From 9b83919815f6a6ce5d73da1c28483970d0ca5589 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 3 Feb 2021 14:22:28 -0600 Subject: added dev/MinGfx/ --- dev/MinGfx/.gitignore | 38 + dev/MinGfx/CMakeLists.txt | 395 + dev/MinGfx/LICENSE.txt | 2 + dev/MinGfx/README.md | 15 + dev/MinGfx/cmake/AutoBuild.cmake | 584 ++ dev/MinGfx/cmake/AutoBuildNanoGUI.cmake | 96 + dev/MinGfx/cmake/AutoBuildOpenGL.cmake | 47 + dev/MinGfx/cmake/MessageMacros.cmake | 17 + dev/MinGfx/cmake/MinGfxConfig.cmake.in | 7 + dev/MinGfx/cmake/Modules/FindDoxygen.cmake | 1166 +++ dev/MinGfx/cmake/Modules/FindNanoGUI.cmake | 62 + dev/MinGfx/data/Futura_Medium_BT.ttf | Bin 0 -> 39762 bytes dev/MinGfx/data/teapot.obj | 8210 ++++++++++++++++++++ dev/MinGfx/data/test.png | Bin 0 -> 923834 bytes dev/MinGfx/doc/Doxyfile.in | 312 + dev/MinGfx/doc/DoxygenLayout.xml | 194 + dev/MinGfx/doc/api.md | 64 + dev/MinGfx/doc/customdoxygen.css | 524 ++ dev/MinGfx/doc/footer.html | 21 + dev/MinGfx/doc/header.html | 55 + dev/MinGfx/doc/index.html | 2 + dev/MinGfx/doc/installation.md | 200 + dev/MinGfx/doc/mainpage.md | 27 + dev/MinGfx/docs/html/aabb_8h.html | 117 + dev/MinGfx/docs/html/aabb_8h_source.html | 185 + dev/MinGfx/docs/html/annotated.html | 119 + dev/MinGfx/docs/html/api.html | 168 + dev/MinGfx/docs/html/api_8md.html | 87 + dev/MinGfx/docs/html/bc_s.png | Bin 0 -> 633 bytes dev/MinGfx/docs/html/bdwn.png | Bin 0 -> 139 bytes dev/MinGfx/docs/html/bvh_8h.html | 111 + dev/MinGfx/docs/html/bvh_8h_source.html | 177 + dev/MinGfx/docs/html/classes.html | 132 + .../docs/html/classmingfx_1_1_a_a_b_b-members.html | 109 + dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b.html | 509 ++ .../docs/html/classmingfx_1_1_b_v_h-members.html | 99 + dev/MinGfx/docs/html/classmingfx_1_1_b_v_h.html | 232 + .../docs/html/classmingfx_1_1_color-members.html | 109 + dev/MinGfx/docs/html/classmingfx_1_1_color.html | 529 ++ .../html/classmingfx_1_1_craft_cam-members.html | 110 + .../docs/html/classmingfx_1_1_craft_cam.html | 541 ++ .../classmingfx_1_1_default_shader-members.html | 105 + .../docs/html/classmingfx_1_1_default_shader.html | 465 ++ ...efault_shader_1_1_light_properties-members.html | 99 + ...fx_1_1_default_shader_1_1_light_properties.html | 214 + ...ult_shader_1_1_material_properties-members.html | 100 + ...1_1_default_shader_1_1_material_properties.html | 232 + .../html/classmingfx_1_1_gfx_math-members.html | 107 + dev/MinGfx/docs/html/classmingfx_1_1_gfx_math.html | 591 ++ .../html/classmingfx_1_1_graphics_app-members.html | 137 + .../docs/html/classmingfx_1_1_graphics_app.html | 1837 +++++ .../docs/html/classmingfx_1_1_matrix4-members.html | 127 + dev/MinGfx/docs/html/classmingfx_1_1_matrix4.html | 1240 +++ .../docs/html/classmingfx_1_1_mesh-members.html | 127 + dev/MinGfx/docs/html/classmingfx_1_1_mesh.html | 1131 +++ .../html/classmingfx_1_1_platform-members.html | 99 + dev/MinGfx/docs/html/classmingfx_1_1_platform.html | 289 + .../docs/html/classmingfx_1_1_point2-members.html | 113 + dev/MinGfx/docs/html/classmingfx_1_1_point2.html | 650 ++ .../docs/html/classmingfx_1_1_point3-members.html | 117 + dev/MinGfx/docs/html/classmingfx_1_1_point3.html | 795 ++ .../html/classmingfx_1_1_quaternion-members.html | 119 + .../docs/html/classmingfx_1_1_quaternion.html | 818 ++ .../html/classmingfx_1_1_quick_shapes-members.html | 111 + .../docs/html/classmingfx_1_1_quick_shapes.html | 844 ++ .../docs/html/classmingfx_1_1_ray-members.html | 110 + dev/MinGfx/docs/html/classmingfx_1_1_ray.html | 689 ++ .../classmingfx_1_1_shader_program-members.html | 127 + .../docs/html/classmingfx_1_1_shader_program.html | 1202 +++ .../html/classmingfx_1_1_text_shader-members.html | 102 + .../docs/html/classmingfx_1_1_text_shader.html | 377 + ...fx_1_1_text_shader_1_1_text_format-members.html | 99 + ...lassmingfx_1_1_text_shader_1_1_text_format.html | 213 + .../html/classmingfx_1_1_texture2_d-members.html | 110 + .../docs/html/classmingfx_1_1_texture2_d.html | 540 ++ .../docs/html/classmingfx_1_1_uni_cam-members.html | 107 + dev/MinGfx/docs/html/classmingfx_1_1_uni_cam.html | 482 ++ .../docs/html/classmingfx_1_1_vector2-members.html | 120 + dev/MinGfx/docs/html/classmingfx_1_1_vector2.html | 841 ++ .../docs/html/classmingfx_1_1_vector3-members.html | 124 + dev/MinGfx/docs/html/classmingfx_1_1_vector3.html | 1018 +++ dev/MinGfx/docs/html/closed.png | Bin 0 -> 125 bytes dev/MinGfx/docs/html/color_8h.html | 119 + dev/MinGfx/docs/html/color_8h_source.html | 177 + dev/MinGfx/docs/html/craft__cam_8h.html | 112 + dev/MinGfx/docs/html/craft__cam_8h_source.html | 211 + dev/MinGfx/docs/html/customdoxygen.css | 524 ++ dev/MinGfx/docs/html/default__shader_8h.html | 122 + .../docs/html/default__shader_8h_source.html | 240 + .../html/dir_68267d1309a1af8e8297ef4c3efbcdba.html | 146 + .../html/dir_e68e8157741866f444e17edd764ebbae.html | 91 + dev/MinGfx/docs/html/doc.png | Bin 0 -> 688 bytes dev/MinGfx/docs/html/doxygen.css | 1793 +++++ dev/MinGfx/docs/html/doxygen.svg | 26 + dev/MinGfx/docs/html/dynsections.js | 128 + dev/MinGfx/docs/html/files.html | 118 + dev/MinGfx/docs/html/folderclosed.png | Bin 0 -> 517 bytes dev/MinGfx/docs/html/folderopen.png | Bin 0 -> 525 bytes dev/MinGfx/docs/html/functions.html | 129 + dev/MinGfx/docs/html/functions_b.html | 99 + dev/MinGfx/docs/html/functions_c.html | 132 + dev/MinGfx/docs/html/functions_d.html | 163 + dev/MinGfx/docs/html/functions_e.html | 94 + dev/MinGfx/docs/html/functions_enum.html | 94 + dev/MinGfx/docs/html/functions_f.html | 126 + dev/MinGfx/docs/html/functions_func.html | 117 + dev/MinGfx/docs/html/functions_func_b.html | 99 + dev/MinGfx/docs/html/functions_func_c.html | 129 + dev/MinGfx/docs/html/functions_func_d.html | 157 + dev/MinGfx/docs/html/functions_func_e.html | 91 + dev/MinGfx/docs/html/functions_func_f.html | 123 + dev/MinGfx/docs/html/functions_func_g.html | 90 + dev/MinGfx/docs/html/functions_func_h.html | 90 + dev/MinGfx/docs/html/functions_func_i.html | 152 + dev/MinGfx/docs/html/functions_func_l.html | 123 + dev/MinGfx/docs/html/functions_func_m.html | 105 + dev/MinGfx/docs/html/functions_func_n.html | 107 + dev/MinGfx/docs/html/functions_func_o.html | 208 + dev/MinGfx/docs/html/functions_func_p.html | 102 + dev/MinGfx/docs/html/functions_func_q.html | 93 + dev/MinGfx/docs/html/functions_func_r.html | 129 + dev/MinGfx/docs/html/functions_func_s.html | 179 + dev/MinGfx/docs/html/functions_func_t.html | 126 + dev/MinGfx/docs/html/functions_func_u.html | 127 + dev/MinGfx/docs/html/functions_func_v.html | 109 + dev/MinGfx/docs/html/functions_func_w.html | 109 + dev/MinGfx/docs/html/functions_func_x.html | 94 + dev/MinGfx/docs/html/functions_func_y.html | 94 + dev/MinGfx/docs/html/functions_func_z.html | 98 + dev/MinGfx/docs/html/functions_func_~.html | 144 + dev/MinGfx/docs/html/functions_g.html | 90 + dev/MinGfx/docs/html/functions_h.html | 106 + dev/MinGfx/docs/html/functions_i.html | 158 + dev/MinGfx/docs/html/functions_l.html | 126 + dev/MinGfx/docs/html/functions_m.html | 108 + dev/MinGfx/docs/html/functions_n.html | 113 + dev/MinGfx/docs/html/functions_o.html | 211 + dev/MinGfx/docs/html/functions_p.html | 108 + dev/MinGfx/docs/html/functions_q.html | 93 + dev/MinGfx/docs/html/functions_r.html | 129 + dev/MinGfx/docs/html/functions_rela.html | 88 + dev/MinGfx/docs/html/functions_s.html | 194 + dev/MinGfx/docs/html/functions_t.html | 129 + dev/MinGfx/docs/html/functions_u.html | 127 + dev/MinGfx/docs/html/functions_v.html | 115 + dev/MinGfx/docs/html/functions_vars.html | 248 + dev/MinGfx/docs/html/functions_w.html | 114 + dev/MinGfx/docs/html/functions_x.html | 96 + dev/MinGfx/docs/html/functions_y.html | 96 + dev/MinGfx/docs/html/functions_z.html | 98 + dev/MinGfx/docs/html/functions_~.html | 144 + dev/MinGfx/docs/html/gfxmath_8h.html | 113 + dev/MinGfx/docs/html/gfxmath_8h_source.html | 172 + dev/MinGfx/docs/html/globals.html | 140 + dev/MinGfx/docs/html/globals_defs.html | 107 + dev/MinGfx/docs/html/globals_eval.html | 94 + dev/MinGfx/docs/html/globals_func.html | 97 + dev/MinGfx/docs/html/globals_type.html | 97 + dev/MinGfx/docs/html/graphics__app_8h.html | 113 + dev/MinGfx/docs/html/graphics__app_8h_source.html | 358 + dev/MinGfx/docs/html/index.html | 120 + dev/MinGfx/docs/html/installation.html | 206 + dev/MinGfx/docs/html/installation_8md.html | 87 + dev/MinGfx/docs/html/jquery.js | 35 + dev/MinGfx/docs/html/mainpage_8md.html | 87 + dev/MinGfx/docs/html/matrix4_8h.html | 139 + dev/MinGfx/docs/html/matrix4_8h_source.html | 286 + dev/MinGfx/docs/html/menu.js | 51 + dev/MinGfx/docs/html/menudata.js | 110 + dev/MinGfx/docs/html/mesh_8h.html | 116 + dev/MinGfx/docs/html/mesh_8h_source.html | 293 + dev/MinGfx/docs/html/mingfx_8h.html | 120 + dev/MinGfx/docs/html/mingfx_8h_source.html | 159 + dev/MinGfx/docs/html/mingfx__config_8h.html | 172 + dev/MinGfx/docs/html/mingfx__config_8h_source.html | 116 + dev/MinGfx/docs/html/namespacemembers.html | 105 + dev/MinGfx/docs/html/namespacemembers_func.html | 105 + dev/MinGfx/docs/html/namespacemingfx.html | 1710 ++++ dev/MinGfx/docs/html/nav_f.png | Bin 0 -> 130 bytes dev/MinGfx/docs/html/nav_g.png | Bin 0 -> 95 bytes dev/MinGfx/docs/html/nav_h.png | Bin 0 -> 87 bytes dev/MinGfx/docs/html/open.png | Bin 0 -> 115 bytes dev/MinGfx/docs/html/opengl__headers_8h.html | 94 + .../docs/html/opengl__headers_8h_source.html | 139 + dev/MinGfx/docs/html/pages.html | 93 + dev/MinGfx/docs/html/platform_8h.html | 111 + dev/MinGfx/docs/html/platform_8h_source.html | 161 + dev/MinGfx/docs/html/point2_8h.html | 144 + dev/MinGfx/docs/html/point2_8h_source.html | 191 + dev/MinGfx/docs/html/point3_8h.html | 145 + dev/MinGfx/docs/html/point3_8h_source.html | 211 + dev/MinGfx/docs/html/quaternion_8h.html | 133 + dev/MinGfx/docs/html/quaternion_8h_source.html | 222 + dev/MinGfx/docs/html/quick__shapes_8h.html | 118 + dev/MinGfx/docs/html/quick__shapes_8h_source.html | 283 + dev/MinGfx/docs/html/ray_8h.html | 122 + dev/MinGfx/docs/html/ray_8h_source.html | 202 + dev/MinGfx/docs/html/search/all_0.html | 37 + dev/MinGfx/docs/html/search/all_0.js | 20 + dev/MinGfx/docs/html/search/all_1.html | 37 + dev/MinGfx/docs/html/search/all_1.js | 8 + dev/MinGfx/docs/html/search/all_10.html | 37 + dev/MinGfx/docs/html/search/all_10.js | 53 + dev/MinGfx/docs/html/search/all_11.html | 37 + dev/MinGfx/docs/html/search/all_11.js | 18 + dev/MinGfx/docs/html/search/all_12.html | 37 + dev/MinGfx/docs/html/search/all_12.js | 16 + dev/MinGfx/docs/html/search/all_13.html | 37 + dev/MinGfx/docs/html/search/all_13.js | 16 + dev/MinGfx/docs/html/search/all_14.html | 37 + dev/MinGfx/docs/html/search/all_14.js | 10 + dev/MinGfx/docs/html/search/all_15.html | 37 + dev/MinGfx/docs/html/search/all_15.js | 4 + dev/MinGfx/docs/html/search/all_16.html | 37 + dev/MinGfx/docs/html/search/all_16.js | 4 + dev/MinGfx/docs/html/search/all_17.html | 37 + dev/MinGfx/docs/html/search/all_17.js | 5 + dev/MinGfx/docs/html/search/all_18.html | 37 + dev/MinGfx/docs/html/search/all_18.js | 22 + dev/MinGfx/docs/html/search/all_2.html | 37 + dev/MinGfx/docs/html/search/all_2.js | 21 + dev/MinGfx/docs/html/search/all_3.html | 37 + dev/MinGfx/docs/html/search/all_3.js | 28 + dev/MinGfx/docs/html/search/all_4.html | 37 + dev/MinGfx/docs/html/search/all_4.js | 5 + dev/MinGfx/docs/html/search/all_5.html | 37 + dev/MinGfx/docs/html/search/all_5.js | 16 + dev/MinGfx/docs/html/search/all_6.html | 37 + dev/MinGfx/docs/html/search/all_6.js | 7 + dev/MinGfx/docs/html/search/all_7.html | 37 + dev/MinGfx/docs/html/search/all_7.js | 12 + dev/MinGfx/docs/html/search/all_8.html | 37 + dev/MinGfx/docs/html/search/all_8.js | 28 + dev/MinGfx/docs/html/search/all_9.html | 37 + dev/MinGfx/docs/html/search/all_9.js | 16 + dev/MinGfx/docs/html/search/all_a.html | 37 + dev/MinGfx/docs/html/search/all_a.js | 22 + dev/MinGfx/docs/html/search/all_b.html | 37 + dev/MinGfx/docs/html/search/all_b.js | 11 + dev/MinGfx/docs/html/search/all_c.html | 37 + dev/MinGfx/docs/html/search/all_c.js | 40 + dev/MinGfx/docs/html/search/all_d.html | 37 + dev/MinGfx/docs/html/search/all_d.js | 14 + dev/MinGfx/docs/html/search/all_e.html | 37 + dev/MinGfx/docs/html/search/all_e.js | 7 + dev/MinGfx/docs/html/search/all_f.html | 37 + dev/MinGfx/docs/html/search/all_f.js | 18 + dev/MinGfx/docs/html/search/classes_0.html | 37 + dev/MinGfx/docs/html/search/classes_0.js | 4 + dev/MinGfx/docs/html/search/classes_1.html | 37 + dev/MinGfx/docs/html/search/classes_1.js | 4 + dev/MinGfx/docs/html/search/classes_2.html | 37 + dev/MinGfx/docs/html/search/classes_2.js | 5 + dev/MinGfx/docs/html/search/classes_3.html | 37 + dev/MinGfx/docs/html/search/classes_3.js | 4 + dev/MinGfx/docs/html/search/classes_4.html | 37 + dev/MinGfx/docs/html/search/classes_4.js | 5 + dev/MinGfx/docs/html/search/classes_5.html | 37 + dev/MinGfx/docs/html/search/classes_5.js | 4 + dev/MinGfx/docs/html/search/classes_6.html | 37 + dev/MinGfx/docs/html/search/classes_6.js | 6 + dev/MinGfx/docs/html/search/classes_7.html | 37 + dev/MinGfx/docs/html/search/classes_7.js | 6 + dev/MinGfx/docs/html/search/classes_8.html | 37 + dev/MinGfx/docs/html/search/classes_8.js | 5 + dev/MinGfx/docs/html/search/classes_9.html | 37 + dev/MinGfx/docs/html/search/classes_9.js | 4 + dev/MinGfx/docs/html/search/classes_a.html | 37 + dev/MinGfx/docs/html/search/classes_a.js | 7 + dev/MinGfx/docs/html/search/classes_b.html | 37 + dev/MinGfx/docs/html/search/classes_b.js | 6 + dev/MinGfx/docs/html/search/classes_c.html | 37 + dev/MinGfx/docs/html/search/classes_c.js | 4 + dev/MinGfx/docs/html/search/classes_d.html | 37 + dev/MinGfx/docs/html/search/classes_d.js | 5 + dev/MinGfx/docs/html/search/close.svg | 31 + dev/MinGfx/docs/html/search/defines_0.html | 37 + dev/MinGfx/docs/html/search/defines_0.js | 8 + dev/MinGfx/docs/html/search/defines_1.html | 37 + dev/MinGfx/docs/html/search/defines_1.js | 5 + dev/MinGfx/docs/html/search/enums_0.html | 37 + dev/MinGfx/docs/html/search/enums_0.js | 4 + dev/MinGfx/docs/html/search/enums_1.html | 37 + dev/MinGfx/docs/html/search/enums_1.js | 4 + dev/MinGfx/docs/html/search/enums_2.html | 37 + dev/MinGfx/docs/html/search/enums_2.js | 4 + dev/MinGfx/docs/html/search/enumvalues_0.html | 37 + dev/MinGfx/docs/html/search/enumvalues_0.js | 6 + dev/MinGfx/docs/html/search/enumvalues_1.html | 37 + dev/MinGfx/docs/html/search/enumvalues_1.js | 6 + dev/MinGfx/docs/html/search/enumvalues_2.html | 37 + dev/MinGfx/docs/html/search/enumvalues_2.js | 6 + dev/MinGfx/docs/html/search/enumvalues_3.html | 37 + dev/MinGfx/docs/html/search/enumvalues_3.js | 7 + dev/MinGfx/docs/html/search/files_0.html | 37 + dev/MinGfx/docs/html/search/files_0.js | 5 + dev/MinGfx/docs/html/search/files_1.html | 37 + dev/MinGfx/docs/html/search/files_1.js | 4 + dev/MinGfx/docs/html/search/files_2.html | 37 + dev/MinGfx/docs/html/search/files_2.js | 5 + dev/MinGfx/docs/html/search/files_3.html | 37 + dev/MinGfx/docs/html/search/files_3.js | 4 + dev/MinGfx/docs/html/search/files_4.html | 37 + dev/MinGfx/docs/html/search/files_4.js | 5 + dev/MinGfx/docs/html/search/files_5.html | 37 + dev/MinGfx/docs/html/search/files_5.js | 4 + dev/MinGfx/docs/html/search/files_6.html | 37 + dev/MinGfx/docs/html/search/files_6.js | 8 + dev/MinGfx/docs/html/search/files_7.html | 37 + dev/MinGfx/docs/html/search/files_7.js | 4 + dev/MinGfx/docs/html/search/files_8.html | 37 + dev/MinGfx/docs/html/search/files_8.js | 6 + dev/MinGfx/docs/html/search/files_9.html | 37 + dev/MinGfx/docs/html/search/files_9.js | 5 + dev/MinGfx/docs/html/search/files_a.html | 37 + dev/MinGfx/docs/html/search/files_a.js | 4 + dev/MinGfx/docs/html/search/files_b.html | 37 + dev/MinGfx/docs/html/search/files_b.js | 5 + dev/MinGfx/docs/html/search/files_c.html | 37 + dev/MinGfx/docs/html/search/files_c.js | 5 + dev/MinGfx/docs/html/search/files_d.html | 37 + dev/MinGfx/docs/html/search/files_d.js | 4 + dev/MinGfx/docs/html/search/files_e.html | 37 + dev/MinGfx/docs/html/search/files_e.js | 5 + dev/MinGfx/docs/html/search/functions_0.html | 37 + dev/MinGfx/docs/html/search/functions_0.js | 13 + dev/MinGfx/docs/html/search/functions_1.html | 37 + dev/MinGfx/docs/html/search/functions_1.js | 7 + dev/MinGfx/docs/html/search/functions_10.html | 37 + dev/MinGfx/docs/html/search/functions_10.js | 37 + dev/MinGfx/docs/html/search/functions_11.html | 37 + dev/MinGfx/docs/html/search/functions_11.js | 15 + dev/MinGfx/docs/html/search/functions_12.html | 37 + dev/MinGfx/docs/html/search/functions_12.js | 15 + dev/MinGfx/docs/html/search/functions_13.html | 37 + dev/MinGfx/docs/html/search/functions_13.js | 8 + dev/MinGfx/docs/html/search/functions_14.html | 37 + dev/MinGfx/docs/html/search/functions_14.js | 9 + dev/MinGfx/docs/html/search/functions_15.html | 37 + dev/MinGfx/docs/html/search/functions_15.js | 4 + dev/MinGfx/docs/html/search/functions_16.html | 37 + dev/MinGfx/docs/html/search/functions_16.js | 4 + dev/MinGfx/docs/html/search/functions_17.html | 37 + dev/MinGfx/docs/html/search/functions_17.js | 5 + dev/MinGfx/docs/html/search/functions_18.html | 37 + dev/MinGfx/docs/html/search/functions_18.js | 22 + dev/MinGfx/docs/html/search/functions_2.html | 37 + dev/MinGfx/docs/html/search/functions_2.js | 17 + dev/MinGfx/docs/html/search/functions_3.html | 37 + dev/MinGfx/docs/html/search/functions_3.js | 25 + dev/MinGfx/docs/html/search/functions_4.html | 37 + dev/MinGfx/docs/html/search/functions_4.js | 4 + dev/MinGfx/docs/html/search/functions_5.html | 37 + dev/MinGfx/docs/html/search/functions_5.js | 15 + dev/MinGfx/docs/html/search/functions_6.html | 37 + dev/MinGfx/docs/html/search/functions_6.js | 4 + dev/MinGfx/docs/html/search/functions_7.html | 37 + dev/MinGfx/docs/html/search/functions_7.js | 4 + dev/MinGfx/docs/html/search/functions_8.html | 37 + dev/MinGfx/docs/html/search/functions_8.js | 24 + dev/MinGfx/docs/html/search/functions_9.html | 37 + dev/MinGfx/docs/html/search/functions_9.js | 12 + dev/MinGfx/docs/html/search/functions_a.html | 37 + dev/MinGfx/docs/html/search/functions_a.js | 9 + dev/MinGfx/docs/html/search/functions_b.html | 37 + dev/MinGfx/docs/html/search/functions_b.js | 9 + dev/MinGfx/docs/html/search/functions_c.html | 37 + dev/MinGfx/docs/html/search/functions_c.js | 39 + dev/MinGfx/docs/html/search/functions_d.html | 37 + dev/MinGfx/docs/html/search/functions_d.js | 8 + dev/MinGfx/docs/html/search/functions_e.html | 37 + dev/MinGfx/docs/html/search/functions_e.js | 5 + dev/MinGfx/docs/html/search/functions_f.html | 37 + dev/MinGfx/docs/html/search/functions_f.js | 17 + dev/MinGfx/docs/html/search/mag_sel.svg | 74 + dev/MinGfx/docs/html/search/namespaces_0.html | 37 + dev/MinGfx/docs/html/search/namespaces_0.js | 4 + dev/MinGfx/docs/html/search/nomatches.html | 13 + dev/MinGfx/docs/html/search/pages_0.html | 37 + dev/MinGfx/docs/html/search/pages_0.js | 4 + dev/MinGfx/docs/html/search/pages_1.html | 37 + dev/MinGfx/docs/html/search/pages_1.js | 4 + dev/MinGfx/docs/html/search/pages_2.html | 37 + dev/MinGfx/docs/html/search/pages_2.js | 4 + dev/MinGfx/docs/html/search/related_0.html | 37 + dev/MinGfx/docs/html/search/related_0.js | 4 + dev/MinGfx/docs/html/search/search.css | 257 + dev/MinGfx/docs/html/search/search.js | 816 ++ dev/MinGfx/docs/html/search/search_l.png | Bin 0 -> 567 bytes dev/MinGfx/docs/html/search/search_m.png | Bin 0 -> 158 bytes dev/MinGfx/docs/html/search/search_r.png | Bin 0 -> 553 bytes dev/MinGfx/docs/html/search/searchdata.js | 48 + dev/MinGfx/docs/html/search/typedefs_0.html | 37 + dev/MinGfx/docs/html/search/typedefs_0.js | 7 + dev/MinGfx/docs/html/search/variables_0.html | 37 + dev/MinGfx/docs/html/search/variables_0.js | 7 + dev/MinGfx/docs/html/search/variables_1.html | 37 + dev/MinGfx/docs/html/search/variables_1.js | 4 + dev/MinGfx/docs/html/search/variables_2.html | 37 + dev/MinGfx/docs/html/search/variables_2.js | 5 + dev/MinGfx/docs/html/search/variables_3.html | 37 + dev/MinGfx/docs/html/search/variables_3.js | 4 + dev/MinGfx/docs/html/search/variables_4.html | 37 + dev/MinGfx/docs/html/search/variables_4.js | 4 + dev/MinGfx/docs/html/search/variables_5.html | 37 + dev/MinGfx/docs/html/search/variables_5.js | 8 + dev/MinGfx/docs/html/search/variables_6.html | 37 + dev/MinGfx/docs/html/search/variables_6.js | 5 + dev/MinGfx/docs/html/search/variables_7.html | 37 + dev/MinGfx/docs/html/search/variables_7.js | 4 + dev/MinGfx/docs/html/search/variables_8.html | 37 + dev/MinGfx/docs/html/search/variables_8.js | 5 + dev/MinGfx/docs/html/search/variables_9.html | 37 + dev/MinGfx/docs/html/search/variables_9.js | 5 + dev/MinGfx/docs/html/search/variables_a.html | 37 + dev/MinGfx/docs/html/search/variables_a.js | 8 + dev/MinGfx/docs/html/search/variables_b.html | 37 + dev/MinGfx/docs/html/search/variables_b.js | 4 + dev/MinGfx/docs/html/search/variables_c.html | 37 + dev/MinGfx/docs/html/search/variables_c.js | 4 + dev/MinGfx/docs/html/search/variables_d.html | 37 + dev/MinGfx/docs/html/search/variables_d.js | 6 + dev/MinGfx/docs/html/search/variables_e.html | 37 + dev/MinGfx/docs/html/search/variables_e.js | 4 + dev/MinGfx/docs/html/search/variables_f.html | 37 + dev/MinGfx/docs/html/search/variables_f.js | 4 + dev/MinGfx/docs/html/shader__program_8h.html | 119 + .../docs/html/shader__program_8h_source.html | 274 + dev/MinGfx/docs/html/splitbar.png | Bin 0 -> 283 bytes dev/MinGfx/docs/html/stb__rect__pack_8h.html | 403 + .../docs/html/stb__rect__pack_8h_source.html | 742 ++ .../docs/html/structstbrp__context-members.html | 99 + dev/MinGfx/docs/html/structstbrp__context.html | 265 + .../docs/html/structstbrp__node-members.html | 93 + dev/MinGfx/docs/html/structstbrp__node.html | 157 + .../docs/html/structstbrp__rect-members.html | 96 + dev/MinGfx/docs/html/structstbrp__rect.html | 211 + dev/MinGfx/docs/html/sync_off.png | Bin 0 -> 814 bytes dev/MinGfx/docs/html/sync_on.png | Bin 0 -> 810 bytes dev/MinGfx/docs/html/tab_a.png | Bin 0 -> 124 bytes dev/MinGfx/docs/html/tab_b.png | Bin 0 -> 142 bytes dev/MinGfx/docs/html/tab_h.png | Bin 0 -> 147 bytes dev/MinGfx/docs/html/tab_s.png | Bin 0 -> 161 bytes dev/MinGfx/docs/html/tabs.css | 1 + dev/MinGfx/docs/html/text__shader_8h.html | 117 + dev/MinGfx/docs/html/text__shader_8h_source.html | 229 + dev/MinGfx/docs/html/texture2d_8h.html | 112 + dev/MinGfx/docs/html/texture2d_8h_source.html | 195 + dev/MinGfx/docs/html/unicam_8h.html | 114 + dev/MinGfx/docs/html/unicam_8h_source.html | 234 + dev/MinGfx/docs/html/vector2_8h.html | 149 + dev/MinGfx/docs/html/vector2_8h_source.html | 261 + dev/MinGfx/docs/html/vector3_8h.html | 149 + dev/MinGfx/docs/html/vector3_8h_source.html | 275 + dev/MinGfx/docs/index.html | 2 + dev/MinGfx/example/CMakeLists.txt | 166 + dev/MinGfx/example/CircleViewer.cpp | 122 + dev/MinGfx/example/CircleViewer.h | 77 + dev/MinGfx/example/cmake/AutoBuild.cmake | 541 ++ dev/MinGfx/example/cmake/AutoBuildOpenGL.cmake | 47 + dev/MinGfx/example/cmake/MessageMacros.cmake | 17 + dev/MinGfx/example/main-circleviewer.cpp | 12 + dev/MinGfx/src/.gitignore | 2 + dev/MinGfx/src/CMakeLists.txt | 107 + dev/MinGfx/src/aabb.cc | 150 + dev/MinGfx/src/aabb.h | 96 + dev/MinGfx/src/bvh.cc | 120 + dev/MinGfx/src/bvh.h | 106 + dev/MinGfx/src/color.cc | 130 + dev/MinGfx/src/color.h | 103 + dev/MinGfx/src/craft_cam.cc | 127 + dev/MinGfx/src/craft_cam.h | 219 + dev/MinGfx/src/default_shader.cc | 168 + dev/MinGfx/src/default_shader.h | 168 + dev/MinGfx/src/gfxmath.cc | 82 + dev/MinGfx/src/gfxmath.h | 81 + dev/MinGfx/src/graphics_app.cc | 467 ++ dev/MinGfx/src/graphics_app.h | 481 ++ dev/MinGfx/src/matrix4.cc | 445 ++ dev/MinGfx/src/matrix4.h | 260 + dev/MinGfx/src/mesh.cc | 651 ++ dev/MinGfx/src/mesh.h | 337 + dev/MinGfx/src/mingfx.h | 46 + dev/MinGfx/src/mingfx_config.h.in | 25 + dev/MinGfx/src/opengl_headers.h | 48 + dev/MinGfx/src/platform.cc | 78 + dev/MinGfx/src/platform.h | 83 + dev/MinGfx/src/point2.cc | 104 + dev/MinGfx/src/point2.h | 112 + dev/MinGfx/src/point3.cc | 144 + dev/MinGfx/src/point3.h | 154 + dev/MinGfx/src/quaternion.cc | 260 + dev/MinGfx/src/quaternion.h | 142 + dev/MinGfx/src/quick_shapes.cc | 727 ++ dev/MinGfx/src/quick_shapes.h | 254 + dev/MinGfx/src/ray.cc | 313 + dev/MinGfx/src/ray.h | 167 + dev/MinGfx/src/shader_program.cc | 389 + dev/MinGfx/src/shader_program.h | 238 + dev/MinGfx/src/shaders/default.frag | 76 + dev/MinGfx/src/shaders/default.vert | 39 + dev/MinGfx/src/shaders/fullscreen.frag | 23 + dev/MinGfx/src/shaders/fullscreen.vert | 24 + dev/MinGfx/src/shaders/text.frag | 25 + dev/MinGfx/src/shaders/text.vert | 28 + dev/MinGfx/src/stb_rect_pack.h | 624 ++ dev/MinGfx/src/text_shader.cc | 238 + dev/MinGfx/src/text_shader.h | 110 + dev/MinGfx/src/texture2d.cc | 232 + dev/MinGfx/src/texture2d.h | 139 + dev/MinGfx/src/unicam.cc | 317 + dev/MinGfx/src/unicam.h | 256 + dev/MinGfx/src/vector2.cc | 185 + dev/MinGfx/src/vector2.h | 186 + dev/MinGfx/src/vector3.cc | 206 + dev/MinGfx/src/vector3.h | 273 + dev/MinGfx/tests/blank_window/CMakeLists.txt | 41 + dev/MinGfx/tests/blank_window/main.cc | 25 + dev/MinGfx/tests/gui_plus_opengl/CMakeLists.txt | 44 + .../tests/gui_plus_opengl/gui_plus_opengl.cc | 374 + dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.h | 96 + dev/MinGfx/tests/gui_plus_opengl/main.cc | 25 + 522 files changed, 72917 insertions(+) create mode 100644 dev/MinGfx/.gitignore create mode 100644 dev/MinGfx/CMakeLists.txt create mode 100644 dev/MinGfx/LICENSE.txt create mode 100644 dev/MinGfx/README.md create mode 100644 dev/MinGfx/cmake/AutoBuild.cmake create mode 100644 dev/MinGfx/cmake/AutoBuildNanoGUI.cmake create mode 100644 dev/MinGfx/cmake/AutoBuildOpenGL.cmake create mode 100644 dev/MinGfx/cmake/MessageMacros.cmake create mode 100644 dev/MinGfx/cmake/MinGfxConfig.cmake.in create mode 100644 dev/MinGfx/cmake/Modules/FindDoxygen.cmake create mode 100644 dev/MinGfx/cmake/Modules/FindNanoGUI.cmake create mode 100644 dev/MinGfx/data/Futura_Medium_BT.ttf create mode 100644 dev/MinGfx/data/teapot.obj create mode 100644 dev/MinGfx/data/test.png create mode 100644 dev/MinGfx/doc/Doxyfile.in create mode 100644 dev/MinGfx/doc/DoxygenLayout.xml create mode 100644 dev/MinGfx/doc/api.md create mode 100644 dev/MinGfx/doc/customdoxygen.css create mode 100644 dev/MinGfx/doc/footer.html create mode 100644 dev/MinGfx/doc/header.html create mode 100644 dev/MinGfx/doc/index.html create mode 100644 dev/MinGfx/doc/installation.md create mode 100644 dev/MinGfx/doc/mainpage.md create mode 100644 dev/MinGfx/docs/html/aabb_8h.html create mode 100644 dev/MinGfx/docs/html/aabb_8h_source.html create mode 100644 dev/MinGfx/docs/html/annotated.html create mode 100644 dev/MinGfx/docs/html/api.html create mode 100644 dev/MinGfx/docs/html/api_8md.html create mode 100644 dev/MinGfx/docs/html/bc_s.png create mode 100644 dev/MinGfx/docs/html/bdwn.png create mode 100644 dev/MinGfx/docs/html/bvh_8h.html create mode 100644 dev/MinGfx/docs/html/bvh_8h_source.html create mode 100644 dev/MinGfx/docs/html/classes.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_b_v_h-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_b_v_h.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_color-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_color.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_craft_cam-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_gfx_math-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_gfx_math.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_graphics_app-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_graphics_app.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_matrix4-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_matrix4.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_mesh-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_mesh.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_platform-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_platform.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_point2-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_point2.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_point3-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_point3.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_quaternion-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_quaternion.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_ray-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_ray.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_shader_program-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_shader_program.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_text_shader-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_text_shader.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_texture2_d-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_texture2_d.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_uni_cam-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_uni_cam.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_vector2-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_vector2.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_vector3-members.html create mode 100644 dev/MinGfx/docs/html/classmingfx_1_1_vector3.html create mode 100644 dev/MinGfx/docs/html/closed.png create mode 100644 dev/MinGfx/docs/html/color_8h.html create mode 100644 dev/MinGfx/docs/html/color_8h_source.html create mode 100644 dev/MinGfx/docs/html/craft__cam_8h.html create mode 100644 dev/MinGfx/docs/html/craft__cam_8h_source.html create mode 100644 dev/MinGfx/docs/html/customdoxygen.css create mode 100644 dev/MinGfx/docs/html/default__shader_8h.html create mode 100644 dev/MinGfx/docs/html/default__shader_8h_source.html create mode 100644 dev/MinGfx/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html create mode 100644 dev/MinGfx/docs/html/dir_e68e8157741866f444e17edd764ebbae.html create mode 100644 dev/MinGfx/docs/html/doc.png create mode 100644 dev/MinGfx/docs/html/doxygen.css create mode 100644 dev/MinGfx/docs/html/doxygen.svg create mode 100644 dev/MinGfx/docs/html/dynsections.js create mode 100644 dev/MinGfx/docs/html/files.html create mode 100644 dev/MinGfx/docs/html/folderclosed.png create mode 100644 dev/MinGfx/docs/html/folderopen.png create mode 100644 dev/MinGfx/docs/html/functions.html create mode 100644 dev/MinGfx/docs/html/functions_b.html create mode 100644 dev/MinGfx/docs/html/functions_c.html create mode 100644 dev/MinGfx/docs/html/functions_d.html create mode 100644 dev/MinGfx/docs/html/functions_e.html create mode 100644 dev/MinGfx/docs/html/functions_enum.html create mode 100644 dev/MinGfx/docs/html/functions_f.html create mode 100644 dev/MinGfx/docs/html/functions_func.html create mode 100644 dev/MinGfx/docs/html/functions_func_b.html create mode 100644 dev/MinGfx/docs/html/functions_func_c.html create mode 100644 dev/MinGfx/docs/html/functions_func_d.html create mode 100644 dev/MinGfx/docs/html/functions_func_e.html create mode 100644 dev/MinGfx/docs/html/functions_func_f.html create mode 100644 dev/MinGfx/docs/html/functions_func_g.html create mode 100644 dev/MinGfx/docs/html/functions_func_h.html create mode 100644 dev/MinGfx/docs/html/functions_func_i.html create mode 100644 dev/MinGfx/docs/html/functions_func_l.html create mode 100644 dev/MinGfx/docs/html/functions_func_m.html create mode 100644 dev/MinGfx/docs/html/functions_func_n.html create mode 100644 dev/MinGfx/docs/html/functions_func_o.html create mode 100644 dev/MinGfx/docs/html/functions_func_p.html create mode 100644 dev/MinGfx/docs/html/functions_func_q.html create mode 100644 dev/MinGfx/docs/html/functions_func_r.html create mode 100644 dev/MinGfx/docs/html/functions_func_s.html create mode 100644 dev/MinGfx/docs/html/functions_func_t.html create mode 100644 dev/MinGfx/docs/html/functions_func_u.html create mode 100644 dev/MinGfx/docs/html/functions_func_v.html create mode 100644 dev/MinGfx/docs/html/functions_func_w.html create mode 100644 dev/MinGfx/docs/html/functions_func_x.html create mode 100644 dev/MinGfx/docs/html/functions_func_y.html create mode 100644 dev/MinGfx/docs/html/functions_func_z.html create mode 100644 dev/MinGfx/docs/html/functions_func_~.html create mode 100644 dev/MinGfx/docs/html/functions_g.html create mode 100644 dev/MinGfx/docs/html/functions_h.html create mode 100644 dev/MinGfx/docs/html/functions_i.html create mode 100644 dev/MinGfx/docs/html/functions_l.html create mode 100644 dev/MinGfx/docs/html/functions_m.html create mode 100644 dev/MinGfx/docs/html/functions_n.html create mode 100644 dev/MinGfx/docs/html/functions_o.html create mode 100644 dev/MinGfx/docs/html/functions_p.html create mode 100644 dev/MinGfx/docs/html/functions_q.html create mode 100644 dev/MinGfx/docs/html/functions_r.html create mode 100644 dev/MinGfx/docs/html/functions_rela.html create mode 100644 dev/MinGfx/docs/html/functions_s.html create mode 100644 dev/MinGfx/docs/html/functions_t.html create mode 100644 dev/MinGfx/docs/html/functions_u.html create mode 100644 dev/MinGfx/docs/html/functions_v.html create mode 100644 dev/MinGfx/docs/html/functions_vars.html create mode 100644 dev/MinGfx/docs/html/functions_w.html create mode 100644 dev/MinGfx/docs/html/functions_x.html create mode 100644 dev/MinGfx/docs/html/functions_y.html create mode 100644 dev/MinGfx/docs/html/functions_z.html create mode 100644 dev/MinGfx/docs/html/functions_~.html create mode 100644 dev/MinGfx/docs/html/gfxmath_8h.html create mode 100644 dev/MinGfx/docs/html/gfxmath_8h_source.html create mode 100644 dev/MinGfx/docs/html/globals.html create mode 100644 dev/MinGfx/docs/html/globals_defs.html create mode 100644 dev/MinGfx/docs/html/globals_eval.html create mode 100644 dev/MinGfx/docs/html/globals_func.html create mode 100644 dev/MinGfx/docs/html/globals_type.html create mode 100644 dev/MinGfx/docs/html/graphics__app_8h.html create mode 100644 dev/MinGfx/docs/html/graphics__app_8h_source.html create mode 100644 dev/MinGfx/docs/html/index.html create mode 100644 dev/MinGfx/docs/html/installation.html create mode 100644 dev/MinGfx/docs/html/installation_8md.html create mode 100644 dev/MinGfx/docs/html/jquery.js create mode 100644 dev/MinGfx/docs/html/mainpage_8md.html create mode 100644 dev/MinGfx/docs/html/matrix4_8h.html create mode 100644 dev/MinGfx/docs/html/matrix4_8h_source.html create mode 100644 dev/MinGfx/docs/html/menu.js create mode 100644 dev/MinGfx/docs/html/menudata.js create mode 100644 dev/MinGfx/docs/html/mesh_8h.html create mode 100644 dev/MinGfx/docs/html/mesh_8h_source.html create mode 100644 dev/MinGfx/docs/html/mingfx_8h.html create mode 100644 dev/MinGfx/docs/html/mingfx_8h_source.html create mode 100644 dev/MinGfx/docs/html/mingfx__config_8h.html create mode 100644 dev/MinGfx/docs/html/mingfx__config_8h_source.html create mode 100644 dev/MinGfx/docs/html/namespacemembers.html create mode 100644 dev/MinGfx/docs/html/namespacemembers_func.html create mode 100644 dev/MinGfx/docs/html/namespacemingfx.html create mode 100644 dev/MinGfx/docs/html/nav_f.png create mode 100644 dev/MinGfx/docs/html/nav_g.png create mode 100644 dev/MinGfx/docs/html/nav_h.png create mode 100644 dev/MinGfx/docs/html/open.png create mode 100644 dev/MinGfx/docs/html/opengl__headers_8h.html create mode 100644 dev/MinGfx/docs/html/opengl__headers_8h_source.html create mode 100644 dev/MinGfx/docs/html/pages.html create mode 100644 dev/MinGfx/docs/html/platform_8h.html create mode 100644 dev/MinGfx/docs/html/platform_8h_source.html create mode 100644 dev/MinGfx/docs/html/point2_8h.html create mode 100644 dev/MinGfx/docs/html/point2_8h_source.html create mode 100644 dev/MinGfx/docs/html/point3_8h.html create mode 100644 dev/MinGfx/docs/html/point3_8h_source.html create mode 100644 dev/MinGfx/docs/html/quaternion_8h.html create mode 100644 dev/MinGfx/docs/html/quaternion_8h_source.html create mode 100644 dev/MinGfx/docs/html/quick__shapes_8h.html create mode 100644 dev/MinGfx/docs/html/quick__shapes_8h_source.html create mode 100644 dev/MinGfx/docs/html/ray_8h.html create mode 100644 dev/MinGfx/docs/html/ray_8h_source.html create mode 100644 dev/MinGfx/docs/html/search/all_0.html create mode 100644 dev/MinGfx/docs/html/search/all_0.js create mode 100644 dev/MinGfx/docs/html/search/all_1.html create mode 100644 dev/MinGfx/docs/html/search/all_1.js create mode 100644 dev/MinGfx/docs/html/search/all_10.html create mode 100644 dev/MinGfx/docs/html/search/all_10.js create mode 100644 dev/MinGfx/docs/html/search/all_11.html create mode 100644 dev/MinGfx/docs/html/search/all_11.js create mode 100644 dev/MinGfx/docs/html/search/all_12.html create mode 100644 dev/MinGfx/docs/html/search/all_12.js create mode 100644 dev/MinGfx/docs/html/search/all_13.html create mode 100644 dev/MinGfx/docs/html/search/all_13.js create mode 100644 dev/MinGfx/docs/html/search/all_14.html create mode 100644 dev/MinGfx/docs/html/search/all_14.js create mode 100644 dev/MinGfx/docs/html/search/all_15.html create mode 100644 dev/MinGfx/docs/html/search/all_15.js create mode 100644 dev/MinGfx/docs/html/search/all_16.html create mode 100644 dev/MinGfx/docs/html/search/all_16.js create mode 100644 dev/MinGfx/docs/html/search/all_17.html create mode 100644 dev/MinGfx/docs/html/search/all_17.js create mode 100644 dev/MinGfx/docs/html/search/all_18.html create mode 100644 dev/MinGfx/docs/html/search/all_18.js create mode 100644 dev/MinGfx/docs/html/search/all_2.html create mode 100644 dev/MinGfx/docs/html/search/all_2.js create mode 100644 dev/MinGfx/docs/html/search/all_3.html create mode 100644 dev/MinGfx/docs/html/search/all_3.js create mode 100644 dev/MinGfx/docs/html/search/all_4.html create mode 100644 dev/MinGfx/docs/html/search/all_4.js create mode 100644 dev/MinGfx/docs/html/search/all_5.html create mode 100644 dev/MinGfx/docs/html/search/all_5.js create mode 100644 dev/MinGfx/docs/html/search/all_6.html create mode 100644 dev/MinGfx/docs/html/search/all_6.js create mode 100644 dev/MinGfx/docs/html/search/all_7.html create mode 100644 dev/MinGfx/docs/html/search/all_7.js create mode 100644 dev/MinGfx/docs/html/search/all_8.html create mode 100644 dev/MinGfx/docs/html/search/all_8.js create mode 100644 dev/MinGfx/docs/html/search/all_9.html create mode 100644 dev/MinGfx/docs/html/search/all_9.js create mode 100644 dev/MinGfx/docs/html/search/all_a.html create mode 100644 dev/MinGfx/docs/html/search/all_a.js create mode 100644 dev/MinGfx/docs/html/search/all_b.html create mode 100644 dev/MinGfx/docs/html/search/all_b.js create mode 100644 dev/MinGfx/docs/html/search/all_c.html create mode 100644 dev/MinGfx/docs/html/search/all_c.js create mode 100644 dev/MinGfx/docs/html/search/all_d.html create mode 100644 dev/MinGfx/docs/html/search/all_d.js create mode 100644 dev/MinGfx/docs/html/search/all_e.html create mode 100644 dev/MinGfx/docs/html/search/all_e.js create mode 100644 dev/MinGfx/docs/html/search/all_f.html create mode 100644 dev/MinGfx/docs/html/search/all_f.js create mode 100644 dev/MinGfx/docs/html/search/classes_0.html create mode 100644 dev/MinGfx/docs/html/search/classes_0.js create mode 100644 dev/MinGfx/docs/html/search/classes_1.html create mode 100644 dev/MinGfx/docs/html/search/classes_1.js create mode 100644 dev/MinGfx/docs/html/search/classes_2.html create mode 100644 dev/MinGfx/docs/html/search/classes_2.js create mode 100644 dev/MinGfx/docs/html/search/classes_3.html create mode 100644 dev/MinGfx/docs/html/search/classes_3.js create mode 100644 dev/MinGfx/docs/html/search/classes_4.html create mode 100644 dev/MinGfx/docs/html/search/classes_4.js create mode 100644 dev/MinGfx/docs/html/search/classes_5.html create mode 100644 dev/MinGfx/docs/html/search/classes_5.js create mode 100644 dev/MinGfx/docs/html/search/classes_6.html create mode 100644 dev/MinGfx/docs/html/search/classes_6.js create mode 100644 dev/MinGfx/docs/html/search/classes_7.html create mode 100644 dev/MinGfx/docs/html/search/classes_7.js create mode 100644 dev/MinGfx/docs/html/search/classes_8.html create mode 100644 dev/MinGfx/docs/html/search/classes_8.js create mode 100644 dev/MinGfx/docs/html/search/classes_9.html create mode 100644 dev/MinGfx/docs/html/search/classes_9.js create mode 100644 dev/MinGfx/docs/html/search/classes_a.html create mode 100644 dev/MinGfx/docs/html/search/classes_a.js create mode 100644 dev/MinGfx/docs/html/search/classes_b.html create mode 100644 dev/MinGfx/docs/html/search/classes_b.js create mode 100644 dev/MinGfx/docs/html/search/classes_c.html create mode 100644 dev/MinGfx/docs/html/search/classes_c.js create mode 100644 dev/MinGfx/docs/html/search/classes_d.html create mode 100644 dev/MinGfx/docs/html/search/classes_d.js create mode 100644 dev/MinGfx/docs/html/search/close.svg create mode 100644 dev/MinGfx/docs/html/search/defines_0.html create mode 100644 dev/MinGfx/docs/html/search/defines_0.js create mode 100644 dev/MinGfx/docs/html/search/defines_1.html create mode 100644 dev/MinGfx/docs/html/search/defines_1.js create mode 100644 dev/MinGfx/docs/html/search/enums_0.html create mode 100644 dev/MinGfx/docs/html/search/enums_0.js create mode 100644 dev/MinGfx/docs/html/search/enums_1.html create mode 100644 dev/MinGfx/docs/html/search/enums_1.js create mode 100644 dev/MinGfx/docs/html/search/enums_2.html create mode 100644 dev/MinGfx/docs/html/search/enums_2.js create mode 100644 dev/MinGfx/docs/html/search/enumvalues_0.html create mode 100644 dev/MinGfx/docs/html/search/enumvalues_0.js create mode 100644 dev/MinGfx/docs/html/search/enumvalues_1.html create mode 100644 dev/MinGfx/docs/html/search/enumvalues_1.js create mode 100644 dev/MinGfx/docs/html/search/enumvalues_2.html create mode 100644 dev/MinGfx/docs/html/search/enumvalues_2.js create mode 100644 dev/MinGfx/docs/html/search/enumvalues_3.html create mode 100644 dev/MinGfx/docs/html/search/enumvalues_3.js create mode 100644 dev/MinGfx/docs/html/search/files_0.html create mode 100644 dev/MinGfx/docs/html/search/files_0.js create mode 100644 dev/MinGfx/docs/html/search/files_1.html create mode 100644 dev/MinGfx/docs/html/search/files_1.js create mode 100644 dev/MinGfx/docs/html/search/files_2.html create mode 100644 dev/MinGfx/docs/html/search/files_2.js create mode 100644 dev/MinGfx/docs/html/search/files_3.html create mode 100644 dev/MinGfx/docs/html/search/files_3.js create mode 100644 dev/MinGfx/docs/html/search/files_4.html create mode 100644 dev/MinGfx/docs/html/search/files_4.js create mode 100644 dev/MinGfx/docs/html/search/files_5.html create mode 100644 dev/MinGfx/docs/html/search/files_5.js create mode 100644 dev/MinGfx/docs/html/search/files_6.html create mode 100644 dev/MinGfx/docs/html/search/files_6.js create mode 100644 dev/MinGfx/docs/html/search/files_7.html create mode 100644 dev/MinGfx/docs/html/search/files_7.js create mode 100644 dev/MinGfx/docs/html/search/files_8.html create mode 100644 dev/MinGfx/docs/html/search/files_8.js create mode 100644 dev/MinGfx/docs/html/search/files_9.html create mode 100644 dev/MinGfx/docs/html/search/files_9.js create mode 100644 dev/MinGfx/docs/html/search/files_a.html create mode 100644 dev/MinGfx/docs/html/search/files_a.js create mode 100644 dev/MinGfx/docs/html/search/files_b.html create mode 100644 dev/MinGfx/docs/html/search/files_b.js create mode 100644 dev/MinGfx/docs/html/search/files_c.html create mode 100644 dev/MinGfx/docs/html/search/files_c.js create mode 100644 dev/MinGfx/docs/html/search/files_d.html create mode 100644 dev/MinGfx/docs/html/search/files_d.js create mode 100644 dev/MinGfx/docs/html/search/files_e.html create mode 100644 dev/MinGfx/docs/html/search/files_e.js create mode 100644 dev/MinGfx/docs/html/search/functions_0.html create mode 100644 dev/MinGfx/docs/html/search/functions_0.js create mode 100644 dev/MinGfx/docs/html/search/functions_1.html create mode 100644 dev/MinGfx/docs/html/search/functions_1.js create mode 100644 dev/MinGfx/docs/html/search/functions_10.html create mode 100644 dev/MinGfx/docs/html/search/functions_10.js create mode 100644 dev/MinGfx/docs/html/search/functions_11.html create mode 100644 dev/MinGfx/docs/html/search/functions_11.js create mode 100644 dev/MinGfx/docs/html/search/functions_12.html create mode 100644 dev/MinGfx/docs/html/search/functions_12.js create mode 100644 dev/MinGfx/docs/html/search/functions_13.html create mode 100644 dev/MinGfx/docs/html/search/functions_13.js create mode 100644 dev/MinGfx/docs/html/search/functions_14.html create mode 100644 dev/MinGfx/docs/html/search/functions_14.js create mode 100644 dev/MinGfx/docs/html/search/functions_15.html create mode 100644 dev/MinGfx/docs/html/search/functions_15.js create mode 100644 dev/MinGfx/docs/html/search/functions_16.html create mode 100644 dev/MinGfx/docs/html/search/functions_16.js create mode 100644 dev/MinGfx/docs/html/search/functions_17.html create mode 100644 dev/MinGfx/docs/html/search/functions_17.js create mode 100644 dev/MinGfx/docs/html/search/functions_18.html create mode 100644 dev/MinGfx/docs/html/search/functions_18.js create mode 100644 dev/MinGfx/docs/html/search/functions_2.html create mode 100644 dev/MinGfx/docs/html/search/functions_2.js create mode 100644 dev/MinGfx/docs/html/search/functions_3.html create mode 100644 dev/MinGfx/docs/html/search/functions_3.js create mode 100644 dev/MinGfx/docs/html/search/functions_4.html create mode 100644 dev/MinGfx/docs/html/search/functions_4.js create mode 100644 dev/MinGfx/docs/html/search/functions_5.html create mode 100644 dev/MinGfx/docs/html/search/functions_5.js create mode 100644 dev/MinGfx/docs/html/search/functions_6.html create mode 100644 dev/MinGfx/docs/html/search/functions_6.js create mode 100644 dev/MinGfx/docs/html/search/functions_7.html create mode 100644 dev/MinGfx/docs/html/search/functions_7.js create mode 100644 dev/MinGfx/docs/html/search/functions_8.html create mode 100644 dev/MinGfx/docs/html/search/functions_8.js create mode 100644 dev/MinGfx/docs/html/search/functions_9.html create mode 100644 dev/MinGfx/docs/html/search/functions_9.js create mode 100644 dev/MinGfx/docs/html/search/functions_a.html create mode 100644 dev/MinGfx/docs/html/search/functions_a.js create mode 100644 dev/MinGfx/docs/html/search/functions_b.html create mode 100644 dev/MinGfx/docs/html/search/functions_b.js create mode 100644 dev/MinGfx/docs/html/search/functions_c.html create mode 100644 dev/MinGfx/docs/html/search/functions_c.js create mode 100644 dev/MinGfx/docs/html/search/functions_d.html create mode 100644 dev/MinGfx/docs/html/search/functions_d.js create mode 100644 dev/MinGfx/docs/html/search/functions_e.html create mode 100644 dev/MinGfx/docs/html/search/functions_e.js create mode 100644 dev/MinGfx/docs/html/search/functions_f.html create mode 100644 dev/MinGfx/docs/html/search/functions_f.js create mode 100644 dev/MinGfx/docs/html/search/mag_sel.svg create mode 100644 dev/MinGfx/docs/html/search/namespaces_0.html create mode 100644 dev/MinGfx/docs/html/search/namespaces_0.js create mode 100644 dev/MinGfx/docs/html/search/nomatches.html create mode 100644 dev/MinGfx/docs/html/search/pages_0.html create mode 100644 dev/MinGfx/docs/html/search/pages_0.js create mode 100644 dev/MinGfx/docs/html/search/pages_1.html create mode 100644 dev/MinGfx/docs/html/search/pages_1.js create mode 100644 dev/MinGfx/docs/html/search/pages_2.html create mode 100644 dev/MinGfx/docs/html/search/pages_2.js create mode 100644 dev/MinGfx/docs/html/search/related_0.html create mode 100644 dev/MinGfx/docs/html/search/related_0.js create mode 100644 dev/MinGfx/docs/html/search/search.css create mode 100644 dev/MinGfx/docs/html/search/search.js create mode 100644 dev/MinGfx/docs/html/search/search_l.png create mode 100644 dev/MinGfx/docs/html/search/search_m.png create mode 100644 dev/MinGfx/docs/html/search/search_r.png create mode 100644 dev/MinGfx/docs/html/search/searchdata.js create mode 100644 dev/MinGfx/docs/html/search/typedefs_0.html create mode 100644 dev/MinGfx/docs/html/search/typedefs_0.js create mode 100644 dev/MinGfx/docs/html/search/variables_0.html create mode 100644 dev/MinGfx/docs/html/search/variables_0.js create mode 100644 dev/MinGfx/docs/html/search/variables_1.html create mode 100644 dev/MinGfx/docs/html/search/variables_1.js create mode 100644 dev/MinGfx/docs/html/search/variables_2.html create mode 100644 dev/MinGfx/docs/html/search/variables_2.js create mode 100644 dev/MinGfx/docs/html/search/variables_3.html create mode 100644 dev/MinGfx/docs/html/search/variables_3.js create mode 100644 dev/MinGfx/docs/html/search/variables_4.html create mode 100644 dev/MinGfx/docs/html/search/variables_4.js create mode 100644 dev/MinGfx/docs/html/search/variables_5.html create mode 100644 dev/MinGfx/docs/html/search/variables_5.js create mode 100644 dev/MinGfx/docs/html/search/variables_6.html create mode 100644 dev/MinGfx/docs/html/search/variables_6.js create mode 100644 dev/MinGfx/docs/html/search/variables_7.html create mode 100644 dev/MinGfx/docs/html/search/variables_7.js create mode 100644 dev/MinGfx/docs/html/search/variables_8.html create mode 100644 dev/MinGfx/docs/html/search/variables_8.js create mode 100644 dev/MinGfx/docs/html/search/variables_9.html create mode 100644 dev/MinGfx/docs/html/search/variables_9.js create mode 100644 dev/MinGfx/docs/html/search/variables_a.html create mode 100644 dev/MinGfx/docs/html/search/variables_a.js create mode 100644 dev/MinGfx/docs/html/search/variables_b.html create mode 100644 dev/MinGfx/docs/html/search/variables_b.js create mode 100644 dev/MinGfx/docs/html/search/variables_c.html create mode 100644 dev/MinGfx/docs/html/search/variables_c.js create mode 100644 dev/MinGfx/docs/html/search/variables_d.html create mode 100644 dev/MinGfx/docs/html/search/variables_d.js create mode 100644 dev/MinGfx/docs/html/search/variables_e.html create mode 100644 dev/MinGfx/docs/html/search/variables_e.js create mode 100644 dev/MinGfx/docs/html/search/variables_f.html create mode 100644 dev/MinGfx/docs/html/search/variables_f.js create mode 100644 dev/MinGfx/docs/html/shader__program_8h.html create mode 100644 dev/MinGfx/docs/html/shader__program_8h_source.html create mode 100644 dev/MinGfx/docs/html/splitbar.png create mode 100644 dev/MinGfx/docs/html/stb__rect__pack_8h.html create mode 100644 dev/MinGfx/docs/html/stb__rect__pack_8h_source.html create mode 100644 dev/MinGfx/docs/html/structstbrp__context-members.html create mode 100644 dev/MinGfx/docs/html/structstbrp__context.html create mode 100644 dev/MinGfx/docs/html/structstbrp__node-members.html create mode 100644 dev/MinGfx/docs/html/structstbrp__node.html create mode 100644 dev/MinGfx/docs/html/structstbrp__rect-members.html create mode 100644 dev/MinGfx/docs/html/structstbrp__rect.html create mode 100644 dev/MinGfx/docs/html/sync_off.png create mode 100644 dev/MinGfx/docs/html/sync_on.png create mode 100644 dev/MinGfx/docs/html/tab_a.png create mode 100644 dev/MinGfx/docs/html/tab_b.png create mode 100644 dev/MinGfx/docs/html/tab_h.png create mode 100644 dev/MinGfx/docs/html/tab_s.png create mode 100644 dev/MinGfx/docs/html/tabs.css create mode 100644 dev/MinGfx/docs/html/text__shader_8h.html create mode 100644 dev/MinGfx/docs/html/text__shader_8h_source.html create mode 100644 dev/MinGfx/docs/html/texture2d_8h.html create mode 100644 dev/MinGfx/docs/html/texture2d_8h_source.html create mode 100644 dev/MinGfx/docs/html/unicam_8h.html create mode 100644 dev/MinGfx/docs/html/unicam_8h_source.html create mode 100644 dev/MinGfx/docs/html/vector2_8h.html create mode 100644 dev/MinGfx/docs/html/vector2_8h_source.html create mode 100644 dev/MinGfx/docs/html/vector3_8h.html create mode 100644 dev/MinGfx/docs/html/vector3_8h_source.html create mode 100644 dev/MinGfx/docs/index.html create mode 100644 dev/MinGfx/example/CMakeLists.txt create mode 100644 dev/MinGfx/example/CircleViewer.cpp create mode 100644 dev/MinGfx/example/CircleViewer.h create mode 100644 dev/MinGfx/example/cmake/AutoBuild.cmake create mode 100644 dev/MinGfx/example/cmake/AutoBuildOpenGL.cmake create mode 100644 dev/MinGfx/example/cmake/MessageMacros.cmake create mode 100644 dev/MinGfx/example/main-circleviewer.cpp create mode 100644 dev/MinGfx/src/.gitignore create mode 100644 dev/MinGfx/src/CMakeLists.txt create mode 100644 dev/MinGfx/src/aabb.cc create mode 100644 dev/MinGfx/src/aabb.h create mode 100644 dev/MinGfx/src/bvh.cc create mode 100644 dev/MinGfx/src/bvh.h create mode 100644 dev/MinGfx/src/color.cc create mode 100644 dev/MinGfx/src/color.h create mode 100644 dev/MinGfx/src/craft_cam.cc create mode 100644 dev/MinGfx/src/craft_cam.h create mode 100644 dev/MinGfx/src/default_shader.cc create mode 100644 dev/MinGfx/src/default_shader.h create mode 100644 dev/MinGfx/src/gfxmath.cc create mode 100644 dev/MinGfx/src/gfxmath.h create mode 100644 dev/MinGfx/src/graphics_app.cc create mode 100644 dev/MinGfx/src/graphics_app.h create mode 100644 dev/MinGfx/src/matrix4.cc create mode 100644 dev/MinGfx/src/matrix4.h create mode 100644 dev/MinGfx/src/mesh.cc create mode 100644 dev/MinGfx/src/mesh.h create mode 100644 dev/MinGfx/src/mingfx.h create mode 100644 dev/MinGfx/src/mingfx_config.h.in create mode 100644 dev/MinGfx/src/opengl_headers.h create mode 100644 dev/MinGfx/src/platform.cc create mode 100644 dev/MinGfx/src/platform.h create mode 100644 dev/MinGfx/src/point2.cc create mode 100644 dev/MinGfx/src/point2.h create mode 100644 dev/MinGfx/src/point3.cc create mode 100644 dev/MinGfx/src/point3.h create mode 100644 dev/MinGfx/src/quaternion.cc create mode 100644 dev/MinGfx/src/quaternion.h create mode 100644 dev/MinGfx/src/quick_shapes.cc create mode 100644 dev/MinGfx/src/quick_shapes.h create mode 100644 dev/MinGfx/src/ray.cc create mode 100644 dev/MinGfx/src/ray.h create mode 100644 dev/MinGfx/src/shader_program.cc create mode 100644 dev/MinGfx/src/shader_program.h create mode 100644 dev/MinGfx/src/shaders/default.frag create mode 100644 dev/MinGfx/src/shaders/default.vert create mode 100644 dev/MinGfx/src/shaders/fullscreen.frag create mode 100644 dev/MinGfx/src/shaders/fullscreen.vert create mode 100644 dev/MinGfx/src/shaders/text.frag create mode 100644 dev/MinGfx/src/shaders/text.vert create mode 100644 dev/MinGfx/src/stb_rect_pack.h create mode 100644 dev/MinGfx/src/text_shader.cc create mode 100644 dev/MinGfx/src/text_shader.h create mode 100644 dev/MinGfx/src/texture2d.cc create mode 100644 dev/MinGfx/src/texture2d.h create mode 100644 dev/MinGfx/src/unicam.cc create mode 100644 dev/MinGfx/src/unicam.h create mode 100644 dev/MinGfx/src/vector2.cc create mode 100644 dev/MinGfx/src/vector2.h create mode 100644 dev/MinGfx/src/vector3.cc create mode 100644 dev/MinGfx/src/vector3.h create mode 100644 dev/MinGfx/tests/blank_window/CMakeLists.txt create mode 100644 dev/MinGfx/tests/blank_window/main.cc create mode 100644 dev/MinGfx/tests/gui_plus_opengl/CMakeLists.txt create mode 100644 dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.cc create mode 100644 dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.h create mode 100644 dev/MinGfx/tests/gui_plus_opengl/main.cc diff --git a/dev/MinGfx/.gitignore b/dev/MinGfx/.gitignore new file mode 100644 index 0000000..c544088 --- /dev/null +++ b/dev/MinGfx/.gitignore @@ -0,0 +1,38 @@ +*.DS_Store + +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Build +build +external +src/external diff --git a/dev/MinGfx/CMakeLists.txt b/dev/MinGfx/CMakeLists.txt new file mode 100644 index 0000000..e3da874 --- /dev/null +++ b/dev/MinGfx/CMakeLists.txt @@ -0,0 +1,395 @@ +# Copyright (c) 2017,2018 Regents of the University of Minnesota. +# All rights reserved. +# +# Original Author(s) of this File: +# Daniel Keefe, Jan 2018, University of Minnesota -- This build system is inspired by +# the AUTOBUILD_DEPENDENCY approach I developed for the MinVR Open Source project. +# Tom Sgouros (Brown Univ.) and Dan Orban (Univ. of Minn.) also contributed to earlier +# versions of MinVR's build system and the use of cmake in other research software used +# in the IV/LAB. So, this is also at least loosly inspired by their contributions. +# See minvr.org for a full list of contributors to that project. +# +# Author(s) of Significant Updates/Modifications to the File: +# ... + + + + +#### BASIC PROJECT SETUP #### + +# Depends on cmake 3.9+ for its more advanced FindOpenGL.cmake module +cmake_minimum_required (VERSION 3.9) + +# Search path for cmake support scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") + +# Version is .. +cmake_policy(SET CMP0048 NEW) # Required for setting version number as part of the project() command +project(MinGfx_Toolkit VERSION 1.0.0) + +# This will be appended to the install destinations so that multiple versions of MinGfx +# can be safely installed on the same system. This intentionally does not include a +# patch number because patches should be small changes that do not change the API. +set(MINGFX_VERSION_STR -${MinGfx_Toolkit_VERSION_MAJOR}.${MinGfx_Toolkit_VERSION_MINOR}) + +# Organize folder structure for Xcode, Visual Studio, etc. +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# For better formatting of output while configuring with cmake +include(MessageMacros) + +# If you "autobuild" external dependencies as part of the cmake configure process, then they will be +# downloaded to this directory. +set(AUTOBUILD_DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external" CACHE STRING "Location for external project sources downloaded by AutoBuild.") + + +set(CMAKE_INSTALL_MESSAGE ALWAYS) + +include(AutoBuild) +AutoBuild_init() + + +#### ADJUST NAMES OF OUTPUT FILES BASED ON BUILD TYPE #### + +h1("CONFIGURING BUILD TYPES") + +# To distinguish between debugging, release, and other builds, we'll +# add a postfix to the name of the lib or exe that we generate. + +set(CMAKE_DEBUG_POSTFIX "d") +set(CMAKE_RELEASE_POSTFIX "") +set(CMAKE_RELWITHDEBINFO_POSTFIX "rd") +set(CMAKE_MINSIZEREL_POSTFIX "s") + +if (CMAKE_BUILD_TYPE MATCHES "Release") + set(CMAKE_BUILD_POSTFIX "${CMAKE_RELEASE_POSTFIX}") +elseif (CMAKE_BUILD_TYPE MATCHES "MinSizeRel") + set(CMAKE_BUILD_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}") +elseif (CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo") + set(CMAKE_BUILD_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}") +elseif (CMAKE_BUILD_TYPE MATCHES "Debug") + set(CMAKE_BUILD_POSTFIX "${CMAKE_DEBUG_POSTFIX}") +else() + set(CMAKE_BUILD_POSTFIX "") +endif() + + + + +#### SETUP DIRECTORIES FOR BUILDING AND INSTALLING #### + +h1("CONFIGURING BUILD/INSTALL LOCATIONS") + +h2("Configuring build directories.") + +message(STATUS "Tests, other binaries: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") +message(STATUS "Libraries: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") + + +h2("Configuring installation directories.") +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE ) +endif() + +# When we autobuild dependencies, we install them in CMAKE_INSTALL_PREFIX, and then look for them +# there using find_package(). So, this makes sure the install prefix is in the path that +# find_package() searches. +list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}) +list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) + +# These are relative to ${CMAKE_INSTALL_PREFIX} +set(INSTALL_BIN_DEST bin) +set(INSTALL_LIB_DEST lib/MinGfx${MINGFX_VERSION_STR}) +set(INSTALL_INCLUDE_DEST include/MinGfx${MINGFX_VERSION_STR}) +set(INSTALL_SHADERS_DEST share/MinGfx${MINGFX_VERSION_STR}/shaders) +set(INSTALL_DATA_DEST share/MinGfx${MINGFX_VERSION_STR}/data) +set(INSTALL_DOC_DEST share/MinGfx${MINGFX_VERSION_STR}/docs) +set(INSTALL_CMAKECONFIG_DEST lib/cmake/MinGfx${MINGFX_VERSION_STR}) + +message(STATUS "Tests, other binaries: ${CMAKE_INSTALL_PREFIX}/${INSTALL_BIN_DEST}") +message(STATUS "MinGfx library: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DEST}") +message(STATUS "MinGfx header files: ${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DEST}") +message(STATUS "MinGfx shader programs: ${CMAKE_INSTALL_PREFIX}/${INSTALL_SHADERS_DEST}") +message(STATUS "MinGfx data files: ${CMAKE_INSTALL_PREFIX}/${INSTALL_DATA_DEST}") +message(STATUS "MinGfx documentation files: ${CMAKE_INSTALL_PREFIX}/${INSTALL_DOC_DEST}") +message(STATUS "CMake Config Package for including MinGfx in other projects: ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKECONFIG_DEST}") + +# Configure a header file to pass some of the CMake settings to the source code +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/mingfx_config.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/src/mingfx_config.h +) + + +#### SET ANY COMPILER FLAGS #### + +h1("CONFIGURING COMPLIER FLAGS") + + + +message(STATUS "Building for " ${CMAKE_SYSTEM_NAME} ".") +message(STATUS "Compiler supported features = ${CMAKE_CXX_COMPILE_FEATURES}") + + +# Linux specific +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + add_definitions(-DLINUX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +endif() + + +# Apple specific +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-DOSX) + + # Since for some stupid reason Apple has now deprecated OpenGL + #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") + add_definitions(-DGL_SILENCE_DEPRECATION) + + # RPATH settings, see https://cmake.org/Wiki/CMake_RPATH_handling + set(CMAKE_MACOSX_RPATH ON) + + # use, i.e. don't skip the full RPATH for the build tree + SET(CMAKE_SKIP_BUILD_RPATH FALSE) + + # when building, don't use the install RPATH already + # (but later on when installing) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) + + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # the RPATH to be used when installing, but only if it's not a system directory + LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + IF("${isSystemDir}" STREQUAL "-1") + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + ENDIF("${isSystemDir}" STREQUAL "-1") + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +endif() + + +# Windows specific +if (WIN32) + add_definitions(-DWIN32) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7") +endif() + + + + +#### DEFINE THE LIBRARY WE WANT TO BUILD #### + +h1("CONFIGURING LIBMINGFX") + +h2("Configuring core library source.") +message(STATUS "Adding src to the build.") + +# Intentionally using include() rather than add_subdirectory() so that the MinGfx target +# is defined in the scope of this CMakeLists.txt file. That way, sudirs that depend +# upon it can list it as a dependency. +include(src/CMakeLists.txt) + + + + +#### DEFINE ADDITIONAL BUILD TARGETS, LIKE TEST PROGRAMS, ETC. #### + +h1("CONFIGURING PROGRAMS AND DATA") + +h2("Cofiguring test programs.") +message(STATUS "Adding all subirectories of tests to the build.") +add_subdirectory(tests/blank_window) +add_subdirectory(tests/gui_plus_opengl) + + +h2("Cofiguring data.") +message(STATUS "Identifying data to install.") +install( + DIRECTORY data/ + DESTINATION ${INSTALL_DATA_DEST} +) + + + +#### OPTIONALLY, BUILD DOXYGEN-STYLE DOCUMENTATION #### + +h1("CONFIGURING DOCUMENTATION") + +h2("Configuring Web-Based Documentation.") +option(WITH_DOCUMENTATION "Builds web-based documentation for the library. (Requires doxygen)") +if (WITH_DOCUMENTATION) + message(STATUS "ON: Will build and install MinGfx Web-Based Documentation.") +else() + message(STATUS "OFF: NOT building MinGfx Web-Based Documentation.") +endif() + +if (WITH_DOCUMENTATION) + find_package(Doxygen) + if(NOT DOXYGEN_FOUND) + message(FATAL_ERROR "Doxygen is needed to build the documentation.") + endif() + + set(DOXY_FILES + doc/Doxyfile.in + doc/api.md + doc/installation.md + doc/mainpage.md + doc/header.html + doc/index.html + doc/footer.html + doc/customdoxygen.css + ) + + set(OTHER_DOCS + README.md + LICENSE.txt + ) + + # Process the config file and put it in the build directory. + set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in) + set(DOXYFILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + configure_file(${DOXYFILE_IN} ${DOXYFILE} @ONLY) + + add_custom_target(doc ALL + ${DOXYGEN_EXECUTABLE} ${DOXYFILE} + DEPENDS ${DOXY_FILES} ${OTHER_DOCS} + SOURCES ${DOXY_FILES} ${OTHER_DOCS} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating documentation with Doxygen" + VERBATIM + ) + + set_source_files_properties(${DOXY_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) + source_group("Doxygen Files" FILES ${DOXY_FILES}) + + set_source_files_properties(${OTHER_DOCS} PROPERTIES HEADER_FILE_ONLY TRUE) + source_group("Other Docs" FILES ${OTHER_DOCS}) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${INSTALL_DOC_DEST} + COMPONENT Docs + OPTIONAL + ) + + install(FILES doc/index.html + DESTINATION ${INSTALL_DOC_DEST} + COMPONENT Docs + OPTIONAL + ) +endif() + + + + + +#### CREATE/INSTALL A CMAKE CONFIG PACKAGE TO HELP OTHERS LINK TO THE LIBRARY #### + +h1("WRITING CMAKE CONFIG PACKAGE") + +# The documentation for setting this up is so bad. These pages all helped. My current +# understanding (dfk) is summarized below to help others. +# https://cmake.org/cmake/help/git-master/manual/cmake-packages.7.html#creating-packages +# https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#target-usage-requirements +# http://foonathan.net/blog/2016/03/03/cmake-install.html +# https://archive.fosdem.org/2013/schedule/event/moderncmake/attachments/slides/258/export/events/attachments/moderncmake/slides/258/cmake_fosdem_2013.pdf + +# CMake Package Config in a Nutshell: + +# CMake config packages are the newer, recommended way of distributing projects built with CMake. +# They replace the older FindModule.cmake approach for including dependencies in a cmake project, +# but not everyone has yet switched over to the new approach. Both styles can work together, and +# this seems to often be required because many libraries are not yet distributing a *Config.cmake +# file with their install tree. + + +# 1. The Difference Between "Find Modules" (Find*.cmake) and "Config Packages" (*Config.cmake) + +# Whereas, Find*.cmake files are either installed on the system or written by downstream projects. +# *Config.cmake files are created and installed by the upstream projects (e.g., we want generate +# MinVRConfig.cmake and install it whenever the MinVR project in installed). + +# When you use a Find Module, it defines several variables (e.g., OPENGL_INCLUDE_DIR, OPENGL_LIBRARIES) +# that you must then be sure to add to the include dirs and libs to link with your project. +# Config Packages are different. Instead, they "export" the targets defined in the original project +# (e.g., the target MinGfx is used in this file to build libMinGfx.a) so that the client project +# may refer to these targets directly. This is pretty cool because we can define the MinGfx target +# in such a way that cmake even knows which header files are associated with it, and will add the +# required include flags whenever the MinGfx target is used. + + +# 2. How to use Config Packages in a client CMakeLists.txt + +# With the config package appraoch, client projects only need to include two lines to use our library: + +# find_package(MinGfx REQUIRED) +# ... then, after add_executable(${PROJECT_NAME}) or add_library(${PROJECT_NAME}) +# target_link_libraries(${PROJECT_NAME} PUBLIC MinGfx) + + +# 3. Finding *Config.cmake files + +# Config packages are files of the form MyProjNameConfig.cmake (or *-config.cmake). Each library +# provides and installs its own config package. So, here we will create one to install with MinGfx. +# If created correctly, these packages can be relocatable, i.e., not specific to the install path +# used on a particular machine. When you call find_package(...) cmake looks for packages in a +# variety of locations (e.g., /usr/local/lib/cmake/*). + +# Since config packages are supposed to be written by and installed by the upstream dependencies, +# my understanding is that you should not attempt to write you own version of a config package if +# you encounter a project that is not (yet) using the config package appraoch. Instead, use the +# older Find Module appraoch. If CMake ships with a Find*.cmake file for that project, then use +# it. If not, then you can write your own. Since making this switch, many of the newer +# Find*.cmake scripts that ship with CMake have been updated to support imported targets. They +# are still called something like FindOpenGL.cmake, but in addition to just setting vars like +# OPENGL_INCLUDE_DIR, they also define targets, such as OpenGL::GL. We use these when we can +# because they are more robust. When you do target_link_libraries(myproj PULBIC OpenGL::GL) +# cmake knows to not only link with the the opengl library but also to include its headers and +# link with all dependencies. + + +# This tells cmake to generate a MinGfxTargets.cmake file that works for importing all targets +# associated with the MinGfx export group from the install tree. This file is where all the +# important cmake magic happens. It is auto-generated. This call also installs the file to +# the appropriate location. +install(EXPORT MinGfxTargets + NAMESPACE MinGfx:: + FILE MinGfxTargets.cmake + DESTINATION ${INSTALL_CMAKECONFIG_DEST} +) + +# This is a very small wrapper around the MinGfxTargets.cmake file. It's possible to use this +# configure_file() command to replace variables (e.g., special defines, install paths) in the +# file, but we do not currently need that functionality. +configure_file( + cmake/MinGfxConfig.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/cmake/MinGfxConfig.cmake" + COPYONLY +) + +# This auto-generates a standard CMake config version file. Using this, client projects can +# check to see if a specific version of MinGfx is installed on the system. +include(CMakePackageConfigHelpers) +set_property(TARGET MinGfx PROPERTY VERSION ${MinGfx_Toolkit_VERSION}) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/cmake/MinGfxConfigVersion.cmake" + VERSION ${MinGfx_Toolkit_VERSION} + COMPATIBILITY AnyNewerVersion +) + +# The two Config files also get installed +install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/cmake/MinGfxConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/MinGfxConfigVersion.cmake" + DESTINATION + "${INSTALL_CMAKECONFIG_DEST}" +) + + +AutoBuild_check_status() + diff --git a/dev/MinGfx/LICENSE.txt b/dev/MinGfx/LICENSE.txt new file mode 100644 index 0000000..c245f5c --- /dev/null +++ b/dev/MinGfx/LICENSE.txt @@ -0,0 +1,2 @@ +Copyright (c) 2017,2018 Dr. Daniel Keefe and Regents of the University of Minnesota. +All Rights Reserved. diff --git a/dev/MinGfx/README.md b/dev/MinGfx/README.md new file mode 100644 index 0000000..c752eec --- /dev/null +++ b/dev/MinGfx/README.md @@ -0,0 +1,15 @@ +# MinGfx Toolkit + +*Quick Links:* +* [Documentation Main Page](https://ivlab.github.io/MinGfx/index.html) + +* [libMinGfx Installation Guide](https://ivlab.github.io/MinGfx/installation.html) +* [Creating Your Own Graphics Program by Copying an Example](https://ivlab.github.io/MinGfx/installation.html#example) +* [API Organized by Topic](https://ivlab.github.io/MinGfx/api.html) +* [Source on GitHub](https://github.com/ivlab/MinGfx) + + +*Project Overview:* +The MinGfx Toolkit is a minimal library for writing cross-platform (Windows, OSX, linux) graphics programs with modern OpenGL 3.3+ support. Application programmers should subclass from MinGfx::GraphicsApp, which provides callbacks for several styles of rendering and user interfaces. On-screen graphical user interfaces can be created with built-in support for NanoGUI. 2D vector graphics rendering is supported by linking with NanoVG. 3D graphics rendering is supported via MinGfx::Mesh, MinGfx::Shader, MinGfx::Texture2D, and related classes. Additionally, application programmers can do whatever custom 2D or 3D rendering is needed with direct calls to OpenGL. + +The library is maintained by Prof. Daniel Keefe (dfk@umn.edu) and is used for instructional purposes in UMN computer science courses (CSci-4611, CSci-3081W, ...) as well as some research projects. See LICENSE.txt for additional details. diff --git a/dev/MinGfx/cmake/AutoBuild.cmake b/dev/MinGfx/cmake/AutoBuild.cmake new file mode 100644 index 0000000..977c91c --- /dev/null +++ b/dev/MinGfx/cmake/AutoBuild.cmake @@ -0,0 +1,584 @@ +# Author: Daniel F. Keefe +# Copyright 2017,2018, Daniel F. Keefe and Regents of the University of Minnesota +# All Rights Reserved. + + +# OVERVIEW / INTENT: AutoBuild is a series of CMake macros and functions for working with sub-projects that are dependencies of a main project. We assume that both the main project and dependencies each build with CMake already. AutoBuild manages the process of checking to see if the dependencies are already available, installed on the system. If not, AutoBuild will automatically download, build, and install the dependencies for you as part of the CMake Configure process. + +# WHY IS THIS NEEDED / USEFUL?: AutoBuild is similar in spirit to CMake's ExternalProject_add() command. In fact, AutoBuild uses that command internally. However, there is a key difference between AutoBuild and ExternalProject_add(). With ExternalProject_add() there is a chicken-and-the-egg problem. ExternalProject_add() doesn't download and build the external project until after CMake has finished running and you are building your actual code using Unix Makefiles, Visual Studio, or Xcode. This means the dependency does not exist on disk until CMake has finished running, and, thus, there is no way to use CMake's find_package() routines to find the dependency. You can still make your project link with the dependency, but you have to hardcode paths to tell CMake where it will exist after it is built rather than find it already installed on the system. If you want to only build the dependency if it is not already found on the system, then this means you need to maintain two ways of linking with the dependency in your CMakeLists.txt, using one approach when the dependency is found already installed and using another approach (hardcoded paths with ExternalProject_add()) when it is not found. The hardcoded paths can get a bit complex when working with cross-platform code, and this is precisely what CMake's find_package() is supposed to handle, so it is a bit annoying that it cannot be used in this case. + +# HOW IT WORKS: AutoBuild takes a different approach where the goal is for our project's CMakeLists.txt file to always use the same approach to link with a dependency. If the dependency is found on the system, then we go ahead and link with it right away. If it is not found, then rather than scheduling it to be built as part of the build process for our own project, we "pause" our build for a moment to download, build, and install the dependency. Then, once the dependency has been installed, we try again to find it using find_package(), which should always succeed since we just did the install, and continue on building our program. + +# LIMITATIONS: Handling dependencies is a hard problem, and this "AutoBuild" strategy is not without its own limitations. For example, a complication arises when using the CMake GUI. When using the CMake GUI, users expect to be able to set the CMAKE_INSTALL_PREFIX interactively after pressing Configure once to bring up all the available options. So, there is a problem if we build and install dependency projects during this first run of CMake Configure -- the user will not yet have had a chance to set CMAKE_INSTALL_PREFIX before the dependency projects are installed, and they may be installed to an undesirable location. AutoBuild addresses this by running a status check at the end of the CMake Configure step. The first time the status check detects that a dependency project should be "auto-built", it prints an informative error message, reminding the user to set CMAKE_INSTALL_PREFIX and then re-run CMake Configure to actually do the download, build, and install steps for each dependency. This seems to be a good match for CMake's GUI mode because it also allows the user to check other related settings (e.g., turning off autobuild for specific projects, forcing autobuild even if the dependency is found on the system, setting the directory to use for downloading projects). + +# RUNNING FROM A SCRIPT: When running from the command line or a script, the error-the-first-time-an-autobuild-is-scheduled behavior described above is typically not desired. In this case, users should already be setting CMAKE_INSTALL_PREFIX and any other desired CMake flags on the command line so it is fine to run the autobuilds immediately. To do this, simply run cmake with the following command line argument: -DAUTOBUILD_EXECUTE_NOW=ON + + +# USAGE: WHAT TO ADD TO YOUR CMAKELISTS.TXT FILE TO USE AUTOBUILD: + +# Edit 1: Add two calls to your main CMakeLists.txt: + +# 1a. Near the top of the file include AutoBuild and call init, like so: +# include(AutoBuild) +# AutoBuild_init() + +# 1b. At the end of the file call: +# AutoBuild_check_status() + + +# Edit 2: For each target you wish to link with an external dependency, add a use_package() call right after you +# define the target with add_library() or add_executable. If the dependency you wish to link with uses +# modern CMake Config Packages, then the generic AutoBuild_use_package() call is all that is needed. +# For example, to link my-program with the MinVR library, add the following to the CMakeLists.txt file +# where you define the my-program target with add_executable: + +# add_execuatable(my-program ${SOURCEFILES}) +# AutoBuild_use_package(MinVR . my-program PUBLIC MinVR::MinVR +# DOWNLOAD_ARGS GIT_REPOSITORY https://github.com/MinVR/MinVR.git GIT_TAG beta +# ) + +# Since CMake Config Packages are relatively new and very complex, so not every package provides one +# (or a correct one). In these cases, the generic AutoBuild_use_package() will not work, and we have +# to write a version of that is specific to the project we wish to add as a dependency. For example, +# in order to link with GLFW, which does not provide a ConfigGLFW.cmake file, we must write a +# GLFW-specific version of AutoBuild_use_package() and then use it like so: + +# include(AutoBuildGLFW) +# AutoBuild_use_package_GLFW(my-program PUBLIC) + +# GLFW is one of the first examples in this style, so it is included in the AutoBuild repo. If the +# repo does not already include an AutoBuild.cmake script, then copy an existing +# example, modify it to work for the package of interest, and once it is working, push it back to +# the AutoBuild repo so others can benefit as well. + + + + + + + +# Usage: +# AutoBuild_init() +# Call this one time in your main CMakeLists.txt script somewhere near the beginning of the file. +macro(AutoBuild_init) + message(STATUS "AutoBuild: Initializing.") + + option(AUTOBUILD_DEPENDENCIES "This is a global option that turns on/off the AutoBuild functionality. It is also possible to turn on/off autobuilding for specific packages via variables of the form AUTOBUILD_PACKAGE_." ON) + + set(AUTOBUILD_DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external" CACHE STRING "Location for external project sources downloaded by AutoBuild." ) +endmacro() + + + + + + +# Usage: +# AutoBuild_check_status() +# Call this one time in your main CMakeLists.txt script somewhere near the end of the file. +macro(AutoBuild_check_status) + message(STATUS "AutoBuild: Checking status...") + + # Report status to the user, and if we detected dependencies to autobuild, stop with a + # cmake error to give the user a chance to adjust config options, such as the + # CMAKE_INSTALL_PREFIX and overriding AUTOBUILD_ on a case-by-case basis if + # needed. Assuming all looks good, we will then download, build, and install each + # dependency that we need the next time CMake Configure is run. + + set(PREFIX "AUTOBUILD_PACKAGE_") + get_cmake_property(ALLVARS VARIABLES) + string(REGEX MATCHALL "(^|;)${PREFIX}[A-Za-z0-9_]*" MATCHED_VARS "${ALLVARS}") + + if (NOT "${MATCHED_VARS}" STREQUAL "") + message(STATUS "AutoBuild: Status check for each dependency linked using AutoBuild:") + + set(RERUN_CONFIGURE "FALSE") + + foreach (VARIABLE ${MATCHED_VARS}) + #message(STATUS "${VARIABLE}=${${VARIABLE}}") + + string(REPLACE ${PREFIX} "" PACKAGE_NAME ${VARIABLE}) + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + if ("${${PACKAGE_NAME}_AUTOBUILT}") + set(STATUS_STR "Now installed to CMAKE_INSTALL_PREFIX (${CMAKE_INSTALL_PREFIX}).") + set(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} OFF CACHE BOOL "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." FORCE) + elseif("${${VARIABLE}}") + set(STATUS_STR "Set to auto-build next time you run CMake Configure.") + set(RERUN_CONFIGURE "TRUE") + else() + set(STATUS_STR "Autobuild off (either found on the system or manually turned off).") + endif() + + message(STATUS "AutoBuild: Dependency = ${PACKAGE_NAME}; Status = ${STATUS_STR}") + + endforeach() + + # Error out if any packages are set to autobuild but have not yet been built + if ("${RERUN_CONFIGURE}") + + # This flag confirms that the user has had a chance to see any new AutoBuild config + # options and we can now proceed on the next run of CMake Configure to do the auto + # download, build, and install steps. + set(AUTOBUILD_EXECUTE_NOW "ON" CACHE BOOL "If on, the AutoBuild download, build, install steps will run the next time CMake Configure is run.") + mark_as_advanced(AUTOBUILD_EXECUTE_NOW) + + message(SEND_ERROR "AutoBuild: One or more packages are setup to be downloaded, built, and installed with AutoBuild the next time you run CMake Configure. Check now to make sure that your CMAKE_INSTALL_PREFIX points to the place where you want these dependencies installed. Also, check variables of the form AUTOBUILD_PACKAGE_* to make sure the packages you want to build are ON and the ones you do not are OFF. When all looks good, run Configure again to perform the download, build, and install steps. This message will be shown only once -- the first time your project schedules a dependency to be autobuilt.") + + endif() + endif() + + message(STATUS "AutoBuild: Completed status check.") +endmacro() + + + + + + + +# Usage: +# AutoBuild_use_package( +# # This 1st argument is required, it is the name of the project/package you wish to use. The project should +# # provide a Config.cmake file for CMake to find. +# MinVR +# +# # The 2nd argument is required and it is the relative path from the root of the external project's source +# # tree to a CMakeLists.txt file that can be used to build the project. +# . +# +# # The 3rd argument is required. It is the name of the target you wish to link this dependency to. +# my-program +# +# # The 4th argument is required. It impacts how dependencies are propogated through CMake. You can treat +# # this dependency as an INTERFACE, PUBLIC, or PRIVATE. See the following URL for details: +# # https://cmake.org/cmake/help/latest/command/target_include_directories.html +# PUBLIC +# +# # The 5th argument is required. It is the name of the imported target(s) provided in the projects CMake +# # Config Package. By convention, these typically start with the project name and then ::, like a namespace. +# MinVR::MinVR +# +# # The remaining arguments are optional and are used to provide more specific instructions on the find_package, +# # download, build, and install steps. List additional flags for these steps after the keywords: +# # FIND_PACKAGE_ARGS, DOWNLOAD_ARGS, and/or BUILD_AND_INSTALL_ARGS. For example: +# +# DOWNLOAD_ARGS GIT_REPOSITORY https://github.com/MinVR/MinVR.git GIT_TAG beta +# ) +# +macro(AutoBuild_use_package PACKAGE_NAME RELPATH_TO_CMAKELISTS YOUR_TARGET INTERFACE_PUBLIC_OR_PRIVATE IMPORTED_TARGETS) + + set(OPTIONS) + set(ONE_VALUE_ARGS) + set(MULTI_VALUE_ARGS FIND_PACKAGE_ARGS DOWNLOAD_ARGS BUILD_AND_INSTALL_ARGS) + cmake_parse_arguments(EXTRA "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + AutoBuild_find_package_config_mode(${PACKAGE_NAME} ${EXTRA_FIND_PACKAGE_ARGS}) + + + + if ("${AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}}") + if ("${AUTOBUILD_EXECUTE_NOW}") + message(STATUS "AutoBuild: Starting download, build, install sequence for ${PACKAGE_NAME}.") + + if (EXISTS "${AUTOBUILD_DOWNLOAD_DIR}/${PACKAGE_NAME}/${RELPATH_TO_CMAKELISTS}/CmakeLists.txt") + message(STATUS "AutoBuild: External project source found at ${AUTOBUILD_DOWNLOAD_DIR}/${PACKAGE_NAME}. Skipping download step.") + else() + AutoBuild_download_project(${PACKAGE_NAME} ${EXTRA_DOWNLOAD_ARGS}) + endif() + + AutoBuild_build_and_install_project(${PACKAGE_NAME} ${RELPATH_TO_CMAKELISTS} ${EXTRA_BUILD_AND_INSTALL_ARGS}) + + AutoBuild_find_built_package_config_mode(${PACKAGE_NAME} CONFIG ${EXTRA_FIND_PACKAGE_ARGS}) + + set(${PACKAGE_NAME_UPPER}_AUTOBUILT "TRUE" CACHE BOOL "Confirms that package ${PACKAGE_NAME} was successfully built by the AutoBuild system.") + mark_as_advanced(${PACKAGE_NAME}_AUTOBUILT) + + else() + message(STATUS "AutoBuild: Scheduled to build ${PACKAGE_NAME} the next time CMake Configure is run.") + endif() + endif() + + + # If we've found the package, either directly on the system or after autobuilding, then link with it + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency ${PACKAGE_NAME}.") + + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} ${IMPORTED_TARGETS}) + + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DUSE_${PACKAGE_NAME_UPPER}) + endif() + +endmacro() + + + + + + + + + + + +# ------ Implementation Details Below this Line -- External Users Should Not Need To Call Anything Below ------- + + +macro(AutoBuild_find_package_config_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching for package ${PACKAGE_NAME} using cmake's find_package() config mode...") + + if (NOT AUTOBUILD_DEPENDENCIES) + + message(STATUS "AutoBuild: AUTOBUILD_DEPENDENCIES is OFF, using default CMake find_package() behavior.") + find_package(${PACKAGE_NAME} CONFIG ${EXTRA_MACRO_ARGS}) + + else() + + # Try first to find the package within the current CMAKE_INSTALL_PREFIX. In the case when multiple + # versions of a library are installed on the same system, this makes sure that we will find a version + # that was previously built using AutoBuild first. + find_package(${PACKAGE_NAME} CONFIG PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ${EXTRA_MACRO_ARGS}) + + # Try again with the normal version of find_package(), which will search a variety of places on + # the system, see details here: https://cmake.org/cmake/help/latest/command/find_package.html + if (NOT ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}")) + find_package(${PACKAGE_NAME} CONFIG ${EXTRA_MACRO_ARGS}) + endif() + + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + # Found the package on the system, so there is no need to autobuild it, but we still add + # an option (defaulting to OFF) so that users can "force" building their own version of + # the dependency if they wish. + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." OFF) + else() + message(STATUS "AutoBuild: Could not find ${PACKAGE_NAME}, setting AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}=ON.") + # If the package is still not found, then we will need to autobuild it, add the option with a default of ON + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." ON) + endif() + + endif() +endmacro() + + + +macro(AutoBuild_find_built_package_config_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching again (after autobuilding) for package ${PACKAGE_NAME} using config mode...") + + # Try first to find the package within the current CMAKE_INSTALL_PREFIX. In the case when multiple + # versions of a library are installed on the same system, this makes sure that we will find a version + # that was previously built using AutoBuild first. + find_package(${PACKAGE_NAME} PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ${EXTRA_MACRO_ARGS} QUIET) + + # Try again with the normal version of find_package(), which will search a variety of places on + # the system, see details here: https://cmake.org/cmake/help/latest/command/find_package.html + if (NOT ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}")) + find_package(${PACKAGE_NAME} ${EXTRA_MACRO_ARGS}) + endif() + + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + else() + message(FATAL_ERROR "AutoBuild: Just completed a download, build, and install sequence for package ${PACKAGE_NAME}, and it should now be installed at the prefix ${CMAKE_INSTALL_PREFIX}, but cmake is still unable to find it with find_package().") + endif() +endmacro() + + + +macro(AutoBuild_find_package_module_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching for package ${PACKAGE_NAME} using cmake's find_package() module mode...") + + if (NOT AUTOBUILD_DEPENDENCIES) + + message(STATUS "AutoBuild: AUTOBUILD_DEPENDENCIES is OFF, using default CMake find_package() behavior.") + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + else() + + # AutoBuild allows users to force building a dependency even if it is already found installed on the + # system. To make this work, any Find*.cmake scripts that are used with AutoBuild must look first + # for the library under ${CMAKE_INSTALL_PREFIX}. This makes it so that preference is given to + # libraries just built and installed there with AutoBuild. + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + # Found the package on the system, so there is no need to autobuild it, but we still add + # an option (defaulting to OFF) so that users can "force" building their own version of + # the dependency if they wish. + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." OFF) + else() + message(STATUS "AutoBuild: Could not find ${PACKAGE_NAME}, setting AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}=ON.") + # If the package is still not found, then we will need to autobuild it, add the option with a default of ON + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." ON) + endif() + + endif() +endmacro() + + + +macro(AutoBuild_find_built_package_module_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching again (after autobuilding) for package ${PACKAGE_NAME} using module mode...") + + # AutoBuild allows users to force building a dependency even if it is already found installed on the + # system. To make this work, any Find*.cmake scripts that are used with AutoBuild must look first + # for the library under ${CMAKE_INSTALL_PREFIX}. This makes it so that preference is given to + # libraries just built and installed there with AutoBuild. + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIR}") + endif() + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_INCLUDE_DIRS}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + else() + message(FATAL_ERROR "AutoBuild: Just completed a download, build, and install sequence for package ${PACKAGE_NAME}, and it should now be installed at the prefix ${CMAKE_INSTALL_PREFIX}, but cmake is still unable to find it with find_package().") + endif() +endmacro() + + + +# Usage: +# AutoBuild_download_project( +# # This first argument is the name of the project to download. It is required: +# glm +# +# # Additional arguments specify how to download the project using GIT, SVN, CVS, or URL. +# # These can be any of the arguments used for the downloading step of the cmake builtin +# # ExternalProject_Add command. +# GIT_REPOSITORY "https://github.com/g-truc/glm.git" +# GIT_TAG master +# etc.. +# ) +function(AutoBuild_download_project EXT_PROJECT_NAME) + + big_message("AUTOBUILD: BEGIN EXTERNAL PROJECT DOWNLOAD (${EXT_PROJECT_NAME}).") + + message(STATUS "AutoBuild: Creating a download helper project for ${EXT_PROJECT_NAME}.") + + set(DOWNLOAD_OPTIONS ${ARGN}) + string (REGEX REPLACE "(^|[^\\\\]);" "\\1 " DOWNLOAD_OPTIONS "${DOWNLOAD_OPTIONS}") + + file(MAKE_DIRECTORY ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}) + + # Write the CMakeLists.txt.in file to disk + set(DLHELPER_FILE_TEXT "\n \ + # This is a helper cmake project -- the only thing this project does is download \n \ + # the external project. So, the configure, build, install, and test commands for \n \ + # ExternalProject_Add() are intentionally set as NOPs. \n \ + \n \ + cmake_minimum_required (VERSION 3.9) \n \ + \n \ + project(@EXT_PROJECT_NAME@-download) \n \ + \n \ + include(ExternalProject) \n \ + ExternalProject_Add( \n \ + @EXT_PROJECT_NAME@ \n \ + SOURCE_DIR \"@AUTOBUILD_DOWNLOAD_DIR@/@EXT_PROJECT_NAME@\" \n \ + BINARY_DIR \"@AUTOBUILD_DOWNLOAD_DIR@/@EXT_PROJECT_NAME@-download-helper\" \n \ + @DOWNLOAD_OPTIONS@ \n \ + CONFIGURE_COMMAND \"\" \n \ + BUILD_COMMAND \"\" \n \ + INSTALL_COMMAND \"\" \n \ + TEST_COMMAND \"\" \n \ + LOG_DOWNLOAD ON \n \ + GIT_PROGRESS 1 \n \ + ) \n \ + ") + + file(WRITE ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper/CMakeLists.txt.in ${DLHELPER_FILE_TEXT}) + + configure_file( + ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper/CMakeLists.txt.in + ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper/CMakeLists.txt + ) + + message(STATUS "AutoBuild: Generating build files for the ${EXT_PROJECT_NAME} download helper project.") + message(STATUS " Using working dir: ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper") + + execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper" OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error while creating download helper project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Building the ${EXT_PROJECT_NAME} download helper project. (This actually performs the download and may take some time...)") + execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}-download-helper" OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(SEND_ERROR "AutoBuild: Error running download helper project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Completed download of external project ${EXT_PROJECT_NAME}.") + +endfunction() + + +# Usage: +# AutoBuild_build_and_install_project( +# # This first argument is the name of the external project to download. It is required: +# VRPN +# # This second argument is the relative path from ${EXTERNAL_DIR_NAME}/projectname/ to the project's +# # main CMakeLists.txt file: +# src +# +# # Additional arguments are passed on as options to the cmake build file generator +# -DVRPN_BUILD_DIRECTSHOW_VIDEO_SERVER=OFF +# -DVRPN_BUILD_HID_GUI=OFF +# etc.. +# ) +function(AutoBuild_build_and_install_project EXT_PROJECT_NAME RELPATH_TO_CMAKELISTS) + + big_message("AUTOBUILD: BEGIN EXTERNAL PROJECT BUILD AND INSTALL (${EXT_PROJECT_NAME}).") + AutoBuild_configure_project( ${EXT_PROJECT_NAME} ${RELPATH_TO_CMAKELISTS} ${ARGN}) + AutoBuild_build_and_install_debug( ${EXT_PROJECT_NAME} ${RELPATH_TO_CMAKELISTS} ${ARGN}) + AutoBuild_build_and_install_release( ${EXT_PROJECT_NAME} ${RELPATH_TO_CMAKELISTS} ${ARGN}) + message(STATUS "AutoBuild: Completed external build of ${EXT_PROJECT_NAME}.\n\n") +endfunction() + + +function(AutoBuild_configure_project EXT_PROJECT_NAME RELPATH_TO_CMAKELISTS) + # any extra args to the function are interpreted as arguments for the cmake config process + set(CMAKE_CONFIG_OPTIONS ${ARGN}) + + # always set the install prefix to be the same as for the main project + list(APPEND CMAKE_CONFIG_OPTIONS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) + + set(SRC_DIR "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/${RELPATH_TO_CMAKELISTS}") + set(BUILD_DIR "${CMAKE_BINARY_DIR}/external/${EXT_PROJECT_NAME}") + + file(MAKE_DIRECTORY ${BUILD_DIR}) + + message(STATUS "AutoBuild: Generating build files for external project ${EXT_PROJECT_NAME}.") + message(STATUS " Using source dir: ${SRC_DIR}") + message(STATUS " Using build dir: ${BUILD_DIR}") + message(STATUS " Config options: ${CMAKE_CONFIG_OPTIONS}") + + execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" ${SRC_DIR} ${CMAKE_CONFIG_OPTIONS} WORKING_DIRECTORY ${BUILD_DIR} OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error generating build files for external project: ${stdout} ${stderr}") + endif() +endfunction() + + +function(AutoBuild_build_and_install_debug EXT_PROJECT_NAME RELPATH_TO_CMAKELISTS) + message(STATUS "AutoBuild: Building external project ${EXT_PROJECT_NAME} (Configuration = Debug). (This may take some time...)") + set(BUILD_DIR "${CMAKE_BINARY_DIR}/external/${EXT_PROJECT_NAME}") + execute_process(COMMAND "${CMAKE_COMMAND}" --build ${BUILD_DIR} --config Debug --target install OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error building Debug configuration for external project: ${stdout} ${stderr}") + endif() +endfunction() + + +function(AutoBuild_build_and_install_release EXT_PROJECT_NAME RELPATH_TO_CMAKELISTS) + message(STATUS "AutoBuild: Building external project ${EXT_PROJECT_NAME} (Configuration = Release). (This may take some time...)") + set(BUILD_DIR "${CMAKE_BINARY_DIR}/external/${EXT_PROJECT_NAME}") + execute_process(COMMAND "${CMAKE_COMMAND}" --build ${BUILD_DIR} --config Release --target install OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error building Release configuration for external project: ${stdout} ${stderr}") + endif() +endfunction() + + +macro(big_message TITLE) + string(TOUPPER ${TITLE} TITLE) + message(STATUS "\n\n==== ${TITLE} ====") +endmacro() + + + diff --git a/dev/MinGfx/cmake/AutoBuildNanoGUI.cmake b/dev/MinGfx/cmake/AutoBuildNanoGUI.cmake new file mode 100644 index 0000000..4c4008f --- /dev/null +++ b/dev/MinGfx/cmake/AutoBuildNanoGUI.cmake @@ -0,0 +1,96 @@ +# Author: Daniel F. Keefe +# Copyright 2017,2018, Daniel F. Keefe and Regents of the University of Minnesota +# All Rights Reserved. + +include(AutoBuild) + + +# Usage: +# AutoBuild_use_package_NanoGUI( +# # The 1st argument is required. It is the name of the target you wish to link this dependency to. +# my-program +# +# # The 2nd argument is required. It impacts how dependencies are propogated through CMake. You can treat +# # this dependency as an INTERFACE, PUBLIC, or PRIVATE. See CMake's docs on Imported Targets for details. +# PUBLIC +# ) +# +macro(AutoBuild_use_package_NanoGUI YOUR_TARGET INTERFACE_PUBLIC_OR_PRIVATE) + set(PACKAGE_NAME "NanoGUI") + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + AutoBuild_find_package_module_mode(${PACKAGE_NAME}) + + if ("${AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}}") + if ("${AUTOBUILD_EXECUTE_NOW}") + + message(STATUS "AutoBuild: Beginning download, build, install sequence.") + + if (EXISTS "${AUTOBUILD_DOWNLOAD_DIR}/${PACKAGE_NAME}/${RELPATH_TO_CMAKELISTS}/CmakeLists.txt") + message(STATUS "AutoBuild: External project source found at ${AUTOBUILD_DOWNLOAD_DIR}/${PACKAGE_NAME}. Skipping download step.") + else() + AutoBuild_download_project( + ${PACKAGE_NAME} + GIT_REPOSITORY https://github.com/wjakob/nanogui.git + ) + endif() + + AutoBuild_build_and_install_project( + ${PACKAGE_NAME} + . + -DNANOGUI_BUILD_PYTHON=OFF + -DCMAKE_DEBUG_POSTFIX=d + ) + + + # NanoGUI's install doesn't seem to install its dependencies, so do it manually here. + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/eigen/Eigen" DESTINATION "${CMAKE_INSTALL_PREFIX}/include") + + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/glfw/include/GLFW" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" + FILES_MATCHING PATTERN "glfw3.h" PATTERN "glfw3native.h") + + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/fontstash.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/nanovg.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/nanovg_gl.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/nanovg_gl_utils.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/stb_image.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/nanovg/src/stb_truetype.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nanovg") + + if (WIN32) + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/glad/include/glad" DESTINATION "${CMAKE_INSTALL_PREFIX}/include") + file(INSTALL "${AUTOBUILD_DOWNLOAD_DIR}/NanoGUI/ext/glad/include/KHR" DESTINATION "${CMAKE_INSTALL_PREFIX}/include") + + # And, the don't even install the .dll on Windows! Come on nanogui guys, get your act together! + file(INSTALL "${CMAKE_BINARY_DIR}/external/NanoGUI/Release/nanogui.dll" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + file(INSTALL "${CMAKE_BINARY_DIR}/external/NanoGUI/Debug/nanoguid.dll" DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + endif() + + + AutoBuild_find_built_package_module_mode(${PACKAGE_NAME}) + + set(${PACKAGE_NAME_UPPER}_AUTOBUILT "TRUE" CACHE BOOL "Confirms that package ${PACKAGE_NAME} was successfully built by the AutoBuild system.") + mark_as_advanced(${PACKAGE_NAME}_AUTOBUILT) + + else() + message(STATUS "AutoBuild: Scheduled to build ${PACKAGE_NAME} the next time CMake Configure is run.") + endif() + endif() + + + # If we've found the package, either directly on the system or after autobuilding, then link with it + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency ${PACKAGE_NAME}.") + + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} ${NANOGUI_LIBRARIES}) + target_include_directories(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} ${NANOGUI_INCLUDE_DIRS}) + + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DUSE_${PACKAGE_NAME}) + + if (WIN32) + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DNANOGUI_GLAD -DGLAD_GLAPI_EXPORT) + endif() + + endif() + +endmacro() + diff --git a/dev/MinGfx/cmake/AutoBuildOpenGL.cmake b/dev/MinGfx/cmake/AutoBuildOpenGL.cmake new file mode 100644 index 0000000..c74b2b8 --- /dev/null +++ b/dev/MinGfx/cmake/AutoBuildOpenGL.cmake @@ -0,0 +1,47 @@ +# Author: Daniel F. Keefe +# Copyright 2017,2018, Daniel F. Keefe and Regents of the University of Minnesota +# All Rights Reserved. + + +# Usage: +# AutoBuild_use_package_OpenGL( +# # The 1st argument is required. It is the name of the target you wish to link this dependency to. +# my-program +# +# # The 2nd argument is required. It impacts how dependencies are propogated through CMake. You can treat +# # this dependency as an INTERFACE, PUBLIC, or PRIVATE. See the following URL for details: +# # https://cmake.org/cmake/help/latest/command/target_include_directories.html +# PUBLIC +# ) +# +macro(AutoBuild_use_package_OpenGL YOUR_TARGET INTERFACE_PUBLIC_OR_PRIVATE) + + message(STATUS "AutoBuild: Searching for package OpenGL...") + + # Check to see if the library is already installed on the system + # CMake ships with FindOpenGL.cmake and in CMake 3.9+ it defines + # the imported targets OpenGL::GL and OpenGL::GLU. Using these is + # now the preferred way to link with OpenGL and all of its dependencies. + # See https://cmake.org/cmake/help/v3.9/module/FindOpenGL.html + find_package(OpenGL) + + if (NOT ${OPENGL_FOUND}) + message(FATAL_ERROR "AutoBuild: OpenGL was not found on the system. AutoBuild can auto-download + and build many dependencies for you, but not OpenGL. It should come pre-installed on your system.") + endif() + + message(STATUS "AutoBuild: Ok. Found OpenGL.") + message(STATUS " OpenGL headers: ${OPENGL_INCLUDE_DIR}") + message(STATUS " OpenGL libs: ${OPENGL_LIBRARIES}") + + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency OpenGL::GL.") + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} OpenGL::GL) + + if (${OPENGL_GLU_FOUND}) + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency OpenGL::GLU.") + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} OpenGL::GLU) + endif() + + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DUSE_OPENGL) + +endmacro() diff --git a/dev/MinGfx/cmake/MessageMacros.cmake b/dev/MinGfx/cmake/MessageMacros.cmake new file mode 100644 index 0000000..4628e5c --- /dev/null +++ b/dev/MinGfx/cmake/MessageMacros.cmake @@ -0,0 +1,17 @@ +# This file is part of the MinVR cmake build system. +# See the main MinVR/CMakeLists.txt file for authors, copyright, and license info. + + +macro(h1 TITLE) + string(TOUPPER ${TITLE} TITLE) + message(STATUS "\n\n==== ${TITLE} ====") +endmacro() + +macro(h2 TITLE) + message(STATUS "\n* ${TITLE}") +endmacro() + +macro(h3 TITLE) + message(STATUS "- ${TITLE}") +endmacro() + diff --git a/dev/MinGfx/cmake/MinGfxConfig.cmake.in b/dev/MinGfx/cmake/MinGfxConfig.cmake.in new file mode 100644 index 0000000..8a7b703 --- /dev/null +++ b/dev/MinGfx/cmake/MinGfxConfig.cmake.in @@ -0,0 +1,7 @@ +# To use the MinGfx library in your cmake project, add the following to your CMakeLists.txt: +# find_package(MinGfx REQUIRED) +# ... then, after add_executable(${PROJECT_NAME}) or add_library(${PROJECT_NAME}) +# target_link_libraries(${PROJECT_NAME} PUBLIC MinGfx) + + +include("${CMAKE_CURRENT_LIST_DIR}/MinGfxTargets.cmake") diff --git a/dev/MinGfx/cmake/Modules/FindDoxygen.cmake b/dev/MinGfx/cmake/Modules/FindDoxygen.cmake new file mode 100644 index 0000000..c0e865f --- /dev/null +++ b/dev/MinGfx/cmake/Modules/FindDoxygen.cmake @@ -0,0 +1,1166 @@ +# dfk: edited one line to add CSE labs Doxygen install location to paths to search + + + +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindDoxygen +----------- + +Doxygen is a documentation generation tool (see http://www.doxygen.org). +This module looks for Doxygen and some optional tools it supports. These +tools are enabled as components in the :command:`find_package` command: + +``dot`` + `Graphviz `_ ``dot`` utility used to render various + graphs. +``mscgen`` + `Message Chart Generator `_ utility used + by Doxygen's ``\msc`` and ``\mscfile`` commands. +``dia`` + `Dia `_ the diagram editor used by Doxygen's + ``\diafile`` command. + +Examples: + +.. code-block:: cmake + + # Require dot, treat the other components as optional + find_package(Doxygen + REQUIRED dot + OPTIONAL_COMPONENTS mscgen dia) + +The following variables are defined by this module: + +.. variable:: DOXYGEN_FOUND + + True if the ``doxygen`` executable was found. + +.. variable:: DOXYGEN_VERSION + + The version reported by ``doxygen --version``. + +The module defines ``IMPORTED`` targets for Doxygen and each component found. +These can be used as part of custom commands, etc. and should be preferred over +old-style (and now deprecated) variables like ``DOXYGEN_EXECUTABLE``. The +following import targets are defined if their corresponding executable could be +found (the component import targets will only be defined if that component was +requested): + +:: + + Doxygen::doxygen + Doxygen::dot + Doxygen::mscgen + Doxygen::dia + + +Functions +^^^^^^^^^ + +.. command:: doxygen_add_docs + + This function is intended as a convenience for adding a target for generating + documentation with Doxygen. It aims to provide sensible defaults so that + projects can generally just provide the input files and directories and that + will be sufficient to give sensible results. The function supports the + ability to customize the Doxygen configuration used to build the + documentation. + + :: + + doxygen_add_docs(targetName + [filesOrDirs...] + [ALL] + [USE_STAMP_FILE] + [WORKING_DIRECTORY dir] + [COMMENT comment]) + + The function constructs a ``Doxyfile`` and defines a custom target that runs + Doxygen on that generated file. The listed files and directories are used as + the ``INPUT`` of the generated ``Doxyfile`` and they can contain wildcards. + Any files that are listed explicitly will also be added as ``SOURCES`` of the + custom target so they will show up in an IDE project's source list. + + So that relative input paths work as expected, by default the working + directory of the Doxygen command will be the current source directory (i.e. + :variable:`CMAKE_CURRENT_SOURCE_DIR`). This can be overridden with the + ``WORKING_DIRECTORY`` option to change the directory used as the relative + base point. Note also that Doxygen's default behavior is to strip the working + directory from relative paths in the generated documentation (see the + ``STRIP_FROM_PATH`` `Doxygen config option + `_ for details). + + If provided, the optional ``comment`` will be passed as the ``COMMENT`` for + the :command:`add_custom_target` command used to create the custom target + internally. + + If ``ALL`` is set, the target will be added to the default build target. + + If ``USE_STAMP_FILE`` is set, the custom command defined by this function will + create a stamp file with the name ``.stamp`` in the current + binary directory whenever doxygen is re-run. With this option present, all + items in ```` must be files (i.e. no directories, symlinks or + wildcards) and each of the files must exist at the time + ``doxygen_add_docs()`` is called. An error will be raised if any of the + items listed is missing or is not a file when ``USE_STAMP_FILE`` is given. + A dependency will be created on each of the files so that doxygen will only + be re-run if one of the files is updated. Without the ``USE_STAMP_FILE`` + option, doxygen will always be re-run if the ```` target is built + regardless of whether anything listed in ```` has changed. + + The contents of the generated ``Doxyfile`` can be customized by setting CMake + variables before calling ``doxygen_add_docs()``. Any variable with a name of + the form ``DOXYGEN_`` will have its value substituted for the + corresponding ```` configuration option in the ``Doxyfile``. See the + `Doxygen documentation `_ for the + full list of supported configuration options. + + Some of Doxygen's defaults are overridden to provide more appropriate + behavior for a CMake project. Each of the following will be explicitly set + unless the variable already has a value before ``doxygen_add_docs()`` is + called (with some exceptions noted): + + .. variable:: DOXYGEN_HAVE_DOT + + Set to ``YES`` if the ``dot`` component was requested and it was found, + ``NO`` otherwise. Any existing value of ``DOXYGEN_HAVE_DOT`` is ignored. + + .. variable:: DOXYGEN_DOT_MULTI_TARGETS + + Set to ``YES`` by this module (note that this requires a ``dot`` version + newer than 1.8.10). This option is only meaningful if ``DOXYGEN_HAVE_DOT`` + is also set to ``YES``. + + .. variable:: DOXYGEN_GENERATE_LATEX + + Set to ``NO`` by this module. + + .. variable:: DOXYGEN_WARN_FORMAT + + For Visual Studio based generators, this is set to the form recognized by + the Visual Studio IDE: ``$file($line) : $text``. For all other generators, + Doxygen's default value is not overridden. + + .. variable:: DOXYGEN_PROJECT_NAME + + Populated with the name of the current project (i.e. + :variable:`PROJECT_NAME`). + + .. variable:: DOXYGEN_PROJECT_NUMBER + + Populated with the version of the current project (i.e. + :variable:`PROJECT_VERSION`). + + .. variable:: DOXYGEN_PROJECT_BRIEF + + Populated with the description of the current project (i.e. + :variable:`PROJECT_DESCRIPTION`). + + .. variable:: DOXYGEN_INPUT + + Projects should not set this variable. It will be populated with the set of + files and directories passed to ``doxygen_add_docs()``, thereby providing + consistent behavior with the other built-in commands like + :command:`add_executable`, :command:`add_library` and + :command:`add_custom_target`. If a variable named ``DOXYGEN_INPUT`` is set + by the project, it will be ignored and a warning will be issued. + + .. variable:: DOXYGEN_RECURSIVE + + Set to ``YES`` by this module. + + .. variable:: DOXYGEN_EXCLUDE_PATTERNS + + If the set of inputs includes directories, this variable will specify + patterns used to exclude files from them. The following patterns are added + by ``doxygen_add_docs()`` to ensure CMake-specific files and directories + are not included in the input. If the project sets + ``DOXYGEN_EXCLUDE_PATTERNS``, those contents are merged with these + additional patterns rather than replacing them: + + :: + + */.git/* + */.svn/* + */.hg/* + */CMakeFiles/* + */_CPack_Packages/* + DartConfiguration.tcl + CMakeLists.txt + CMakeCache.txt + + .. variable:: DOXYGEN_OUTPUT_DIRECTORY + + Set to :variable:`CMAKE_CURRENT_BINARY_DIR` by this module. Note that if + the project provides its own value for this and it is a relative path, it + will be converted to an absolute path relative to the current binary + directory. This is necessary because doxygen will normally be run from a + directory within the source tree so that relative source paths work as + expected. If this directory does not exist, it will be recursively created + prior to executing the doxygen commands. + +To change any of these defaults or override any other Doxygen config option, +set relevant variables before calling ``doxygen_add_docs()``. For example: + + .. code-block:: cmake + + set(DOXYGEN_GENERATE_HTML NO) + set(DOXYGEN_GENERATE_MAN YES) + + doxygen_add_docs( + doxygen + ${PROJECT_SOURCE_DIR} + COMMENT "Generate man pages" + ) + +A number of Doxygen config options accept lists of values, but Doxygen requires +them to be separated by whitespace. CMake variables hold lists as a string with +items separated by semi-colons, so a conversion needs to be performed. The +``doxygen_add_docs()`` command specifically checks the following Doxygen config +options and will convert their associated CMake variable's contents into the +required form if set. + +:: + + ABBREVIATE_BRIEF + ALIASES + CITE_BIB_FILES + DIAFILE_DIRS + DOTFILE_DIRS + DOT_FONTPATH + ENABLED_SECTIONS + EXAMPLE_PATH + EXAMPLE_PATTERNS + EXCLUDE + EXCLUDE_PATTERNS + EXCLUDE_SYMBOLS + EXPAND_AS_DEFINED + EXTENSION_MAPPING + EXTRA_PACKAGES + EXTRA_SEARCH_MAPPINGS + FILE_PATTERNS + FILTER_PATTERNS + FILTER_SOURCE_PATTERNS + HTML_EXTRA_FILES + HTML_EXTRA_STYLESHEET + IGNORE_PREFIX + IMAGE_PATH + INCLUDE_FILE_PATTERNS + INCLUDE_PATH + INPUT + LATEX_EXTRA_FILES + LATEX_EXTRA_STYLESHEET + MATHJAX_EXTENSIONS + MSCFILE_DIRS + PLANTUML_INCLUDE_PATH + PREDEFINED + QHP_CUST_FILTER_ATTRS + QHP_SECT_FILTER_ATTRS + STRIP_FROM_INC_PATH + STRIP_FROM_PATH + TAGFILES + TCL_SUBST + +The following single value Doxygen options will be quoted automatically +if they contain at least one space: + +:: + + CHM_FILE + DIA_PATH + DOCBOOK_OUTPUT + DOCSET_FEEDNAME + DOCSET_PUBLISHER_NAME + DOT_FONTNAME + DOT_PATH + EXTERNAL_SEARCH_ID + FILE_VERSION_FILTER + GENERATE_TAGFILE + HHC_LOCATION + HTML_FOOTER + HTML_HEADER + HTML_OUTPUT + HTML_STYLESHEET + INPUT_FILTER + LATEX_FOOTER + LATEX_HEADER + LATEX_OUTPUT + LAYOUT_FILE + MAN_OUTPUT + MAN_SUBDIR + MATHJAX_CODEFILE + MSCGEN_PATH + OUTPUT_DIRECTORY + PERL_PATH + PLANTUML_JAR_PATH + PROJECT_BRIEF + PROJECT_LOGO + PROJECT_NAME + QCH_FILE + QHG_LOCATION + QHP_CUST_FILTER_NAME + QHP_VIRTUAL_FOLDER + RTF_EXTENSIONS_FILE + RTF_OUTPUT + RTF_STYLESHEET_FILE + SEARCHDATA_FILE + USE_MDFILE_AS_MAINPAGE + WARN_FORMAT + WARN_LOGFILE + XML_OUTPUT + +There are situations where it may be undesirable for a particular config option +to be automatically quoted by ``doxygen_add_docs()``, such as ``ALIASES`` which +may need to include its own embedded quoting. The ``DOXYGEN_VERBATIM_VARS`` +variable can be used to specify a list of Doxygen variables (including the +leading ``DOXYGEN_`` prefix) which should not be quoted. The project is then +responsible for ensuring that those variables' values make sense when placed +directly in the Doxygen input file. In the case of list variables, list items +are still separated by spaces, it is only the automatic quoting that is +skipped. For example, the following allows ``doxygen_add_docs()`` to apply +quoting to ``DOXYGEN_PROJECT_BRIEF``, but not each item in the +``DOXYGEN_ALIASES`` list (:ref:`bracket syntax ` can also +be used to make working with embedded quotes easier): + +.. code-block:: cmake + + set(DOXYGEN_PROJECT_BRIEF "String with spaces") + set(DOXYGEN_ALIASES + [[somealias="@some_command param"]] + "anotherAlias=@foobar" + ) + set(DOXYGEN_VERBATIM_VARS DOXYGEN_ALIASES) + +The resultant ``Doxyfile`` will contain the following lines: + +.. code-block:: text + + PROJECT_BRIEF = "String with spaces" + ALIASES = somealias="@some_command param" anotherAlias=@foobar + + +Deprecated Result Variables +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For compatibility with previous versions of CMake, the following variables +are also defined but they are deprecated and should no longer be used: + +.. variable:: DOXYGEN_EXECUTABLE + + The path to the ``doxygen`` command. If projects need to refer to the + ``doxygen`` executable directly, they should use the ``Doxygen::doxygen`` + import target instead. + +.. variable:: DOXYGEN_DOT_FOUND + + True if the ``dot`` executable was found. + +.. variable:: DOXYGEN_DOT_EXECUTABLE + + The path to the ``dot`` command. If projects need to refer to the ``dot`` + executable directly, they should use the ``Doxygen::dot`` import target + instead. + +.. variable:: DOXYGEN_DOT_PATH + + The path to the directory containing the ``dot`` executable as reported in + ``DOXYGEN_DOT_EXECUTABLE``. The path may have forward slashes even on Windows + and is not suitable for direct substitution into a ``Doxyfile.in`` template. + If you need this value, get the :prop_tgt:`IMPORTED_LOCATION` property of the + ``Doxygen::dot`` target and use :command:`get_filename_component` to extract + the directory part of that path. You may also want to consider using + :command:`file(TO_NATIVE_PATH)` to prepare the path for a Doxygen + configuration file. + + +Deprecated Hint Variables +^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. variable:: DOXYGEN_SKIP_DOT + + This variable has no effect for the component form of ``find_package``. + In backward compatibility mode (i.e. without components list) it prevents + the finder module from searching for Graphviz's ``dot`` utility. + +#]=======================================================================] + +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + +# For backwards compatibility support +if(Doxygen_FIND_QUIETLY) + set(DOXYGEN_FIND_QUIETLY TRUE) +endif() + +# ===== Rationale for OS X AppBundle mods below ===== +# With the OS X GUI version, Doxygen likes to be installed to /Applications +# and it contains the doxygen executable in the bundle. In the versions I've +# seen, it is located in Resources, but in general, more often binaries are +# located in MacOS. +# +# NOTE: The official Doxygen.app distributed for OS X uses non-standard +# conventions. Instead of the command-line "doxygen" tool being placed in +# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and +# "doxygen" is placed in Contents/Resources. This is most likely done +# so that something happens when people double-click on the Doxygen.app +# package. Unfortunately, CMake gets confused by this as when it sees the +# bundle it uses "Doxywizard" as the executable to use instead of +# "doxygen". Therefore to work-around this issue we temporarily disable +# the app-bundle feature, just for this CMake module: +# +if(APPLE) + # Save the old setting + set(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE}) + # Disable the App-bundle detection feature + set(CMAKE_FIND_APPBUNDLE "NEVER") +endif() +# FYI: +# In older versions of OS X Doxygen, dot was included with the Doxygen bundle, +# but newer versions require you to download Graphviz.app which contains "dot" +# or use something like homebrew. +# ============== End OSX stuff ================ + +# +# Find Doxygen... +# +macro(_Doxygen_find_doxygen) + find_program( + DOXYGEN_EXECUTABLE + NAMES doxygen + PATHS + C:/Doxygen191/bin + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin" + /Applications/Doxygen.app/Contents/Resources + /Applications/Doxygen.app/Contents/MacOS + /Applications/Utilities/Doxygen.app/Contents/Resources + /Applications/Utilities/Doxygen.app/Contents/MacOS + DOC "Doxygen documentation generation tool (http://www.doxygen.org)" + ) + mark_as_advanced(DOXYGEN_EXECUTABLE) + + if(DOXYGEN_EXECUTABLE) + execute_process( + COMMAND "${DOXYGEN_EXECUTABLE}" --version + OUTPUT_VARIABLE DOXYGEN_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE _Doxygen_version_result + ) + if(_Doxygen_version_result) + message(WARNING "Unable to determine doxygen version: ${_Doxygen_version_result}") + endif() + + # Create an imported target for Doxygen + if(NOT TARGET Doxygen::doxygen) + add_executable(Doxygen::doxygen IMPORTED GLOBAL) + set_target_properties(Doxygen::doxygen PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_EXECUTABLE}" + ) + endif() + endif() +endmacro() + +# +# Find Diagram Editor... +# +macro(_Doxygen_find_dia) + set(_x86 "(x86)") + find_program( + DOXYGEN_DIA_EXECUTABLE + NAMES dia + PATHS + "$ENV{ProgramFiles}/Dia" + "$ENV{ProgramFiles${_x86}}/Dia" + DOC "Diagram Editor tool for use with Doxygen" + ) + mark_as_advanced(DOXYGEN_DIA_EXECUTABLE) + + if(DOXYGEN_DIA_EXECUTABLE) + # The Doxyfile wants the path to the utility, not the entire path + # including file name + get_filename_component(DOXYGEN_DIA_PATH + "${DOXYGEN_DIA_EXECUTABLE}" + DIRECTORY) + if(WIN32) + file(TO_NATIVE_PATH "${DOXYGEN_DIA_PATH}" DOXYGEN_DIA_PATH) + endif() + + # Create an imported target for component + if(NOT TARGET Doxygen::dia) + add_executable(Doxygen::dia IMPORTED GLOBAL) + set_target_properties(Doxygen::dia PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_DIA_EXECUTABLE}" + ) + endif() + endif() + + unset(_x86) +endmacro() + +# +# Find Graphviz Dot... +# +macro(_Doxygen_find_dot) + if(WIN32) + set(_x86 "(x86)") + file( + GLOB _Doxygen_GRAPHVIZ_BIN_DIRS + "$ENV{ProgramFiles}/Graphviz*/bin" + "$ENV{ProgramFiles${_x86}}/Graphviz*/bin" + ) + unset(_x86) + else() + set(_Doxygen_GRAPHVIZ_BIN_DIRS "") + endif() + + find_program( + DOXYGEN_DOT_EXECUTABLE + NAMES dot + PATHS + ${_Doxygen_GRAPHVIZ_BIN_DIRS} + "$ENV{ProgramFiles}/ATT/Graphviz/bin" + "C:/Program Files/ATT/Graphviz/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin + /Applications/Graphviz.app/Contents/MacOS + /Applications/Utilities/Graphviz.app/Contents/MacOS + /Applications/Doxygen.app/Contents/Resources + /Applications/Doxygen.app/Contents/MacOS + /Applications/Utilities/Doxygen.app/Contents/Resources + /Applications/Utilities/Doxygen.app/Contents/MacOS + DOC "Dot tool for use with Doxygen" + ) + mark_as_advanced(DOXYGEN_DOT_EXECUTABLE) + + if(DOXYGEN_DOT_EXECUTABLE) + # The Doxyfile wants the path to the utility, not the entire path + # including file name + get_filename_component(DOXYGEN_DOT_PATH + "${DOXYGEN_DOT_EXECUTABLE}" + DIRECTORY) + if(WIN32) + file(TO_NATIVE_PATH "${DOXYGEN_DOT_PATH}" DOXYGEN_DOT_PATH) + endif() + + # Create an imported target for component + if(NOT TARGET Doxygen::dot) + add_executable(Doxygen::dot IMPORTED GLOBAL) + set_target_properties(Doxygen::dot PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_DOT_EXECUTABLE}" + ) + endif() + endif() + + unset(_Doxygen_GRAPHVIZ_BIN_DIRS) +endmacro() + +# +# Find Message Sequence Chart... +# +macro(_Doxygen_find_mscgen) + set(_x86 "(x86)") + find_program( + DOXYGEN_MSCGEN_EXECUTABLE + NAMES mscgen + PATHS + "$ENV{ProgramFiles}/Mscgen" + "$ENV{ProgramFiles${_x86}}/Mscgen" + DOC "Message sequence chart tool for use with Doxygen" + ) + mark_as_advanced(DOXYGEN_MSCGEN_EXECUTABLE) + + if(DOXYGEN_MSCGEN_EXECUTABLE) + # The Doxyfile wants the path to the utility, not the entire path + # including file name + get_filename_component(DOXYGEN_MSCGEN_PATH + "${DOXYGEN_MSCGEN_EXECUTABLE}" + DIRECTORY) + if(WIN32) + file(TO_NATIVE_PATH "${DOXYGEN_MSCGEN_PATH}" DOXYGEN_MSCGEN_PATH) + endif() + + # Create an imported target for component + if(NOT TARGET Doxygen::mscgen) + add_executable(Doxygen::mscgen IMPORTED GLOBAL) + set_target_properties(Doxygen::mscgen PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_MSCGEN_EXECUTABLE}" + ) + endif() + endif() + + unset(_x86) +endmacro() + +# Make sure `doxygen` is one of the components to find +set(_Doxygen_keep_backward_compat FALSE) +if(NOT Doxygen_FIND_COMPONENTS) + # Search at least for `doxygen` executable + set(Doxygen_FIND_COMPONENTS doxygen) + # Preserve backward compatibility: + # search for `dot` also if `DOXYGEN_SKIP_DOT` is not explicitly disable this. + if(NOT DOXYGEN_SKIP_DOT) + list(APPEND Doxygen_FIND_COMPONENTS dot) + endif() + set(_Doxygen_keep_backward_compat TRUE) +elseif(NOT doxygen IN_LIST Doxygen_FIND_COMPONENTS) + list(INSERT Doxygen_FIND_COMPONENTS 0 doxygen) +endif() + +# +# Find all requested components of Doxygen... +# +foreach(_comp IN LISTS Doxygen_FIND_COMPONENTS) + if(_comp STREQUAL "doxygen") + _Doxygen_find_doxygen() + elseif(_comp STREQUAL "dia") + _Doxygen_find_dia() + elseif(_comp STREQUAL "dot") + _Doxygen_find_dot() + elseif(_comp STREQUAL "mscgen") + _Doxygen_find_mscgen() + else() + message(WARNING "${_comp} is not a valid Doxygen component") + set(Doxygen_${_comp}_FOUND FALSE) + continue() + endif() + + if(TARGET Doxygen::${_comp}) + set(Doxygen_${_comp}_FOUND TRUE) + else() + set(Doxygen_${_comp}_FOUND FALSE) + endif() +endforeach() +unset(_comp) + +# Verify find results +#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + Doxygen + REQUIRED_VARS DOXYGEN_EXECUTABLE + VERSION_VAR DOXYGEN_VERSION + HANDLE_COMPONENTS +) + +# +# Backwards compatibility... +# +if(APPLE) + # Restore the old app-bundle setting + set(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE}) +endif() + +# Maintain the _FOUND variables as "YES" or "NO" for backwards +# compatibility. This allows people to substitute them directly into +# Doxyfile with configure_file(). +if(DOXYGEN_FOUND) + set(DOXYGEN_FOUND "YES") +else() + set(DOXYGEN_FOUND "NO") +endif() +if(_Doxygen_keep_backward_compat) + if(Doxygen_dot_FOUND) + set(DOXYGEN_DOT_FOUND "YES") + else() + set(DOXYGEN_DOT_FOUND "NO") + endif() + + # For backwards compatibility support for even older CMake versions + set(DOXYGEN ${DOXYGEN_EXECUTABLE}) + set(DOT ${DOXYGEN_DOT_EXECUTABLE}) + + # No need to keep any backward compatibility for `DOXYGEN_MSCGEN_XXX` + # and `DOXYGEN_DIA_XXX` since they were not supported before component + # support was added +endif() +unset(_Doxygen_keep_backward_compat) + +# +# Allow full control of Doxygen from CMakeLists.txt +# + +# Prepare a template Doxyfile and Doxygen's default values CMake file +if(TARGET Doxygen::doxygen) + # If doxygen was found, use it to generate a minimal default Doxyfile. + # We will delete this file after we have finished using it below to + # generate the other files that doxygen_add_docs() will use. + set(_Doxygen_tpl "${CMAKE_BINARY_DIR}/CMakeDoxyfile.tpl") + execute_process( + COMMAND "${DOXYGEN_EXECUTABLE}" -s -g "${_Doxygen_tpl}" + OUTPUT_QUIET + RESULT_VARIABLE _Doxygen_tpl_result + ) + if(_Doxygen_tpl_result) + message(FATAL_ERROR + "Unable to generate Doxyfile template: ${_Doxygen_tpl_result}") + elseif(NOT EXISTS "${_Doxygen_tpl}") + message(FATAL_ERROR + "Doxygen has failed to generate a Doxyfile template") + endif() + + # Write a do-not-edit header to files we are going to generate... + set(_Doxygen_dne_header +[[ +# +# DO NOT EDIT! THIS FILE WAS GENERATED BY CMAKE! +# + +]] + ) + # We only need one copy of these across the whole build, since their + # content is only dependent on the version of Doxygen being used. Therefore + # we always put them at the top of the build tree so that they are in a + # predictable location. + set(_doxyfile_in "${CMAKE_BINARY_DIR}/CMakeDoxyfile.in") + set(_doxyfile_defaults "${CMAKE_BINARY_DIR}/CMakeDoxygenDefaults.cmake") + + file(WRITE "${_doxyfile_in}" ${_Doxygen_dne_header}) + file(WRITE "${_doxyfile_defaults}" ${_Doxygen_dne_header}) + + # Get strings containing a configuration key from the template Doxyfile + # we obtained from this version of Doxygen. Because some options are split + # across multiple lines by ending lines with backslashes, we cannot just + # use file(STRINGS...) with a REGEX. Instead, read lines without a REGEX + # so that file(STRINGS...) handles the trailing backslash as a line + # continuation. It stores multi-lines as lists, so we then have to replace + # the ";" list separator with backslashed newlines again so that we get the + # original content stored back as the value part. + file(STRINGS "${_Doxygen_tpl}" _file_lines) + unset(_Doxygen_tpl_params) + foreach(_line IN LISTS _file_lines) + if(_line MATCHES "([A-Z][A-Z0-9_]+)( *=)(.*)") + set(_key "${CMAKE_MATCH_1}") + set(_eql "${CMAKE_MATCH_2}") + set(_value "${CMAKE_MATCH_3}") + string(REPLACE "\\" "\\\\" _value "${_value}") + string(REPLACE ";" "\\\n" _value "${_value}") + list(APPEND _Doxygen_tpl_params "${_key}${_eql}${_value}") + endif() + endforeach() + + # Build up a Doxyfile that provides @configVar@ substitutions for each + # Doxygen config option as well as a separate CMake script which provides + # the default value for each of those options if the project doesn't supply + # them. Each config option will support substitution of a CMake variable + # of the same name except with DOXYGEN_ prepended. + foreach(_Doxygen_param IN LISTS _Doxygen_tpl_params) + if(_Doxygen_param MATCHES "([A-Z][A-Z0-9_]+)( *)=( (.*))?") + # Ok, this is a config key with a value + if(CMAKE_MATCH_COUNT EQUAL 4) + file(APPEND "${_doxyfile_in}" + "${CMAKE_MATCH_1}${CMAKE_MATCH_2}= @DOXYGEN_${CMAKE_MATCH_1}@\n") + # Remove the backslashes we had to preserve to handle newlines + string(REPLACE "\\\n" "\n" _value "${CMAKE_MATCH_4}") + file(APPEND "${_doxyfile_defaults}" +"if(NOT DEFINED DOXYGEN_${CMAKE_MATCH_1}) + set(DOXYGEN_${CMAKE_MATCH_1} ${_value}) +endif() +") + # Ok, this is a config key with empty default value + elseif(CMAKE_MATCH_COUNT EQUAL 2) + file(APPEND "${_doxyfile_in}" + "${CMAKE_MATCH_1}${CMAKE_MATCH_2}= @DOXYGEN_${CMAKE_MATCH_1}@\n") + else() + message(AUTHOR_WARNING +"Unexpected line format! Code review required!\nFault line: ${_Doxygen_param}") + endif() + else() + message(AUTHOR_WARNING +"Unexpected line format! Code review required!\nFault line: ${_Doxygen_param}") + endif() + endforeach() + + # Ok, dumped defaults are not needed anymore... + file(REMOVE "${_Doxygen_tpl}") + + unset(_Doxygen_param) + unset(_Doxygen_tpl_params) + unset(_Doxygen_dne_header) + unset(_Doxygen_tpl) + +endif() + +function(doxygen_quote_value VARIABLE) + # Quote a value of the given variable if: + # - VARIABLE parameter was really given + # - the variable it names is defined and is not present in the list + # specified by DOXYGEN_VERBATIM_VARS (if set) + # - the value of the named variable isn't already quoted + # - the value has spaces + if(VARIABLE AND DEFINED ${VARIABLE} AND + NOT ${VARIABLE} MATCHES "^\".* .*\"$" AND ${VARIABLE} MATCHES " " AND + NOT (DEFINED DOXYGEN_VERBATIM_VARS AND + "${VARIABLE}" IN_LIST DOXYGEN_VERBATIM_VARS)) + set(${VARIABLE} "\"${${VARIABLE}}\"" PARENT_SCOPE) + endif() +endfunction() + +function(doxygen_list_to_quoted_strings LIST_VARIABLE) + if(LIST_VARIABLE AND DEFINED ${LIST_VARIABLE}) + unset(_inputs) + unset(_sep) + unset(_verbatim) + # Have to test if list items should be treated as verbatim here + # because we lose the variable name when we pass just one list item + # to doxygen_quote_value() below + if(DEFINED DOXYGEN_VERBATIM_VARS AND + "${LIST_VARIABLE}" IN_LIST DOXYGEN_VERBATIM_VARS) + set(_verbatim True) + endif() + foreach(_in IN LISTS ${LIST_VARIABLE}) + if(NOT _verbatim) + doxygen_quote_value(_in) + endif() + string(APPEND _inputs "${_sep}${_in}") + set(_sep " ") + endforeach() + set(${LIST_VARIABLE} "${_inputs}" PARENT_SCOPE) + endif() +endfunction() + +function(doxygen_add_docs targetName) + set(_options ALL USE_STAMP_FILE) + set(_one_value_args WORKING_DIRECTORY COMMENT) + set(_multi_value_args) + cmake_parse_arguments(_args + "${_options}" + "${_one_value_args}" + "${_multi_value_args}" + ${ARGN}) + + if(NOT _args_COMMENT) + set(_args_COMMENT "Generate API documentation for ${targetName}") + endif() + + if(NOT _args_WORKING_DIRECTORY) + set(_args_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + endif() + + if(DEFINED DOXYGEN_INPUT) + message(WARNING +"DOXYGEN_INPUT is set but it will be ignored. Pass the files and directories \ +directly to the doxygen_add_docs() command instead.") + endif() + set(DOXYGEN_INPUT ${_args_UNPARSED_ARGUMENTS}) + + if(NOT TARGET Doxygen::doxygen) + message(FATAL_ERROR "Doxygen was not found, needed by \ +doxygen_add_docs() for target ${targetName}") + endif() + + # If not already defined, set some relevant defaults based on the + # assumption that the documentation is for the whole project. Details + # specified in the project() command will be used to populate a number of + # these defaults. + + if(NOT DEFINED DOXYGEN_PROJECT_NAME) + # The PROJECT_NAME tag is a single word (or a sequence of words + # surrounded by double-quotes, unless you are using Doxywizard) that + # should identify the project for which the documentation is generated. + # This name is used in the title of most generated pages and in a few + # other places. The default value is: My Project. + set(DOXYGEN_PROJECT_NAME ${PROJECT_NAME}) + endif() + + if(NOT DEFINED DOXYGEN_PROJECT_NUMBER) + # The PROJECT_NUMBER tag can be used to enter a project or revision + # number. This could be handy for archiving the generated documentation + # or if some version control system is used. + set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION}) + endif() + + if(NOT DEFINED DOXYGEN_PROJECT_BRIEF) + # Using the PROJECT_BRIEF tag one can provide an optional one line + # description for a project that appears at the top of each page and + # should give viewer a quick idea about the purpose of the project. + # Keep the description short. + set(DOXYGEN_PROJECT_BRIEF "${PROJECT_DESCRIPTION}") + endif() + + if(NOT DEFINED DOXYGEN_RECURSIVE) + # The RECURSIVE tag can be used to specify whether or not + # subdirectories should be searched for input files as well. CMake + # projects generally evolve to span multiple directories, so it makes + # more sense for this to be on by default. Doxygen's default value + # has this setting turned off, so we override it. + set(DOXYGEN_RECURSIVE YES) + endif() + + if(NOT DEFINED DOXYGEN_OUTPUT_DIRECTORY) + # The OUTPUT_DIRECTORY tag is used to specify the (relative or + # absolute) path into which the generated documentation will be + # written. If a relative path is used, Doxygen will interpret it as + # being relative to the location where doxygen was started, but we need + # to run Doxygen in the source tree so that relative input paths work + # intuitively. Therefore, we ensure that the output directory is always + # an absolute path and if the project provided a relative path, we + # treat it as relative to the current BINARY directory so that output + # is not generated inside the source tree. + set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") + elseif(NOT IS_ABSOLUTE "${DOXYGEN_OUTPUT_DIRECTORY}") + get_filename_component(DOXYGEN_OUTPUT_DIRECTORY + "${DOXYGEN_OUTPUT_DIRECTORY}" + ABSOLUTE + BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}") + endif() + + if(NOT DEFINED DOXYGEN_HAVE_DOT) + # If you set the HAVE_DOT tag to YES then doxygen will assume the dot + # tool is available from the path. This tool is part of Graphviz (see: + # http://www.graphviz.org/), a graph visualization toolkit from AT&T + # and Lucent Bell Labs. The other options in this section have no + # effect if this option is set to NO. + # Doxygen's default value is: NO. + if(Doxygen_dot_FOUND) + set(DOXYGEN_HAVE_DOT "YES") + else() + set(DOXYGEN_HAVE_DOT "NO") + endif() + endif() + + if(NOT DEFINED DOXYGEN_DOT_MULTI_TARGETS) + # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate + # multiple output files in one run (i.e. multiple -o and -T options on + # the command line). This makes dot run faster, but since only newer + # versions of dot (>1.8.10) support this, Doxygen disables this feature + # by default. + # This tag requires that the tag HAVE_DOT is set to YES. + set(DOXYGEN_DOT_MULTI_TARGETS YES) + endif() + + if(NOT DEFINED DOXYGEN_GENERATE_LATEX) + # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX + # output. We only want the HTML output enabled by default, so we turn + # this off if the project hasn't specified it. + set(DOXYGEN_GENERATE_LATEX NO) + endif() + + if(NOT DEFINED DOXYGEN_WARN_FORMAT) + if(CMAKE_VS_MSBUILD_COMMAND OR CMAKE_VS_DEVENV_COMMAND) + # The WARN_FORMAT tag determines the format of the warning messages + # that doxygen can produce. The string should contain the $file, + # $line and $text tags, which will be replaced by the file and line + # number from which the warning originated and the warning text. + # Optionally, the format may contain $version, which will be + # replaced by the version of the file (if it could be obtained via + # FILE_VERSION_FILTER). + # Doxygen's default value is: $file:$line: $text + set(DOXYGEN_WARN_FORMAT "$file($line) : $text ") + endif() + endif() + + if(DEFINED DOXYGEN_WARN_LOGFILE AND NOT IS_ABSOLUTE "${DOXYGEN_WARN_LOGFILE}") + # The WARN_LOGFILE tag can be used to specify a file to which warning and error + # messages should be written. If left blank the output is written to standard + # error (stderr). + get_filename_component(DOXYGEN_WARN_LOGFILE + "${DOXYGEN_WARN_LOGFILE}" + ABSOLUTE + BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}") + endif() + + # Any files from the INPUT that match any of the EXCLUDE_PATTERNS will be + # excluded from the set of input files. We provide some additional patterns + # to prevent commonly unwanted things from CMake builds being pulled in. + # + # Note that the wildcards are matched against the file with absolute path, + # so to exclude all test directories for example use the pattern */test/* + list( + APPEND + DOXYGEN_EXCLUDE_PATTERNS + "*/.git/*" + "*/.svn/*" + "*/.hg/*" + "*/CMakeFiles/*" + "*/_CPack_Packages/*" + "DartConfiguration.tcl" + "CMakeLists.txt" + "CMakeCache.txt" + ) + + # Now bring in Doxgen's defaults for those things the project has not + # already set and we have not provided above + include("${CMAKE_BINARY_DIR}/CMakeDoxygenDefaults.cmake" OPTIONAL) + + # Cleanup built HTMLs on "make clean" + # TODO Any other dirs? + if(DOXYGEN_GENERATE_HTML) + if(IS_ABSOLUTE "${DOXYGEN_HTML_OUTPUT}") + set(_args_clean_html_dir "${DOXYGEN_HTML_OUTPUT}") + else() + set(_args_clean_html_dir + "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_HTML_OUTPUT}") + endif() + set_property(DIRECTORY APPEND PROPERTY + ADDITIONAL_CLEAN_FILES "${_args_clean_html_dir}") + endif() + + # Build up a list of files we can identify from the inputs so we can list + # them as DEPENDS and SOURCES in the custom command/target (the latter + # makes them display in IDEs). This must be done before we transform the + # various DOXYGEN_... variables below because we need to process + # DOXYGEN_INPUT as a list first. + unset(_sources) + foreach(_item IN LISTS DOXYGEN_INPUT) + get_filename_component(_abs_item "${_item}" ABSOLUTE + BASE_DIR "${_args_WORKING_DIRECTORY}") + get_source_file_property(_isGenerated "${_abs_item}" GENERATED) + if(_isGenerated OR + (EXISTS "${_abs_item}" AND + NOT IS_DIRECTORY "${_abs_item}" AND + NOT IS_SYMLINK "${_abs_item}")) + list(APPEND _sources "${_abs_item}") + elseif(_args_USE_STAMP_FILE) + message(FATAL_ERROR "Source does not exist or is not a file:\n" + " ${_abs_item}\n" + "Only existing files may be specified when the " + "USE_STAMP_FILE option is given.") + endif() + endforeach() + + # Transform known list type options into space separated strings. + set(_doxygen_list_options + ABBREVIATE_BRIEF + ALIASES + CITE_BIB_FILES + DIAFILE_DIRS + DOTFILE_DIRS + DOT_FONTPATH + ENABLED_SECTIONS + EXAMPLE_PATH + EXAMPLE_PATTERNS + EXCLUDE + EXCLUDE_PATTERNS + EXCLUDE_SYMBOLS + EXPAND_AS_DEFINED + EXTENSION_MAPPING + EXTRA_PACKAGES + EXTRA_SEARCH_MAPPINGS + FILE_PATTERNS + FILTER_PATTERNS + FILTER_SOURCE_PATTERNS + HTML_EXTRA_FILES + HTML_EXTRA_STYLESHEET + IGNORE_PREFIX + IMAGE_PATH + INCLUDE_FILE_PATTERNS + INCLUDE_PATH + INPUT + LATEX_EXTRA_FILES + LATEX_EXTRA_STYLESHEET + MATHJAX_EXTENSIONS + MSCFILE_DIRS + PLANTUML_INCLUDE_PATH + PREDEFINED + QHP_CUST_FILTER_ATTRS + QHP_SECT_FILTER_ATTRS + STRIP_FROM_INC_PATH + STRIP_FROM_PATH + TAGFILES + TCL_SUBST + ) + foreach(_item IN LISTS _doxygen_list_options) + doxygen_list_to_quoted_strings(DOXYGEN_${_item}) + endforeach() + + # Transform known single value variables which may contain spaces, such as + # paths or description strings. + set(_doxygen_quoted_options + CHM_FILE + DIA_PATH + DOCBOOK_OUTPUT + DOCSET_FEEDNAME + DOCSET_PUBLISHER_NAME + DOT_FONTNAME + DOT_PATH + EXTERNAL_SEARCH_ID + FILE_VERSION_FILTER + GENERATE_TAGFILE + HHC_LOCATION + HTML_FOOTER + HTML_HEADER + HTML_OUTPUT + HTML_STYLESHEET + INPUT_FILTER + LATEX_FOOTER + LATEX_HEADER + LATEX_OUTPUT + LAYOUT_FILE + MAN_OUTPUT + MAN_SUBDIR + MATHJAX_CODEFILE + MSCGEN_PATH + OUTPUT_DIRECTORY + PERL_PATH + PLANTUML_JAR_PATH + PROJECT_BRIEF + PROJECT_LOGO + PROJECT_NAME + QCH_FILE + QHG_LOCATION + QHP_CUST_FILTER_NAME + QHP_VIRTUAL_FOLDER + RTF_EXTENSIONS_FILE + RTF_OUTPUT + RTF_STYLESHEET_FILE + SEARCHDATA_FILE + USE_MDFILE_AS_MAINPAGE + WARN_FORMAT + WARN_LOGFILE + XML_OUTPUT + ) + + # Store the unmodified value of DOXYGEN_OUTPUT_DIRECTORY prior to invoking + # doxygen_quote_value() below. This will mutate the string specifically for + # consumption by Doxygen's config file, which we do not want when we use it + # later in the custom target's commands. + set( _original_doxygen_output_dir ${DOXYGEN_OUTPUT_DIRECTORY} ) + + foreach(_item IN LISTS _doxygen_quoted_options) + doxygen_quote_value(DOXYGEN_${_item}) + endforeach() + + # Prepare doxygen configuration file + set(_doxyfile_template "${CMAKE_BINARY_DIR}/CMakeDoxyfile.in") + set(_target_doxyfile "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${targetName}") + configure_file("${_doxyfile_template}" "${_target_doxyfile}") + + unset(_all) + if(${_args_ALL}) + set(_all ALL) + endif() + + # Only create the stamp file if asked to. If we don't create it, + # the target will always be considered out-of-date. + if(_args_USE_STAMP_FILE) + set(__stamp_file "${CMAKE_CURRENT_BINARY_DIR}/${targetName}.stamp") + add_custom_command( + VERBATIM + OUTPUT ${__stamp_file} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_original_doxygen_output_dir} + COMMAND "${DOXYGEN_EXECUTABLE}" "${_target_doxyfile}" + COMMAND ${CMAKE_COMMAND} -E touch ${__stamp_file} + WORKING_DIRECTORY "${_args_WORKING_DIRECTORY}" + DEPENDS "${_target_doxyfile}" ${_sources} + COMMENT "${_args_COMMENT}" + ) + add_custom_target(${targetName} ${_all} + DEPENDS ${__stamp_file} + SOURCES ${_sources} + ) + unset(__stamp_file) + else() + add_custom_target( ${targetName} ${_all} VERBATIM + COMMAND ${CMAKE_COMMAND} -E make_directory ${_original_doxygen_output_dir} + COMMAND "${DOXYGEN_EXECUTABLE}" "${_target_doxyfile}" + WORKING_DIRECTORY "${_args_WORKING_DIRECTORY}" + DEPENDS "${_target_doxyfile}" ${_sources} + COMMENT "${_args_COMMENT}" + SOURCES ${_sources} + ) + endif() + +endfunction() + +cmake_policy(POP) diff --git a/dev/MinGfx/cmake/Modules/FindNanoGUI.cmake b/dev/MinGfx/cmake/Modules/FindNanoGUI.cmake new file mode 100644 index 0000000..1c27135 --- /dev/null +++ b/dev/MinGfx/cmake/Modules/FindNanoGUI.cmake @@ -0,0 +1,62 @@ + + +find_path(NANOGUI_INCLUDE_DIR + nanogui/nanogui.h + HINTS + ${CMAKE_INSTALL_PREFIX}/include + ${CMAKE_INSTALL_PREFIX}/include/nanogui + $ENV{NANOGUI_ROOT}/include + $ENV{NANOGUI_ROOT}/include/nanogui + /usr/local/include + /usr/local/include/nanogui +) + + +find_library(NANOGUI_OPT_LIBRARIES + NAMES + nanogui + HINTS + ${CMAKE_INSTALL_PREFIX}/lib + $ENV{NANOGUI_ROOT}/lib + /usr/local/lib +) + + +find_library(NANOGUI_DEBUG_LIBRARIES + NAMES + nanoguid + HINTS + ${CMAKE_INSTALL_PREFIX}/lib + $ENV{NANOGUI_ROOT}/lib + /usr/local/lib +) + +set(NANOGUI_INCLUDE_DIRS + ${NANOGUI_INCLUDE_DIR} + ${NANOGUI_INCLUDE_DIR}/nanovg +) + +unset(NANOGUI_LIBRARIES) +if (NANOGUI_OPT_LIBRARIES) + list(APPEND NANOGUI_LIBRARIES optimized ${NANOGUI_OPT_LIBRARIES}) +endif() + +if (NANOGUI_DEBUG_LIBRARIES) + list(APPEND NANOGUI_LIBRARIES debug ${NANOGUI_DEBUG_LIBRARIES}) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + NanoGUI + DEFAULT_MSG + NANOGUI_INCLUDE_DIRS + NANOGUI_LIBRARIES +) + +mark_as_advanced( + NANOGUI_INCLUDE_DIR + NANOGUI_INCLUDE_DIRS + NANOGUI_OPT_LIBRARIES + NANOGUI_DEBUG_LIBRARIES + NANOGUI_LIBRARIES +) diff --git a/dev/MinGfx/data/Futura_Medium_BT.ttf b/dev/MinGfx/data/Futura_Medium_BT.ttf new file mode 100644 index 0000000..b08a86e Binary files /dev/null and b/dev/MinGfx/data/Futura_Medium_BT.ttf differ diff --git a/dev/MinGfx/data/teapot.obj b/dev/MinGfx/data/teapot.obj new file mode 100644 index 0000000..38008e2 --- /dev/null +++ b/dev/MinGfx/data/teapot.obj @@ -0,0 +1,8210 @@ +#### +# +# OBJ File Generated by Meshlab +# +#### +# Object teapot.obj +# +# Vertices: 2081 +# Faces: 4032 +# +#### +vn -0.935882 -0.352314 0.000004 +v 0.183957 0.128242 0.000001 0.752941 0.752941 0.752941 +vn -0.917700 -0.352548 -0.183132 +v 0.179604 0.128242 0.044341 0.752941 0.752941 0.752941 +vn -0.953551 -0.233737 -0.190021 +v 0.177135 0.134936 0.043827 0.752941 0.752941 0.752941 +vn -0.972350 -0.233527 -0.000001 +v 0.181437 0.134936 0.000001 0.752941 0.752941 0.752941 +vn -0.971779 0.134763 -0.193608 +v 0.176628 0.139718 0.043722 0.752941 0.752941 0.752941 +vn -0.990900 0.134600 -0.000001 +v 0.180920 0.139718 0.000001 0.752941 0.752941 0.752941 +vn -0.682645 0.717970 -0.136069 +v 0.177731 0.142587 0.043951 0.752941 0.752941 0.752941 +vn -0.696557 0.717502 0.000003 +v 0.182045 0.142587 0.000001 0.752941 0.752941 0.752941 +vn -0.028042 0.999590 -0.005761 +v 0.180081 0.143544 0.044440 0.752941 0.752941 0.752941 +vn -0.028982 0.999580 0.000003 +v 0.184442 0.143544 0.000001 0.752941 0.752941 0.752941 +vn 0.444456 0.891418 0.088510 +v 0.183324 0.142587 0.045114 0.752941 0.752941 0.752941 +vn 0.453327 0.891344 0.000005 +v 0.187752 0.142587 0.000001 0.752941 0.752941 0.752941 +vn 0.675238 0.725218 0.134583 +v 0.187101 0.139718 0.045900 0.752941 0.752941 0.752941 +vn 0.688802 0.724950 0.000001 +v 0.191607 0.139718 0.000001 0.752941 0.752941 0.752941 +vn 0.804275 0.572218 0.160337 +v 0.191059 0.134936 0.046723 0.752941 0.752941 0.752941 +vn 0.820356 0.571854 -0.000003 +v 0.195645 0.134936 0.000001 0.752941 0.752941 0.752941 +vn 0.869035 0.463428 0.173243 +v 0.194838 0.128242 0.047509 0.752941 0.752941 0.752941 +vn 0.886299 0.463113 0.000004 +v 0.199501 0.128242 0.000001 0.752941 0.752941 0.752941 +vn -0.863779 -0.353110 -0.359442 +v 0.167091 0.128242 0.085417 0.752941 0.752941 0.752941 +vn -0.897733 -0.233880 -0.373330 +v 0.164766 0.134936 0.084428 0.752941 0.752941 0.752941 +vn -0.914956 0.134694 -0.380411 +v 0.164291 0.139718 0.084226 0.752941 0.752941 0.752941 +vn -0.642621 0.718058 -0.267265 +v 0.165326 0.142587 0.084667 0.752941 0.752941 0.752941 +vn -0.026266 0.999593 -0.011109 +v 0.167540 0.143544 0.085609 0.752941 0.752941 0.752941 +vn 0.417873 0.891743 0.173715 +v 0.170592 0.142587 0.086907 0.752941 0.752941 0.752941 +vn 0.635242 0.725725 0.264181 +v 0.174149 0.139718 0.088421 0.752941 0.752941 0.752941 +vn 0.756882 0.572742 0.314796 +v 0.177873 0.134936 0.090004 0.752941 0.752941 0.752941 +vn 0.817887 0.464038 0.340191 +v 0.181431 0.128242 0.091518 0.752941 0.752941 0.752941 +vn -0.777111 -0.353350 -0.520810 +v 0.147232 0.128242 0.122413 0.752941 0.752941 0.752941 +vn -0.807678 -0.234129 -0.541146 +v 0.145138 0.134936 0.120996 0.752941 0.752941 0.752941 +vn -0.823208 0.134920 -0.551476 +v 0.144710 0.139718 0.120705 0.752941 0.752941 0.752941 +vn -0.578061 0.718210 -0.387325 +v 0.145643 0.142587 0.121338 0.752941 0.752941 0.752941 +vn -0.023997 0.999581 -0.016176 +v 0.147636 0.143544 0.122686 0.752941 0.752941 0.752941 +vn 0.375545 0.892007 0.251576 +v 0.150388 0.142587 0.124548 0.752941 0.752941 0.752941 +vn 0.571163 0.726177 0.382674 +v 0.153593 0.139718 0.126717 0.752941 0.752941 0.752941 +vn 0.680748 0.573188 0.456111 +v 0.156949 0.134936 0.128988 0.752941 0.752941 0.752941 +vn 0.735735 0.464417 0.492962 +v 0.160154 0.128242 0.131157 0.752941 0.752941 0.752941 +vn -0.661425 -0.353623 -0.661414 +v 0.120846 0.128242 0.154513 0.752941 0.752941 0.752941 +vn -0.687425 -0.234347 -0.687407 +v 0.119057 0.134936 0.152723 0.752941 0.752941 0.752941 +vn -0.700626 0.135001 -0.700641 +v 0.118690 0.139718 0.152357 0.752941 0.752941 0.752941 +vn -0.491911 0.718363 -0.491912 +v 0.119488 0.142587 0.153155 0.752941 0.752941 0.752941 +vn -0.020434 0.999582 -0.020431 +v 0.121190 0.143544 0.154858 0.752941 0.752941 0.752941 +vn 0.319514 0.892088 0.319514 +v 0.123541 0.142587 0.157206 0.752941 0.752941 0.752941 +vn 0.485984 0.726379 0.485997 +v 0.126279 0.139718 0.159944 0.752941 0.752941 0.752941 +vn 0.579340 0.573357 0.579333 +v 0.129146 0.134936 0.162811 0.752941 0.752941 0.752941 +vn 0.626179 0.464542 0.626179 +v 0.131882 0.128242 0.165549 0.752941 0.752941 0.752941 +vn -0.520796 -0.353342 -0.777123 +v 0.088746 0.128242 0.180899 0.752941 0.752941 0.752941 +vn -0.541115 -0.234237 -0.807668 +v 0.087329 0.134936 0.178805 0.752941 0.752941 0.752941 +vn -0.551494 0.134968 -0.823188 +v 0.087039 0.139718 0.178375 0.752941 0.752941 0.752941 +vn -0.387241 0.718324 -0.577975 +v 0.087671 0.142587 0.179310 0.752941 0.752941 0.752941 +vn -0.016147 0.999583 -0.023931 +v 0.089019 0.143544 0.181303 0.752941 0.752941 0.752941 +vn 0.251576 0.892003 0.375552 +v 0.090881 0.142587 0.184053 0.752941 0.752941 0.752941 +vn 0.382652 0.726211 0.571134 +v 0.093050 0.139718 0.187259 0.752941 0.752941 0.752941 +vn 0.456099 0.573233 0.680718 +v 0.095321 0.134936 0.190615 0.752941 0.752941 0.752941 +vn 0.492948 0.464460 0.735716 +v 0.097490 0.128242 0.193821 0.752941 0.752941 0.752941 +vn -0.359457 -0.353015 -0.863812 +v 0.051751 0.128242 0.200757 0.752941 0.752941 0.752941 +vn -0.373308 -0.233999 -0.897711 +v 0.050762 0.134936 0.198433 0.752941 0.752941 0.752941 +vn -0.380441 0.134731 -0.914938 +v 0.050560 0.139718 0.197956 0.752941 0.752941 0.752941 +vn -0.267228 0.718110 -0.642579 +v 0.051000 0.142587 0.198993 0.752941 0.752941 0.752941 +vn -0.011164 0.999589 -0.026421 +v 0.051942 0.143544 0.201205 0.752941 0.752941 0.752941 +vn 0.173726 0.891731 0.417893 +v 0.053240 0.142587 0.204258 0.752941 0.752941 0.752941 +vn 0.264157 0.725804 0.635161 +v 0.054754 0.139718 0.207814 0.752941 0.752941 0.752941 +vn 0.314783 0.572816 0.756831 +v 0.056339 0.134936 0.211540 0.752941 0.752941 0.752941 +vn 0.340195 0.464006 0.817904 +v 0.057853 0.128242 0.215097 0.752941 0.752941 0.752941 +vn -0.183103 -0.352735 -0.917634 +v 0.010674 0.128242 0.213271 0.752941 0.752941 0.752941 +vn -0.190049 -0.233665 -0.953563 +v 0.010162 0.134936 0.210800 0.752941 0.752941 0.752941 +vn -0.193594 0.134646 -0.971798 +v 0.010056 0.139718 0.210295 0.752941 0.752941 0.752941 +vn -0.136107 0.717766 -0.682852 +v 0.010285 0.142587 0.211396 0.752941 0.752941 0.752941 +vn -0.005761 0.999590 -0.028044 +v 0.010774 0.143544 0.213746 0.752941 0.752941 0.752941 +vn 0.088497 0.891474 0.444345 +v 0.011448 0.142587 0.216989 0.752941 0.752941 0.752941 +vn 0.134574 0.725289 0.675163 +v 0.012234 0.139718 0.220768 0.752941 0.752941 0.752941 +vn 0.160336 0.572163 0.804314 +v 0.013056 0.134936 0.224726 0.752941 0.752941 0.752941 +vn 0.173243 0.463398 0.869051 +v 0.013842 0.128242 0.228504 0.752941 0.752941 0.752941 +vn -0.002687 -0.353135 -0.935569 +v -0.033666 0.128242 0.217624 0.752941 0.752941 0.752941 +vn -0.002300 -0.233750 -0.972294 +v -0.033666 0.134936 0.215103 0.752941 0.752941 0.752941 +vn -0.001473 0.134135 -0.990962 +v -0.033666 0.139718 0.214587 0.752941 0.752941 0.752941 +vn -0.000630 0.717219 -0.696848 +v -0.033666 0.142587 0.215710 0.752941 0.752941 0.752941 +vn -0.000053 0.999583 -0.028883 +v -0.033666 0.143544 0.218109 0.752941 0.752941 0.752941 +vn 0.000055 0.891354 0.453309 +v -0.033666 0.142587 0.221418 0.752941 0.752941 0.752941 +vn 0.000027 0.724984 0.688766 +v -0.033666 0.139718 0.225274 0.752941 0.752941 0.752941 +vn 0.000006 0.571805 0.820390 +v -0.033666 0.134936 0.229312 0.752941 0.752941 0.752941 +vn 0.000004 0.463059 0.886327 +v -0.033666 0.128242 0.233167 0.752941 0.752941 0.752941 +vn 0.182802 -0.385403 -0.904460 +v -0.082024 0.128242 0.213271 0.752941 0.752941 0.752941 +vn 0.182293 -0.268531 -0.945865 +v -0.080183 0.134936 0.210800 0.752941 0.752941 0.752941 +vn 0.190920 0.093440 -0.977148 +v -0.079083 0.139718 0.210295 0.752941 0.752941 0.752941 +vn 0.133770 0.698810 -0.702688 +v -0.078597 0.142587 0.211396 0.752941 0.752941 0.752941 +vn 0.003374 0.999476 -0.032180 +v -0.078607 0.143544 0.213746 0.752941 0.752941 0.752941 +vn -0.089007 0.889629 0.447927 +v -0.078992 0.142587 0.216989 0.752941 0.752941 0.752941 +vn -0.134512 0.723649 0.676933 +v -0.079628 0.139718 0.220768 0.752941 0.752941 0.752941 +vn -0.160233 0.571590 0.804743 +v -0.080396 0.134936 0.224726 0.752941 0.752941 0.752941 +vn -0.173226 0.463329 0.869091 +v -0.081174 0.128242 0.228504 0.752941 0.752941 0.752941 +vn 0.351441 -0.441178 -0.825743 +v -0.124985 0.128242 0.200757 0.752941 0.752941 0.752941 +vn 0.357520 -0.333081 -0.872489 +v -0.122048 0.134936 0.198433 0.752941 0.752941 0.752941 +vn 0.381562 0.013418 -0.924246 +v -0.120381 0.139718 0.197956 0.752941 0.752941 0.752941 +vn 0.281686 0.658922 -0.697477 +v -0.119773 0.142587 0.198993 0.752941 0.752941 0.752941 +vn 0.011229 0.999178 -0.038946 +v -0.120011 0.143544 0.201205 0.752941 0.752941 0.752941 +vn -0.177549 0.886275 0.427776 +v -0.120883 0.142587 0.204258 0.752941 0.752941 0.752941 +vn -0.265587 0.721013 0.640003 +v -0.122178 0.139718 0.207814 0.752941 0.752941 0.752941 +vn -0.314999 0.571125 0.758018 +v -0.123682 0.134936 0.211540 0.752941 0.752941 0.752941 +vn -0.340198 0.463788 0.818026 +v -0.125184 0.128242 0.215097 0.752941 0.752941 0.752941 +vn 0.500463 -0.481354 -0.719607 +v -0.162227 0.128242 0.180899 0.752941 0.752941 0.752941 +vn 0.516917 -0.382448 -0.765853 +v -0.158779 0.134936 0.178805 0.752941 0.752941 0.752941 +vn 0.558565 -0.051072 -0.827887 +v -0.156964 0.139718 0.178375 0.752941 0.752941 0.752941 +vn 0.431812 0.622315 -0.652888 +v -0.156504 0.142587 0.179310 0.752941 0.752941 0.752941 +vn 0.023211 0.998815 -0.042766 +v -0.157120 0.143544 0.181303 0.752941 0.752941 0.752941 +vn -0.260613 0.883578 0.389064 +v -0.158537 0.142587 0.184053 0.752941 0.752941 0.752941 +vn -0.386578 0.718939 0.577654 +v -0.160479 0.139718 0.187259 0.752941 0.752941 0.752941 +vn -0.456920 0.570674 0.682316 +v -0.162666 0.134936 0.190615 0.752941 0.752941 0.752941 +vn -0.493016 0.464131 0.735879 +v -0.164823 0.128242 0.193821 0.752941 0.752941 0.752941 +vn 0.632679 -0.489920 -0.599747 +v -0.193424 0.128242 0.154513 0.752941 0.752941 0.752941 +vn 0.658967 -0.395242 -0.639958 +v -0.189903 0.134936 0.152723 0.752941 0.752941 0.752941 +vn 0.712617 -0.067931 -0.698257 +v -0.188236 0.139718 0.152357 0.752941 0.752941 0.752941 +vn 0.559999 0.611232 -0.559282 +v -0.188101 0.142587 0.153155 0.752941 0.752941 0.752941 +vn 0.034172 0.998674 -0.038497 +v -0.189178 0.143544 0.154858 0.752941 0.752941 0.752941 +vn -0.332347 0.882864 0.331808 +v -0.191150 0.142587 0.157206 0.752941 0.752941 0.752941 +vn -0.491855 0.718383 0.491940 +v -0.193693 0.139718 0.159944 0.752941 0.752941 0.752941 +vn -0.580632 0.570587 0.580772 +v -0.196487 0.134936 0.162811 0.752941 0.752941 0.752941 +vn -0.626276 0.464263 0.626290 +v -0.199215 0.128242 0.165549 0.752941 0.752941 0.752941 +vn 0.750359 -0.466477 -0.468360 +v -0.218253 0.128242 0.122413 0.752941 0.752941 0.752941 +vn 0.783666 -0.369370 -0.499433 +v -0.214941 0.134936 0.120996 0.752941 0.752941 0.752941 +vn 0.838652 -0.032570 -0.543692 +v -0.213598 0.139718 0.120705 0.752941 0.752941 0.752941 +vn 0.646985 0.631354 -0.427555 +v -0.213876 0.142587 0.121338 0.752941 0.752941 0.752941 +vn 0.038603 0.998879 -0.027392 +v -0.215429 0.143544 0.122686 0.752941 0.752941 0.752941 +vn -0.388041 0.884473 0.259099 +v -0.217913 0.142587 0.124548 0.752941 0.752941 0.752941 +vn -0.576974 0.719643 0.386284 +v -0.220982 0.139718 0.126717 0.752941 0.752941 0.752941 +vn -0.682089 0.570885 0.456997 +v -0.224288 0.134936 0.128988 0.752941 0.752941 0.752941 +vn -0.735854 0.464140 0.493044 +v -0.227486 0.128242 0.131157 0.752941 0.752941 0.752941 +vn 0.847721 -0.421113 -0.322541 +v -0.236391 0.128242 0.085417 0.752941 0.752941 0.752941 +vn 0.884475 -0.316289 -0.343023 +v -0.233416 0.134936 0.084428 0.752941 0.752941 0.752941 +vn 0.928672 0.036019 -0.369149 +v -0.232452 0.139718 0.084226 0.752941 0.752941 0.752941 +vn 0.688877 0.668893 -0.279339 +v -0.233139 0.142587 0.084667 0.752941 0.752941 0.752941 +vn 0.036067 0.999235 -0.015128 +v -0.235117 0.143544 0.085609 0.752941 0.752941 0.752941 +vn -0.426065 0.887356 0.176263 +v -0.238028 0.142587 0.086907 0.752941 0.752941 0.752941 +vn -0.639130 0.721856 0.265399 +v -0.241511 0.139718 0.088421 0.752941 0.752941 0.752941 +vn -0.757826 0.571327 0.315095 +v -0.245210 0.134936 0.090004 0.752941 0.752941 0.752941 +vn -0.818013 0.463789 0.340227 +v -0.248762 0.128242 0.091518 0.752941 0.752941 0.752941 +vn 0.913018 -0.373875 -0.163144 +v -0.247510 0.128242 0.044341 0.752941 0.752941 0.752941 +vn 0.949916 -0.260264 -0.172980 +v -0.244851 0.134936 0.043827 0.752941 0.752941 0.752941 +vn 0.977512 0.103516 -0.183724 +v -0.244203 0.139718 0.043722 0.752941 0.752941 0.752941 +vn 0.698675 0.702726 -0.134269 +v -0.245201 0.142587 0.043951 0.752941 0.752941 0.752941 +vn 0.031254 0.999493 -0.006041 +v -0.247485 0.143544 0.044440 0.752941 0.752941 0.752941 +vn -0.447080 0.890111 0.088439 +v -0.250686 0.142587 0.045114 0.752941 0.752941 0.752941 +vn -0.676582 0.723978 0.134510 +v -0.254443 0.139718 0.045900 0.752941 0.752941 0.752941 +vn -0.804673 0.571665 0.160315 +v -0.258392 0.134936 0.046723 0.752941 0.752941 0.752941 +vn -0.869080 0.463342 0.173242 +v -0.262169 0.128242 0.047509 0.752941 0.752941 0.752941 +vn 0.935819 -0.352431 0.005880 +v -0.251289 0.128242 0.000001 0.752941 0.752941 0.752941 +vn 0.972244 -0.233914 0.005169 +v -0.248768 0.134936 0.000001 0.752941 0.752941 0.752941 +vn 0.990985 0.133927 0.003521 +v -0.248253 0.139718 0.000001 0.752941 0.752941 0.752941 +vn 0.697127 0.716945 0.001629 +v -0.249376 0.142587 0.000001 0.752941 0.752941 0.752941 +vn 0.029014 0.999579 0.000138 +v -0.251775 0.143544 0.000001 0.752941 0.752941 0.752941 +vn -0.453282 0.891367 -0.000215 +v -0.255083 0.142587 0.000001 0.752941 0.752941 0.752941 +vn -0.688790 0.724961 -0.000123 +v -0.258940 0.139718 0.000001 0.752941 0.752941 0.752941 +vn -0.820435 0.571739 -0.000029 +v -0.262977 0.134936 0.000001 0.752941 0.752941 0.752941 +vn -0.886323 0.463067 -0.000002 +v -0.266832 0.128242 0.000001 0.752941 0.752941 0.752941 +vn 0.917676 -0.352626 0.183099 +v -0.246936 0.128242 -0.044340 0.752941 0.752941 0.752941 +vn 0.953581 -0.233605 0.190032 +v -0.244466 0.134936 -0.043827 0.752941 0.752941 0.752941 +vn 0.971792 0.134674 0.193606 +v -0.243961 0.139718 -0.043722 0.752941 0.752941 0.752941 +vn 0.682854 0.717764 0.136107 +v -0.245062 0.142587 -0.043951 0.752941 0.752941 0.752941 +vn 0.028043 0.999590 0.005759 +v -0.247412 0.143544 -0.044440 0.752941 0.752941 0.752941 +vn -0.444349 0.891471 -0.088500 +v -0.250655 0.142587 -0.045114 0.752941 0.752941 0.752941 +vn -0.675165 0.725286 -0.134581 +v -0.254434 0.139718 -0.045900 0.752941 0.752941 0.752941 +vn -0.804356 0.572106 -0.160333 +v -0.258392 0.134936 -0.046721 0.752941 0.752941 0.752941 +vn -0.869070 0.463362 -0.173242 +v -0.262169 0.128242 -0.047507 0.752941 0.752941 0.752941 +vn 0.863838 -0.352908 0.359498 +v -0.234422 0.128242 -0.085417 0.752941 0.752941 0.752941 +vn 0.897720 -0.233947 0.373319 +v -0.232099 0.134936 -0.084428 0.752941 0.752941 0.752941 +vn 0.914943 0.134680 0.380447 +v -0.231622 0.139718 -0.084226 0.752941 0.752941 0.752941 +vn 0.642619 0.718070 0.267238 +v -0.232659 0.142587 -0.084665 0.752941 0.752941 0.752941 +vn 0.026422 0.999588 0.011168 +v -0.234871 0.143544 -0.085607 0.752941 0.752941 0.752941 +vn -0.417898 0.891731 -0.173717 +v -0.237924 0.142587 -0.086905 0.752941 0.752941 0.752941 +vn -0.635162 0.725804 -0.264155 +v -0.241480 0.139718 -0.088419 0.752941 0.752941 0.752941 +vn -0.756858 0.572776 -0.314793 +v -0.245206 0.134936 -0.090004 0.752941 0.752941 0.752941 +vn -0.817921 0.463971 -0.340200 +v -0.248762 0.128242 -0.091518 0.752941 0.752941 0.752941 +vn 0.777049 -0.353570 0.520753 +v -0.214565 0.128242 -0.122413 0.752941 0.752941 0.752941 +vn 0.807675 -0.234213 0.541115 +v -0.212470 0.134936 -0.120994 0.752941 0.752941 0.752941 +vn 0.823191 0.134900 0.551505 +v -0.212041 0.139718 -0.120705 0.752941 0.752941 0.752941 +vn 0.578018 0.718279 0.387261 +v -0.212975 0.142587 -0.121336 0.752941 0.752941 0.752941 +vn 0.023848 0.999586 0.016095 +v -0.214969 0.143544 -0.122686 0.752941 0.752941 0.752941 +vn -0.375612 0.891969 -0.251610 +v -0.217720 0.142587 -0.124548 0.752941 0.752941 0.752941 +vn -0.571148 0.726190 -0.382673 +v -0.220924 0.139718 -0.126717 0.752941 0.752941 0.752941 +vn -0.680742 0.573211 -0.456093 +v -0.224282 0.134936 -0.128987 0.752941 0.752941 0.752941 +vn -0.735751 0.464387 -0.492965 +v -0.227486 0.128242 -0.131156 0.752941 0.752941 0.752941 +vn 0.661434 -0.353557 0.661440 +v -0.188178 0.128242 -0.154511 0.752941 0.752941 0.752941 +vn 0.687416 -0.234238 0.687453 +v -0.186388 0.134936 -0.152723 0.752941 0.752941 0.752941 +vn 0.700628 0.135069 0.700626 +v -0.186023 0.139718 -0.152356 0.752941 0.752941 0.752941 +vn 0.491934 0.718331 0.491936 +v -0.186821 0.142587 -0.153154 0.752941 0.752941 0.752941 +vn 0.020492 0.999580 0.020484 +v -0.188523 0.143544 -0.154856 0.752941 0.752941 0.752941 +vn -0.319525 0.892080 -0.319527 +v -0.190873 0.142587 -0.157206 0.752941 0.752941 0.752941 +vn -0.486008 0.726352 -0.486013 +v -0.193610 0.139718 -0.159944 0.752941 0.752941 0.752941 +vn -0.579304 0.573423 -0.579304 +v -0.196477 0.134936 -0.162811 0.752941 0.752941 0.752941 +vn -0.626164 0.464592 -0.626157 +v -0.199215 0.128242 -0.165549 0.752941 0.752941 0.752941 +vn 0.520761 -0.353604 0.777028 +v -0.156079 0.128242 -0.180899 0.752941 0.752941 0.752941 +vn 0.541130 -0.234262 0.807651 +v -0.154661 0.134936 -0.178803 0.752941 0.752941 0.752941 +vn 0.551468 0.134915 0.823214 +v -0.154370 0.139718 -0.178375 0.752941 0.752941 0.752941 +vn 0.387278 0.718283 0.578001 +v -0.155003 0.142587 -0.179308 0.752941 0.752941 0.752941 +vn 0.016097 0.999585 0.023870 +v -0.156352 0.143544 -0.181302 0.752941 0.752941 0.752941 +vn -0.251570 0.892008 -0.375545 +v -0.158213 0.142587 -0.184053 0.752941 0.752941 0.752941 +vn -0.382635 0.726232 -0.571120 +v -0.160382 0.139718 -0.187259 0.752941 0.752941 0.752941 +vn -0.456090 0.573259 -0.680703 +v -0.162654 0.134936 -0.190615 0.752941 0.752941 0.752941 +vn -0.492955 0.464445 -0.735721 +v -0.164823 0.128242 -0.193821 0.752941 0.752941 0.752941 +vn 0.359437 -0.353113 0.863780 +v -0.119082 0.128242 -0.200757 0.752941 0.752941 0.752941 +vn 0.373319 -0.233974 0.897713 +v -0.118093 0.134936 -0.198432 0.752941 0.752941 0.752941 +vn 0.380433 0.134746 0.914939 +v -0.117891 0.139718 -0.197956 0.752941 0.752941 0.752941 +vn 0.267250 0.718100 0.642580 +v -0.118332 0.142587 -0.198992 0.752941 0.752941 0.752941 +vn 0.011148 0.999590 0.026375 +v -0.119274 0.143544 -0.201205 0.752941 0.752941 0.752941 +vn -0.173734 0.891725 -0.417902 +v -0.120573 0.142587 -0.204258 0.752941 0.752941 0.752941 +vn -0.264171 0.725751 -0.635216 +v -0.122086 0.139718 -0.207814 0.752941 0.752941 0.752941 +vn -0.314787 0.572802 -0.756841 +v -0.123671 0.134936 -0.211539 0.752941 0.752941 0.752941 +vn -0.340173 0.464025 -0.817902 +v -0.125184 0.128242 -0.215097 0.752941 0.752941 0.752941 +vn 0.183123 -0.352540 0.917704 +v -0.078007 0.128242 -0.213269 0.752941 0.752941 0.752941 +vn 0.190038 -0.233551 0.953593 +v -0.077493 0.134936 -0.210800 0.752941 0.752941 0.752941 +vn 0.193618 0.134639 0.971794 +v -0.077388 0.139718 -0.210295 0.752941 0.752941 0.752941 +vn 0.136103 0.717745 0.682875 +v -0.077616 0.142587 -0.211396 0.752941 0.752941 0.752941 +vn 0.005761 0.999590 0.028042 +v -0.078105 0.143544 -0.213746 0.752941 0.752941 0.752941 +vn -0.088505 0.891446 -0.444400 +v -0.078779 0.142587 -0.216989 0.752941 0.752941 0.752941 +vn -0.134566 0.725257 -0.675199 +v -0.079565 0.139718 -0.220767 0.752941 0.752941 0.752941 +vn -0.160324 0.572218 -0.804278 +v -0.080388 0.134936 -0.224725 0.752941 0.752941 0.752941 +vn -0.173246 0.463425 -0.869035 +v -0.081174 0.128242 -0.228504 0.752941 0.752941 0.752941 +vn -0.000003 -0.352197 0.935926 +v -0.033666 0.128242 -0.217622 0.752941 0.752941 0.752941 +vn 0.000002 -0.233364 0.972390 +v -0.033666 0.134936 -0.215103 0.752941 0.752941 0.752941 +vn 0.000006 0.134400 0.990927 +v -0.033666 0.139718 -0.214587 0.752941 0.752941 0.752941 +vn 0.000003 0.717349 0.696714 +v -0.033666 0.142587 -0.215710 0.752941 0.752941 0.752941 +vn 0.000001 0.999582 0.028911 +v -0.033666 0.143544 -0.218108 0.752941 0.752941 0.752941 +vn 0.000000 0.891344 -0.453327 +v -0.033666 0.142587 -0.221418 0.752941 0.752941 0.752941 +vn -0.000008 0.724909 -0.688845 +v -0.033666 0.139718 -0.225273 0.752941 0.752941 0.752941 +vn -0.000002 0.571854 -0.820356 +v -0.033666 0.134936 -0.229310 0.752941 0.752941 0.752941 +vn 0.000005 0.463148 -0.886281 +v -0.033666 0.128242 -0.233167 0.752941 0.752941 0.752941 +vn -0.183113 -0.352503 0.917721 +v 0.010674 0.128242 -0.213269 0.752941 0.752941 0.752941 +vn -0.190058 -0.233540 0.953591 +v 0.010162 0.134936 -0.210800 0.752941 0.752941 0.752941 +vn -0.193610 0.134648 0.971795 +v 0.010056 0.139718 -0.210295 0.752941 0.752941 0.752941 +vn -0.136111 0.717766 0.682852 +v 0.010285 0.142587 -0.211396 0.752941 0.752941 0.752941 +vn -0.005761 0.999590 0.028042 +v 0.010774 0.143544 -0.213746 0.752941 0.752941 0.752941 +vn 0.088508 0.891445 -0.444400 +v 0.011448 0.142587 -0.216989 0.752941 0.752941 0.752941 +vn 0.134584 0.725251 -0.675202 +v 0.012234 0.139718 -0.220767 0.752941 0.752941 0.752941 +vn 0.160324 0.572207 -0.804286 +v 0.013056 0.134936 -0.224725 0.752941 0.752941 0.752941 +vn 0.173235 0.463429 -0.869036 +v 0.013842 0.128242 -0.228504 0.752941 0.752941 0.752941 +vn -0.359440 -0.353121 0.863776 +v 0.051751 0.128242 -0.200757 0.752941 0.752941 0.752941 +vn -0.373318 -0.233966 0.897716 +v 0.050762 0.134936 -0.198432 0.752941 0.752941 0.752941 +vn -0.380439 0.134687 0.914946 +v 0.050560 0.139718 -0.197956 0.752941 0.752941 0.752941 +vn -0.267260 0.718062 0.642618 +v 0.051000 0.142587 -0.198992 0.752941 0.752941 0.752941 +vn -0.011143 0.999590 0.026361 +v 0.051942 0.143544 -0.201205 0.752941 0.752941 0.752941 +vn 0.173718 0.891732 -0.417896 +v 0.053240 0.142587 -0.204258 0.752941 0.752941 0.752941 +vn 0.264166 0.725761 -0.635206 +v 0.054754 0.139718 -0.207814 0.752941 0.752941 0.752941 +vn 0.314785 0.572822 -0.756826 +v 0.056339 0.134936 -0.211539 0.752941 0.752941 0.752941 +vn 0.340186 0.464035 -0.817891 +v 0.057853 0.128242 -0.215097 0.752941 0.752941 0.752941 +vn -0.520751 -0.353532 0.777067 +v 0.088746 0.128242 -0.180899 0.752941 0.752941 0.752941 +vn -0.541137 -0.234179 0.807670 +v 0.087329 0.134936 -0.178803 0.752941 0.752941 0.752941 +vn -0.551492 0.134888 0.823202 +v 0.087039 0.139718 -0.178375 0.752941 0.752941 0.752941 +vn -0.387329 0.718195 0.578077 +v 0.087671 0.142587 -0.179308 0.752941 0.752941 0.752941 +vn -0.016131 0.999584 0.023918 +v 0.089019 0.143544 -0.181302 0.752941 0.752941 0.752941 +vn 0.251565 0.892018 -0.375525 +v 0.090881 0.142587 -0.184053 0.752941 0.752941 0.752941 +vn 0.382650 0.726208 -0.571140 +v 0.093050 0.139718 -0.187259 0.752941 0.752941 0.752941 +vn 0.456096 0.573231 -0.680722 +v 0.095321 0.134936 -0.190615 0.752941 0.752941 0.752941 +vn 0.492954 0.464455 -0.735716 +v 0.097490 0.128242 -0.193821 0.752941 0.752941 0.752941 +vn -0.661476 -0.353468 0.661446 +v 0.120846 0.128242 -0.154511 0.752941 0.752941 0.752941 +vn -0.687413 -0.234325 0.687426 +v 0.119057 0.134936 -0.152723 0.752941 0.752941 0.752941 +vn -0.700634 0.134925 0.700648 +v 0.118690 0.139718 -0.152356 0.752941 0.752941 0.752941 +vn -0.491938 0.718329 0.491936 +v 0.119488 0.142587 -0.153154 0.752941 0.752941 0.752941 +vn -0.020511 0.999579 0.020510 +v 0.121190 0.143544 -0.154856 0.752941 0.752941 0.752941 +vn 0.319481 0.892111 -0.319484 +v 0.123541 0.142587 -0.157206 0.752941 0.752941 0.752941 +vn 0.485992 0.726379 -0.485990 +v 0.126279 0.139718 -0.159944 0.752941 0.752941 0.752941 +vn 0.579341 0.573355 -0.579334 +v 0.129146 0.134936 -0.162811 0.752941 0.752941 0.752941 +vn 0.626178 0.464535 -0.626186 +v 0.131882 0.128242 -0.165549 0.752941 0.752941 0.752941 +vn -0.777063 -0.353478 0.520794 +v 0.147232 0.128242 -0.122413 0.752941 0.752941 0.752941 +vn -0.807702 -0.234081 0.541132 +v 0.145138 0.134936 -0.120994 0.752941 0.752941 0.752941 +vn -0.823203 0.134846 0.551501 +v 0.144710 0.139718 -0.120705 0.752941 0.752941 0.752941 +vn -0.578113 0.718161 0.387337 +v 0.145643 0.142587 -0.121336 0.752941 0.752941 0.752941 +vn -0.023924 0.999583 0.016147 +v 0.147636 0.143544 -0.122686 0.752941 0.752941 0.752941 +vn 0.375546 0.892007 -0.251571 +v 0.150388 0.142587 -0.124548 0.752941 0.752941 0.752941 +vn 0.571183 0.726152 -0.382692 +v 0.153593 0.139718 -0.126717 0.752941 0.752941 0.752941 +vn 0.680758 0.573173 -0.456115 +v 0.156949 0.134936 -0.128987 0.752941 0.752941 0.752941 +vn 0.735735 0.464415 -0.492964 +v 0.160154 0.128242 -0.131156 0.752941 0.752941 0.752941 +vn -0.863773 -0.353111 0.359458 +v 0.167091 0.128242 -0.085417 0.752941 0.752941 0.752941 +vn -0.897732 -0.233888 0.373329 +v 0.164766 0.134936 -0.084428 0.752941 0.752941 0.752941 +vn -0.914955 0.134597 0.380448 +v 0.164291 0.139718 -0.084226 0.752941 0.752941 0.752941 +vn -0.642703 0.717974 0.267297 +v 0.165326 0.142587 -0.084665 0.752941 0.752941 0.752941 +vn -0.026273 0.999593 0.011097 +v 0.167540 0.143544 -0.085607 0.752941 0.752941 0.752941 +vn 0.417874 0.891743 -0.173711 +v 0.170592 0.142587 -0.086905 0.752941 0.752941 0.752941 +vn 0.635210 0.725761 -0.264160 +v 0.174149 0.139718 -0.088419 0.752941 0.752941 0.752941 +vn 0.756860 0.572774 -0.314791 +v 0.177873 0.134936 -0.090004 0.752941 0.752941 0.752941 +vn 0.817891 0.464037 -0.340181 +v 0.181431 0.128242 -0.091518 0.752941 0.752941 0.752941 +vn -0.917714 -0.352523 0.183110 +v 0.179604 0.128242 -0.044340 0.752941 0.752941 0.752941 +vn -0.953550 -0.233733 0.190030 +v 0.177135 0.134936 -0.043827 0.752941 0.752941 0.752941 +vn -0.971779 0.134780 0.193600 +v 0.176628 0.139718 -0.043722 0.752941 0.752941 0.752941 +vn -0.682658 0.717960 0.136054 +v 0.177731 0.142587 -0.043951 0.752941 0.752941 0.752941 +vn -0.028038 0.999590 0.005762 +v 0.180081 0.143544 -0.044440 0.752941 0.752941 0.752941 +vn 0.444457 0.891416 -0.088521 +v 0.183324 0.142587 -0.045114 0.752941 0.752941 0.752941 +vn 0.675249 0.725206 -0.134592 +v 0.187101 0.139718 -0.045900 0.752941 0.752941 0.752941 +vn 0.804293 0.572196 -0.160323 +v 0.191059 0.134936 -0.046721 0.752941 0.752941 0.752941 +vn 0.869032 0.463433 -0.173244 +v 0.194838 0.128242 -0.047507 0.752941 0.752941 0.752941 +vn 0.888285 0.423785 0.177077 +v 0.209044 0.097662 0.050462 0.752941 0.752941 0.752941 +vn 0.905909 0.423473 0.000001 +v 0.213999 0.097661 0.000001 0.752941 0.752941 0.752941 +vn 0.894909 0.409037 0.178400 +v 0.222805 0.067217 0.053323 0.752941 0.752941 0.752941 +vn 0.912661 0.408718 -0.000003 +v 0.228040 0.067217 0.000001 0.752941 0.752941 0.752941 +vn 0.905784 0.383337 0.180577 +v 0.235674 0.037047 0.055999 0.752941 0.752941 0.752941 +vn 0.923738 0.383024 -0.000005 +v 0.241171 0.037047 0.000001 0.752941 0.752941 0.752941 +vn 0.920558 0.344808 0.183522 +v 0.247204 0.007286 0.058395 0.752941 0.752941 0.752941 +vn 0.938777 0.344525 -0.000001 +v 0.252935 0.007286 0.000001 0.752941 0.752941 0.752941 +vn 0.938360 0.290665 0.187070 +v 0.256948 -0.021927 0.060421 0.752941 0.752941 0.752941 +vn 0.956891 0.290447 0.000007 +v 0.262878 -0.021927 0.000001 0.752941 0.752941 0.752941 +vn 0.957287 0.217192 0.190862 +v 0.264460 -0.050459 0.061984 0.752941 0.752941 0.752941 +vn 0.976168 0.217017 0.000003 +v 0.270545 -0.050459 0.000001 0.752941 0.752941 0.752941 +vn 0.973603 0.120062 0.194119 +v 0.269295 -0.078170 0.062988 0.752941 0.752941 0.752941 +vn 0.992778 0.119965 0.000002 +v 0.275478 -0.078170 0.000001 0.752941 0.752941 0.752941 +vn 0.980102 -0.034653 0.195445 +v 0.271005 -0.104925 0.063345 0.752941 0.752941 0.752941 +vn 0.999400 -0.034631 -0.000000 +v 0.277224 -0.104925 0.000001 0.752941 0.752941 0.752941 +vn 0.836070 0.424341 0.347738 +v 0.194804 0.097661 0.097208 0.752941 0.752941 0.752941 +vn 0.842330 0.409571 0.350330 +v 0.207758 0.067217 0.102719 0.752941 0.752941 0.752941 +vn 0.852597 0.383833 0.354613 +v 0.219871 0.037047 0.107874 0.752941 0.752941 0.752941 +vn 0.866534 0.345279 0.360418 +v 0.230723 0.007286 0.112491 0.752941 0.752941 0.752941 +vn 0.883326 0.291101 0.367418 +v 0.239896 -0.021927 0.116394 0.752941 0.752941 0.752941 +vn 0.901202 0.217519 0.374860 +v 0.246968 -0.050459 0.119403 0.752941 0.752941 0.752941 +vn 0.916606 0.120263 0.381273 +v 0.251519 -0.078170 0.121339 0.752941 0.752941 0.752941 +vn 0.922745 -0.034704 0.383845 +v 0.253130 -0.104925 0.122024 0.752941 0.752941 0.752941 +vn 0.752092 0.424760 0.503922 +v 0.172204 0.097661 0.139311 0.752941 0.752941 0.752941 +vn 0.757734 0.409978 0.507698 +v 0.183878 0.067217 0.147210 0.752941 0.752941 0.752941 +vn 0.766987 0.384227 0.513907 +v 0.194792 0.037047 0.154596 0.752941 0.752941 0.752941 +vn 0.779556 0.345642 0.522325 +v 0.204572 0.007286 0.161214 0.752941 0.752941 0.752941 +vn 0.794706 0.291397 0.532475 +v 0.212837 -0.021927 0.166806 0.752941 0.752941 0.752941 +vn 0.810818 0.217764 0.543280 +v 0.219209 -0.050459 0.171118 0.752941 0.752941 0.752941 +vn 0.824706 0.120409 0.552595 +v 0.223310 -0.078170 0.173893 0.752941 0.752941 0.752941 +vn 0.830241 -0.034739 0.556321 +v 0.224762 -0.104925 0.174875 0.752941 0.752941 0.752941 +vn 0.640106 0.424897 0.640100 +v 0.142175 0.097661 0.175842 0.752941 0.752941 0.752941 +vn 0.644898 0.410117 0.644912 +v 0.152145 0.067217 0.185812 0.752941 0.752941 0.752941 +vn 0.652785 0.384357 0.652795 +v 0.161468 0.037047 0.195134 0.752941 0.752941 0.752941 +vn 0.663484 0.345776 0.663496 +v 0.169821 0.007286 0.203487 0.752941 0.752941 0.752941 +vn 0.676394 0.291523 0.676391 +v 0.176881 -0.021927 0.210546 0.752941 0.752941 0.752941 +vn 0.690128 0.217861 0.690116 +v 0.182324 -0.050459 0.215989 0.752941 0.752941 0.752941 +vn 0.701964 0.120444 0.701954 +v 0.185827 -0.078170 0.219492 0.752941 0.752941 0.752941 +vn 0.706681 -0.034774 0.706677 +v 0.187066 -0.104925 0.220731 0.752941 0.752941 0.752941 +vn 0.503933 0.424741 0.752095 +v 0.105646 0.097661 0.205871 0.752941 0.752941 0.752941 +vn 0.507704 0.409961 0.757739 +v 0.113543 0.067217 0.217543 0.752941 0.752941 0.752941 +vn 0.513904 0.384225 0.766990 +v 0.120929 0.037047 0.228458 0.752941 0.752941 0.752941 +vn 0.522327 0.345651 0.779551 +v 0.127547 0.007286 0.238237 0.752941 0.752941 0.752941 +vn 0.532471 0.291432 0.794696 +v 0.133140 -0.021927 0.246503 0.752941 0.752941 0.752941 +vn 0.543285 0.217769 0.810813 +v 0.137453 -0.050459 0.252876 0.752941 0.752941 0.752941 +vn 0.552599 0.120384 0.824707 +v 0.140228 -0.078170 0.256976 0.752941 0.752941 0.752941 +vn 0.556324 -0.034755 0.830239 +v 0.141210 -0.104925 0.258427 0.752941 0.752941 0.752941 +vn 0.347737 0.424336 0.836073 +v 0.063542 0.097661 0.228471 0.752941 0.752941 0.752941 +vn 0.350347 0.409559 0.842329 +v 0.069054 0.067217 0.241424 0.752941 0.752941 0.752941 +vn 0.354615 0.383840 0.852593 +v 0.074207 0.037047 0.253537 0.752941 0.752941 0.752941 +vn 0.360423 0.345283 0.866531 +v 0.078826 0.007286 0.264390 0.752941 0.752941 0.752941 +vn 0.367415 0.291097 0.883328 +v 0.082728 -0.021927 0.273562 0.752941 0.752941 0.752941 +vn 0.374849 0.217526 0.901205 +v 0.085736 -0.050459 0.280635 0.752941 0.752941 0.752941 +vn 0.381279 0.120235 0.916608 +v 0.087674 -0.078170 0.285185 0.752941 0.752941 0.752941 +vn 0.383850 -0.034690 0.922744 +v 0.088358 -0.104925 0.286795 0.752941 0.752941 0.752941 +vn 0.177064 0.423792 0.888284 +v 0.016795 0.097661 0.242712 0.752941 0.752941 0.752941 +vn 0.178395 0.409023 0.894916 +v 0.019656 0.067217 0.256472 0.752941 0.752941 0.752941 +vn 0.180573 0.383319 0.905792 +v 0.022332 0.037047 0.269340 0.752941 0.752941 0.752941 +vn 0.183521 0.344803 0.920560 +v 0.024729 0.007286 0.280869 0.752941 0.752941 0.752941 +vn 0.187074 0.290685 0.938353 +v 0.026756 -0.021927 0.290613 0.752941 0.752941 0.752941 +vn 0.190849 0.217205 0.957287 +v 0.028317 -0.050459 0.298127 0.752941 0.752941 0.752941 +vn 0.194120 0.120060 0.973603 +v 0.029323 -0.078170 0.302961 0.752941 0.752941 0.752941 +vn 0.195439 -0.034645 0.980104 +v 0.029678 -0.104925 0.304672 0.752941 0.752941 0.752941 +vn 0.000002 0.423475 0.905908 +v -0.033666 0.097661 0.247664 0.752941 0.752941 0.752941 +vn -0.000003 0.408723 0.912658 +v -0.033666 0.067217 0.261706 0.752941 0.752941 0.752941 +vn -0.000003 0.383032 0.923735 +v -0.033666 0.037047 0.274837 0.752941 0.752941 0.752941 +vn -0.000003 0.344534 0.938774 +v -0.033666 0.007286 0.286602 0.752941 0.752941 0.752941 +vn 0.000006 0.290424 0.956898 +v -0.033666 -0.021927 0.296545 0.752941 0.752941 0.752941 +vn 0.000002 0.217008 0.976170 +v -0.033666 -0.050459 0.304210 0.752941 0.752941 0.752941 +vn -0.000001 0.119964 0.992778 +v -0.033666 -0.078170 0.309144 0.752941 0.752941 0.752941 +vn 0.000003 -0.034627 0.999400 +v -0.033666 -0.104925 0.310889 0.752941 0.752941 0.752941 +vn -0.177061 0.423791 0.888285 +v -0.084127 0.097662 0.242712 0.752941 0.752941 0.752941 +vn -0.178392 0.409019 0.894919 +v -0.086989 0.067217 0.256472 0.752941 0.752941 0.752941 +vn -0.180568 0.383315 0.905795 +v -0.089664 0.037047 0.269340 0.752941 0.752941 0.752941 +vn -0.183519 0.344799 0.920562 +v -0.092060 0.007286 0.280869 0.752941 0.752941 0.752941 +vn -0.187081 0.290695 0.938348 +v -0.094087 -0.021927 0.290613 0.752941 0.752941 0.752941 +vn -0.190853 0.217196 0.957288 +v -0.095649 -0.050459 0.298127 0.752941 0.752941 0.752941 +vn -0.194121 0.120063 0.973603 +v -0.096654 -0.078170 0.302961 0.752941 0.752941 0.752941 +vn -0.195444 -0.034635 0.980103 +v -0.097010 -0.104925 0.304672 0.752941 0.752941 0.752941 +vn -0.347747 0.424343 0.836065 +v -0.130875 0.097661 0.228471 0.752941 0.752941 0.752941 +vn -0.350348 0.409560 0.842328 +v -0.136386 0.067217 0.241424 0.752941 0.752941 0.752941 +vn -0.354617 0.383835 0.852594 +v -0.141540 0.037047 0.253537 0.752941 0.752941 0.752941 +vn -0.360415 0.345273 0.866538 +v -0.146157 0.007286 0.264390 0.752941 0.752941 0.752941 +vn -0.367407 0.291106 0.883328 +v -0.150059 -0.021927 0.273562 0.752941 0.752941 0.752941 +vn -0.374856 0.217524 0.901203 +v -0.153069 -0.050459 0.280635 0.752941 0.752941 0.752941 +vn -0.381274 0.120225 0.916611 +v -0.155005 -0.078170 0.285185 0.752941 0.752941 0.752941 +vn -0.383855 -0.034690 0.922742 +v -0.155689 -0.104925 0.286795 0.752941 0.752941 0.752941 +vn -0.503922 0.424740 0.752103 +v -0.172977 0.097661 0.205871 0.752941 0.752941 0.752941 +vn -0.507703 0.409966 0.757737 +v -0.180875 0.067217 0.217543 0.752941 0.752941 0.752941 +vn -0.513911 0.384231 0.766982 +v -0.188262 0.037047 0.228458 0.752941 0.752941 0.752941 +vn -0.522333 0.345637 0.779553 +v -0.194880 0.007286 0.238237 0.752941 0.752941 0.752941 +vn -0.532479 0.291416 0.794697 +v -0.200471 -0.021927 0.246503 0.752941 0.752941 0.752941 +vn -0.543287 0.217774 0.810810 +v -0.204784 -0.050459 0.252876 0.752941 0.752941 0.752941 +vn -0.552601 0.120381 0.824707 +v -0.207559 -0.078170 0.256976 0.752941 0.752941 0.752941 +vn -0.556321 -0.034750 0.830240 +v -0.208541 -0.104925 0.258427 0.752941 0.752941 0.752941 +vn -0.640104 0.424900 0.640099 +v -0.209508 0.097661 0.175842 0.752941 0.752941 0.752941 +vn -0.644907 0.410095 0.644916 +v -0.219478 0.067217 0.185812 0.752941 0.752941 0.752941 +vn -0.652789 0.384355 0.652792 +v -0.228799 0.037047 0.195134 0.752941 0.752941 0.752941 +vn -0.663494 0.345770 0.663490 +v -0.237153 0.007286 0.203487 0.752941 0.752941 0.752941 +vn -0.676395 0.291514 0.676395 +v -0.244212 -0.021927 0.210546 0.752941 0.752941 0.752941 +vn -0.690127 0.217864 0.690116 +v -0.249655 -0.050459 0.215989 0.752941 0.752941 0.752941 +vn -0.701963 0.120444 0.701955 +v -0.253158 -0.078170 0.219492 0.752941 0.752941 0.752941 +vn -0.706678 -0.034775 0.706680 +v -0.254397 -0.104925 0.220731 0.752941 0.752941 0.752941 +vn -0.752101 0.424747 0.503918 +v -0.239537 0.097661 0.139311 0.752941 0.752941 0.752941 +vn -0.757745 0.409965 0.507692 +v -0.251209 0.067217 0.147210 0.752941 0.752941 0.752941 +vn -0.766990 0.384222 0.513907 +v -0.262123 0.037047 0.154596 0.752941 0.752941 0.752941 +vn -0.779551 0.345646 0.522330 +v -0.271903 0.007286 0.161214 0.752941 0.752941 0.752941 +vn -0.794698 0.291405 0.532484 +v -0.280168 -0.021927 0.166806 0.752941 0.752941 0.752941 +vn -0.810815 0.217760 0.543286 +v -0.286541 -0.050459 0.171118 0.752941 0.752941 0.752941 +vn -0.824706 0.120403 0.552596 +v -0.290641 -0.078170 0.173893 0.752941 0.752941 0.752941 +vn -0.830239 -0.034740 0.556324 +v -0.292093 -0.104925 0.174875 0.752941 0.752941 0.752941 +vn -0.836072 0.424337 0.347738 +v -0.262137 0.097661 0.097208 0.752941 0.752941 0.752941 +vn -0.842331 0.409557 0.350347 +v -0.275089 0.067217 0.102719 0.752941 0.752941 0.752941 +vn -0.852589 0.383846 0.354618 +v -0.287202 0.037047 0.107874 0.752941 0.752941 0.752941 +vn -0.866531 0.345291 0.360414 +v -0.298056 0.007286 0.112491 0.752941 0.752941 0.752941 +vn -0.883328 0.291093 0.367418 +v -0.307228 -0.021927 0.116394 0.752941 0.752941 0.752941 +vn -0.901202 0.217504 0.374869 +v -0.314300 -0.050459 0.119403 0.752941 0.752941 0.752941 +vn -0.916604 0.120262 0.381281 +v -0.318850 -0.078170 0.121339 0.752941 0.752941 0.752941 +vn -0.922743 -0.034686 0.383853 +v -0.320462 -0.104925 0.122024 0.752941 0.752941 0.752941 +vn -0.888279 0.423803 0.177063 +v -0.276377 0.097661 0.050462 0.752941 0.752941 0.752941 +vn -0.894913 0.409030 0.178394 +v -0.290138 0.067217 0.053323 0.752941 0.752941 0.752941 +vn -0.905791 0.383320 0.180579 +v -0.303006 0.037047 0.055999 0.752941 0.752941 0.752941 +vn -0.920561 0.344798 0.183524 +v -0.314535 0.007286 0.058395 0.752941 0.752941 0.752941 +vn -0.938352 0.290691 0.187066 +v -0.324279 -0.021927 0.060421 0.752941 0.752941 0.752941 +vn -0.957287 0.217199 0.190855 +v -0.331793 -0.050459 0.061984 0.752941 0.752941 0.752941 +vn -0.973603 0.120062 0.194120 +v -0.336627 -0.078170 0.062988 0.752941 0.752941 0.752941 +vn -0.980103 -0.034653 0.195440 +v -0.338338 -0.104925 0.063345 0.752941 0.752941 0.752941 +vn -0.905907 0.423476 0.000006 +v -0.281330 0.097661 0.000001 0.752941 0.752941 0.752941 +vn -0.912662 0.408716 0.000001 +v -0.295371 0.067217 0.000001 0.752941 0.752941 0.752941 +vn -0.923730 0.383044 -0.000006 +v -0.308502 0.037047 0.000001 0.752941 0.752941 0.752941 +vn -0.938774 0.344533 -0.000000 +v -0.320268 0.007286 0.000001 0.752941 0.752941 0.752941 +vn -0.956898 0.290425 0.000007 +v -0.330210 -0.021927 0.000001 0.752941 0.752941 0.752941 +vn -0.976170 0.217007 0.000003 +v -0.337876 -0.050459 0.000001 0.752941 0.752941 0.752941 +vn -0.992778 0.119964 -0.000000 +v -0.342809 -0.078170 0.000001 0.752941 0.752941 0.752941 +vn -0.861333 0.508040 -0.000456 +v -0.344555 -0.104925 0.000001 0.752941 0.752941 0.752941 +vn -0.888279 0.423802 -0.177069 +v -0.276377 0.097662 -0.050462 0.752941 0.752941 0.752941 +vn -0.894917 0.409022 -0.178395 +v -0.290138 0.067217 -0.053322 0.752941 0.752941 0.752941 +vn -0.905793 0.383322 -0.180563 +v -0.303006 0.037047 -0.055997 0.752941 0.752941 0.752941 +vn -0.920560 0.344805 -0.183518 +v -0.314535 0.007286 -0.058395 0.752941 0.752941 0.752941 +vn -0.938352 0.290684 -0.187077 +v -0.324279 -0.021927 -0.060421 0.752941 0.752941 0.752941 +vn -0.957287 0.217199 -0.190855 +v -0.331793 -0.050459 -0.061982 0.752941 0.752941 0.752941 +vn -0.973603 0.120066 -0.194118 +v -0.336627 -0.078170 -0.062988 0.752941 0.752941 0.752941 +vn -0.980105 -0.034658 -0.195429 +v -0.338338 -0.104925 -0.063343 0.752941 0.752941 0.752941 +vn -0.836071 0.424340 -0.347735 +v -0.262137 0.097661 -0.097208 0.752941 0.752941 0.752941 +vn -0.842336 0.409547 -0.350345 +v -0.275089 0.067217 -0.102719 0.752941 0.752941 0.752941 +vn -0.852584 0.383852 -0.354623 +v -0.287202 0.037047 -0.107873 0.752941 0.752941 0.752941 +vn -0.866528 0.345293 -0.360420 +v -0.298056 0.007286 -0.112491 0.752941 0.752941 0.752941 +vn -0.883332 0.291087 -0.367414 +v -0.307228 -0.021927 -0.116394 0.752941 0.752941 0.752941 +vn -0.901206 0.217506 -0.374857 +v -0.314300 -0.050459 -0.119402 0.752941 0.752941 0.752941 +vn -0.916601 0.120269 -0.381284 +v -0.318850 -0.078170 -0.121339 0.752941 0.752941 0.752941 +vn -0.922740 -0.034691 -0.383859 +v -0.320462 -0.104925 -0.122024 0.752941 0.752941 0.752941 +vn -0.752092 0.424758 -0.503923 +v -0.239537 0.097661 -0.139311 0.752941 0.752941 0.752941 +vn -0.757745 0.409952 -0.507703 +v -0.251209 0.067217 -0.147210 0.752941 0.752941 0.752941 +vn -0.766994 0.384222 -0.513901 +v -0.262123 0.037047 -0.154595 0.752941 0.752941 0.752941 +vn -0.779551 0.345652 -0.522327 +v -0.271903 0.007286 -0.161213 0.752941 0.752941 0.752941 +vn -0.794694 0.291413 -0.532485 +v -0.280168 -0.021927 -0.166806 0.752941 0.752941 0.752941 +vn -0.810817 0.217762 -0.543283 +v -0.286541 -0.050459 -0.171118 0.752941 0.752941 0.752941 +vn -0.824708 0.120396 -0.552596 +v -0.290641 -0.078170 -0.173893 0.752941 0.752941 0.752941 +vn -0.830239 -0.034756 -0.556323 +v -0.292093 -0.104925 -0.174875 0.752941 0.752941 0.752941 +vn -0.640104 0.424890 -0.640106 +v -0.209508 0.097661 -0.175841 0.752941 0.752941 0.752941 +vn -0.644910 0.410107 -0.644906 +v -0.219478 0.067217 -0.185810 0.752941 0.752941 0.752941 +vn -0.652791 0.384364 -0.652785 +v -0.228799 0.037047 -0.195134 0.752941 0.752941 0.752941 +vn -0.663496 0.345772 -0.663487 +v -0.237153 0.007286 -0.203487 0.752941 0.752941 0.752941 +vn -0.676396 0.291513 -0.676394 +v -0.244212 -0.021927 -0.210546 0.752941 0.752941 0.752941 +vn -0.690118 0.217866 -0.690124 +v -0.249655 -0.050459 -0.215989 0.752941 0.752941 0.752941 +vn -0.701963 0.120442 -0.701956 +v -0.253158 -0.078170 -0.219492 0.752941 0.752941 0.752941 +vn -0.706683 -0.034772 -0.706676 +v -0.254397 -0.104925 -0.220731 0.752941 0.752941 0.752941 +vn -0.503931 0.424736 -0.752099 +v -0.172977 0.097661 -0.205870 0.752941 0.752941 0.752941 +vn -0.507701 0.409980 -0.757731 +v -0.180875 0.067217 -0.217543 0.752941 0.752941 0.752941 +vn -0.513909 0.384227 -0.766986 +v -0.188262 0.037047 -0.228458 0.752941 0.752941 0.752941 +vn -0.522329 0.345640 -0.779555 +v -0.194880 0.007286 -0.238237 0.752941 0.752941 0.752941 +vn -0.532480 0.291393 -0.794705 +v -0.200471 -0.021927 -0.246503 0.752941 0.752941 0.752941 +vn -0.543284 0.217773 -0.810813 +v -0.204784 -0.050459 -0.252874 0.752941 0.752941 0.752941 +vn -0.552592 0.120409 -0.824708 +v -0.207559 -0.078170 -0.256976 0.752941 0.752941 0.752941 +vn -0.556317 -0.034750 -0.830243 +v -0.208541 -0.104925 -0.258427 0.752941 0.752941 0.752941 +vn -0.347734 0.424338 -0.836073 +v -0.130875 0.097661 -0.228470 0.752941 0.752941 0.752941 +vn -0.350341 0.409573 -0.842325 +v -0.136386 0.067217 -0.241424 0.752941 0.752941 0.752941 +vn -0.354621 0.383825 -0.852598 +v -0.141540 0.037047 -0.253537 0.752941 0.752941 0.752941 +vn -0.360418 0.345275 -0.866536 +v -0.146157 0.007286 -0.264389 0.752941 0.752941 0.752941 +vn -0.367410 0.291091 -0.883333 +v -0.150059 -0.021927 -0.273562 0.752941 0.752941 0.752941 +vn -0.374863 0.217524 -0.901200 +v -0.153069 -0.050459 -0.280633 0.752941 0.752941 0.752941 +vn -0.381276 0.120254 -0.916606 +v -0.155005 -0.078170 -0.285185 0.752941 0.752941 0.752941 +vn -0.383847 -0.034723 -0.922744 +v -0.155689 -0.104925 -0.286795 0.752941 0.752941 0.752941 +vn -0.177071 0.423785 -0.888286 +v -0.084127 0.097661 -0.242710 0.752941 0.752941 0.752941 +vn -0.178393 0.409044 -0.894907 +v -0.086989 0.067217 -0.256471 0.752941 0.752941 0.752941 +vn -0.180567 0.383323 -0.905792 +v -0.089664 0.037047 -0.269340 0.752941 0.752941 0.752941 +vn -0.183515 0.344796 -0.920564 +v -0.092060 0.007286 -0.280869 0.752941 0.752941 0.752941 +vn -0.187069 0.290681 -0.938355 +v -0.094087 -0.021927 -0.290613 0.752941 0.752941 0.752941 +vn -0.190860 0.217202 -0.957286 +v -0.095649 -0.050459 -0.298126 0.752941 0.752941 0.752941 +vn -0.194123 0.120063 -0.973602 +v -0.096654 -0.078170 -0.302961 0.752941 0.752941 0.752941 +vn -0.195446 -0.034671 -0.980101 +v -0.097010 -0.104925 -0.304671 0.752941 0.752941 0.752941 +vn 0.000001 0.423473 -0.905909 +v -0.033666 0.097661 -0.247664 0.752941 0.752941 0.752941 +vn -0.000001 0.408729 -0.912656 +v -0.033666 0.067217 -0.261706 0.752941 0.752941 0.752941 +vn -0.000002 0.383023 -0.923739 +v -0.033666 0.037047 -0.274837 0.752941 0.752941 0.752941 +vn -0.000004 0.344510 -0.938783 +v -0.033666 0.007286 -0.286601 0.752941 0.752941 0.752941 +vn -0.000001 0.290436 -0.956894 +v -0.033666 -0.021927 -0.296543 0.752941 0.752941 0.752941 +vn 0.000003 0.217035 -0.976164 +v -0.033666 -0.050459 -0.304210 0.752941 0.752941 0.752941 +vn 0.000001 0.119963 -0.992778 +v -0.033666 -0.078170 -0.309144 0.752941 0.752941 0.752941 +vn 0.000003 -0.034632 -0.999400 +v -0.033666 -0.104925 -0.310889 0.752941 0.752941 0.752941 +vn 0.177068 0.423784 -0.888287 +v 0.016795 0.097662 -0.242710 0.752941 0.752941 0.752941 +vn 0.178394 0.409038 -0.894910 +v 0.019656 0.067217 -0.256471 0.752941 0.752941 0.752941 +vn 0.180573 0.383329 -0.905788 +v 0.022332 0.037047 -0.269340 0.752941 0.752941 0.752941 +vn 0.183519 0.344801 -0.920561 +v 0.024729 0.007286 -0.280869 0.752941 0.752941 0.752941 +vn 0.187073 0.290671 -0.938357 +v 0.026756 -0.021927 -0.290613 0.752941 0.752941 0.752941 +vn 0.190857 0.217208 -0.957285 +v 0.028317 -0.050459 -0.298126 0.752941 0.752941 0.752941 +vn 0.194121 0.120062 -0.973603 +v 0.029323 -0.078170 -0.302961 0.752941 0.752941 0.752941 +vn 0.195440 -0.034679 -0.980102 +v 0.029678 -0.104925 -0.304671 0.752941 0.752941 0.752941 +vn 0.347736 0.424336 -0.836073 +v 0.063542 0.097661 -0.228470 0.752941 0.752941 0.752941 +vn 0.350338 0.409569 -0.842328 +v 0.069054 0.067217 -0.241424 0.752941 0.752941 0.752941 +vn 0.354614 0.383832 -0.852597 +v 0.074207 0.037047 -0.253537 0.752941 0.752941 0.752941 +vn 0.360422 0.345286 -0.866530 +v 0.078826 0.007286 -0.264389 0.752941 0.752941 0.752941 +vn 0.367411 0.291078 -0.883336 +v 0.082728 -0.021927 -0.273562 0.752941 0.752941 0.752941 +vn 0.374855 0.217529 -0.901202 +v 0.085736 -0.050459 -0.280633 0.752941 0.752941 0.752941 +vn 0.381276 0.120267 -0.916605 +v 0.087674 -0.078170 -0.285185 0.752941 0.752941 0.752941 +vn 0.383844 -0.034726 -0.922745 +v 0.088358 -0.104925 -0.286795 0.752941 0.752941 0.752941 +vn 0.503933 0.424740 -0.752095 +v 0.105646 0.097661 -0.205870 0.752941 0.752941 0.752941 +vn 0.507707 0.409972 -0.757731 +v 0.113543 0.067217 -0.217543 0.752941 0.752941 0.752941 +vn 0.513905 0.384223 -0.766991 +v 0.120929 0.037047 -0.228458 0.752941 0.752941 0.752941 +vn 0.522326 0.345652 -0.779551 +v 0.127547 0.007286 -0.238237 0.752941 0.752941 0.752941 +vn 0.532477 0.291409 -0.794701 +v 0.133140 -0.021927 -0.246503 0.752941 0.752941 0.752941 +vn 0.543279 0.217770 -0.810817 +v 0.137453 -0.050459 -0.252874 0.752941 0.752941 0.752941 +vn 0.552595 0.120412 -0.824706 +v 0.140228 -0.078170 -0.256976 0.752941 0.752941 0.752941 +vn 0.556320 -0.034760 -0.830241 +v 0.141210 -0.104925 -0.258427 0.752941 0.752941 0.752941 +vn 0.640105 0.424891 -0.640105 +v 0.142175 0.097661 -0.175841 0.752941 0.752941 0.752941 +vn 0.644903 0.410117 -0.644907 +v 0.152145 0.067217 -0.185810 0.752941 0.752941 0.752941 +vn 0.652785 0.384375 -0.652785 +v 0.161468 0.037047 -0.195134 0.752941 0.752941 0.752941 +vn 0.663487 0.345772 -0.663496 +v 0.169821 0.007286 -0.203487 0.752941 0.752941 0.752941 +vn 0.676394 0.291524 -0.676392 +v 0.176881 -0.021927 -0.210546 0.752941 0.752941 0.752941 +vn 0.690124 0.217862 -0.690120 +v 0.182324 -0.050459 -0.215989 0.752941 0.752941 0.752941 +vn 0.701960 0.120448 -0.701958 +v 0.185827 -0.078170 -0.219492 0.752941 0.752941 0.752941 +vn 0.706681 -0.034778 -0.706678 +v 0.187066 -0.104925 -0.220731 0.752941 0.752941 0.752941 +vn 0.752091 0.424764 -0.503919 +v 0.172204 0.097661 -0.139311 0.752941 0.752941 0.752941 +vn 0.757731 0.409972 -0.507707 +v 0.183878 0.067217 -0.147210 0.752941 0.752941 0.752941 +vn 0.766991 0.384220 -0.513907 +v 0.194792 0.037047 -0.154595 0.752941 0.752941 0.752941 +vn 0.779555 0.345653 -0.522319 +v 0.204572 0.007286 -0.161213 0.752941 0.752941 0.752941 +vn 0.794702 0.291401 -0.532480 +v 0.212837 -0.021927 -0.166806 0.752941 0.752941 0.752941 +vn 0.810817 0.217764 -0.543281 +v 0.219209 -0.050459 -0.171118 0.752941 0.752941 0.752941 +vn 0.824709 0.120413 -0.552591 +v 0.223310 -0.078170 -0.173893 0.752941 0.752941 0.752941 +vn 0.830240 -0.034760 -0.556321 +v 0.224762 -0.104925 -0.174875 0.752941 0.752941 0.752941 +vn 0.836073 0.424337 -0.347737 +v 0.194804 0.097661 -0.097208 0.752941 0.752941 0.752941 +vn 0.842329 0.409576 -0.350328 +v 0.207758 0.067217 -0.102719 0.752941 0.752941 0.752941 +vn 0.852597 0.383829 -0.354618 +v 0.219871 0.037047 -0.107873 0.752941 0.752941 0.752941 +vn 0.866530 0.345286 -0.360422 +v 0.230723 0.007286 -0.112491 0.752941 0.752941 0.752941 +vn 0.883331 0.291094 -0.367412 +v 0.239896 -0.021927 -0.116394 0.752941 0.752941 0.752941 +vn 0.901205 0.217521 -0.374852 +v 0.246968 -0.050459 -0.119402 0.752941 0.752941 0.752941 +vn 0.916607 0.120264 -0.381271 +v 0.251519 -0.078170 -0.121339 0.752941 0.752941 0.752941 +vn 0.922747 -0.034698 -0.383841 +v 0.253130 -0.104925 -0.122024 0.752941 0.752941 0.752941 +vn 0.888286 0.423781 -0.177082 +v 0.209044 0.097661 -0.050462 0.752941 0.752941 0.752941 +vn 0.894909 0.409041 -0.178393 +v 0.222805 0.067217 -0.053322 0.752941 0.752941 0.752941 +vn 0.905786 0.383340 -0.180561 +v 0.235674 0.037047 -0.055997 0.752941 0.752941 0.752941 +vn 0.920558 0.344811 -0.183517 +v 0.247204 0.007286 -0.058395 0.752941 0.752941 0.752941 +vn 0.938358 0.290663 -0.187080 +v 0.256948 -0.021927 -0.060421 0.752941 0.752941 0.752941 +vn 0.957289 0.217189 -0.190860 +v 0.264460 -0.050459 -0.061982 0.752941 0.752941 0.752941 +vn 0.973602 0.120063 -0.194125 +v 0.269295 -0.078170 -0.062988 0.752941 0.752941 0.752941 +vn 0.980103 -0.034656 -0.195439 +v 0.271005 -0.104925 -0.063343 0.752941 0.752941 0.752941 +vn 0.947691 -0.257232 0.188982 +v 0.267733 -0.129539 0.062664 0.752941 0.752941 0.752941 +vn 0.966393 -0.257070 -0.000006 +v 0.273884 -0.129539 0.000001 0.752941 0.752941 0.752941 +vn 0.865992 -0.469308 0.172648 +v 0.259105 -0.151011 0.060870 0.752941 0.752941 0.752941 +vn 0.883200 -0.468996 0.000003 +v 0.265079 -0.151011 0.000001 0.752941 0.752941 0.752941 +vn 0.771981 -0.616737 0.153882 +v 0.246905 -0.169478 0.058334 0.752941 0.752941 0.752941 +vn 0.787426 -0.616409 0.000003 +v 0.252632 -0.169478 0.000001 0.752941 0.752941 0.752941 +vn 0.692124 -0.708472 0.137953 +v 0.232922 -0.185077 0.055427 0.752941 0.752941 0.752941 +vn 0.706034 -0.708178 -0.000004 +v 0.238362 -0.185077 0.000001 0.752941 0.752941 0.752941 +vn 0.640985 -0.756848 0.127747 +v 0.218938 -0.197941 0.052519 0.752941 0.752941 0.752941 +vn 0.653946 -0.756541 0.000004 +v 0.224093 -0.197941 0.000001 0.752941 0.752941 0.752941 +vn 0.636593 -0.760691 0.126876 +v 0.206739 -0.208211 0.049982 0.752941 0.752941 0.752941 +vn 0.649461 -0.760395 0.000001 +v 0.211646 -0.208211 0.000001 0.752941 0.752941 0.752941 +vn 0.748535 -0.646095 0.149187 +v 0.198111 -0.216021 0.048189 0.752941 0.752941 0.752941 +vn 0.763553 -0.645745 -0.000003 +v 0.202841 -0.216021 0.000001 0.752941 0.752941 0.752941 +vn 0.909538 -0.374018 0.181248 +v 0.194838 -0.221508 0.047509 0.752941 0.752941 0.752941 +vn 0.927531 -0.373747 -0.000002 +v 0.199501 -0.221508 0.000001 0.752941 0.752941 0.752941 +vn 0.892134 -0.257617 0.371120 +v 0.250049 -0.129539 0.120714 0.752941 0.752941 0.752941 +vn 0.815040 -0.469868 0.339018 +v 0.241927 -0.151011 0.117258 0.752941 0.752941 0.752941 +vn 0.726378 -0.617340 0.302103 +v 0.230444 -0.169478 0.112372 0.752941 0.752941 0.752941 +vn 0.651107 -0.709038 0.270786 +v 0.217280 -0.185077 0.106772 0.752941 0.752941 0.752941 +vn 0.602946 -0.757349 0.250756 +v 0.204117 -0.197941 0.101171 0.752941 0.752941 0.752941 +vn 0.598805 -0.761193 0.249032 +v 0.192634 -0.208211 0.096285 0.752941 0.752941 0.752941 +vn 0.704292 -0.646668 0.292905 +v 0.184512 -0.216021 0.092830 0.752941 0.752941 0.752941 +vn 0.856147 -0.374528 0.356008 +v 0.181431 -0.221508 0.091518 0.752941 0.752941 0.752941 +vn 0.802634 -0.257912 0.537829 +v 0.221985 -0.129539 0.172998 0.752941 0.752941 0.752941 +vn 0.733139 -0.470314 0.491235 +v 0.214666 -0.151011 0.168045 0.752941 0.752941 0.752941 +vn 0.653266 -0.617788 0.437699 +v 0.204319 -0.169478 0.161043 0.752941 0.752941 0.752941 +vn 0.585474 -0.709469 0.392267 +v 0.192458 -0.185077 0.153017 0.752941 0.752941 0.752941 +vn 0.542126 -0.757742 0.363216 +v 0.180596 -0.197941 0.144989 0.752941 0.752941 0.752941 +vn 0.538407 -0.761571 0.360733 +v 0.170249 -0.208211 0.137988 0.752941 0.752941 0.752941 +vn 0.633431 -0.647032 0.424399 +v 0.162930 -0.216021 0.133035 0.752941 0.752941 0.752941 +vn 0.770207 -0.374825 0.516031 +v 0.160154 -0.221508 0.131157 0.752941 0.752941 0.752941 +vn 0.683165 -0.258001 0.683170 +v 0.184695 -0.129539 0.218360 0.752941 0.752941 0.752941 +vn 0.623965 -0.470456 0.623970 +v 0.178444 -0.151011 0.212109 0.752941 0.752941 0.752941 +vn 0.555933 -0.617955 0.555940 +v 0.169606 -0.169478 0.203272 0.752941 0.752941 0.752941 +vn 0.498216 -0.709621 0.498216 +v 0.159475 -0.185077 0.193140 0.752941 0.752941 0.752941 +vn 0.461317 -0.757871 0.461322 +v 0.149343 -0.197941 0.183009 0.752941 0.752941 0.752941 +vn 0.458159 -0.761700 0.458152 +v 0.140506 -0.208211 0.174171 0.752941 0.752941 0.752941 +vn 0.539043 -0.647208 0.539031 +v 0.134254 -0.216021 0.167920 0.752941 0.752941 0.752941 +vn 0.655540 -0.374899 0.655529 +v 0.131882 -0.221508 0.165549 0.752941 0.752941 0.752941 +vn 0.537833 -0.257907 0.802633 +v 0.139331 -0.129539 0.255651 0.752941 0.752941 0.752941 +vn 0.491231 -0.470314 0.733141 +v 0.134378 -0.151011 0.248333 0.752941 0.752941 0.752941 +vn 0.437688 -0.617797 0.653266 +v 0.127376 -0.169478 0.237985 0.752941 0.752941 0.752941 +vn 0.392267 -0.709463 0.585482 +v 0.119350 -0.185077 0.226124 0.752941 0.752941 0.752941 +vn 0.363223 -0.757737 0.542129 +v 0.111323 -0.197941 0.214262 0.752941 0.752941 0.752941 +vn 0.360742 -0.761557 0.538420 +v 0.104322 -0.208211 0.203915 0.752941 0.752941 0.752941 +vn 0.424392 -0.647041 0.633427 +v 0.099369 -0.216021 0.196597 0.752941 0.752941 0.752941 +vn 0.516032 -0.374751 0.770242 +v 0.097490 -0.221508 0.193821 0.752941 0.752941 0.752941 +vn 0.371122 -0.257611 0.892135 +v 0.087048 -0.129539 0.283716 0.752941 0.752941 0.752941 +vn 0.339010 -0.469901 0.815025 +v 0.083591 -0.151011 0.275593 0.752941 0.752941 0.752941 +vn 0.302110 -0.617341 0.726374 +v 0.078705 -0.169478 0.264109 0.752941 0.752941 0.752941 +vn 0.270792 -0.709028 0.651115 +v 0.073105 -0.185077 0.250946 0.752941 0.752941 0.752941 +vn 0.250756 -0.757339 0.602959 +v 0.067504 -0.197941 0.237783 0.752941 0.752941 0.752941 +vn 0.249028 -0.761197 0.598802 +v 0.062618 -0.208211 0.226301 0.752941 0.752941 0.752941 +vn 0.292898 -0.646651 0.704311 +v 0.059163 -0.216021 0.218178 0.752941 0.752941 0.752941 +vn 0.356031 -0.374465 0.856164 +v 0.057853 -0.221508 0.215097 0.752941 0.752941 0.752941 +vn 0.188972 -0.257256 0.947686 +v 0.028997 -0.129539 0.301400 0.752941 0.752941 0.752941 +vn 0.172653 -0.469312 0.865989 +v 0.027204 -0.151011 0.292770 0.752941 0.752941 0.752941 +vn 0.153887 -0.616715 0.771998 +v 0.024667 -0.169478 0.280572 0.752941 0.752941 0.752941 +vn 0.137953 -0.708482 0.692114 +v 0.021760 -0.185077 0.266589 0.752941 0.752941 0.752941 +vn 0.127750 -0.756843 0.640990 +v 0.018852 -0.197941 0.252604 0.752941 0.752941 0.752941 +vn 0.126870 -0.760714 0.636567 +v 0.016317 -0.208211 0.240406 0.752941 0.752941 0.752941 +vn 0.149175 -0.646095 0.748537 +v 0.014522 -0.216021 0.231776 0.752941 0.752941 0.752941 +vn 0.181249 -0.373974 0.909556 +v 0.013842 -0.221508 0.228504 0.752941 0.752941 0.752941 +vn -0.000002 -0.257057 0.966396 +v -0.033666 -0.129539 0.307550 0.752941 0.752941 0.752941 +vn -0.000004 -0.468996 0.883200 +v -0.033666 -0.151011 0.298745 0.752941 0.752941 0.752941 +vn 0.000001 -0.616395 0.787437 +v -0.033666 -0.169478 0.286298 0.752941 0.752941 0.752941 +vn 0.000001 -0.708178 0.706034 +v -0.033666 -0.185077 0.272029 0.752941 0.752941 0.752941 +vn 0.000002 -0.756563 0.653921 +v -0.033666 -0.197941 0.257759 0.752941 0.752941 0.752941 +vn 0.000000 -0.760408 0.649446 +v -0.033666 -0.208211 0.245311 0.752941 0.752941 0.752941 +vn -0.000002 -0.645699 0.763592 +v -0.033666 -0.216021 0.236506 0.752941 0.752941 0.752941 +vn -0.000002 -0.373586 0.927596 +v -0.033666 -0.221508 0.233167 0.752941 0.752941 0.752941 +vn -0.188970 -0.257262 0.947685 +v -0.096330 -0.129539 0.301400 0.752941 0.752941 0.752941 +vn -0.172646 -0.469318 0.865987 +v -0.094535 -0.151011 0.292770 0.752941 0.752941 0.752941 +vn -0.153895 -0.616710 0.772001 +v -0.091999 -0.169478 0.280572 0.752941 0.752941 0.752941 +vn -0.137952 -0.708478 0.692118 +v -0.089092 -0.185077 0.266589 0.752941 0.752941 0.752941 +vn -0.127749 -0.756845 0.640988 +v -0.086185 -0.197941 0.252604 0.752941 0.752941 0.752941 +vn -0.126861 -0.760714 0.636569 +v -0.083648 -0.208211 0.240406 0.752941 0.752941 0.752941 +vn -0.149181 -0.646098 0.748533 +v -0.081855 -0.216021 0.231776 0.752941 0.752941 0.752941 +vn -0.181241 -0.373966 0.909561 +v -0.081174 -0.221508 0.228504 0.752941 0.752941 0.752941 +vn -0.371130 -0.257592 0.892137 +v -0.154379 -0.129539 0.283716 0.752941 0.752941 0.752941 +vn -0.339004 -0.469893 0.815032 +v -0.150924 -0.151011 0.275593 0.752941 0.752941 0.752941 +vn -0.302097 -0.617346 0.726376 +v -0.146038 -0.169478 0.264109 0.752941 0.752941 0.752941 +vn -0.270794 -0.709027 0.651115 +v -0.140437 -0.185077 0.250946 0.752941 0.752941 0.752941 +vn -0.250767 -0.757337 0.602957 +v -0.134837 -0.197941 0.237783 0.752941 0.752941 0.752941 +vn -0.249032 -0.761201 0.598796 +v -0.129951 -0.208211 0.226301 0.752941 0.752941 0.752941 +vn -0.292888 -0.646680 0.704288 +v -0.126495 -0.216021 0.218178 0.752941 0.752941 0.752941 +vn -0.356021 -0.374449 0.856176 +v -0.125184 -0.221508 0.215097 0.752941 0.752941 0.752941 +vn -0.537836 -0.257890 0.802636 +v -0.206663 -0.129539 0.255651 0.752941 0.752941 0.752941 +vn -0.491247 -0.470293 0.733144 +v -0.201710 -0.151011 0.248333 0.752941 0.752941 0.752941 +vn -0.437695 -0.617798 0.653260 +v -0.194709 -0.169478 0.237986 0.752941 0.752941 0.752941 +vn -0.392262 -0.709473 0.585473 +v -0.186682 -0.185077 0.226124 0.752941 0.752941 0.752941 +vn -0.363223 -0.757742 0.542122 +v -0.178656 -0.197941 0.214262 0.752941 0.752941 0.752941 +vn -0.360737 -0.761568 0.538407 +v -0.171653 -0.208211 0.203915 0.752941 0.752941 0.752941 +vn -0.424416 -0.646990 0.633463 +v -0.166700 -0.216021 0.196597 0.752941 0.752941 0.752941 +vn -0.516034 -0.374790 0.770222 +v -0.164823 -0.221508 0.193821 0.752941 0.752941 0.752941 +vn -0.683168 -0.258001 0.683167 +v -0.252026 -0.129539 0.218360 0.752941 0.752941 0.752941 +vn -0.623970 -0.470451 0.623969 +v -0.245775 -0.151011 0.212109 0.752941 0.752941 0.752941 +vn -0.555934 -0.617958 0.555937 +v -0.236937 -0.169478 0.203272 0.752941 0.752941 0.752941 +vn -0.498217 -0.709622 0.498214 +v -0.226806 -0.185077 0.193140 0.752941 0.752941 0.752941 +vn -0.461318 -0.757872 0.461319 +v -0.216674 -0.197941 0.183009 0.752941 0.752941 0.752941 +vn -0.458166 -0.761689 0.458162 +v -0.207837 -0.208211 0.174171 0.752941 0.752941 0.752941 +vn -0.539064 -0.647159 0.539068 +v -0.201586 -0.216021 0.167920 0.752941 0.752941 0.752941 +vn -0.655554 -0.374856 0.655540 +v -0.199215 -0.221508 0.165549 0.752941 0.752941 0.752941 +vn -0.802632 -0.257902 0.537836 +v -0.289316 -0.129539 0.172998 0.752941 0.752941 0.752941 +vn -0.733151 -0.470289 0.491241 +v -0.281998 -0.151011 0.168045 0.752941 0.752941 0.752941 +vn -0.653265 -0.617795 0.437692 +v -0.271652 -0.169478 0.161043 0.752941 0.752941 0.752941 +vn -0.585471 -0.709471 0.392269 +v -0.259789 -0.185077 0.153017 0.752941 0.752941 0.752941 +vn -0.542124 -0.757743 0.363219 +v -0.247929 -0.197941 0.144989 0.752941 0.752941 0.752941 +vn -0.538410 -0.761564 0.360743 +v -0.237580 -0.208211 0.137988 0.752941 0.752941 0.752941 +vn -0.633436 -0.647038 0.424383 +v -0.230263 -0.216021 0.133035 0.752941 0.752941 0.752941 +vn -0.770220 -0.374789 0.516037 +v -0.227486 -0.221508 0.131157 0.752941 0.752941 0.752941 +vn -0.892127 -0.257632 0.371127 +v -0.317381 -0.129539 0.120714 0.752941 0.752941 0.752941 +vn -0.815030 -0.469883 0.339021 +v -0.309258 -0.151011 0.117258 0.752941 0.752941 0.752941 +vn -0.726378 -0.617338 0.302107 +v -0.297775 -0.169478 0.112372 0.752941 0.752941 0.752941 +vn -0.651103 -0.709042 0.270785 +v -0.284611 -0.185077 0.106772 0.752941 0.752941 0.752941 +vn -0.602963 -0.757337 0.250753 +v -0.271448 -0.197941 0.101171 0.752941 0.752941 0.752941 +vn -0.598800 -0.761198 0.249030 +v -0.259966 -0.208211 0.096285 0.752941 0.752941 0.752941 +vn -0.704278 -0.646687 0.292898 +v -0.251843 -0.216021 0.092830 0.752941 0.752941 0.752941 +vn -0.856219 -0.374346 0.356026 +v -0.248762 -0.221508 0.091518 0.752941 0.752941 0.752941 +vn -0.947689 -0.257244 0.188974 +v -0.335065 -0.129539 0.062664 0.752941 0.752941 0.752941 +vn -0.865996 -0.469297 0.172657 +v -0.326437 -0.151011 0.060870 0.752941 0.752941 0.752941 +vn -0.771982 -0.616736 0.153885 +v -0.314238 -0.169478 0.058334 0.752941 0.752941 0.752941 +vn -0.692102 -0.708495 0.137951 +v -0.300254 -0.185077 0.055427 0.752941 0.752941 0.752941 +vn -0.640998 -0.756836 0.127755 +v -0.286269 -0.197941 0.052519 0.752941 0.752941 0.752941 +vn -0.636586 -0.760698 0.126873 +v -0.274072 -0.208211 0.049982 0.752941 0.752941 0.752941 +vn -0.748499 -0.646138 0.149181 +v -0.265442 -0.216021 0.048189 0.752941 0.752941 0.752941 +vn -0.909540 -0.374015 0.181247 +v -0.262169 -0.221508 0.047509 0.752941 0.752941 0.752941 +vn -0.966401 -0.257038 -0.000001 +v -0.341215 -0.129539 0.000001 0.752941 0.752941 0.752941 +vn -0.883203 -0.468991 0.000000 +v -0.332412 -0.151011 0.000001 0.752941 0.752941 0.752941 +vn -0.787414 -0.616425 0.000002 +v -0.319963 -0.169478 0.000001 0.752941 0.752941 0.752941 +vn -0.706033 -0.708179 -0.000002 +v -0.305694 -0.185077 0.000001 0.752941 0.752941 0.752941 +vn -0.653935 -0.756550 0.000002 +v -0.291424 -0.197941 0.000001 0.752941 0.752941 0.752941 +vn -0.649480 -0.760379 -0.000001 +v -0.278977 -0.208211 0.000001 0.752941 0.752941 0.752941 +vn -0.763528 -0.645775 -0.000001 +v -0.270173 -0.216021 0.000001 0.752941 0.752941 0.752941 +vn -0.927545 -0.373711 0.000002 +v -0.266832 -0.221508 0.000001 0.752941 0.752941 0.752941 +vn -0.947689 -0.257244 -0.188973 +v -0.335065 -0.129539 -0.062663 0.752941 0.752941 0.752941 +vn -0.865998 -0.469292 -0.172663 +v -0.326437 -0.151011 -0.060870 0.752941 0.752941 0.752941 +vn -0.771975 -0.616745 -0.153881 +v -0.314238 -0.169478 -0.058332 0.752941 0.752941 0.752941 +vn -0.692107 -0.708490 -0.137947 +v -0.300254 -0.185077 -0.055425 0.752941 0.752941 0.752941 +vn -0.641002 -0.756833 -0.127754 +v -0.286269 -0.197941 -0.052518 0.752941 0.752941 0.752941 +vn -0.636582 -0.760702 -0.126874 +v -0.274072 -0.208211 -0.049982 0.752941 0.752941 0.752941 +vn -0.748493 -0.646146 -0.149177 +v -0.265442 -0.216021 -0.048188 0.752941 0.752941 0.752941 +vn -0.909537 -0.374028 -0.181235 +v -0.262169 -0.221508 -0.047507 0.752941 0.752941 0.752941 +vn -0.892126 -0.257637 -0.371126 +v -0.317381 -0.129539 -0.120714 0.752941 0.752941 0.752941 +vn -0.815035 -0.469881 -0.339013 +v -0.309258 -0.151011 -0.117257 0.752941 0.752941 0.752941 +vn -0.726371 -0.617347 -0.302106 +v -0.297775 -0.169478 -0.112372 0.752941 0.752941 0.752941 +vn -0.651104 -0.709041 -0.270784 +v -0.284611 -0.185077 -0.106770 0.752941 0.752941 0.752941 +vn -0.602960 -0.757338 -0.250757 +v -0.271448 -0.197941 -0.101170 0.752941 0.752941 0.752941 +vn -0.598801 -0.761197 -0.249030 +v -0.259966 -0.208211 -0.096284 0.752941 0.752941 0.752941 +vn -0.704300 -0.646665 -0.292892 +v -0.251843 -0.216021 -0.092828 0.752941 0.752941 0.752941 +vn -0.856199 -0.374371 -0.356048 +v -0.248762 -0.221508 -0.091518 0.752941 0.752941 0.752941 +vn -0.802632 -0.257918 -0.537830 +v -0.289316 -0.129539 -0.172996 0.752941 0.752941 0.752941 +vn -0.733151 -0.470284 -0.491246 +v -0.281998 -0.151011 -0.168043 0.752941 0.752941 0.752941 +vn -0.653265 -0.617795 -0.437692 +v -0.271652 -0.169478 -0.161042 0.752941 0.752941 0.752941 +vn -0.585479 -0.709468 -0.392263 +v -0.259789 -0.185077 -0.153015 0.752941 0.752941 0.752941 +vn -0.542138 -0.757731 -0.363222 +v -0.247929 -0.197941 -0.144989 0.752941 0.752941 0.752941 +vn -0.538415 -0.761562 -0.360739 +v -0.237580 -0.208211 -0.137988 0.752941 0.752941 0.752941 +vn -0.633417 -0.647064 -0.424371 +v -0.230263 -0.216021 -0.133035 0.752941 0.752941 0.752941 +vn -0.770234 -0.374776 -0.516026 +v -0.227486 -0.221508 -0.131156 0.752941 0.752941 0.752941 +vn -0.683168 -0.258008 -0.683164 +v -0.252026 -0.129539 -0.218360 0.752941 0.752941 0.752941 +vn -0.623971 -0.470450 -0.623969 +v -0.245775 -0.151011 -0.212109 0.752941 0.752941 0.752941 +vn -0.555938 -0.617954 -0.555937 +v -0.236937 -0.169478 -0.203272 0.752941 0.752941 0.752941 +vn -0.498220 -0.709623 -0.498209 +v -0.226806 -0.185077 -0.193140 0.752941 0.752941 0.752941 +vn -0.461321 -0.757869 -0.461322 +v -0.216674 -0.197941 -0.183009 0.752941 0.752941 0.752941 +vn -0.458159 -0.761692 -0.458165 +v -0.207837 -0.208211 -0.174171 0.752941 0.752941 0.752941 +vn -0.539068 -0.647153 -0.539072 +v -0.201586 -0.216021 -0.167920 0.752941 0.752941 0.752941 +vn -0.655507 -0.375004 -0.655502 +v -0.199215 -0.221508 -0.165549 0.752941 0.752941 0.752941 +vn -0.537829 -0.257919 -0.802632 +v -0.206663 -0.129539 -0.255651 0.752941 0.752941 0.752941 +vn -0.491242 -0.470310 -0.733137 +v -0.201710 -0.151011 -0.248331 0.752941 0.752941 0.752941 +vn -0.437701 -0.617774 -0.653279 +v -0.194709 -0.169478 -0.237985 0.752941 0.752941 0.752941 +vn -0.392270 -0.709463 -0.585479 +v -0.186682 -0.185077 -0.226124 0.752941 0.752941 0.752941 +vn -0.363224 -0.757746 -0.542116 +v -0.178656 -0.197941 -0.214262 0.752941 0.752941 0.752941 +vn -0.360726 -0.761581 -0.538396 +v -0.171653 -0.208211 -0.203915 0.752941 0.752941 0.752941 +vn -0.424420 -0.646966 -0.633484 +v -0.166700 -0.216021 -0.196596 0.752941 0.752941 0.752941 +vn -0.516018 -0.374823 -0.770216 +v -0.164823 -0.221508 -0.193821 0.752941 0.752941 0.752941 +vn -0.371115 -0.257595 -0.892143 +v -0.154379 -0.129539 -0.283714 0.752941 0.752941 0.752941 +vn -0.339015 -0.469864 -0.815044 +v -0.150924 -0.151011 -0.275593 0.752941 0.752941 0.752941 +vn -0.302107 -0.617343 -0.726374 +v -0.146038 -0.169478 -0.264109 0.752941 0.752941 0.752941 +vn -0.270783 -0.709026 -0.651121 +v -0.140437 -0.185077 -0.250946 0.752941 0.752941 0.752941 +vn -0.250746 -0.757358 -0.602939 +v -0.134837 -0.197941 -0.237783 0.752941 0.752941 0.752941 +vn -0.249029 -0.761194 -0.598806 +v -0.129951 -0.208211 -0.226299 0.752941 0.752941 0.752941 +vn -0.292907 -0.646641 -0.704316 +v -0.126495 -0.216021 -0.218178 0.752941 0.752941 0.752941 +vn -0.356016 -0.374535 -0.856140 +v -0.125184 -0.221508 -0.215097 0.752941 0.752941 0.752941 +vn -0.188987 -0.257249 -0.947685 +v -0.096330 -0.129539 -0.301398 0.752941 0.752941 0.752941 +vn -0.172653 -0.469292 -0.866000 +v -0.094535 -0.151011 -0.292770 0.752941 0.752941 0.752941 +vn -0.153882 -0.616741 -0.771979 +v -0.091999 -0.169478 -0.280571 0.752941 0.752941 0.752941 +vn -0.137945 -0.708469 -0.692129 +v -0.089092 -0.185077 -0.266587 0.752941 0.752941 0.752941 +vn -0.127751 -0.756846 -0.640986 +v -0.086185 -0.197941 -0.252604 0.752941 0.752941 0.752941 +vn -0.126873 -0.760706 -0.636576 +v -0.083648 -0.208211 -0.240404 0.752941 0.752941 0.752941 +vn -0.149188 -0.646053 -0.748571 +v -0.081855 -0.216021 -0.231776 0.752941 0.752941 0.752941 +vn -0.181241 -0.373967 -0.909561 +v -0.081174 -0.221508 -0.228504 0.752941 0.752941 0.752941 +vn 0.000000 -0.257054 -0.966397 +v -0.033666 -0.129539 -0.307550 0.752941 0.752941 0.752941 +vn -0.000001 -0.468995 -0.883201 +v -0.033666 -0.151011 -0.298745 0.752941 0.752941 0.752941 +vn -0.000001 -0.616421 -0.787417 +v -0.033666 -0.169478 -0.286298 0.752941 0.752941 0.752941 +vn -0.000004 -0.708179 -0.706033 +v -0.033666 -0.185077 -0.272027 0.752941 0.752941 0.752941 +vn 0.000003 -0.756541 -0.653946 +v -0.033666 -0.197941 -0.257759 0.752941 0.752941 0.752941 +vn 0.000000 -0.760409 -0.649445 +v -0.033666 -0.208211 -0.245311 0.752941 0.752941 0.752941 +vn -0.000003 -0.645696 -0.763595 +v -0.033666 -0.216021 -0.236506 0.752941 0.752941 0.752941 +vn 0.000003 -0.373586 -0.927595 +v -0.033666 -0.221508 -0.233167 0.752941 0.752941 0.752941 +vn 0.188979 -0.257241 -0.947689 +v 0.028997 -0.129539 -0.301398 0.752941 0.752941 0.752941 +vn 0.172658 -0.469296 -0.865997 +v 0.027204 -0.151011 -0.292770 0.752941 0.752941 0.752941 +vn 0.153885 -0.616737 -0.771981 +v 0.024667 -0.169478 -0.280571 0.752941 0.752941 0.752941 +vn 0.137949 -0.708475 -0.692123 +v 0.021760 -0.185077 -0.266587 0.752941 0.752941 0.752941 +vn 0.127747 -0.756844 -0.640990 +v 0.018852 -0.197941 -0.252604 0.752941 0.752941 0.752941 +vn 0.126878 -0.760704 -0.636577 +v 0.016317 -0.208211 -0.240404 0.752941 0.752941 0.752941 +vn 0.149183 -0.646056 -0.748570 +v 0.014522 -0.216021 -0.231776 0.752941 0.752941 0.752941 +vn 0.181253 -0.373976 -0.909554 +v 0.013842 -0.221508 -0.228504 0.752941 0.752941 0.752941 +vn 0.371123 -0.257612 -0.892134 +v 0.087048 -0.129539 -0.283714 0.752941 0.752941 0.752941 +vn 0.339014 -0.469870 -0.815041 +v 0.083591 -0.151011 -0.275593 0.752941 0.752941 0.752941 +vn 0.302101 -0.617341 -0.726378 +v 0.078705 -0.169478 -0.264109 0.752941 0.752941 0.752941 +vn 0.270787 -0.709028 -0.651117 +v 0.073105 -0.185077 -0.250946 0.752941 0.752941 0.752941 +vn 0.250745 -0.757358 -0.602940 +v 0.067504 -0.197941 -0.237783 0.752941 0.752941 0.752941 +vn 0.249030 -0.761190 -0.598810 +v 0.062618 -0.208211 -0.226299 0.752941 0.752941 0.752941 +vn 0.292911 -0.646614 -0.704339 +v 0.059163 -0.216021 -0.218178 0.752941 0.752941 0.752941 +vn 0.356012 -0.374552 -0.856134 +v 0.057853 -0.221508 -0.215097 0.752941 0.752941 0.752941 +vn 0.537815 -0.257931 -0.802637 +v 0.139331 -0.129539 -0.255651 0.752941 0.752941 0.752941 +vn 0.491231 -0.470314 -0.733142 +v 0.134378 -0.151011 -0.248331 0.752941 0.752941 0.752941 +vn 0.437698 -0.617779 -0.653276 +v 0.127376 -0.169478 -0.237985 0.752941 0.752941 0.752941 +vn 0.392266 -0.709462 -0.585483 +v 0.119350 -0.185077 -0.226124 0.752941 0.752941 0.752941 +vn 0.363220 -0.757737 -0.542132 +v 0.111323 -0.197941 -0.214262 0.752941 0.752941 0.752941 +vn 0.360727 -0.761572 -0.538409 +v 0.104322 -0.208211 -0.203915 0.752941 0.752941 0.752941 +vn 0.424405 -0.647017 -0.633443 +v 0.099369 -0.216021 -0.196596 0.752941 0.752941 0.752941 +vn 0.516029 -0.374784 -0.770228 +v 0.097490 -0.221508 -0.193821 0.752941 0.752941 0.752941 +vn 0.683174 -0.258004 -0.683160 +v 0.184695 -0.129539 -0.218360 0.752941 0.752941 0.752941 +vn 0.623972 -0.470454 -0.623964 +v 0.178444 -0.151011 -0.212109 0.752941 0.752941 0.752941 +vn 0.555935 -0.617955 -0.555939 +v 0.169606 -0.169478 -0.203272 0.752941 0.752941 0.752941 +vn 0.498219 -0.709620 -0.498214 +v 0.159475 -0.185077 -0.193140 0.752941 0.752941 0.752941 +vn 0.461320 -0.757871 -0.461320 +v 0.149343 -0.197941 -0.183009 0.752941 0.752941 0.752941 +vn 0.458156 -0.761701 -0.458153 +v 0.140506 -0.208211 -0.174171 0.752941 0.752941 0.752941 +vn 0.539037 -0.647208 -0.539037 +v 0.134254 -0.216021 -0.167920 0.752941 0.752941 0.752941 +vn 0.655487 -0.375038 -0.655502 +v 0.131882 -0.221508 -0.165549 0.752941 0.752941 0.752941 +vn 0.802628 -0.257933 -0.537828 +v 0.221985 -0.129539 -0.172996 0.752941 0.752941 0.752941 +vn 0.733144 -0.470306 -0.491235 +v 0.214666 -0.151011 -0.168043 0.752941 0.752941 0.752941 +vn 0.653270 -0.617788 -0.437695 +v 0.204319 -0.169478 -0.161042 0.752941 0.752941 0.752941 +vn 0.585485 -0.709463 -0.392263 +v 0.192458 -0.185077 -0.153015 0.752941 0.752941 0.752941 +vn 0.542135 -0.757732 -0.363224 +v 0.180596 -0.197941 -0.144989 0.752941 0.752941 0.752941 +vn 0.538411 -0.761569 -0.360730 +v 0.170249 -0.208211 -0.137988 0.752941 0.752941 0.752941 +vn 0.633415 -0.647058 -0.424384 +v 0.162930 -0.216021 -0.133035 0.752941 0.752941 0.752941 +vn 0.770222 -0.374809 -0.516019 +v 0.160154 -0.221508 -0.131156 0.752941 0.752941 0.752941 +vn 0.892130 -0.257625 -0.371124 +v 0.250049 -0.129539 -0.120714 0.752941 0.752941 0.752941 +vn 0.815038 -0.469874 -0.339017 +v 0.241927 -0.151011 -0.117257 0.752941 0.752941 0.752941 +vn 0.726376 -0.617341 -0.302108 +v 0.230444 -0.169478 -0.112372 0.752941 0.752941 0.752941 +vn 0.651103 -0.709042 -0.270784 +v 0.217280 -0.185077 -0.106770 0.752941 0.752941 0.752941 +vn 0.602951 -0.757346 -0.250753 +v 0.204117 -0.197941 -0.101170 0.752941 0.752941 0.752941 +vn 0.598802 -0.761197 -0.249030 +v 0.192634 -0.208211 -0.096284 0.752941 0.752941 0.752941 +vn 0.704316 -0.646643 -0.292902 +v 0.184512 -0.216021 -0.092828 0.752941 0.752941 0.752941 +vn 0.856128 -0.374555 -0.356025 +v 0.181431 -0.221508 -0.091518 0.752941 0.752941 0.752941 +vn 0.947695 -0.257225 -0.188970 +v 0.267733 -0.129539 -0.062663 0.752941 0.752941 0.752941 +vn 0.865990 -0.469309 -0.172655 +v 0.259105 -0.151011 -0.060870 0.752941 0.752941 0.752941 +vn 0.771977 -0.616744 -0.153879 +v 0.246905 -0.169478 -0.058332 0.752941 0.752941 0.752941 +vn 0.692128 -0.708471 -0.137944 +v 0.232922 -0.185077 -0.055425 0.752941 0.752941 0.752941 +vn 0.640990 -0.756843 -0.127754 +v 0.218938 -0.197941 -0.052518 0.752941 0.752941 0.752941 +vn 0.636589 -0.760694 -0.126879 +v 0.206739 -0.208211 -0.049982 0.752941 0.752941 0.752941 +vn 0.748526 -0.646107 -0.149182 +v 0.198111 -0.216021 -0.048188 0.752941 0.752941 0.752941 +vn 0.909536 -0.374029 -0.181235 +v 0.194838 -0.221508 -0.047507 0.752941 0.752941 0.752941 +vn 0.861565 -0.477682 0.171830 +v 0.193923 -0.225858 0.047319 0.752941 0.752941 0.752941 +vn 0.878651 -0.477465 0.000002 +v 0.198567 -0.225858 0.000001 0.752941 0.752941 0.752941 +vn 0.538123 -0.836020 0.107206 +v 0.189661 -0.230071 0.046432 0.752941 0.752941 0.752941 +vn 0.548990 -0.835829 0.000006 +v 0.194219 -0.230071 0.000001 0.752941 0.752941 0.752941 +vn 0.277939 -0.959003 0.055353 +v 0.179775 -0.234009 0.044377 0.752941 0.752941 0.752941 +vn 0.283578 -0.958949 0.000000 +v 0.184132 -0.234009 0.000001 0.752941 0.752941 0.752941 +vn 0.147286 -0.988659 0.029329 +v 0.161991 -0.237539 0.040680 0.752941 0.752941 0.752941 +vn 0.150275 -0.988644 -0.000001 +v 0.165983 -0.237539 0.000001 0.752941 0.752941 0.752941 +vn 0.079724 -0.996691 0.015873 +v 0.134030 -0.240522 0.034865 0.752941 0.752941 0.752941 +vn 0.081350 -0.996686 0.000001 +v 0.137453 -0.240522 0.000001 0.752941 0.752941 0.752941 +vn 0.041064 -0.999123 0.008175 +v 0.093617 -0.242821 0.026464 0.752941 0.752941 0.752941 +vn 0.041898 -0.999122 0.000000 +v 0.096215 -0.242821 0.000001 0.752941 0.752941 0.752941 +vn 0.016963 -0.999850 0.003374 +v 0.038478 -0.244301 0.014999 0.752941 0.752941 0.752941 +vn 0.017304 -0.999850 0.000000 +v 0.039950 -0.244301 0.000001 0.752941 0.752941 0.752941 +vn -0.000000 -1.000000 0.000000 +v -0.033666 -0.244825 0.000001 0.752941 0.752941 0.752941 +vn 0.810861 -0.478225 0.337351 +v 0.180569 -0.225858 0.091153 0.752941 0.752941 0.752941 +vn 0.506074 -0.836433 0.210401 +v 0.176557 -0.230071 0.089444 0.752941 0.752941 0.752941 +vn 0.261292 -0.959129 0.108618 +v 0.167251 -0.234009 0.085485 0.752941 0.752941 0.752941 +vn 0.138453 -0.988695 0.057555 +v 0.150511 -0.237539 0.078362 0.752941 0.752941 0.752941 +vn 0.074941 -0.996701 0.031150 +v 0.124191 -0.240522 0.067164 0.752941 0.752941 0.752941 +vn 0.038599 -0.999126 0.016042 +v 0.086149 -0.242821 0.050979 0.752941 0.752941 0.752941 +vn 0.015944 -0.999851 0.006625 +v 0.034246 -0.244301 0.028895 0.752941 0.752941 0.752941 +vn 0.729435 -0.478554 0.488785 +v 0.159378 -0.225858 0.130631 0.752941 0.752941 0.752941 +vn 0.455027 -0.836673 0.304843 +v 0.155764 -0.230071 0.128186 0.752941 0.752941 0.752941 +vn 0.234801 -0.959236 0.157274 +v 0.147378 -0.234009 0.122511 0.752941 0.752941 0.752941 +vn 0.124407 -0.988726 0.083332 +v 0.132292 -0.237539 0.112302 0.752941 0.752941 0.752941 +vn 0.067341 -0.996710 0.045109 +v 0.108577 -0.240522 0.096254 0.752941 0.752941 0.752941 +vn 0.034682 -0.999128 0.023231 +v 0.074298 -0.242821 0.073059 0.752941 0.752941 0.752941 +vn 0.014324 -0.999851 0.009594 +v 0.027528 -0.244301 0.041409 0.752941 0.752941 0.752941 +vn 0.620817 -0.478709 0.620826 +v 0.131219 -0.225858 0.164887 0.752941 0.752941 0.752941 +vn 0.387116 -0.836832 0.387109 +v 0.128132 -0.230071 0.161798 0.752941 0.752941 0.752941 +vn 0.199769 -0.959263 0.199767 +v 0.120971 -0.234009 0.154636 0.752941 0.752941 0.752941 +vn 0.105832 -0.988736 0.105831 +v 0.108085 -0.237539 0.141752 0.752941 0.752941 0.752941 +vn 0.057284 -0.996713 0.057284 +v 0.087828 -0.240522 0.121494 0.752941 0.752941 0.752941 +vn 0.029503 -0.999129 0.029502 +v 0.058549 -0.242821 0.092216 0.752941 0.752941 0.752941 +vn 0.012184 -0.999852 0.012184 +v 0.018601 -0.244301 0.052268 0.752941 0.752941 0.752941 +vn 0.488791 -0.478573 0.729418 +v 0.096966 -0.225858 0.193045 0.752941 0.752941 0.752941 +vn 0.304785 -0.836740 0.454942 +v 0.094519 -0.230071 0.189429 0.752941 0.752941 0.752941 +vn 0.157307 -0.959223 0.234833 +v 0.088846 -0.234009 0.181045 0.752941 0.752941 0.752941 +vn 0.083332 -0.988726 0.124404 +v 0.078637 -0.237539 0.165959 0.752941 0.752941 0.752941 +vn 0.045107 -0.996710 0.067338 +v 0.062588 -0.240522 0.142242 0.752941 0.752941 0.752941 +vn 0.023231 -0.999128 0.034683 +v 0.039392 -0.242821 0.107965 0.752941 0.752941 0.752941 +vn 0.009594 -0.999851 0.014325 +v 0.007743 -0.244301 0.061194 0.752941 0.752941 0.752941 +vn 0.337335 -0.478176 0.810897 +v 0.057486 -0.225858 0.214236 0.752941 0.752941 0.752941 +vn 0.210432 -0.836400 0.506116 +v 0.055779 -0.230071 0.210224 0.752941 0.752941 0.752941 +vn 0.108620 -0.959127 0.261300 +v 0.051820 -0.234009 0.200919 0.752941 0.752941 0.752941 +vn 0.057547 -0.988697 0.138440 +v 0.044697 -0.237539 0.184176 0.752941 0.752941 0.752941 +vn 0.031150 -0.996701 0.074942 +v 0.033498 -0.240522 0.157857 0.752941 0.752941 0.752941 +vn 0.016042 -0.999126 0.038599 +v 0.017312 -0.242821 0.119816 0.752941 0.752941 0.752941 +vn 0.006624 -0.999851 0.015944 +v -0.004772 -0.244301 0.067911 0.752941 0.752941 0.752941 +vn 0.171810 -0.477683 0.861569 +v 0.013651 -0.225858 0.227589 0.752941 0.752941 0.752941 +vn 0.107208 -0.836003 0.538150 +v 0.012766 -0.230071 0.223327 0.752941 0.752941 0.752941 +vn 0.055344 -0.959000 0.277949 +v 0.010710 -0.234009 0.213442 0.752941 0.752941 0.752941 +vn 0.029327 -0.988660 0.147281 +v 0.007013 -0.237539 0.195657 0.752941 0.752941 0.752941 +vn 0.015874 -0.996690 0.079725 +v 0.001200 -0.240522 0.167696 0.752941 0.752941 0.752941 +vn 0.008174 -0.999123 0.041064 +v -0.007203 -0.242821 0.127284 0.752941 0.752941 0.752941 +vn 0.003375 -0.999851 0.016963 +v -0.018667 -0.244301 0.072144 0.752941 0.752941 0.752941 +vn -0.000000 -0.477462 0.878652 +v -0.033666 -0.225858 0.232234 0.752941 0.752941 0.752941 +vn 0.000004 -0.835892 0.548894 +v -0.033666 -0.230071 0.227884 0.752941 0.752941 0.752941 +vn 0.000000 -0.958947 0.283584 +v -0.033666 -0.234009 0.217797 0.752941 0.752941 0.752941 +vn -0.000001 -0.988643 0.150282 +v -0.033666 -0.237539 0.199650 0.752941 0.752941 0.752941 +vn 0.000000 -0.996686 0.081347 +v -0.033666 -0.240522 0.171118 0.752941 0.752941 0.752941 +vn 0.000000 -0.999122 0.041898 +v -0.033666 -0.242821 0.129881 0.752941 0.752941 0.752941 +vn 0.000000 -0.999850 0.017304 +v -0.033666 -0.244301 0.073616 0.752941 0.752941 0.752941 +vn -0.171823 -0.477679 0.861568 +v -0.080984 -0.225858 0.227589 0.752941 0.752941 0.752941 +vn -0.107200 -0.836013 0.538135 +v -0.080097 -0.230071 0.223327 0.752941 0.752941 0.752941 +vn -0.055350 -0.958999 0.277952 +v -0.078043 -0.234009 0.213442 0.752941 0.752941 0.752941 +vn -0.029328 -0.988660 0.147282 +v -0.074345 -0.237539 0.195657 0.752941 0.752941 0.752941 +vn -0.015873 -0.996691 0.079725 +v -0.068531 -0.240522 0.167696 0.752941 0.752941 0.752941 +vn -0.008175 -0.999123 0.041064 +v -0.060130 -0.242821 0.127284 0.752941 0.752941 0.752941 +vn -0.003375 -0.999851 0.016963 +v -0.048666 -0.244301 0.072144 0.752941 0.752941 0.752941 +vn -0.337353 -0.478142 0.810909 +v -0.124818 -0.225858 0.214236 0.752941 0.752941 0.752941 +vn -0.210432 -0.836401 0.506113 +v -0.123111 -0.230071 0.210224 0.752941 0.752941 0.752941 +vn -0.108613 -0.959129 0.261294 +v -0.119151 -0.234009 0.200919 0.752941 0.752941 0.752941 +vn -0.057547 -0.988697 0.138441 +v -0.112028 -0.237539 0.184176 0.752941 0.752941 0.752941 +vn -0.031152 -0.996701 0.074942 +v -0.100830 -0.240522 0.157857 0.752941 0.752941 0.752941 +vn -0.016042 -0.999126 0.038599 +v -0.084644 -0.242821 0.119816 0.752941 0.752941 0.752941 +vn -0.006625 -0.999851 0.015944 +v -0.062560 -0.244301 0.067911 0.752941 0.752941 0.752941 +vn -0.488750 -0.478631 0.729408 +v -0.164297 -0.225858 0.193045 0.752941 0.752941 0.752941 +vn -0.304815 -0.836713 0.454972 +v -0.161852 -0.230071 0.189429 0.752941 0.752941 0.752941 +vn -0.157297 -0.959228 0.234820 +v -0.156177 -0.234009 0.181045 0.752941 0.752941 0.752941 +vn -0.083328 -0.988726 0.124405 +v -0.145968 -0.237539 0.165959 0.752941 0.752941 0.752941 +vn -0.045107 -0.996710 0.067340 +v -0.129920 -0.240522 0.142242 0.752941 0.752941 0.752941 +vn -0.023231 -0.999128 0.034683 +v -0.106724 -0.242821 0.107965 0.752941 0.752941 0.752941 +vn -0.009593 -0.999851 0.014325 +v -0.075075 -0.244301 0.061194 0.752941 0.752941 0.752941 +vn -0.620805 -0.478738 0.620815 +v -0.198552 -0.225858 0.164887 0.752941 0.752941 0.752941 +vn -0.387078 -0.836863 0.387080 +v -0.195464 -0.230071 0.161798 0.752941 0.752941 0.752941 +vn -0.199768 -0.959264 0.199764 +v -0.188302 -0.234009 0.154636 0.752941 0.752941 0.752941 +vn -0.105838 -0.988735 0.105835 +v -0.175418 -0.237539 0.141752 0.752941 0.752941 0.752941 +vn -0.057284 -0.996713 0.057284 +v -0.155161 -0.240522 0.121494 0.752941 0.752941 0.752941 +vn -0.029503 -0.999129 0.029503 +v -0.125882 -0.242821 0.092216 0.752941 0.752941 0.752941 +vn -0.012185 -0.999852 0.012184 +v -0.085934 -0.244301 0.052268 0.752941 0.752941 0.752941 +vn -0.729444 -0.478552 0.488774 +v -0.226711 -0.225858 0.130631 0.752941 0.752941 0.752941 +vn -0.454966 -0.836721 0.304801 +v -0.223095 -0.230071 0.128186 0.752941 0.752941 0.752941 +vn -0.234810 -0.959231 0.157290 +v -0.214710 -0.234009 0.122511 0.752941 0.752941 0.752941 +vn -0.124410 -0.988725 0.083333 +v -0.199625 -0.237539 0.112302 0.752941 0.752941 0.752941 +vn -0.067340 -0.996710 0.045106 +v -0.175908 -0.240522 0.096254 0.752941 0.752941 0.752941 +vn -0.034682 -0.999128 0.023231 +v -0.141630 -0.242821 0.073059 0.752941 0.752941 0.752941 +vn -0.014324 -0.999851 0.009593 +v -0.094859 -0.244301 0.041409 0.752941 0.752941 0.752941 +vn -0.810955 -0.478052 0.337370 +v -0.247902 -0.225858 0.091153 0.752941 0.752941 0.752941 +vn -0.506077 -0.836430 0.210407 +v -0.243890 -0.230071 0.089444 0.752941 0.752941 0.752941 +vn -0.261288 -0.959131 0.108614 +v -0.234584 -0.234009 0.085485 0.752941 0.752941 0.752941 +vn -0.138444 -0.988697 0.057548 +v -0.217842 -0.237539 0.078362 0.752941 0.752941 0.752941 +vn -0.074942 -0.996701 0.031150 +v -0.191522 -0.240522 0.067164 0.752941 0.752941 0.752941 +vn -0.038599 -0.999126 0.016043 +v -0.153482 -0.242821 0.050979 0.752941 0.752941 0.752941 +vn -0.015944 -0.999851 0.006625 +v -0.101577 -0.244301 0.028895 0.752941 0.752941 0.752941 +vn -0.861569 -0.477676 0.171828 +v -0.261254 -0.225858 0.047319 0.752941 0.752941 0.752941 +vn -0.538133 -0.836015 0.107198 +v -0.256992 -0.230071 0.046432 0.752941 0.752941 0.752941 +vn -0.277950 -0.959000 0.055348 +v -0.247107 -0.234009 0.044377 0.752941 0.752941 0.752941 +vn -0.147281 -0.988660 0.029328 +v -0.229322 -0.237539 0.040680 0.752941 0.752941 0.752941 +vn -0.079725 -0.996690 0.015875 +v -0.201361 -0.240522 0.034865 0.752941 0.752941 0.752941 +vn -0.041065 -0.999123 0.008176 +v -0.160950 -0.242821 0.026464 0.752941 0.752941 0.752941 +vn -0.016962 -0.999851 0.003375 +v -0.105809 -0.244301 0.014999 0.752941 0.752941 0.752941 +vn -0.878678 -0.477414 -0.000003 +v -0.265899 -0.225858 0.000001 0.752941 0.752941 0.752941 +vn -0.548943 -0.835860 0.000001 +v -0.261550 -0.230071 0.000001 0.752941 0.752941 0.752941 +vn -0.283581 -0.958948 0.000001 +v -0.251463 -0.234009 0.000001 0.752941 0.752941 0.752941 +vn -0.150278 -0.988644 -0.000000 +v -0.233315 -0.237539 0.000001 0.752941 0.752941 0.752941 +vn -0.081349 -0.996686 -0.000000 +v -0.204784 -0.240522 0.000001 0.752941 0.752941 0.752941 +vn -0.041899 -0.999122 0.000000 +v -0.163548 -0.242821 0.000001 0.752941 0.752941 0.752941 +vn -0.017305 -0.999850 -0.000000 +v -0.107283 -0.244301 0.000001 0.752941 0.752941 0.752941 +vn -0.861581 -0.477661 -0.171812 +v -0.261254 -0.225858 -0.047317 0.752941 0.752941 0.752941 +vn -0.538148 -0.836004 -0.107213 +v -0.256992 -0.230071 -0.046432 0.752941 0.752941 0.752941 +vn -0.277946 -0.959001 -0.055347 +v -0.247107 -0.234009 -0.044376 0.752941 0.752941 0.752941 +vn -0.147281 -0.988660 -0.029327 +v -0.229322 -0.237539 -0.040678 0.752941 0.752941 0.752941 +vn -0.079726 -0.996690 -0.015874 +v -0.201361 -0.240522 -0.034865 0.752941 0.752941 0.752941 +vn -0.041064 -0.999123 -0.008176 +v -0.160950 -0.242821 -0.026463 0.752941 0.752941 0.752941 +vn -0.016962 -0.999851 -0.003375 +v -0.105809 -0.244301 -0.014999 0.752941 0.752941 0.752941 +vn -0.810940 -0.478093 -0.337348 +v -0.247902 -0.225858 -0.091151 0.752941 0.752941 0.752941 +vn -0.506110 -0.836405 -0.210427 +v -0.243890 -0.230071 -0.089444 0.752941 0.752941 0.752941 +vn -0.261290 -0.959130 -0.108612 +v -0.234584 -0.234009 -0.085485 0.752941 0.752941 0.752941 +vn -0.138445 -0.988697 -0.057547 +v -0.217842 -0.237539 -0.078362 0.752941 0.752941 0.752941 +vn -0.074942 -0.996701 -0.031150 +v -0.191522 -0.240522 -0.067164 0.752941 0.752941 0.752941 +vn -0.038599 -0.999126 -0.016042 +v -0.153482 -0.242821 -0.050977 0.752941 0.752941 0.752941 +vn -0.015944 -0.999851 -0.006625 +v -0.101577 -0.244301 -0.028895 0.752941 0.752941 0.752941 +vn -0.729440 -0.478545 -0.488787 +v -0.226711 -0.225858 -0.130631 0.752941 0.752941 0.752941 +vn -0.454939 -0.836747 -0.304772 +v -0.223095 -0.230071 -0.128184 0.752941 0.752941 0.752941 +vn -0.234824 -0.959226 -0.157302 +v -0.214710 -0.234009 -0.122511 0.752941 0.752941 0.752941 +vn -0.124409 -0.988726 -0.083332 +v -0.199625 -0.237539 -0.112302 0.752941 0.752941 0.752941 +vn -0.067340 -0.996710 -0.045106 +v -0.175908 -0.240522 -0.096254 0.752941 0.752941 0.752941 +vn -0.034683 -0.999128 -0.023231 +v -0.141630 -0.242821 -0.073059 0.752941 0.752941 0.752941 +vn -0.014324 -0.999851 -0.009593 +v -0.094859 -0.244301 -0.041409 0.752941 0.752941 0.752941 +vn -0.620794 -0.478803 -0.620776 +v -0.198552 -0.225858 -0.164885 0.752941 0.752941 0.752941 +vn -0.387123 -0.836820 -0.387127 +v -0.195464 -0.230071 -0.161798 0.752941 0.752941 0.752941 +vn -0.199764 -0.959264 -0.199766 +v -0.188302 -0.234009 -0.154636 0.752941 0.752941 0.752941 +vn -0.105834 -0.988735 -0.105837 +v -0.175418 -0.237539 -0.141751 0.752941 0.752941 0.752941 +vn -0.057284 -0.996713 -0.057284 +v -0.155161 -0.240522 -0.121494 0.752941 0.752941 0.752941 +vn -0.029502 -0.999129 -0.029503 +v -0.125882 -0.242821 -0.092215 0.752941 0.752941 0.752941 +vn -0.012184 -0.999852 -0.012184 +v -0.085934 -0.244301 -0.052267 0.752941 0.752941 0.752941 +vn -0.488748 -0.478672 -0.729382 +v -0.164297 -0.225858 -0.193044 0.752941 0.752941 0.752941 +vn -0.304818 -0.836699 -0.454995 +v -0.161852 -0.230071 -0.189429 0.752941 0.752941 0.752941 +vn -0.157283 -0.959235 -0.234799 +v -0.156177 -0.234009 -0.181043 0.752941 0.752941 0.752941 +vn -0.083334 -0.988725 -0.124410 +v -0.145968 -0.237539 -0.165958 0.752941 0.752941 0.752941 +vn -0.045107 -0.996710 -0.067340 +v -0.129920 -0.240522 -0.142242 0.752941 0.752941 0.752941 +vn -0.023231 -0.999128 -0.034682 +v -0.106724 -0.242821 -0.107963 0.752941 0.752941 0.752941 +vn -0.009594 -0.999851 -0.014325 +v -0.075075 -0.244301 -0.061194 0.752941 0.752941 0.752941 +vn -0.337338 -0.478235 -0.810860 +v -0.124818 -0.225858 -0.214235 0.752941 0.752941 0.752941 +vn -0.210433 -0.836408 -0.506102 +v -0.123111 -0.230071 -0.210223 0.752941 0.752941 0.752941 +vn -0.108616 -0.959132 -0.261282 +v -0.119151 -0.234009 -0.200917 0.752941 0.752941 0.752941 +vn -0.057552 -0.988696 -0.138449 +v -0.112028 -0.237539 -0.184176 0.752941 0.752941 0.752941 +vn -0.031151 -0.996701 -0.074942 +v -0.100830 -0.240522 -0.157857 0.752941 0.752941 0.752941 +vn -0.016043 -0.999126 -0.038598 +v -0.084644 -0.242821 -0.119815 0.752941 0.752941 0.752941 +vn -0.006625 -0.999851 -0.015944 +v -0.062560 -0.244301 -0.067911 0.752941 0.752941 0.752941 +vn -0.171830 -0.477684 -0.861564 +v -0.080984 -0.225858 -0.227589 0.752941 0.752941 0.752941 +vn -0.107203 -0.836011 -0.538138 +v -0.080097 -0.230071 -0.223327 0.752941 0.752941 0.752941 +vn -0.055351 -0.958999 -0.277952 +v -0.078043 -0.234009 -0.213442 0.752941 0.752941 0.752941 +vn -0.029327 -0.988660 -0.147283 +v -0.074345 -0.237539 -0.195657 0.752941 0.752941 0.752941 +vn -0.015874 -0.996691 -0.079725 +v -0.068531 -0.240522 -0.167696 0.752941 0.752941 0.752941 +vn -0.008175 -0.999123 -0.041063 +v -0.060130 -0.242821 -0.127283 0.752941 0.752941 0.752941 +vn -0.003375 -0.999850 -0.016963 +v -0.048666 -0.244301 -0.072144 0.752941 0.752941 0.752941 +vn 0.000001 -0.477461 -0.878653 +v -0.033666 -0.225858 -0.232234 0.752941 0.752941 0.752941 +vn -0.000005 -0.835893 -0.548893 +v -0.033666 -0.230071 -0.227884 0.752941 0.752941 0.752941 +vn -0.000001 -0.958950 -0.283577 +v -0.033666 -0.234009 -0.217797 0.752941 0.752941 0.752941 +vn -0.000001 -0.988644 -0.150274 +v -0.033666 -0.237539 -0.199648 0.752941 0.752941 0.752941 +vn 0.000001 -0.996686 -0.081350 +v -0.033666 -0.240522 -0.171118 0.752941 0.752941 0.752941 +vn 0.000000 -0.999122 -0.041898 +v -0.033666 -0.242821 -0.129881 0.752941 0.752941 0.752941 +vn -0.000000 -0.999850 -0.017304 +v -0.033666 -0.244301 -0.073616 0.752941 0.752941 0.752941 +vn 0.171818 -0.477680 -0.861569 +v 0.013651 -0.225858 -0.227589 0.752941 0.752941 0.752941 +vn 0.107221 -0.836004 -0.538146 +v 0.012766 -0.230071 -0.223327 0.752941 0.752941 0.752941 +vn 0.055350 -0.959000 -0.277948 +v 0.010710 -0.234009 -0.213442 0.752941 0.752941 0.752941 +vn 0.029327 -0.988660 -0.147283 +v 0.007013 -0.237539 -0.195657 0.752941 0.752941 0.752941 +vn 0.015873 -0.996691 -0.079725 +v 0.001200 -0.240522 -0.167696 0.752941 0.752941 0.752941 +vn 0.008175 -0.999123 -0.041063 +v -0.007203 -0.242821 -0.127283 0.752941 0.752941 0.752941 +vn 0.003375 -0.999850 -0.016963 +v -0.018667 -0.244301 -0.072144 0.752941 0.752941 0.752941 +vn 0.337320 -0.478268 -0.810848 +v 0.057486 -0.225858 -0.214235 0.752941 0.752941 0.752941 +vn 0.210431 -0.836406 -0.506106 +v 0.055779 -0.230071 -0.210223 0.752941 0.752941 0.752941 +vn 0.108619 -0.959130 -0.261290 +v 0.051820 -0.234009 -0.200917 0.752941 0.752941 0.752941 +vn 0.057553 -0.988696 -0.138449 +v 0.044697 -0.237539 -0.184176 0.752941 0.752941 0.752941 +vn 0.031151 -0.996701 -0.074941 +v 0.033498 -0.240522 -0.157857 0.752941 0.752941 0.752941 +vn 0.016043 -0.999126 -0.038598 +v 0.017312 -0.242821 -0.119815 0.752941 0.752941 0.752941 +vn 0.006624 -0.999851 -0.015944 +v -0.004772 -0.244301 -0.067911 0.752941 0.752941 0.752941 +vn 0.488787 -0.478614 -0.729394 +v 0.096966 -0.225858 -0.193044 0.752941 0.752941 0.752941 +vn 0.304787 -0.836726 -0.454967 +v 0.094519 -0.230071 -0.189429 0.752941 0.752941 0.752941 +vn 0.157292 -0.959230 -0.234813 +v 0.088846 -0.234009 -0.181043 0.752941 0.752941 0.752941 +vn 0.083334 -0.988725 -0.124408 +v 0.078637 -0.237539 -0.165958 0.752941 0.752941 0.752941 +vn 0.045107 -0.996710 -0.067339 +v 0.062588 -0.240522 -0.142242 0.752941 0.752941 0.752941 +vn 0.023231 -0.999128 -0.034682 +v 0.039392 -0.242821 -0.107963 0.752941 0.752941 0.752941 +vn 0.009594 -0.999851 -0.014325 +v 0.007743 -0.244301 -0.061194 0.752941 0.752941 0.752941 +vn 0.620802 -0.478775 -0.620790 +v 0.131219 -0.225858 -0.164885 0.752941 0.752941 0.752941 +vn 0.387161 -0.836791 -0.387153 +v 0.128132 -0.230071 -0.161798 0.752941 0.752941 0.752941 +vn 0.199770 -0.959263 -0.199766 +v 0.120971 -0.234009 -0.154636 0.752941 0.752941 0.752941 +vn 0.105831 -0.988736 -0.105831 +v 0.108085 -0.237539 -0.141751 0.752941 0.752941 0.752941 +vn 0.057283 -0.996713 -0.057285 +v 0.087828 -0.240522 -0.121494 0.752941 0.752941 0.752941 +vn 0.029501 -0.999129 -0.029503 +v 0.058549 -0.242821 -0.092215 0.752941 0.752941 0.752941 +vn 0.012184 -0.999852 -0.012184 +v 0.018601 -0.244301 -0.052267 0.752941 0.752941 0.752941 +vn 0.729434 -0.478553 -0.488788 +v 0.159378 -0.225858 -0.130631 0.752941 0.752941 0.752941 +vn 0.455004 -0.836698 -0.304809 +v 0.155764 -0.230071 -0.128184 0.752941 0.752941 0.752941 +vn 0.234813 -0.959230 -0.157292 +v 0.147378 -0.234009 -0.122511 0.752941 0.752941 0.752941 +vn 0.124405 -0.988726 -0.083333 +v 0.132292 -0.237539 -0.112302 0.752941 0.752941 0.752941 +vn 0.067342 -0.996710 -0.045108 +v 0.108577 -0.240522 -0.096254 0.752941 0.752941 0.752941 +vn 0.034683 -0.999128 -0.023231 +v 0.074298 -0.242821 -0.073059 0.752941 0.752941 0.752941 +vn 0.014324 -0.999851 -0.009595 +v 0.027528 -0.244301 -0.041409 0.752941 0.752941 0.752941 +vn 0.810844 -0.478266 -0.337332 +v 0.180569 -0.225858 -0.091151 0.752941 0.752941 0.752941 +vn 0.506105 -0.836407 -0.210431 +v 0.176557 -0.230071 -0.089444 0.752941 0.752941 0.752941 +vn 0.261295 -0.959129 -0.108616 +v 0.167251 -0.234009 -0.085485 0.752941 0.752941 0.752941 +vn 0.138453 -0.988695 -0.057551 +v 0.150511 -0.237539 -0.078362 0.752941 0.752941 0.752941 +vn 0.074941 -0.996701 -0.031150 +v 0.124191 -0.240522 -0.067164 0.752941 0.752941 0.752941 +vn 0.038599 -0.999126 -0.016042 +v 0.086149 -0.242821 -0.050977 0.752941 0.752941 0.752941 +vn 0.015944 -0.999851 -0.006625 +v 0.034246 -0.244301 -0.028895 0.752941 0.752941 0.752941 +vn 0.861578 -0.477662 -0.171821 +v 0.193923 -0.225858 -0.047317 0.752941 0.752941 0.752941 +vn 0.538136 -0.836010 -0.107220 +v 0.189661 -0.230071 -0.046432 0.752941 0.752941 0.752941 +vn 0.277933 -0.959005 -0.055350 +v 0.179775 -0.234009 -0.044376 0.752941 0.752941 0.752941 +vn 0.147288 -0.988659 -0.029327 +v 0.161991 -0.237539 -0.040678 0.752941 0.752941 0.752941 +vn 0.079724 -0.996691 -0.015875 +v 0.134030 -0.240522 -0.034865 0.752941 0.752941 0.752941 +vn 0.041063 -0.999123 -0.008175 +v 0.093617 -0.242821 -0.026463 0.752941 0.752941 0.752941 +vn 0.016963 -0.999850 -0.003374 +v 0.038478 -0.244301 -0.014999 0.752941 0.752941 0.752941 +vn 0.001789 -0.999998 -0.000016 +v -0.282377 0.069951 0.000001 0.752941 0.752941 0.752941 +vn 0.001822 -0.973634 0.228107 +v -0.281710 0.071453 0.015302 0.752941 0.752941 0.752941 +vn 0.008062 -0.975336 0.220578 +v -0.320988 0.071381 0.015302 0.752941 0.752941 0.752941 +vn 0.007981 -0.999968 -0.000047 +v -0.320966 0.069883 0.000001 0.752941 0.752941 0.752941 +vn 0.029211 -0.975055 0.220032 +v -0.355594 0.070884 0.015302 0.752941 0.752941 0.752941 +vn 0.029088 -0.999577 -0.000208 +v -0.355000 0.069404 0.000001 0.752941 0.752941 0.752941 +vn 0.073370 -0.972692 0.220196 +v -0.385356 0.069529 0.015302 0.752941 0.752941 0.752941 +vn 0.073210 -0.997316 -0.000554 +v -0.384296 0.068106 0.000001 0.752941 0.752941 0.752941 +vn 0.156004 -0.962198 0.223245 +v -0.410096 0.066894 0.015302 0.752941 0.752941 0.752941 +vn 0.156030 -0.987752 -0.001166 +v -0.408676 0.065579 0.000001 0.752941 0.752941 0.752941 +vn 0.305644 -0.922881 0.234248 +v -0.429641 0.062547 0.015302 0.752941 0.752941 0.752941 +vn 0.307285 -0.951615 -0.002132 +v -0.427955 0.061412 0.000001 0.752941 0.752941 0.752941 +vn 0.554568 -0.790763 0.259129 +v -0.443819 0.056064 0.015302 0.752941 0.752941 0.752941 +vn 0.565293 -0.824884 -0.003159 +v -0.441951 0.055195 0.000001 0.752941 0.752941 0.752941 +vn 0.837376 -0.464712 0.287828 +v -0.452453 0.047015 0.015302 0.752941 0.752941 0.752941 +vn 0.870593 -0.491996 -0.002746 +v -0.450482 0.046519 0.000001 0.752941 0.752941 0.752941 +vn 0.954311 -0.067197 0.291163 +v -0.455371 0.034975 0.015302 0.752941 0.752941 0.752941 +vn 0.997408 -0.071948 -0.000812 +v -0.453367 0.034975 0.000001 0.752941 0.752941 0.752941 +vn 0.001701 -0.852035 0.523482 +v -0.279948 0.075415 0.026231 0.752941 0.752941 0.752941 +vn 0.007612 -0.864380 0.502782 +v -0.321046 0.075336 0.026231 0.752941 0.752941 0.752941 +vn 0.027546 -0.864149 0.502482 +v -0.357163 0.074783 0.026231 0.752941 0.752941 0.752941 +vn 0.069195 -0.860799 0.504219 +v -0.388144 0.073283 0.026231 0.752941 0.752941 0.752941 +vn 0.146433 -0.846036 0.512620 +v -0.413838 0.070359 0.026231 0.752941 0.752941 0.752941 +vn 0.281430 -0.796092 0.535756 +v -0.434089 0.065542 0.026231 0.752941 0.752941 0.752941 +vn 0.487456 -0.653650 0.578902 +v -0.448744 0.058355 0.026231 0.752941 0.752941 0.752941 +vn 0.696809 -0.365401 0.617202 +v -0.457650 0.048323 0.026231 0.752941 0.752941 0.752941 +vn 0.786132 -0.049974 0.616035 +v -0.460654 0.034975 0.026231 0.752941 0.752941 0.752941 +vn 0.001089 -0.513217 0.858258 +v -0.277459 0.081017 0.032790 0.752941 0.752941 0.752941 +vn 0.005258 -0.561133 0.827709 +v -0.321129 0.080926 0.032790 0.752941 0.752941 0.752941 +vn 0.019657 -0.559775 0.828412 +v -0.359379 0.080298 0.032790 0.752941 0.752941 0.752941 +vn 0.049568 -0.553275 0.831523 +v -0.392088 0.078588 0.032790 0.752941 0.752941 0.752941 +vn 0.103024 -0.531875 0.840533 +v -0.419128 0.075262 0.032790 0.752941 0.752941 0.752941 +vn 0.187959 -0.476063 0.859090 +v -0.440376 0.069776 0.032790 0.752941 0.752941 0.752941 +vn 0.297075 -0.359899 0.884431 +v -0.455707 0.061593 0.032790 0.752941 0.752941 0.752941 +vn 0.394316 -0.188964 0.899337 +v -0.464998 0.050172 0.032790 0.752941 0.752941 0.752941 +vn 0.446910 -0.024222 0.894251 +v -0.468122 0.034975 0.032790 0.752941 0.752941 0.752941 +vn -0.000219 0.086476 0.996254 +v -0.274605 0.087437 0.034975 0.752941 0.752941 0.752941 +vn -0.000095 0.001667 0.999999 +v -0.321223 0.087335 0.034975 0.752941 0.752941 0.752941 +vn 0.000927 0.004512 0.999989 +v -0.361921 0.086617 0.034975 0.752941 0.752941 0.752941 +vn 0.002702 0.010590 0.999940 +v -0.396609 0.084671 0.034975 0.752941 0.752941 0.752941 +vn 0.003556 0.021031 0.999772 +v -0.425192 0.080880 0.034975 0.752941 0.752941 0.752941 +vn -0.001323 0.034358 0.999409 +v -0.447584 0.074629 0.034975 0.752941 0.752941 0.752941 +vn -0.017950 0.038531 0.999096 +v -0.463689 0.065306 0.034975 0.752941 0.752941 0.752941 +vn -0.033156 0.019585 0.999258 +v -0.473419 0.052292 0.034975 0.752941 0.752941 0.752941 +vn -0.022988 0.001469 0.999735 +v -0.476683 0.034975 0.034975 0.752941 0.752941 0.752941 +vn -0.001457 0.611857 0.790967 +v -0.271751 0.093859 0.032790 0.752941 0.752941 0.752941 +vn -0.006039 0.562877 0.826519 +v -0.321318 0.093743 0.032790 0.752941 0.752941 0.752941 +vn -0.021879 0.563701 0.825689 +v -0.364463 0.092938 0.032790 0.752941 0.752941 0.752941 +vn -0.054883 0.559674 0.826893 +v -0.401129 0.090753 0.032790 0.752941 0.752941 0.752941 +vn -0.114546 0.541436 0.832903 +v -0.431258 0.086498 0.032790 0.752941 0.752941 0.752941 +vn -0.211755 0.490049 0.845583 +v -0.454790 0.079484 0.032790 0.752941 0.752941 0.752941 +vn -0.342003 0.374911 0.861670 +v -0.471671 0.069018 0.032790 0.752941 0.752941 0.752941 +vn -0.451240 0.190807 0.871765 +v -0.481842 0.054412 0.032790 0.752941 0.752941 0.752941 +vn -0.481456 0.019034 0.876263 +v -0.485246 0.034975 0.032790 0.752941 0.752941 0.752941 +vn -0.002144 0.877249 0.480031 +v -0.269261 0.099460 0.026231 0.752941 0.752941 0.752941 +vn -0.009557 0.864767 0.502083 +v -0.321401 0.099335 0.026231 0.752941 0.752941 0.752941 +vn -0.035914 0.864073 0.502084 +v -0.366681 0.098453 0.026231 0.752941 0.752941 0.752941 +vn -0.091406 0.857035 0.507086 +v -0.405072 0.096059 0.026231 0.752941 0.752941 0.752941 +vn -0.192546 0.830761 0.522266 +v -0.436548 0.091399 0.026231 0.752941 0.752941 0.752941 +vn -0.357735 0.754421 0.550341 +v -0.461077 0.083717 0.026231 0.752941 0.752941 0.752941 +vn -0.573345 0.577232 0.581445 +v -0.478635 0.072255 0.026231 0.752941 0.752941 0.752941 +vn -0.746840 0.294659 0.596160 +v -0.489190 0.056260 0.026231 0.752941 0.752941 0.752941 +vn -0.801068 0.027128 0.597959 +v -0.492713 0.034975 0.026231 0.752941 0.752941 0.752941 +vn -0.002429 0.977067 0.212919 +v -0.267501 0.103422 0.015302 0.752941 0.752941 0.752941 +vn -0.010991 0.975337 0.220446 +v -0.321459 0.103288 0.015302 0.752941 0.752941 0.752941 +vn -0.041530 0.974460 0.220687 +v -0.368249 0.102352 0.015302 0.752941 0.752941 0.752941 +vn -0.106497 0.968694 0.224253 +v -0.407862 0.099813 0.015302 0.752941 0.752941 0.752941 +vn -0.226954 0.945250 0.234510 +v -0.440290 0.094867 0.015302 0.752941 0.752941 0.752941 +vn -0.427950 0.867430 0.253818 +v -0.465525 0.086712 0.015302 0.752941 0.752941 0.752941 +vn -0.691131 0.668280 0.275209 +v -0.483559 0.074546 0.015302 0.752941 0.752941 0.752941 +vn -0.896322 0.340505 0.284012 +v -0.494386 0.057567 0.015302 0.752941 0.752941 0.752941 +vn -0.958601 0.029208 0.283252 +v -0.497996 0.034975 0.015302 0.752941 0.752941 0.752941 +vn -0.002486 0.999997 0.000008 +v -0.266832 0.104925 0.000001 0.752941 0.752941 0.752941 +vn -0.011306 0.999936 0.000038 +v -0.321481 0.104789 0.000001 0.752941 0.752941 0.752941 +vn -0.042741 0.999086 0.000140 +v -0.368844 0.103832 0.000001 0.752941 0.752941 0.752941 +vn -0.109810 0.993953 0.000362 +v -0.408919 0.101237 0.000001 0.752941 0.752941 0.752941 +vn -0.234937 0.972010 0.000745 +v -0.441708 0.096181 0.000001 0.752941 0.752941 0.752941 +vn -0.445565 0.895249 0.001244 +v -0.467211 0.087847 0.000001 0.752941 0.752941 0.752941 +vn -0.722683 0.691178 0.001487 +v -0.485427 0.075415 0.000001 0.752941 0.752941 0.752941 +vn -0.936408 0.350913 0.001007 +v -0.496357 0.058064 0.000001 0.752941 0.752941 0.752941 +vn -0.999581 0.028953 0.000275 +v -0.500000 0.034975 0.000001 0.752941 0.752941 0.752941 +vn -0.002394 0.977072 -0.212894 +v -0.267501 0.103422 -0.015302 0.752941 0.752941 0.752941 +vn -0.010865 0.975353 -0.220383 +v -0.321459 0.103288 -0.015302 0.752941 0.752941 0.752941 +vn -0.041187 0.974529 -0.220448 +v -0.368249 0.102352 -0.015302 0.752941 0.752941 0.752941 +vn -0.105746 0.968935 -0.223568 +v -0.407862 0.099813 -0.015302 0.752941 0.752941 0.752941 +vn -0.225770 0.945898 -0.233034 +v -0.440290 0.094867 -0.015302 0.752941 0.752941 0.752941 +vn -0.426865 0.868640 -0.251497 +v -0.465525 0.086712 -0.015302 0.752941 0.752941 0.752941 +vn -0.691410 0.668944 -0.272884 +v -0.483559 0.074546 -0.015302 0.752941 0.752941 0.752941 +vn -0.897328 0.339041 -0.282583 +v -0.494386 0.057567 -0.015302 0.752941 0.752941 0.752941 +vn -0.958748 0.028071 -0.282868 +v -0.497996 0.034975 -0.015302 0.752941 0.752941 0.752941 +vn -0.002087 0.877208 -0.480106 +v -0.269261 0.099460 -0.026231 0.752941 0.752941 0.752941 +vn -0.009340 0.864739 -0.502134 +v -0.321401 0.099335 -0.026231 0.752941 0.752941 0.752941 +vn -0.035321 0.864175 -0.501951 +v -0.366681 0.098453 -0.026231 0.752941 0.752941 0.752941 +vn -0.090187 0.857496 -0.506524 +v -0.405072 0.096059 -0.026231 0.752941 0.752941 0.752941 +vn -0.190700 0.831933 -0.521077 +v -0.436548 0.091399 -0.026231 0.752941 0.752941 0.752941 +vn -0.356161 0.756136 -0.549007 +v -0.461077 0.083717 -0.026231 0.752941 0.752941 0.752941 +vn -0.573484 0.577428 -0.581113 +v -0.478635 0.072255 -0.026231 0.752941 0.752941 0.752941 +vn -0.747884 0.291741 -0.596286 +v -0.489190 0.056260 -0.026231 0.752941 0.752941 0.752941 +vn -0.801124 0.025112 -0.597972 +v -0.492713 0.034975 -0.026231 0.752941 0.752941 0.752941 +vn -0.001415 0.611855 -0.790969 +v -0.271751 0.093859 -0.032788 0.752941 0.752941 0.752941 +vn -0.005842 0.562894 -0.826509 +v -0.321318 0.093743 -0.032788 0.752941 0.752941 0.752941 +vn -0.021404 0.563731 -0.825681 +v -0.364463 0.092938 -0.032788 0.752941 0.752941 0.752941 +vn -0.054092 0.559769 -0.826881 +v -0.401129 0.090753 -0.032788 0.752941 0.752941 0.752941 +vn -0.113525 0.541461 -0.833026 +v -0.431258 0.086498 -0.032788 0.752941 0.752941 0.752941 +vn -0.210829 0.489192 -0.846311 +v -0.454790 0.079484 -0.032788 0.752941 0.752941 0.752941 +vn -0.341148 0.372053 -0.863247 +v -0.471671 0.069018 -0.032788 0.752941 0.752941 0.752941 +vn -0.450559 0.186858 -0.872972 +v -0.481842 0.054412 -0.032788 0.752941 0.752941 0.752941 +vn -0.481080 0.017087 -0.876510 +v -0.485246 0.034975 -0.032788 0.752941 0.752941 0.752941 +vn -0.000201 0.086513 -0.996251 +v -0.274605 0.087437 -0.034975 0.752941 0.752941 0.752941 +vn -0.000112 0.001541 -0.999999 +v -0.321223 0.087335 -0.034975 0.752941 0.752941 0.752941 +vn 0.000789 0.003971 -0.999992 +v -0.361921 0.086617 -0.034975 0.752941 0.752941 0.752941 +vn 0.002199 0.008893 -0.999958 +v -0.396609 0.084671 -0.034975 0.752941 0.752941 0.752941 +vn 0.002865 0.017146 -0.999849 +v -0.425192 0.080880 -0.034975 0.752941 0.752941 0.752941 +vn -0.001019 0.028040 -0.999606 +v -0.447584 0.074629 -0.034975 0.752941 0.752941 0.752941 +vn -0.015301 0.032406 -0.999358 +v -0.463689 0.065306 -0.034975 0.752941 0.752941 0.752941 +vn -0.030121 0.016938 -0.999403 +v -0.473421 0.052292 -0.034975 0.752941 0.752941 0.752941 +vn -0.022016 0.001205 -0.999757 +v -0.476684 0.034975 -0.034975 0.752941 0.752941 0.752941 +vn 0.001027 -0.513314 -0.858200 +v -0.277459 0.081017 -0.032788 0.752941 0.752941 0.752941 +vn 0.005018 -0.561259 -0.827625 +v -0.321129 0.080926 -0.032788 0.752941 0.752941 0.752941 +vn 0.019007 -0.560286 -0.828081 +v -0.359379 0.080298 -0.032788 0.752941 0.752941 0.752941 +vn 0.048384 -0.554673 -0.830660 +v -0.392088 0.078588 -0.032788 0.752941 0.752941 0.752941 +vn 0.101448 -0.534872 -0.838821 +v -0.419128 0.075262 -0.032788 0.752941 0.752941 0.752941 +vn 0.187445 -0.480541 -0.856706 +v -0.440376 0.069776 -0.032788 0.752941 0.752941 0.752941 +vn 0.299433 -0.362501 -0.882572 +v -0.455707 0.061593 -0.032788 0.752941 0.752941 0.752941 +vn 0.397492 -0.186470 -0.898459 +v -0.464998 0.050172 -0.032788 0.752941 0.752941 0.752941 +vn 0.447764 -0.021694 -0.893889 +v -0.468122 0.034975 -0.032788 0.752941 0.752941 0.752941 +vn 0.001608 -0.851969 -0.523589 +v -0.279948 0.075415 -0.026231 0.752941 0.752941 0.752941 +vn 0.007293 -0.864344 -0.502847 +v -0.321046 0.075336 -0.026231 0.752941 0.752941 0.752941 +vn 0.026833 -0.864189 -0.502451 +v -0.357163 0.074783 -0.026231 0.752941 0.752941 0.752941 +vn 0.068032 -0.861008 -0.504021 +v -0.388144 0.073283 -0.026231 0.752941 0.752941 0.752941 +vn 0.144929 -0.846467 -0.512338 +v -0.413838 0.070359 -0.026231 0.752941 0.752941 0.752941 +vn 0.280173 -0.796471 -0.535851 +v -0.434089 0.065542 -0.026231 0.752941 0.752941 0.752941 +vn 0.487847 -0.652120 -0.580297 +v -0.448744 0.058355 -0.026231 0.752941 0.752941 0.752941 +vn 0.698415 -0.359160 -0.619048 +v -0.457650 0.048323 -0.026231 0.752941 0.752941 0.752941 +vn 0.786156 -0.045718 -0.616335 +v -0.460654 0.034975 -0.026231 0.752941 0.752941 0.752941 +vn 0.001759 -0.973633 -0.228114 +v -0.281710 0.071453 -0.015302 0.752941 0.752941 0.752941 +vn 0.007859 -0.975318 -0.220666 +v -0.320988 0.071381 -0.015302 0.752941 0.752941 0.752941 +vn 0.028760 -0.975009 -0.220296 +v -0.355594 0.070884 -0.015302 0.752941 0.752941 0.752941 +vn 0.072638 -0.972596 -0.220862 +v -0.385356 0.069529 -0.015302 0.752941 0.752941 0.752941 +vn 0.155071 -0.961994 -0.224770 +v -0.410096 0.066894 -0.015302 0.752941 0.752941 0.752941 +vn 0.304570 -0.922459 -0.237292 +v -0.429641 0.062547 -0.015302 0.752941 0.752941 0.752941 +vn 0.554043 -0.789446 -0.264219 +v -0.443819 0.056064 -0.015302 0.752941 0.752941 0.752941 +vn 0.838092 -0.460424 -0.292594 +v -0.452453 0.047015 -0.015302 0.752941 0.752941 0.752941 +vn 0.954131 -0.064100 -0.292448 +v -0.455371 0.034975 -0.015302 0.752941 0.752941 0.752941 +vn 0.941301 0.174446 0.288999 +v -0.453837 0.019870 0.015302 0.752941 0.752941 0.752941 +vn 0.983533 0.180728 -0.000253 +v -0.451879 0.020357 0.000001 0.752941 0.752941 0.752941 +vn 0.905049 0.314873 0.285904 +v -0.449115 0.002437 0.015302 0.752941 0.752941 0.752941 +vn 0.945885 0.324500 -0.000984 +v -0.447294 0.003279 0.000001 0.752941 0.752941 0.752941 +vn 0.857246 0.434731 0.275933 +v -0.441030 -0.016535 0.015302 0.752941 0.752941 0.752941 +vn 0.894841 0.446381 -0.001729 +v -0.439431 -0.015439 0.000001 0.752941 0.752941 0.752941 +vn 0.797743 0.544465 0.259160 +v -0.429401 -0.036259 0.015302 0.752941 0.752941 0.752941 +vn 0.830309 0.557299 -0.002240 +v -0.428107 -0.034975 0.000001 0.752941 0.752941 0.752941 +vn 0.724026 0.647135 0.238753 +v -0.414051 -0.055948 0.015302 0.752941 0.752941 0.752941 +vn 0.750493 0.660874 -0.002372 +v -0.413140 -0.054512 0.000001 0.752941 0.752941 0.752941 +vn 0.633740 0.741343 0.220870 +v -0.394801 -0.074815 0.015302 0.752941 0.752941 0.752941 +vn 0.653907 0.756572 -0.002065 +v -0.394346 -0.073229 0.000001 0.752941 0.752941 0.752941 +vn 0.526453 0.822808 0.214088 +v -0.371472 -0.092071 0.015302 0.752941 0.752941 0.752941 +vn 0.540667 0.841236 -0.001282 +v -0.371546 -0.090307 0.000001 0.752941 0.752941 0.752941 +vn 0.462203 0.856621 0.229280 +v -0.343888 -0.106929 0.015302 0.752941 0.752941 0.752941 +vn 0.777418 0.146355 0.611721 +v -0.458997 0.018586 0.026231 0.752941 0.752941 0.752941 +vn 0.747316 0.267822 0.608104 +v -0.453917 0.000219 0.026231 0.752941 0.752941 0.752941 +vn 0.711375 0.374595 0.594663 +v -0.445246 -0.019424 0.026231 0.752941 0.752941 0.752941 +vn 0.669482 0.475794 0.570451 +v -0.432813 -0.039643 0.026231 0.752941 0.752941 0.752941 +vn 0.617231 0.573400 0.538738 +v -0.416453 -0.059733 0.026231 0.752941 0.752941 0.752941 +vn 0.549083 0.663192 0.508610 +v -0.395997 -0.078993 0.026231 0.752941 0.752941 0.752941 +vn 0.461592 0.735969 0.495260 +v -0.371279 -0.096719 0.026231 0.752941 0.752941 0.752941 +vn 0.397899 0.745633 0.534517 +v -0.342126 -0.112212 0.026231 0.752941 0.752941 0.752941 +vn 0.446521 0.085788 0.890651 +v -0.466293 0.016773 0.032790 0.752941 0.752941 0.752941 +vn 0.429240 0.159420 0.889010 +v -0.460706 -0.002917 0.032790 0.752941 0.752941 0.752941 +vn 0.411447 0.226793 0.882766 +v -0.451204 -0.023511 0.032790 0.752941 0.752941 0.752941 +vn 0.393701 0.294269 0.870865 +v -0.437637 -0.044428 0.032790 0.752941 0.752941 0.752941 +vn 0.371928 0.363620 0.854078 +v -0.419849 -0.065084 0.032790 0.752941 0.752941 0.752941 +vn 0.339248 0.429816 0.836761 +v -0.397689 -0.084900 0.032790 0.752941 0.752941 0.752941 +vn 0.289225 0.479768 0.828354 +v -0.371004 -0.103293 0.032790 0.752941 0.752941 0.752941 +vn 0.220105 0.418527 0.881130 +v -0.339638 -0.119680 0.032790 0.752941 0.752941 0.752941 +vn -0.014437 -0.002313 0.999893 +v -0.474657 0.014693 0.034975 0.752941 0.752941 0.752941 +vn -0.012865 -0.005157 0.999904 +v -0.468486 -0.006512 0.034975 0.752941 0.752941 0.752941 +vn -0.011377 -0.007807 0.999905 +v -0.458035 -0.028195 0.034975 0.752941 0.752941 0.752941 +vn -0.010057 -0.009695 0.999902 +v -0.443166 -0.049912 0.034975 0.752941 0.752941 0.752941 +vn -0.009504 -0.010466 0.999900 +v -0.423742 -0.071220 0.034975 0.752941 0.752941 0.752941 +vn -0.010457 -0.010410 0.999891 +v -0.399629 -0.091673 0.034975 0.752941 0.752941 0.752941 +vn -0.012718 -0.010824 0.999861 +v -0.370689 -0.110829 0.034975 0.752941 0.752941 0.752941 +vn -0.075856 -0.148775 0.985957 +v -0.336783 -0.128242 0.034975 0.752941 0.752941 0.752941 +vn -0.466968 -0.091867 0.879489 +v -0.483020 0.012613 0.032790 0.752941 0.752941 0.752941 +vn -0.443651 -0.176396 0.878669 +v -0.476267 -0.010107 0.032790 0.752941 0.752941 0.752941 +vn -0.416916 -0.253595 0.872852 +v -0.464865 -0.032879 0.032790 0.752941 0.752941 0.752941 +vn -0.389697 -0.325781 0.861396 +v -0.448695 -0.055397 0.032790 0.752941 0.752941 0.752941 +vn -0.360831 -0.393248 0.845670 +v -0.427636 -0.077355 0.032790 0.752941 0.752941 0.752941 +vn -0.326762 -0.451924 0.830055 +v -0.401569 -0.098445 0.032790 0.752941 0.752941 0.752941 +vn -0.284183 -0.492992 0.822313 +v -0.370374 -0.118363 0.032790 0.752941 0.752941 0.752941 +vn -0.299629 -0.591167 0.748829 +v -0.333929 -0.136804 0.032790 0.752941 0.752941 0.752941 +vn -0.783732 -0.156239 0.601127 +v -0.490317 0.010798 0.026231 0.752941 0.752941 0.752941 +vn -0.741604 -0.301246 0.599395 +v -0.483056 -0.013244 0.026231 0.752941 0.752941 0.752941 +vn -0.685523 -0.429134 0.588135 +v -0.470824 -0.036966 0.026231 0.752941 0.752941 0.752941 +vn -0.623175 -0.538886 0.566793 +v -0.453519 -0.060182 0.026231 0.752941 0.752941 0.752941 +vn -0.557857 -0.630660 0.539503 +v -0.431032 -0.082706 0.026231 0.752941 0.752941 0.752941 +vn -0.490488 -0.703443 0.514382 +v -0.403261 -0.104353 0.026231 0.752941 0.752941 0.752941 +vn -0.421675 -0.754837 0.502406 +v -0.370099 -0.124937 0.026231 0.752941 0.752941 0.752941 +vn -0.399963 -0.797417 0.451836 +v -0.331441 -0.144272 0.026231 0.752941 0.752941 0.752941 +vn -0.939916 -0.188502 0.284649 +v -0.495478 0.009516 0.015302 0.752941 0.752941 0.752941 +vn -0.886810 -0.364874 0.283611 +v -0.487857 -0.015462 0.015302 0.752941 0.752941 0.752941 +vn -0.810336 -0.516855 0.276073 +v -0.475040 -0.039857 0.015302 0.752941 0.752941 0.752941 +vn -0.722854 -0.639403 0.262004 +v -0.456931 -0.063566 0.015302 0.752941 0.752941 0.752941 +vn -0.633794 -0.733733 0.244829 +v -0.433435 -0.086491 0.015302 0.752941 0.752941 0.752941 +vn -0.548752 -0.803841 0.229590 +v -0.404458 -0.108532 0.015302 0.752941 0.752941 0.752941 +vn -0.470290 -0.854079 0.222209 +v -0.369904 -0.129587 0.015302 0.752941 0.752941 0.752941 +vn -0.436236 -0.876612 0.203100 +v -0.329679 -0.149554 0.015302 0.752941 0.752941 0.752941 +vn -0.980449 -0.196775 0.000148 +v -0.497434 0.009028 0.000001 0.752941 0.752941 0.752941 +vn -0.924324 -0.381607 0.000553 +v -0.489678 -0.016303 0.000001 0.752941 0.752941 0.752941 +vn -0.841606 -0.540092 0.001028 +v -0.476638 -0.040953 0.000001 0.752941 0.752941 0.752941 +vn -0.746387 -0.665510 0.001320 +v -0.458225 -0.064849 0.000001 0.752941 0.752941 0.752941 +vn -0.650466 -0.759534 0.001348 +v -0.434346 -0.087928 0.000001 0.752941 0.752941 0.752941 +vn -0.560844 -0.827921 0.001092 +v -0.404911 -0.110117 0.000001 0.752941 0.752941 0.752941 +vn -0.480442 -0.877026 0.000590 +v -0.369830 -0.131350 0.000001 0.752941 0.752941 0.752941 +vn -0.444048 -0.896003 0.000297 +v -0.329012 -0.151558 0.000001 0.752941 0.752941 0.752941 +vn -0.940105 -0.187886 -0.284432 +v -0.495478 0.009516 -0.015302 0.752941 0.752941 0.752941 +vn -0.887461 -0.363932 -0.282782 +v -0.487857 -0.015462 -0.015302 0.752941 0.752941 0.752941 +vn -0.811245 -0.516244 -0.274542 +v -0.475040 -0.039857 -0.015302 0.752941 0.752941 0.752941 +vn -0.723585 -0.639404 -0.259976 +v -0.456931 -0.063566 -0.015302 0.752941 0.752941 0.752941 +vn -0.634094 -0.734167 -0.242743 +v -0.433435 -0.086491 -0.015302 0.752941 0.752941 0.752941 +vn -0.548491 -0.804492 -0.227924 +v -0.404458 -0.108532 -0.015302 0.752941 0.752941 0.752941 +vn -0.469435 -0.854755 -0.221413 +v -0.369904 -0.129587 -0.015302 0.752941 0.752941 0.752941 +vn -0.434935 -0.877292 -0.202955 +v -0.329679 -0.149554 -0.015302 0.752941 0.752941 0.752941 +vn -0.783939 -0.155167 -0.601134 +v -0.490317 0.010798 -0.026231 0.752941 0.752941 0.752941 +vn -0.742360 -0.299611 -0.599279 +v -0.483056 -0.013244 -0.026231 0.752941 0.752941 0.752941 +vn -0.686520 -0.427850 -0.587908 +v -0.470824 -0.036966 -0.026231 0.752941 0.752941 0.752941 +vn -0.623903 -0.538445 -0.566412 +v -0.453519 -0.060182 -0.026231 0.752941 0.752941 0.752941 +vn -0.557940 -0.631004 -0.539015 +v -0.431032 -0.082706 -0.026231 0.752941 0.752941 0.752941 +vn -0.489729 -0.704218 -0.514045 +v -0.403261 -0.104353 -0.026231 0.752941 0.752941 0.752941 +vn -0.419908 -0.755652 -0.502660 +v -0.370099 -0.124937 -0.026231 0.752941 0.752941 0.752941 +vn -0.397366 -0.798094 -0.452930 +v -0.331441 -0.144272 -0.026231 0.752941 0.752941 0.752941 +vn -0.467031 -0.090921 -0.879554 +v -0.483020 0.012613 -0.032788 0.752941 0.752941 0.752941 +vn -0.443553 -0.174758 -0.879045 +v -0.476267 -0.010107 -0.032788 0.752941 0.752941 0.752941 +vn -0.416405 -0.251814 -0.873611 +v -0.464865 -0.032879 -0.032788 0.752941 0.752941 0.752941 +vn -0.388682 -0.324238 -0.862436 +v -0.448695 -0.055397 -0.032788 0.752941 0.752941 0.752941 +vn -0.359183 -0.392268 -0.846825 +v -0.427636 -0.077355 -0.032788 0.752941 0.752941 0.752941 +vn -0.324403 -0.451492 -0.831214 +v -0.401569 -0.098445 -0.032788 0.752941 0.752941 0.752941 +vn -0.281186 -0.492773 -0.823474 +v -0.370374 -0.118363 -0.032788 0.752941 0.752941 0.752941 +vn -0.296157 -0.590555 -0.750690 +v -0.333929 -0.136804 -0.032788 0.752941 0.752941 0.752941 +vn -0.014033 -0.002211 -0.999899 +v -0.474657 0.014693 -0.034975 0.752941 0.752941 0.752941 +vn -0.011310 -0.004575 -0.999926 +v -0.468486 -0.006512 -0.034975 0.752941 0.752941 0.752941 +vn -0.008595 -0.006394 -0.999943 +v -0.458035 -0.028195 -0.034975 0.752941 0.752941 0.752941 +vn -0.006429 -0.007379 -0.999952 +v -0.443166 -0.049912 -0.034975 0.752941 0.752941 0.752941 +vn -0.005432 -0.007611 -0.999956 +v -0.423742 -0.071220 -0.034975 0.752941 0.752941 0.752941 +vn -0.006405 -0.007564 -0.999951 +v -0.399629 -0.091673 -0.034975 0.752941 0.752941 0.752941 +vn -0.009802 -0.008704 -0.999914 +v -0.370689 -0.110829 -0.034975 0.752941 0.752941 0.752941 +vn -0.074115 -0.147358 -0.986302 +v -0.336783 -0.128242 -0.034975 0.752941 0.752941 0.752941 +vn 0.447128 0.084726 -0.890448 +v -0.466293 0.016773 -0.032788 0.752941 0.752941 0.752941 +vn 0.431107 0.158236 -0.888317 +v -0.460706 -0.002917 -0.032788 0.752941 0.752941 0.752941 +vn 0.414200 0.226499 -0.881553 +v -0.451204 -0.023511 -0.032788 0.752941 0.752941 0.752941 +vn 0.396581 0.295198 -0.869242 +v -0.437637 -0.044428 -0.032788 0.752941 0.752941 0.752941 +vn 0.373961 0.365637 -0.852328 +v -0.419849 -0.065084 -0.032788 0.752941 0.752941 0.752941 +vn 0.339461 0.432154 -0.835469 +v -0.397689 -0.084900 -0.032788 0.752941 0.752941 0.752941 +vn 0.287126 0.481182 -0.828265 +v -0.371004 -0.103293 -0.032788 0.752941 0.752941 0.752941 +vn 0.216962 0.418549 -0.881898 +v -0.339638 -0.119680 -0.032788 0.752941 0.752941 0.752941 +vn 0.777733 0.144685 -0.611717 +v -0.458997 0.018586 -0.026231 0.752941 0.752941 0.752941 +vn 0.748155 0.265550 -0.608069 +v -0.453917 0.000219 -0.026231 0.752941 0.752941 0.752941 +vn 0.712240 0.372877 -0.594708 +v -0.445246 -0.019424 -0.026231 0.752941 0.752941 0.752941 +vn 0.669825 0.475030 -0.570684 +v -0.432813 -0.039643 -0.026231 0.752941 0.752941 0.752941 +vn 0.616359 0.573786 -0.539325 +v -0.416453 -0.059733 -0.026231 0.752941 0.752941 0.752941 +vn 0.546452 0.664454 -0.509795 +v -0.395997 -0.078993 -0.026231 0.752941 0.752941 0.752941 +vn 0.457295 0.737321 -0.497232 +v -0.371279 -0.096719 -0.026231 0.752941 0.752941 0.752941 +vn 0.393148 0.746243 -0.537175 +v -0.342126 -0.112212 -0.026231 0.752941 0.752941 0.752941 +vn 0.941422 0.173259 -0.289318 +v -0.453837 0.019870 -0.015302 0.752941 0.752941 0.752941 +vn 0.905216 0.313220 -0.287188 +v -0.449115 0.002437 -0.015302 0.752941 0.752941 0.752941 +vn 0.857201 0.433311 -0.278293 +v -0.441030 -0.016535 -0.015302 0.752941 0.752941 0.752941 +vn 0.797302 0.543602 -0.262308 +v -0.429401 -0.036259 -0.015302 0.752941 0.752941 0.752941 +vn 0.722960 0.647032 -0.242237 +v -0.414051 -0.055948 -0.015302 0.752941 0.752941 0.752941 +vn 0.631852 0.741982 -0.224113 +v -0.394801 -0.074815 -0.015302 0.752941 0.752941 0.752941 +vn 0.523734 0.823913 -0.216496 +v -0.371472 -0.092071 -0.015302 0.752941 0.752941 0.752941 +vn 0.459255 0.857681 -0.231231 +v -0.343888 -0.106929 -0.015302 0.752941 0.752941 0.752941 +vn -0.105858 0.994378 -0.002395 +v 0.230589 -0.023316 0.000001 0.752941 0.752941 0.752941 +vn -0.107866 0.932383 0.345002 +v 0.230589 -0.028826 0.033663 0.752941 0.752941 0.752941 +vn -0.230343 0.914993 0.331254 +v 0.275879 -0.023579 0.032765 0.752941 0.752941 0.752941 +vn -0.247838 0.968800 -0.001808 +v 0.274886 -0.018717 0.000001 0.752941 0.752941 0.752941 +vn -0.503982 0.804477 0.314353 +v 0.306721 -0.010279 0.030397 0.752941 0.752941 0.752941 +vn -0.545914 0.837841 -0.000450 +v 0.305155 -0.006194 0.000001 0.752941 0.752941 0.752941 +vn -0.740584 0.606440 0.289421 +v 0.326713 0.009103 0.027047 0.752941 0.752941 0.752941 +vn -0.791333 0.611384 0.001042 +v 0.324859 0.012341 0.000001 0.752941 0.752941 0.752941 +vn -0.860377 0.428140 0.276493 +v 0.339462 0.032595 0.023208 0.752941 0.752941 0.752941 +vn -0.910267 0.414014 0.002576 +v 0.337458 0.034975 0.000001 0.752941 0.752941 0.752941 +vn -0.885294 0.359601 0.294857 +v 0.348567 0.058227 0.019368 0.752941 0.752941 0.752941 +vn -0.940713 0.339175 0.004359 +v 0.346415 0.059794 0.000001 0.752941 0.752941 0.752941 +vn -0.846113 0.411649 0.338582 +v 0.357631 0.084026 0.016019 0.752941 0.752941 0.752941 +vn -0.916171 0.400739 0.006261 +v 0.355189 0.084888 0.000001 0.752941 0.752941 0.752941 +vn -0.736595 0.559839 0.379484 +v 0.370255 0.108023 0.013650 0.752941 0.752941 0.752941 +vn -0.816739 0.576961 0.007350 +v 0.367242 0.108340 0.000001 0.752941 0.752941 0.752941 +vn -0.578957 0.711638 0.397970 +v 0.390043 0.128242 0.012751 0.752941 0.752941 0.752941 +vn -0.651870 0.758306 0.006172 +v 0.386034 0.128242 0.000001 0.752941 0.752941 0.752941 +vn -0.089287 0.720620 0.687557 +v 0.230591 -0.043355 0.057708 0.752941 0.752941 0.752941 +vn -0.166948 0.723999 0.669293 +v 0.278500 -0.036400 0.056169 0.752941 0.752941 0.752941 +vn -0.357757 0.669351 0.651137 +v 0.310848 -0.021051 0.052108 0.752941 0.752941 0.752941 +vn -0.551235 0.554462 0.623468 +v 0.331604 0.000565 0.046366 0.752941 0.752941 0.752941 +vn -0.668786 0.433290 0.604140 +v 0.344745 0.026322 0.039784 0.752941 0.752941 0.752941 +vn -0.688888 0.377295 0.618936 +v 0.354242 0.054096 0.033203 0.752941 0.752941 0.752941 +vn -0.634413 0.403493 0.659328 +v 0.364069 0.081757 0.027461 0.752941 0.752941 0.752941 +vn -0.526812 0.495306 0.690754 +v 0.378200 0.107180 0.023400 0.752941 0.752941 0.752941 +vn -0.402685 0.590132 0.699707 +v 0.400608 0.128242 0.021859 0.752941 0.752941 0.752941 +vn -0.037139 0.376130 0.925822 +v 0.230591 -0.063893 0.072136 0.752941 0.752941 0.752941 +vn -0.052438 0.396830 0.916393 +v 0.282206 -0.054523 0.070211 0.752941 0.752941 0.752941 +vn -0.104981 0.402138 0.909540 +v 0.316683 -0.036279 0.065135 0.752941 0.752941 0.752941 +vn -0.190073 0.390647 0.900704 +v 0.338519 -0.011506 0.057958 0.752941 0.752941 0.752941 +vn -0.280288 0.357291 0.890944 +v 0.352213 0.017453 0.049731 0.752941 0.752941 0.752941 +vn -0.324961 0.328635 0.886792 +v 0.362264 0.048253 0.041503 0.752941 0.752941 0.752941 +vn -0.313569 0.330594 0.890158 +v 0.373171 0.078548 0.034326 0.752941 0.752941 0.752941 +vn -0.268338 0.363123 0.892265 +v 0.389432 0.105992 0.029250 0.752941 0.752941 0.752941 +vn -0.207224 0.401387 0.892158 +v 0.415545 0.128242 0.027324 0.752941 0.752941 0.752941 +vn 0.043363 -0.027473 0.998682 +v 0.230589 -0.087437 0.076945 0.752941 0.752941 0.752941 +vn 0.092369 -0.001966 0.995723 +v 0.286454 -0.075302 0.074892 0.752941 0.752941 0.752941 +vn 0.187025 0.049960 0.981084 +v 0.323371 -0.053738 0.069477 0.752941 0.752941 0.752941 +vn 0.235428 0.123414 0.964024 +v 0.346445 -0.025343 0.061822 0.752941 0.752941 0.752941 +vn 0.205938 0.175205 0.962753 +v 0.360776 0.007286 0.053045 0.752941 0.752941 0.752941 +vn 0.126350 0.189097 0.973796 +v 0.371461 0.041556 0.044270 0.752941 0.752941 0.752941 +vn 0.047305 0.179222 0.982671 +v 0.383606 0.074868 0.036615 0.752941 0.752941 0.752941 +vn -0.000195 0.150957 0.988540 +v 0.402309 0.104630 0.031200 0.752941 0.752941 0.752941 +vn -0.004634 0.126390 0.991970 +v 0.432669 0.128242 0.029146 0.752941 0.752941 0.752941 +vn 0.135604 -0.418123 0.898212 +v 0.230589 -0.110982 0.072136 0.752941 0.752941 0.752941 +vn 0.235432 -0.388802 0.890732 +v 0.290701 -0.096079 0.070211 0.752941 0.752941 0.752941 +vn 0.436132 -0.289557 0.852024 +v 0.330060 -0.071196 0.065135 0.752941 0.752941 0.752941 +vn 0.571887 -0.145508 0.807324 +v 0.354371 -0.039181 0.057958 0.752941 0.752941 0.752941 +vn 0.597359 -0.035115 0.801205 +v 0.369337 -0.002880 0.049731 0.752941 0.752941 0.752941 +vn 0.525226 0.001465 0.850961 +v 0.380658 0.034859 0.041503 0.752941 0.752941 0.752941 +vn 0.397471 -0.034308 0.916973 +v 0.394040 0.071190 0.034326 0.752941 0.752941 0.752941 +vn 0.276020 -0.144276 0.950262 +v 0.415184 0.103266 0.029250 0.752941 0.752941 0.752941 +vn 0.208718 -0.250053 0.945468 +v 0.449791 0.128242 0.027324 0.752941 0.752941 0.752941 +vn 0.216490 -0.728577 0.649852 +v 0.230589 -0.131521 0.057708 0.752941 0.752941 0.752941 +vn 0.347023 -0.688479 0.636845 +v 0.294406 -0.114202 0.056169 0.752941 0.752941 0.752941 +vn 0.601960 -0.539367 0.588836 +v 0.335894 -0.086424 0.052108 0.752941 0.752941 0.752941 +vn 0.772183 -0.338310 0.537847 +v 0.361285 -0.051251 0.046366 0.752941 0.752941 0.752941 +vn 0.825649 -0.196087 0.529012 +v 0.376805 -0.011750 0.039784 0.752941 0.752941 0.752941 +vn 0.791082 -0.167706 0.588272 +v 0.388682 0.029017 0.033203 0.752941 0.752941 0.752941 +vn 0.682436 -0.258342 0.683770 +v 0.403144 0.067981 0.027461 0.752941 0.752941 0.752941 +vn 0.517966 -0.460631 0.720785 +v 0.426416 0.102077 0.023400 0.752941 0.752941 0.752941 +vn 0.380736 -0.623306 0.683030 +v 0.464729 0.128242 0.021859 0.752941 0.752941 0.752941 +vn 0.265590 -0.908118 0.323704 +v 0.230589 -0.146048 0.033663 0.752941 0.752941 0.752941 +vn 0.410446 -0.856367 0.313319 +v 0.297026 -0.127023 0.032765 0.752941 0.752941 0.752941 +vn 0.683924 -0.672562 0.282679 +v 0.340023 -0.097196 0.030397 0.752941 0.752941 0.752941 +vn 0.861952 -0.439719 0.252361 +v 0.366176 -0.059790 0.027047 0.752941 0.752941 0.752941 +vn 0.925880 -0.285983 0.246902 +v 0.382087 -0.018022 0.023208 0.752941 0.752941 0.752941 +vn 0.919749 -0.273971 0.281074 +v 0.394357 0.024884 0.019368 0.752941 0.752941 0.752941 +vn 0.843741 -0.414433 0.341097 +v 0.409582 0.065711 0.016019 0.752941 0.752941 0.752941 +vn 0.651729 -0.669330 0.356717 +v 0.434361 0.101237 0.013650 0.752941 0.752941 0.752941 +vn 0.455022 -0.831682 0.318214 +v 0.475294 0.128242 0.012751 0.752941 0.752941 0.752941 +vn 0.279072 -0.960270 0.000826 +v 0.230589 -0.151558 0.000001 0.752941 0.752941 0.752941 +vn 0.429482 -0.903075 0.000409 +v 0.298020 -0.131885 0.000001 0.752941 0.752941 0.752941 +vn 0.705637 -0.708574 -0.000503 +v 0.341587 -0.101283 0.000001 0.752941 0.752941 0.752941 +vn 0.883873 -0.467724 -0.001286 +v 0.368031 -0.063028 0.000001 0.752941 0.752941 0.752941 +vn 0.949876 -0.312620 -0.002030 +v 0.384091 -0.020402 0.000001 0.752941 0.752941 0.752941 +vn 0.951608 -0.307300 -0.002964 +v 0.396509 0.023316 0.000001 0.752941 0.752941 0.752941 +vn 0.886021 -0.463629 -0.003863 +v 0.412023 0.064850 0.000001 0.752941 0.752941 0.752941 +vn 0.685302 -0.728251 -0.003426 +v 0.437374 0.100917 0.000001 0.752941 0.752941 0.752941 +vn 0.468684 -0.883364 -0.002072 +v 0.479302 0.128242 0.000001 0.752941 0.752941 0.752941 +vn 0.262218 -0.909348 -0.322998 +v 0.230589 -0.146048 -0.033663 0.752941 0.752941 0.752941 +vn 0.412516 -0.855609 -0.312671 +v 0.297026 -0.127023 -0.032765 0.752941 0.752941 0.752941 +vn 0.684912 -0.671259 -0.283385 +v 0.340023 -0.097196 -0.030395 0.752941 0.752941 0.752941 +vn 0.861882 -0.438637 -0.254475 +v 0.366176 -0.059790 -0.027047 0.752941 0.752941 0.752941 +vn 0.925317 -0.284871 -0.250274 +v 0.382087 -0.018022 -0.023207 0.752941 0.752941 0.752941 +vn 0.918797 -0.272271 -0.285800 +v 0.394357 0.024884 -0.019368 0.752941 0.752941 0.752941 +vn 0.842484 -0.412115 -0.346960 +v 0.409582 0.065711 -0.016018 0.752941 0.752941 0.752941 +vn 0.650325 -0.667811 -0.362086 +v 0.434361 0.101237 -0.013650 0.752941 0.752941 0.752941 +vn 0.453376 -0.830711 -0.323063 +v 0.475294 0.128242 -0.012751 0.752941 0.752941 0.752941 +vn 0.211229 -0.729276 -0.650798 +v 0.230591 -0.131521 -0.057708 0.752941 0.752941 0.752941 +vn 0.350406 -0.687038 -0.636548 +v 0.294406 -0.114202 -0.056168 0.752941 0.752941 0.752941 +vn 0.603815 -0.537283 -0.588842 +v 0.335894 -0.086424 -0.052106 0.752941 0.752941 0.752941 +vn 0.772151 -0.336674 -0.538919 +v 0.361285 -0.051251 -0.046366 0.752941 0.752941 0.752941 +vn 0.824714 -0.194778 -0.530950 +v 0.376805 -0.011750 -0.039784 0.752941 0.752941 0.752941 +vn 0.789858 -0.166292 -0.590315 +v 0.388682 0.029017 -0.033203 0.752941 0.752941 0.752941 +vn 0.681307 -0.256973 -0.685409 +v 0.403144 0.067981 -0.027461 0.752941 0.752941 0.752941 +vn 0.516687 -0.460260 -0.721939 +v 0.426416 0.102077 -0.023400 0.752941 0.752941 0.752941 +vn 0.376379 -0.624673 -0.684194 +v 0.464729 0.128242 -0.021859 0.752941 0.752941 0.752941 +vn 0.131649 -0.416799 -0.899415 +v 0.230591 -0.110982 -0.072136 0.752941 0.752941 0.752941 +vn 0.238682 -0.386772 -0.890752 +v 0.290701 -0.096079 -0.070211 0.752941 0.752941 0.752941 +vn 0.438768 -0.287615 -0.851329 +v 0.330060 -0.071196 -0.065133 0.752941 0.752941 0.752941 +vn 0.573024 -0.143869 -0.806812 +v 0.354371 -0.039181 -0.057957 0.752941 0.752941 0.752941 +vn 0.597707 -0.034242 -0.800983 +v 0.369337 -0.002880 -0.049730 0.752941 0.752941 0.752941 +vn 0.526142 0.000913 -0.850396 +v 0.380658 0.034859 -0.041503 0.752941 0.752941 0.752941 +vn 0.399307 -0.037500 -0.916050 +v 0.394040 0.071190 -0.034326 0.752941 0.752941 0.752941 +vn 0.278029 -0.151239 -0.948592 +v 0.415184 0.103266 -0.029250 0.752941 0.752941 0.752941 +vn 0.207938 -0.260677 -0.942767 +v 0.449791 0.128242 -0.027324 0.752941 0.752941 0.752941 +vn 0.044641 -0.024953 -0.998691 +v 0.230589 -0.087437 -0.076945 0.752941 0.752941 0.752941 +vn 0.094117 0.000110 -0.995561 +v 0.286454 -0.075302 -0.074890 0.752941 0.752941 0.752941 +vn 0.189884 0.050820 -0.980490 +v 0.323371 -0.053738 -0.069476 0.752941 0.752941 0.752941 +vn 0.239537 0.124044 -0.962931 +v 0.346445 -0.025343 -0.061820 0.752941 0.752941 0.752941 +vn 0.210994 0.175335 -0.961634 +v 0.360776 0.007286 -0.053045 0.752941 0.752941 0.752941 +vn 0.132097 0.187149 -0.973409 +v 0.371461 0.041556 -0.044270 0.752941 0.752941 0.752941 +vn 0.052965 0.172701 -0.983549 +v 0.383606 0.074868 -0.036614 0.752941 0.752941 0.752941 +vn 0.004781 0.136903 -0.990573 +v 0.402309 0.104630 -0.031199 0.752941 0.752941 0.752941 +vn -0.000878 0.114113 -0.993467 +v 0.432669 0.128242 -0.029146 0.752941 0.752941 0.752941 +vn -0.028806 0.378178 -0.925285 +v 0.230589 -0.063893 -0.072136 0.752941 0.752941 0.752941 +vn -0.052775 0.397749 -0.915975 +v 0.282206 -0.054525 -0.070211 0.752941 0.752941 0.752941 +vn -0.103746 0.401549 -0.909942 +v 0.316683 -0.036279 -0.065133 0.752941 0.752941 0.752941 +vn -0.186259 0.389669 -0.901923 +v 0.338519 -0.011506 -0.057957 0.752941 0.752941 0.752941 +vn -0.274325 0.356375 -0.893165 +v 0.352213 0.017453 -0.049730 0.752941 0.752941 0.752941 +vn -0.317843 0.326850 -0.890025 +v 0.362264 0.048253 -0.041503 0.752941 0.752941 0.752941 +vn -0.306701 0.325234 -0.894515 +v 0.373171 0.078548 -0.034326 0.752941 0.752941 0.752941 +vn -0.263659 0.350735 -0.898593 +v 0.389432 0.105992 -0.029250 0.752941 0.752941 0.752941 +vn -0.202852 0.399017 -0.894224 +v 0.415545 0.128242 -0.027324 0.752941 0.752941 0.752941 +vn -0.076791 0.721282 -0.688371 +v 0.230589 -0.043355 -0.057708 0.752941 0.752941 0.752941 +vn -0.168899 0.723098 -0.669778 +v 0.278500 -0.036400 -0.056168 0.752941 0.752941 0.752941 +vn -0.359235 0.667719 -0.651998 +v 0.310848 -0.021051 -0.052106 0.752941 0.752941 0.752941 +vn -0.552746 0.552063 -0.624258 +v 0.331604 0.000565 -0.046366 0.752941 0.752941 0.752941 +vn -0.670081 0.429966 -0.605079 +v 0.344745 0.026322 -0.039784 0.752941 0.752941 0.752941 +vn -0.688747 0.374040 -0.621065 +v 0.354242 0.054096 -0.033203 0.752941 0.752941 0.752941 +vn -0.632137 0.400964 -0.663047 +v 0.364069 0.081757 -0.027461 0.752941 0.752941 0.752941 +vn -0.524615 0.492529 -0.694402 +v 0.378200 0.107180 -0.023400 0.752941 0.752941 0.752941 +vn -0.398098 0.598782 -0.694966 +v 0.400608 0.128242 -0.021859 0.752941 0.752941 0.752941 +vn -0.098577 0.932136 -0.348432 +v 0.230589 -0.028826 -0.033663 0.752941 0.752941 0.752941 +vn -0.232183 0.913590 -0.333832 +v 0.275879 -0.023579 -0.032765 0.752941 0.752941 0.752941 +vn -0.505829 0.802998 -0.315168 +v 0.306721 -0.010279 -0.030395 0.752941 0.752941 0.752941 +vn -0.743028 0.604167 -0.287908 +v 0.326713 0.009103 -0.027047 0.752941 0.752941 0.752941 +vn -0.863374 0.424452 -0.272813 +v 0.339462 0.032595 -0.023207 0.752941 0.752941 0.752941 +vn -0.888747 0.355227 -0.289728 +v 0.348567 0.058227 -0.019368 0.752941 0.752941 0.752941 +vn -0.849287 0.409703 -0.332950 +v 0.357631 0.084026 -0.016018 0.752941 0.752941 0.752941 +vn -0.737194 0.563696 -0.372548 +v 0.370255 0.108023 -0.013650 0.752941 0.752941 0.752941 +vn -0.573236 0.722636 -0.386261 +v 0.390043 0.128242 -0.012751 0.752941 0.752941 0.752941 +vn -0.457991 0.819616 0.344200 +v 0.396034 0.132114 0.012533 0.752941 0.752941 0.752941 +vn -0.509869 0.860247 0.003052 +v 0.391803 0.132068 0.000001 0.752941 0.752941 0.752941 +vn -0.360140 0.889603 0.280901 +v 0.401499 0.134887 0.011955 0.752941 0.752941 0.752941 +vn -0.402759 0.915304 0.002045 +v 0.397207 0.134800 0.000001 0.752941 0.752941 0.752941 +vn -0.232007 0.955336 0.183044 +v 0.406098 0.136560 0.011138 0.752941 0.752941 0.752941 +vn -0.261543 0.965191 0.000880 +v 0.401882 0.136440 0.000001 0.752941 0.752941 0.752941 +vn -0.001958 0.999932 -0.011517 +v 0.409494 0.137126 0.010202 0.752941 0.752941 0.752941 +vn 0.001634 0.999998 -0.000615 +v 0.405466 0.136986 0.000001 0.752941 0.752941 0.752941 +vn 0.458488 0.767279 -0.448410 +v 0.411345 0.136582 0.009265 0.752941 0.752941 0.752941 +vn 0.659460 0.751738 -0.001479 +v 0.407591 0.136440 0.000001 0.752941 0.752941 0.752941 +vn 0.765157 -0.082531 -0.638532 +v 0.411316 0.134923 0.008448 0.752941 0.752941 0.752941 +vn 0.971814 -0.235735 0.002647 +v 0.407894 0.134800 0.000001 0.752941 0.752941 0.752941 +vn 0.634525 -0.590185 -0.499058 +v 0.409064 0.132145 0.007870 0.752941 0.752941 0.752941 +vn 0.727484 -0.686106 0.005005 +v 0.406012 0.132068 0.000001 0.752941 0.752941 0.752941 +vn 0.599522 -0.709161 -0.371031 +v 0.404252 0.128242 0.007651 0.752941 0.752941 0.752941 +vn 0.649806 -0.760091 0.003729 +v 0.401579 0.128242 0.000001 0.752941 0.752941 0.752941 +vn -0.329353 0.703265 0.630036 +v 0.407189 0.132236 0.021483 0.752941 0.752941 0.752941 +vn -0.259304 0.818252 0.513054 +v 0.412814 0.135121 0.020494 0.752941 0.752941 0.752941 +vn -0.167304 0.930107 0.326973 +v 0.417213 0.136879 0.019093 0.752941 0.752941 0.752941 +vn -0.017693 0.999736 -0.014662 +v 0.420115 0.137497 0.017487 0.752941 0.752941 0.752941 +vn 0.195973 0.806785 -0.557397 +v 0.421245 0.136960 0.015883 0.752941 0.752941 0.752941 +vn 0.399292 0.189469 -0.897032 +v 0.420333 0.135248 0.014482 0.752941 0.752941 0.752941 +vn 0.412324 -0.335353 -0.847070 +v 0.417106 0.132347 0.013491 0.752941 0.752941 0.752941 +vn 0.443716 -0.545362 -0.711124 +v 0.411295 0.128242 0.013117 0.752941 0.752941 0.752941 +vn -0.173444 0.517580 0.837871 +v 0.422959 0.132408 0.026855 0.752941 0.752941 0.752941 +vn -0.140323 0.705596 0.694582 +v 0.428812 0.135449 0.025616 0.752941 0.752941 0.752941 +vn -0.095989 0.890535 0.444671 +v 0.432927 0.137331 0.023866 0.752941 0.752941 0.752941 +vn -0.033140 0.999304 0.017137 +v 0.435129 0.138023 0.021859 0.752941 0.752941 0.752941 +vn 0.044874 0.855067 -0.516572 +v 0.435240 0.137493 0.019854 0.752941 0.752941 0.752941 +vn 0.143494 0.412794 -0.899450 +v 0.433082 0.135707 0.018102 0.752941 0.752941 0.752941 +vn 0.184258 -0.036809 -0.982188 +v 0.428478 0.132635 0.016865 0.752941 0.752941 0.752941 +vn 0.249825 -0.299668 -0.920753 +v 0.421252 0.128242 0.016395 0.752941 0.752941 0.752941 +vn 0.004200 0.233884 0.972256 +v 0.441037 0.132605 0.028645 0.752941 0.752941 0.752941 +vn 0.003482 0.518518 0.855060 +v 0.447150 0.135825 0.027324 0.752941 0.752941 0.752941 +vn -0.005617 0.822572 0.568633 +v 0.450941 0.137848 0.025457 0.752941 0.752941 0.752941 +vn -0.031375 0.996875 0.072502 +v 0.452342 0.138625 0.023316 0.752941 0.752941 0.752941 +vn -0.044620 0.897470 -0.438812 +v 0.451283 0.138105 0.021177 0.752941 0.752941 0.752941 +vn -0.025210 0.594208 -0.803916 +v 0.447697 0.136235 0.019310 0.752941 0.752941 0.752941 +vn -0.009029 0.265554 -0.964054 +v 0.441514 0.132964 0.017989 0.752941 0.752941 0.752941 +vn 0.060906 -0.002221 -0.998141 +v 0.432669 0.128242 0.017487 0.752941 0.752941 0.752941 +vn 0.203849 -0.170721 0.964002 +v 0.459115 0.132803 0.026855 0.752941 0.752941 0.752941 +vn 0.201910 0.184584 0.961853 +v 0.465489 0.136201 0.025616 0.752941 0.752941 0.752941 +vn 0.150645 0.677297 0.720122 +v 0.468955 0.138365 0.023866 0.752941 0.752941 0.752941 +vn -0.003107 0.989704 0.143093 +v 0.469554 0.139227 0.021859 0.752941 0.752941 0.752941 +vn -0.106059 0.933535 -0.342438 +v 0.467327 0.138716 0.019854 0.752941 0.752941 0.752941 +vn -0.146515 0.747058 -0.648412 +v 0.462312 0.136761 0.018102 0.752941 0.752941 0.752941 +vn -0.167268 0.551182 -0.817447 +v 0.454551 0.133293 0.016865 0.752941 0.752941 0.752941 +vn -0.120131 0.334087 -0.934855 +v 0.444084 0.128242 0.016395 0.752941 0.752941 0.752941 +vn 0.368623 -0.588542 0.719538 +v 0.474884 0.132975 0.021483 0.752941 0.752941 0.752941 +vn 0.426873 -0.290195 0.856485 +v 0.481486 0.136529 0.020494 0.752941 0.752941 0.752941 +vn 0.448463 0.367454 0.814775 +v 0.484669 0.138817 0.019093 0.752941 0.752941 0.752941 +vn 0.083640 0.971287 0.222725 +v 0.484570 0.139752 0.017487 0.752941 0.752941 0.752941 +vn -0.148899 0.962227 -0.227920 +v 0.481322 0.139249 0.015883 0.752941 0.752941 0.752941 +vn -0.232480 0.864945 -0.444774 +v 0.475061 0.137221 0.014482 0.752941 0.752941 0.752941 +vn -0.281218 0.773419 -0.568101 +v 0.465923 0.133580 0.013491 0.752941 0.752941 0.752941 +vn -0.276261 0.654961 -0.703354 +v 0.454042 0.128242 0.013117 0.752941 0.752941 0.752941 +vn 0.439406 -0.831677 0.339464 +v 0.486039 0.133097 0.012533 0.752941 0.752941 0.752941 +vn 0.557985 -0.691456 0.458848 +v 0.492801 0.136761 0.011955 0.752941 0.752941 0.752941 +vn 0.812766 0.039513 0.581249 +v 0.495784 0.139136 0.011138 0.752941 0.752941 0.752941 +vn 0.304397 0.924125 0.230943 +v 0.495190 0.140124 0.010202 0.752941 0.752941 0.752941 +vn -0.170345 0.979656 -0.106092 +v 0.491220 0.139626 0.009265 0.752941 0.752941 0.752941 +vn -0.282205 0.934444 -0.217200 +v 0.484078 0.137545 0.008448 0.752941 0.752941 0.752941 +vn -0.343424 0.897773 -0.275796 +v 0.473966 0.133784 0.007870 0.752941 0.752941 0.752941 +vn -0.368696 0.861446 -0.349248 +v 0.461086 0.128242 0.007651 0.752941 0.752941 0.752941 +vn 0.450922 -0.892561 -0.002127 +v 0.490270 0.133143 0.000001 0.752941 0.752941 0.752941 +vn 0.576482 -0.817103 -0.003335 +v 0.497093 0.136850 0.000001 0.752941 0.752941 0.752941 +vn 0.996016 -0.089003 -0.005598 +v 0.500000 0.139258 0.000001 0.752941 0.752941 0.752941 +vn 0.474156 0.880428 -0.004788 +v 0.499219 0.140265 0.000001 0.752941 0.752941 0.752941 +vn -0.175093 0.984552 -0.000076 +v 0.494976 0.139769 0.000001 0.752941 0.752941 0.752941 +vn -0.297778 0.954635 0.000090 +v 0.487499 0.137668 0.000001 0.752941 0.752941 0.752941 +vn -0.361055 0.932544 -0.000522 +v 0.477017 0.133861 0.000001 0.752941 0.752941 0.752941 +vn -0.391225 0.920294 -0.001321 +v 0.463757 0.128242 0.000001 0.752941 0.752941 0.752941 +vn 0.439839 -0.828462 -0.346688 +v 0.486039 0.133097 -0.012531 0.752941 0.752941 0.752941 +vn 0.557442 -0.685589 -0.468217 +v 0.492801 0.136761 -0.011954 0.752941 0.752941 0.752941 +vn 0.811578 0.040041 -0.582871 +v 0.495784 0.139136 -0.011138 0.752941 0.752941 0.752941 +vn 0.307483 0.922571 -0.233059 +v 0.495190 0.140124 -0.010201 0.752941 0.752941 0.752941 +vn -0.170096 0.979778 0.105367 +v 0.491220 0.139626 -0.009265 0.752941 0.752941 0.752941 +vn -0.282654 0.934066 0.218237 +v 0.484078 0.137545 -0.008448 0.752941 0.752941 0.752941 +vn -0.344115 0.897642 0.275363 +v 0.473966 0.133784 -0.007870 0.752941 0.752941 0.752941 +vn -0.365636 0.865331 0.342802 +v 0.461086 0.128242 -0.007650 0.752941 0.752941 0.752941 +vn 0.366773 -0.584152 -0.724047 +v 0.474884 0.132975 -0.021483 0.752941 0.752941 0.752941 +vn 0.425532 -0.288437 -0.857745 +v 0.481486 0.136529 -0.020492 0.752941 0.752941 0.752941 +vn 0.457929 0.355909 -0.814635 +v 0.484669 0.138817 -0.019093 0.752941 0.752941 0.752941 +vn 0.088766 0.970210 -0.225415 +v 0.484570 0.139752 -0.017487 0.752941 0.752941 0.752941 +vn -0.148990 0.962669 0.225989 +v 0.481322 0.139249 -0.015881 0.752941 0.752941 0.752941 +vn -0.232570 0.863729 0.447082 +v 0.475061 0.137221 -0.014482 0.752941 0.752941 0.752941 +vn -0.282276 0.770590 0.571411 +v 0.465923 0.133580 -0.013491 0.752941 0.752941 0.752941 +vn -0.275394 0.664772 0.694432 +v 0.454042 0.128242 -0.013115 0.752941 0.752941 0.752941 +vn 0.205167 -0.175323 -0.962896 +v 0.459115 0.132803 -0.026855 0.752941 0.752941 0.752941 +vn 0.205879 0.176383 -0.962550 +v 0.465489 0.136201 -0.025616 0.752941 0.752941 0.752941 +vn 0.159101 0.668475 -0.726517 +v 0.468955 0.138365 -0.023866 0.752941 0.752941 0.752941 +vn 0.000092 0.989339 -0.145631 +v 0.469554 0.139227 -0.021859 0.752941 0.752941 0.752941 +vn -0.106823 0.934309 0.340081 +v 0.467327 0.138716 -0.019852 0.752941 0.752941 0.752941 +vn -0.145891 0.745795 0.650005 +v 0.462312 0.136761 -0.018102 0.752941 0.752941 0.752941 +vn -0.165876 0.543525 0.822840 +v 0.454551 0.133293 -0.016863 0.752941 0.752941 0.752941 +vn -0.120253 0.337866 0.933480 +v 0.444084 0.128242 -0.016394 0.752941 0.752941 0.752941 +vn 0.007215 0.228017 -0.973631 +v 0.441037 0.132605 -0.028645 0.752941 0.752941 0.752941 +vn 0.006566 0.513899 -0.857826 +v 0.447150 0.135825 -0.027324 0.752941 0.752941 0.752941 +vn -0.002256 0.819760 -0.572703 +v 0.450941 0.137848 -0.025457 0.752941 0.752941 0.752941 +vn -0.029278 0.996786 -0.074563 +v 0.452342 0.138625 -0.023316 0.752941 0.752941 0.752941 +vn -0.045841 0.898550 0.436471 +v 0.451283 0.138105 -0.021176 0.752941 0.752941 0.752941 +vn -0.025182 0.595012 0.803322 +v 0.447697 0.136235 -0.019308 0.752941 0.752941 0.752941 +vn -0.005732 0.257649 0.966222 +v 0.441514 0.132964 -0.017988 0.752941 0.752941 0.752941 +vn 0.065762 -0.016906 0.997692 +v 0.432669 0.128242 -0.017487 0.752941 0.752941 0.752941 +vn -0.172325 0.517035 -0.838438 +v 0.422959 0.132408 -0.026855 0.752941 0.752941 0.752941 +vn -0.139314 0.705301 -0.695084 +v 0.428812 0.135449 -0.025616 0.752941 0.752941 0.752941 +vn -0.094907 0.890206 -0.445562 +v 0.432927 0.137331 -0.023866 0.752941 0.752941 0.752941 +vn -0.031906 0.999317 -0.018619 +v 0.435129 0.138023 -0.021859 0.752941 0.752941 0.752941 +vn 0.043668 0.856088 0.514982 +v 0.435240 0.137493 -0.019852 0.752941 0.752941 0.752941 +vn 0.141900 0.416885 0.897815 +v 0.433082 0.135707 -0.018102 0.752941 0.752941 0.752941 +vn 0.186544 -0.039063 0.981670 +v 0.428478 0.132635 -0.016863 0.752941 0.752941 0.752941 +vn 0.257030 -0.327387 0.909259 +v 0.421252 0.128242 -0.016394 0.752941 0.752941 0.752941 +vn -0.329525 0.706233 -0.626617 +v 0.407189 0.132236 -0.021483 0.752941 0.752941 0.752941 +vn -0.259145 0.819873 -0.510540 +v 0.412814 0.135121 -0.020492 0.752941 0.752941 0.752941 +vn -0.166745 0.930634 -0.325756 +v 0.417213 0.136879 -0.019093 0.752941 0.752941 0.752941 +vn -0.016975 0.999753 0.014355 +v 0.420115 0.137497 -0.017487 0.752941 0.752941 0.752941 +vn 0.195010 0.808009 0.555960 +v 0.421245 0.136960 -0.015881 0.752941 0.752941 0.752941 +vn 0.396203 0.196454 0.896899 +v 0.420333 0.135248 -0.014482 0.752941 0.752941 0.752941 +vn 0.412336 -0.331238 0.848681 +v 0.417106 0.132347 -0.013491 0.752941 0.752941 0.752941 +vn 0.443638 -0.569433 0.692049 +v 0.411295 0.128242 -0.013115 0.752941 0.752941 0.752941 +vn -0.457513 0.822676 -0.337471 +v 0.396034 0.132114 -0.012531 0.752941 0.752941 0.752941 +vn -0.359666 0.891164 -0.276525 +v 0.401499 0.134887 -0.011954 0.752941 0.752941 0.752941 +vn -0.231240 0.955957 -0.180762 +v 0.406098 0.136560 -0.011138 0.752941 0.752941 0.752941 +vn -0.000745 0.999936 0.011332 +v 0.409494 0.137126 -0.010201 0.752941 0.752941 0.752941 +vn 0.458037 0.768634 0.446546 +v 0.411345 0.136582 -0.009265 0.752941 0.752941 0.752941 +vn 0.762797 -0.075208 0.642250 +v 0.411314 0.134923 -0.008448 0.752941 0.752941 0.752941 +vn 0.634229 -0.583270 0.507493 +v 0.409064 0.132145 -0.007870 0.752941 0.752941 0.752941 +vn 0.591839 -0.718307 0.365735 +v 0.404250 0.128242 -0.007650 0.752941 0.752941 0.752941 +vn 0.189014 0.981265 0.037319 +v 0.001387 0.242777 0.007313 0.752941 0.752941 0.752941 +vn 0.192741 0.981250 0.000007 +v 0.002098 0.242777 0.000001 0.752941 0.752941 0.752941 +vn -0.000000 1.000000 0.000001 +v -0.033666 0.244825 0.000001 0.752941 0.752941 0.752941 +vn 0.683472 0.717324 0.135327 +v 0.018228 0.237175 0.010826 0.752941 0.752941 0.752941 +vn 0.696797 0.717268 0.000003 +v 0.019282 0.237175 0.000001 0.752941 0.752941 0.752941 +vn 0.978867 -0.064032 0.194212 +v 0.021503 0.228841 0.011508 0.752941 0.752941 0.752941 +vn 0.997949 -0.064012 0.000003 +v 0.022623 0.228841 0.000001 0.752941 0.752941 0.752941 +vn 0.799583 -0.579283 0.158424 +v 0.015849 0.218594 0.010327 0.752941 0.752941 0.752941 +vn 0.815422 -0.578867 0.000020 +v 0.016854 0.218594 0.000001 0.752941 0.752941 0.752941 +vn 0.740060 -0.656342 0.146719 +v 0.005909 0.207254 0.008251 0.752941 0.752941 0.752941 +vn 0.754886 -0.655856 0.000034 +v 0.006714 0.207254 0.000001 0.752941 0.752941 0.752941 +vn 0.833432 -0.527232 0.165582 +v -0.003673 0.195642 0.006249 0.752941 0.752941 0.752941 +vn 0.850040 -0.526718 0.000017 +v -0.003062 0.195642 0.000001 0.752941 0.752941 0.752941 +vn 0.979792 0.045659 0.194738 +v -0.008256 0.184576 0.005286 0.752941 0.752941 0.752941 +vn 0.998953 0.045751 0.000050 +v -0.007739 0.184576 0.000001 0.752941 0.752941 0.752941 +vn 0.667103 0.733010 0.132930 +v -0.003199 0.174875 0.006335 0.752941 0.752941 0.752941 +vn 0.680571 0.732682 0.000031 +v -0.002577 0.174875 0.000001 0.752941 0.752941 0.752941 +vn 0.177704 0.981337 0.073482 +v -0.000660 0.242777 0.014075 0.752941 0.752941 0.752941 +vn 0.643464 0.717640 0.266360 +v 0.015198 0.237175 0.020839 0.752941 0.752941 0.752941 +vn 0.921899 -0.064302 0.382058 +v 0.018279 0.228841 0.022150 0.752941 0.752941 0.752941 +vn 0.752530 -0.580067 0.311801 +v 0.012955 0.218594 0.019879 0.752941 0.752941 0.752941 +vn 0.696308 -0.657194 0.288532 +v 0.003596 0.207254 0.015884 0.752941 0.752941 0.752941 +vn 0.784344 -0.528131 0.325395 +v -0.005429 0.195642 0.012031 0.752941 0.752941 0.752941 +vn 0.922605 0.045410 0.383063 +v -0.009746 0.184576 0.010183 0.752941 0.752941 0.752941 +vn 0.627699 0.733370 0.261079 +v -0.004986 0.174875 0.012203 0.752941 0.752941 0.752941 +vn 0.159614 0.981401 0.106655 +v -0.003914 0.242777 0.020157 0.752941 0.752941 0.752941 +vn 0.578543 0.718104 0.386801 +v 0.010382 0.237175 0.029841 0.752941 0.752941 0.752941 +vn 0.829521 -0.064440 0.554745 +v 0.013160 0.228841 0.031722 0.752941 0.752941 0.752941 +vn 0.676729 -0.580778 0.452476 +v 0.008358 0.218594 0.028468 0.752941 0.752941 0.752941 +vn 0.626074 -0.657825 0.418685 +v -0.000079 0.207254 0.022749 0.752941 0.752941 0.752941 +vn 0.705406 -0.528836 0.471948 +v -0.008216 0.195642 0.017233 0.752941 0.752941 0.752941 +vn 0.830120 0.045164 0.555752 +v -0.012109 0.184576 0.014590 0.752941 0.752941 0.752941 +vn 0.564695 0.733484 0.378313 +v -0.007824 0.174875 0.017487 0.752941 0.752941 0.752941 +vn 0.135667 0.981424 0.135652 +v -0.008240 0.242777 0.025426 0.752941 0.752941 0.752941 +vn 0.492002 0.718239 0.492003 +v 0.003976 0.237175 0.037643 0.752941 0.752941 0.752941 +vn 0.705624 -0.064425 0.705652 +v 0.006350 0.228841 0.040016 0.752941 0.752941 0.752941 +vn 0.575545 -0.581026 0.575462 +v 0.002247 0.218594 0.035912 0.752941 0.752941 0.752941 +vn 0.532467 -0.658062 0.532385 +v -0.004965 0.207254 0.028700 0.752941 0.752941 0.752941 +vn 0.600081 -0.529145 0.599924 +v -0.011921 0.195642 0.021745 0.752941 0.752941 0.752941 +vn 0.706317 0.045084 0.706458 +v -0.015253 0.184576 0.018414 0.752941 0.752941 0.752941 +vn 0.480598 0.733586 0.480497 +v -0.011592 0.174875 0.022073 0.752941 0.752941 0.752941 +vn 0.106649 0.981399 0.159632 +v -0.013509 0.242777 0.029753 0.752941 0.752941 0.752941 +vn 0.386811 0.718041 0.578614 +v -0.003825 0.237175 0.044049 0.752941 0.752941 0.752941 +vn 0.554769 -0.064427 0.829506 +v -0.001944 0.228841 0.046825 0.752941 0.752941 0.752941 +vn 0.452467 -0.580749 0.676760 +v -0.005197 0.218594 0.042025 0.752941 0.752941 0.752941 +vn 0.418653 -0.657812 0.626110 +v -0.010917 0.207254 0.033588 0.752941 0.752941 0.752941 +vn 0.471988 -0.528865 0.705357 +v -0.016432 0.195642 0.025451 0.752941 0.752941 0.752941 +vn 0.555801 0.045095 0.830091 +v -0.019077 0.184576 0.021556 0.752941 0.752941 0.752941 +vn 0.378247 0.733547 0.564658 +v -0.016178 0.174875 0.025843 0.752941 0.752941 0.752941 +vn 0.073476 0.981339 0.177695 +v -0.019591 0.242777 0.033005 0.752941 0.752941 0.752941 +vn 0.266341 0.717715 0.643388 +v -0.012828 0.237175 0.048863 0.752941 0.752941 0.752941 +vn 0.382073 -0.064286 0.921894 +v -0.011515 0.228841 0.051945 0.752941 0.752941 0.752941 +vn 0.311713 -0.580102 0.752540 +v -0.013788 0.218594 0.046620 0.752941 0.752941 0.752941 +vn 0.288528 -0.657144 0.696357 +v -0.017783 0.207254 0.037261 0.752941 0.752941 0.752941 +vn 0.325300 -0.528099 0.784405 +v -0.021636 0.195642 0.028238 0.752941 0.752941 0.752941 +vn 0.383167 0.045336 0.922566 +v -0.023484 0.184576 0.023921 0.752941 0.752941 0.752941 +vn 0.261095 0.733281 0.627797 +v -0.021464 0.174875 0.028679 0.752941 0.752941 0.752941 +vn 0.037354 0.981263 0.189017 +v -0.026353 0.242777 0.035054 0.752941 0.752941 0.752941 +vn 0.135358 0.717262 0.683530 +v -0.022840 0.237175 0.051895 0.752941 0.752941 0.752941 +vn 0.194158 -0.064116 0.978873 +v -0.022158 0.228841 0.055168 0.752941 0.752941 0.752941 +vn 0.158449 -0.579266 0.799590 +v -0.023339 0.218594 0.049514 0.752941 0.752941 0.752941 +vn 0.146707 -0.656319 0.740082 +v -0.025416 0.207254 0.039576 0.752941 0.752941 0.752941 +vn 0.165438 -0.527216 0.833471 +v -0.027418 0.195642 0.029993 0.752941 0.752941 0.752941 +vn 0.194730 0.045671 0.979793 +v -0.028379 0.184576 0.025410 0.752941 0.752941 0.752941 +vn 0.132966 0.733008 0.667097 +v -0.027332 0.174875 0.030468 0.752941 0.752941 0.752941 +vn -0.000005 0.981250 0.192741 +v -0.033666 0.242777 0.035765 0.752941 0.752941 0.752941 +vn 0.000002 0.717194 0.696874 +v -0.033666 0.237175 0.052949 0.752941 0.752941 0.752941 +vn -0.000009 -0.064087 0.997944 +v -0.033666 0.228841 0.056288 0.752941 0.752941 0.752941 +vn -0.000009 -0.578842 0.815440 +v -0.033666 0.218594 0.050520 0.752941 0.752941 0.752941 +vn -0.000002 -0.655857 0.754885 +v -0.033666 0.207254 0.040379 0.752941 0.752941 0.752941 +vn -0.000035 -0.526673 0.850068 +v -0.033666 0.195642 0.030603 0.752941 0.752941 0.752941 +vn -0.000040 0.045791 0.998951 +v -0.033666 0.184576 0.025928 0.752941 0.752941 0.752941 +vn -0.000007 0.732660 0.680595 +v -0.033666 0.174875 0.031089 0.752941 0.752941 0.752941 +vn -0.037339 0.981264 0.189016 +v -0.040978 0.242777 0.035054 0.752941 0.752941 0.752941 +vn -0.135358 0.717261 0.683531 +v -0.044492 0.237175 0.051895 0.752941 0.752941 0.752941 +vn -0.194155 -0.064154 0.978871 +v -0.045173 0.228841 0.055168 0.752941 0.752941 0.752941 +vn -0.158468 -0.579247 0.799600 +v -0.043992 0.218594 0.049514 0.752941 0.752941 0.752941 +vn -0.146730 -0.656327 0.740071 +v -0.041917 0.207254 0.039576 0.752941 0.752941 0.752941 +vn -0.165454 -0.527249 0.833447 +v -0.039915 0.195642 0.029993 0.752941 0.752941 0.752941 +vn -0.194767 0.045689 0.979785 +v -0.038952 0.184576 0.025410 0.752941 0.752941 0.752941 +vn -0.132975 0.733051 0.667048 +v -0.040001 0.174875 0.030468 0.752941 0.752941 0.752941 +vn -0.073484 0.981338 0.177695 +v -0.047742 0.242777 0.033005 0.752941 0.752941 0.752941 +vn -0.266385 0.717692 0.643395 +v -0.054504 0.237175 0.048863 0.752941 0.752941 0.752941 +vn -0.382087 -0.064277 0.921888 +v -0.055817 0.228841 0.051945 0.752941 0.752941 0.752941 +vn -0.311684 -0.580100 0.752554 +v -0.053544 0.218594 0.046620 0.752941 0.752941 0.752941 +vn -0.288522 -0.657149 0.696355 +v -0.049550 0.207254 0.037261 0.752941 0.752941 0.752941 +vn -0.325325 -0.528144 0.784364 +v -0.045696 0.195642 0.028238 0.752941 0.752941 0.752941 +vn -0.383073 0.045404 0.922602 +v -0.043848 0.184576 0.023921 0.752941 0.752941 0.752941 +vn -0.261082 0.733319 0.627758 +v -0.045869 0.174875 0.028679 0.752941 0.752941 0.752941 +vn -0.106651 0.981401 0.159617 +v -0.053822 0.242777 0.029753 0.752941 0.752941 0.752941 +vn -0.386779 0.718016 0.578667 +v -0.063507 0.237175 0.044049 0.752941 0.752941 0.752941 +vn -0.554761 -0.064452 0.829510 +v -0.065387 0.228841 0.046825 0.752941 0.752941 0.752941 +vn -0.452511 -0.580735 0.676743 +v -0.062134 0.218594 0.042025 0.752941 0.752941 0.752941 +vn -0.418692 -0.657822 0.626073 +v -0.056416 0.207254 0.033588 0.752941 0.752941 0.752941 +vn -0.471967 -0.528870 0.705368 +v -0.050900 0.195642 0.025451 0.752941 0.752941 0.752941 +vn -0.555750 0.045142 0.830123 +v -0.048256 0.184576 0.021556 0.752941 0.752941 0.752941 +vn -0.378291 0.733543 0.564633 +v -0.051154 0.174875 0.025843 0.752941 0.752941 0.752941 +vn -0.135648 0.981427 0.135653 +v -0.059091 0.242777 0.025426 0.752941 0.752941 0.752941 +vn -0.492043 0.718202 0.492016 +v -0.071309 0.237175 0.037643 0.752941 0.752941 0.752941 +vn -0.705608 -0.064512 0.705660 +v -0.073681 0.228841 0.040016 0.752941 0.752941 0.752941 +vn -0.575502 -0.581009 0.575523 +v -0.069578 0.218594 0.035912 0.752941 0.752941 0.752941 +vn -0.532465 -0.658053 0.532398 +v -0.062366 0.207254 0.028700 0.752941 0.752941 0.752941 +vn -0.600043 -0.529090 0.600010 +v -0.055410 0.195642 0.021745 0.752941 0.752941 0.752941 +vn -0.706379 0.045028 0.706400 +v -0.052080 0.184576 0.018414 0.752941 0.752941 0.752941 +vn -0.480574 0.733569 0.480547 +v -0.055739 0.174875 0.022073 0.752941 0.752941 0.752941 +vn -0.159630 0.981397 0.106666 +v -0.063419 0.242777 0.020157 0.752941 0.752941 0.752941 +vn -0.578586 0.718080 0.386780 +v -0.077714 0.237175 0.029841 0.752941 0.752941 0.752941 +vn -0.829484 -0.064415 0.554803 +v -0.080491 0.228841 0.031722 0.752941 0.752941 0.752941 +vn -0.676704 -0.580769 0.452525 +v -0.075691 0.218594 0.028468 0.752941 0.752941 0.752941 +vn -0.626074 -0.657811 0.418707 +v -0.067253 0.207254 0.022749 0.752941 0.752941 0.752941 +vn -0.705340 -0.528833 0.472050 +v -0.059117 0.195642 0.017233 0.752941 0.752941 0.752941 +vn -0.830077 0.045108 0.555821 +v -0.055222 0.184576 0.014590 0.752941 0.752941 0.752941 +vn -0.564669 0.733509 0.378303 +v -0.059509 0.174875 0.017487 0.752941 0.752941 0.752941 +vn -0.177698 0.981339 0.073466 +v -0.066671 0.242777 0.014075 0.752941 0.752941 0.752941 +vn -0.643380 0.717708 0.266380 +v -0.082529 0.237175 0.020839 0.752941 0.752941 0.752941 +vn -0.921902 -0.064245 0.382058 +v -0.085612 0.228841 0.022150 0.752941 0.752941 0.752941 +vn -0.752534 -0.580104 0.311724 +v -0.080287 0.218594 0.019879 0.752941 0.752941 0.752941 +vn -0.696340 -0.657150 0.288557 +v -0.070927 0.207254 0.015884 0.752941 0.752941 0.752941 +vn -0.784346 -0.528127 0.325397 +v -0.061904 0.195642 0.012031 0.752941 0.752941 0.752941 +vn -0.922615 0.045364 0.383046 +v -0.057587 0.184576 0.010183 0.752941 0.752941 0.752941 +vn -0.627788 0.733289 0.261094 +v -0.062345 0.174875 0.012203 0.752941 0.752941 0.752941 +vn -0.189006 0.981265 0.037346 +v -0.068719 0.242777 0.007313 0.752941 0.752941 0.752941 +vn -0.683526 0.717271 0.135331 +v -0.085561 0.237175 0.010826 0.752941 0.752941 0.752941 +vn -0.978878 -0.064122 0.194128 +v -0.088834 0.228841 0.011508 0.752941 0.752941 0.752941 +vn -0.799605 -0.579264 0.158381 +v -0.083180 0.218594 0.010327 0.752941 0.752941 0.752941 +vn -0.740092 -0.656310 0.146699 +v -0.073241 0.207254 0.008251 0.752941 0.752941 0.752941 +vn -0.833451 -0.527247 0.165440 +v -0.063660 0.195642 0.006249 0.752941 0.752941 0.752941 +vn -0.979802 0.045609 0.194700 +v -0.059075 0.184576 0.005286 0.752941 0.752941 0.752941 +vn -0.667105 0.733012 0.132910 +v -0.064133 0.174875 0.006335 0.752941 0.752941 0.752941 +vn -0.192752 0.981247 0.000005 +v -0.069431 0.242777 0.000001 0.752941 0.752941 0.752941 +vn -0.696833 0.717233 -0.000001 +v -0.086614 0.237175 0.000001 0.752941 0.752941 0.752941 +vn -0.997945 -0.064073 0.000001 +v -0.089954 0.228841 0.000001 0.752941 0.752941 0.752941 +vn -0.815426 -0.578861 0.000001 +v -0.084185 0.218594 0.000001 0.752941 0.752941 0.752941 +vn -0.754900 -0.655840 -0.000007 +v -0.074045 0.207254 0.000001 0.752941 0.752941 0.752941 +vn -0.850071 -0.526668 -0.000041 +v -0.064269 0.195642 0.000001 0.752941 0.752941 0.752941 +vn -0.998954 0.045734 -0.000028 +v -0.059594 0.184576 0.000001 0.752941 0.752941 0.752941 +vn -0.680602 0.732653 0.000006 +v -0.064754 0.174875 0.000001 0.752941 0.752941 0.752941 +vn -0.189004 0.981266 -0.037346 +v -0.068719 0.242777 -0.007313 0.752941 0.752941 0.752941 +vn -0.683532 0.717267 -0.135322 +v -0.085561 0.237175 -0.010826 0.752941 0.752941 0.752941 +vn -0.978879 -0.064134 -0.194123 +v -0.088834 0.228841 -0.011508 0.752941 0.752941 0.752941 +vn -0.799590 -0.579277 -0.158412 +v -0.083180 0.218594 -0.010327 0.752941 0.752941 0.752941 +vn -0.740083 -0.656315 -0.146723 +v -0.073241 0.207254 -0.008250 0.752941 0.752941 0.752941 +vn -0.833439 -0.527267 -0.165435 +v -0.063660 0.195642 -0.006247 0.752941 0.752941 0.752941 +vn -0.979786 0.045647 -0.194769 +v -0.059075 0.184576 -0.005286 0.752941 0.752941 0.752941 +vn -0.667074 0.733034 -0.132939 +v -0.064133 0.174875 -0.006334 0.752941 0.752941 0.752941 +vn -0.177701 0.981338 -0.073472 +v -0.066671 0.242777 -0.014075 0.752941 0.752941 0.752941 +vn -0.643352 0.717731 -0.266385 +v -0.082529 0.237175 -0.020837 0.752941 0.752941 0.752941 +vn -0.921893 -0.064242 -0.382081 +v -0.085612 0.228841 -0.022150 0.752941 0.752941 0.752941 +vn -0.752538 -0.580120 -0.311684 +v -0.080287 0.218594 -0.019877 0.752941 0.752941 0.752941 +vn -0.696340 -0.657168 -0.288516 +v -0.070927 0.207254 -0.015883 0.752941 0.752941 0.752941 +vn -0.784367 -0.528122 -0.325355 +v -0.061904 0.195642 -0.012029 0.752941 0.752941 0.752941 +vn -0.922637 0.045376 -0.382991 +v -0.057587 0.184576 -0.010181 0.752941 0.752941 0.752941 +vn -0.627767 0.733331 -0.261025 +v -0.062345 0.174875 -0.012202 0.752941 0.752941 0.752941 +vn -0.159634 0.981398 -0.106656 +v -0.063419 0.242777 -0.020157 0.752941 0.752941 0.752941 +vn -0.578621 0.718058 -0.386770 +v -0.077714 0.237175 -0.029841 0.752941 0.752941 0.752941 +vn -0.829493 -0.064400 -0.554791 +v -0.080491 0.228841 -0.031722 0.752941 0.752941 0.752941 +vn -0.676724 -0.580765 -0.452500 +v -0.075691 0.218594 -0.028468 0.752941 0.752941 0.752941 +vn -0.626080 -0.657833 -0.418664 +v -0.067253 0.207254 -0.022749 0.752941 0.752941 0.752941 +vn -0.705389 -0.528852 -0.471956 +v -0.059117 0.195642 -0.017233 0.752941 0.752941 0.752941 +vn -0.830117 0.045154 -0.555758 +v -0.055222 0.184576 -0.014590 0.752941 0.752941 0.752941 +vn -0.564662 0.733530 -0.378273 +v -0.059509 0.174875 -0.017487 0.752941 0.752941 0.752941 +vn -0.135634 0.981426 -0.135670 +v -0.059091 0.242777 -0.025426 0.752941 0.752941 0.752941 +vn -0.492007 0.718215 -0.492033 +v -0.071309 0.237175 -0.037642 0.752941 0.752941 0.752941 +vn -0.705625 -0.064452 -0.705649 +v -0.073681 0.228841 -0.040016 0.752941 0.752941 0.752941 +vn -0.575533 -0.581021 -0.575479 +v -0.069578 0.218594 -0.035912 0.752941 0.752941 0.752941 +vn -0.532426 -0.658065 -0.532422 +v -0.062366 0.207254 -0.028700 0.752941 0.752941 0.752941 +vn -0.600026 -0.529097 -0.600021 +v -0.055410 0.195642 -0.021745 0.752941 0.752941 0.752941 +vn -0.706417 0.045030 -0.706362 +v -0.052080 0.184576 -0.018413 0.752941 0.752941 0.752941 +vn -0.480555 0.733574 -0.480558 +v -0.055739 0.174875 -0.022073 0.752941 0.752941 0.752941 +vn -0.106654 0.981401 -0.159614 +v -0.053822 0.242777 -0.029752 0.752941 0.752941 0.752941 +vn -0.386798 0.718088 -0.578564 +v -0.063507 0.237175 -0.044047 0.752941 0.752941 0.752941 +vn -0.554762 -0.064367 -0.829516 +v -0.065387 0.228841 -0.046825 0.752941 0.752941 0.752941 +vn -0.452482 -0.580740 -0.676757 +v -0.062134 0.218594 -0.042026 0.752941 0.752941 0.752941 +vn -0.418708 -0.657835 -0.626049 +v -0.056416 0.207254 -0.033586 0.752941 0.752941 0.752941 +vn -0.471976 -0.528831 -0.705391 +v -0.050900 0.195642 -0.025450 0.752941 0.752941 0.752941 +vn -0.555775 0.045123 -0.830107 +v -0.048256 0.184576 -0.021556 0.752941 0.752941 0.752941 +vn -0.378331 0.733499 -0.564663 +v -0.051154 0.174875 -0.025842 0.752941 0.752941 0.752941 +vn -0.073478 0.981336 -0.177708 +v -0.047742 0.242777 -0.033005 0.752941 0.752941 0.752941 +vn -0.266405 0.717669 -0.643413 +v -0.054504 0.237175 -0.048864 0.752941 0.752941 0.752941 +vn -0.382108 -0.064307 -0.921878 +v -0.055817 0.228841 -0.051945 0.752941 0.752941 0.752941 +vn -0.311685 -0.580098 -0.752555 +v -0.053544 0.218594 -0.046620 0.752941 0.752941 0.752941 +vn -0.288519 -0.657159 -0.696347 +v -0.049550 0.207254 -0.037261 0.752941 0.752941 0.752941 +vn -0.325386 -0.528115 -0.784358 +v -0.045696 0.195642 -0.028237 0.752941 0.752941 0.752941 +vn -0.383084 0.045371 -0.922598 +v -0.043848 0.184576 -0.023920 0.752941 0.752941 0.752941 +vn -0.261043 0.733314 -0.627780 +v -0.045869 0.174875 -0.028679 0.752941 0.752941 0.752941 +vn -0.037326 0.981269 -0.188994 +v -0.040978 0.242777 -0.035052 0.752941 0.752941 0.752941 +vn -0.135307 0.717305 -0.683495 +v -0.044492 0.237175 -0.051894 0.752941 0.752941 0.752941 +vn -0.194125 -0.064095 -0.978881 +v -0.045173 0.228841 -0.055168 0.752941 0.752941 0.752941 +vn -0.158455 -0.579278 -0.799580 +v -0.043992 0.218594 -0.049514 0.752941 0.752941 0.752941 +vn -0.146753 -0.656316 -0.740077 +v -0.041917 0.207254 -0.039574 0.752941 0.752941 0.752941 +vn -0.165495 -0.527215 -0.833460 +v -0.039915 0.195642 -0.029993 0.752941 0.752941 0.752941 +vn -0.194823 0.045622 -0.979777 +v -0.038952 0.184576 -0.025410 0.752941 0.752941 0.752941 +vn -0.132993 0.732956 -0.667150 +v -0.040001 0.174875 -0.030466 0.752941 0.752941 0.752941 +vn 0.000001 0.981250 -0.192741 +v -0.033666 0.242777 -0.035764 0.752941 0.752941 0.752941 +vn -0.000019 0.717197 -0.696870 +v -0.033666 0.237175 -0.052949 0.752941 0.752941 0.752941 +vn -0.000011 -0.064077 -0.997945 +v -0.033666 0.228841 -0.056288 0.752941 0.752941 0.752941 +vn 0.000022 -0.578843 -0.815439 +v -0.033666 0.218594 -0.050520 0.752941 0.752941 0.752941 +vn 0.000022 -0.655863 -0.754880 +v -0.033666 0.207254 -0.040380 0.752941 0.752941 0.752941 +vn 0.000022 -0.526670 -0.850070 +v -0.033666 0.195642 -0.030603 0.752941 0.752941 0.752941 +vn 0.000053 0.045757 -0.998953 +v -0.033666 0.184576 -0.025928 0.752941 0.752941 0.752941 +vn 0.000021 0.732679 -0.680575 +v -0.033666 0.174875 -0.031089 0.752941 0.752941 0.752941 +vn 0.037330 0.981268 -0.188999 +v -0.026353 0.242777 -0.035052 0.752941 0.752941 0.752941 +vn 0.135346 0.717308 -0.683484 +v -0.022840 0.237175 -0.051894 0.752941 0.752941 0.752941 +vn 0.194181 -0.064107 -0.978869 +v -0.022158 0.228841 -0.055168 0.752941 0.752941 0.752941 +vn 0.158460 -0.579278 -0.799580 +v -0.023339 0.218594 -0.049514 0.752941 0.752941 0.752941 +vn 0.146762 -0.656326 -0.740066 +v -0.025416 0.207254 -0.039574 0.752941 0.752941 0.752941 +vn 0.165536 -0.527226 -0.833445 +v -0.027418 0.195642 -0.029993 0.752941 0.752941 0.752941 +vn 0.194848 0.045654 -0.979770 +v -0.028379 0.184576 -0.025410 0.752941 0.752941 0.752941 +vn 0.132982 0.732976 -0.667130 +v -0.027332 0.174875 -0.030466 0.752941 0.752941 0.752941 +vn 0.073474 0.981338 -0.177702 +v -0.019591 0.242777 -0.033005 0.752941 0.752941 0.752941 +vn 0.266377 0.717663 -0.643431 +v -0.012828 0.237175 -0.048864 0.752941 0.752941 0.752941 +vn 0.382045 -0.064290 -0.921905 +v -0.011515 0.228841 -0.051945 0.752941 0.752941 0.752941 +vn 0.311653 -0.580129 -0.752544 +v -0.013788 0.218594 -0.046620 0.752941 0.752941 0.752941 +vn 0.288516 -0.657175 -0.696333 +v -0.017783 0.207254 -0.037261 0.752941 0.752941 0.752941 +vn 0.325349 -0.528127 -0.784366 +v -0.021636 0.195642 -0.028237 0.752941 0.752941 0.752941 +vn 0.383155 0.045423 -0.922567 +v -0.023484 0.184576 -0.023920 0.752941 0.752941 0.752941 +vn 0.261021 0.733328 -0.627772 +v -0.021464 0.174875 -0.028679 0.752941 0.752941 0.752941 +vn 0.106649 0.981399 -0.159630 +v -0.013509 0.242777 -0.029752 0.752941 0.752941 0.752941 +vn 0.386795 0.718110 -0.578539 +v -0.003825 0.237175 -0.044047 0.752941 0.752941 0.752941 +vn 0.554788 -0.064353 -0.829499 +v -0.001944 0.228841 -0.046825 0.752941 0.752941 0.752941 +vn 0.452471 -0.580759 -0.676749 +v -0.005197 0.218594 -0.042026 0.752941 0.752941 0.752941 +vn 0.418617 -0.657847 -0.626096 +v -0.010917 0.207254 -0.033586 0.752941 0.752941 0.752941 +vn 0.471917 -0.528863 -0.705407 +v -0.016432 0.195642 -0.025450 0.752941 0.752941 0.752941 +vn 0.555753 0.045170 -0.830119 +v -0.019077 0.184576 -0.021556 0.752941 0.752941 0.752941 +vn 0.378263 0.733526 -0.564673 +v -0.016178 0.174875 -0.025842 0.752941 0.752941 0.752941 +vn 0.135662 0.981423 -0.135666 +v -0.008240 0.242777 -0.025426 0.752941 0.752941 0.752941 +vn 0.491970 0.718266 -0.491995 +v 0.003976 0.237175 -0.037642 0.752941 0.752941 0.752941 +vn 0.705624 -0.064419 -0.705653 +v 0.006350 0.228841 -0.040016 0.752941 0.752941 0.752941 +vn 0.575568 -0.580997 -0.575468 +v 0.002247 0.218594 -0.035912 0.752941 0.752941 0.752941 +vn 0.532401 -0.658087 -0.532420 +v -0.004965 0.207254 -0.028700 0.752941 0.752941 0.752941 +vn 0.600006 -0.529118 -0.600022 +v -0.011921 0.195642 -0.021745 0.752941 0.752941 0.752941 +vn 0.706293 0.045002 -0.706488 +v -0.015253 0.184576 -0.018413 0.752941 0.752941 0.752941 +vn 0.480543 0.733625 -0.480493 +v -0.011592 0.174875 -0.022073 0.752941 0.752941 0.752941 +vn 0.159617 0.981401 -0.106652 +v -0.003914 0.242777 -0.020157 0.752941 0.752941 0.752941 +vn 0.578570 0.718087 -0.386791 +v 0.010382 0.237175 -0.029841 0.752941 0.752941 0.752941 +vn 0.829512 -0.064400 -0.554763 +v 0.013160 0.228841 -0.031722 0.752941 0.752941 0.752941 +vn 0.676716 -0.580790 -0.452481 +v 0.008358 0.218594 -0.028468 0.752941 0.752941 0.752941 +vn 0.626085 -0.657822 -0.418674 +v -0.000079 0.207254 -0.022749 0.752941 0.752941 0.752941 +vn 0.705457 -0.528809 -0.471902 +v -0.008216 0.195642 -0.017233 0.752941 0.752941 0.752941 +vn 0.830105 0.045118 -0.555779 +v -0.012109 0.184576 -0.014590 0.752941 0.752941 0.752941 +vn 0.564693 0.733473 -0.378337 +v -0.007824 0.174875 -0.017487 0.752941 0.752941 0.752941 +vn 0.177711 0.981335 -0.073486 +v -0.000660 0.242777 -0.014075 0.752941 0.752941 0.752941 +vn 0.643403 0.717685 -0.266383 +v 0.015198 0.237175 -0.020837 0.752941 0.752941 0.752941 +vn 0.921886 -0.064280 -0.382093 +v 0.018279 0.228841 -0.022150 0.752941 0.752941 0.752941 +vn 0.752525 -0.580105 -0.311744 +v 0.012955 0.218594 -0.019877 0.752941 0.752941 0.752941 +vn 0.696337 -0.657164 -0.288530 +v 0.003596 0.207254 -0.015883 0.752941 0.752941 0.752941 +vn 0.784355 -0.528130 -0.325370 +v -0.005429 0.195642 -0.012029 0.752941 0.752941 0.752941 +vn 0.922632 0.045425 -0.382998 +v -0.009746 0.184576 -0.010181 0.752941 0.752941 0.752941 +vn 0.627765 0.733320 -0.261061 +v -0.004986 0.174875 -0.012202 0.752941 0.752941 0.752941 +vn 0.189012 0.981265 -0.037324 +v 0.001387 0.242777 -0.007313 0.752941 0.752941 0.752941 +vn 0.683461 0.717342 -0.135285 +v 0.018228 0.237175 -0.010826 0.752941 0.752941 0.752941 +vn 0.978876 -0.064057 -0.194161 +v 0.021503 0.228841 -0.011508 0.752941 0.752941 0.752941 +vn 0.799584 -0.579276 -0.158444 +v 0.015849 0.218594 -0.010327 0.752941 0.752941 0.752941 +vn 0.740072 -0.656329 -0.146721 +v 0.005909 0.207254 -0.008250 0.752941 0.752941 0.752941 +vn 0.833436 -0.527245 -0.165520 +v -0.003673 0.195642 -0.006247 0.752941 0.752941 0.752941 +vn 0.979789 0.045667 -0.194752 +v -0.008256 0.184576 -0.005286 0.752941 0.752941 0.752941 +vn 0.667130 0.732983 -0.132941 +v -0.003199 0.174875 -0.006334 0.752941 0.752941 0.752941 +vn 0.329646 0.941812 0.065747 +v 0.012748 0.167134 0.009651 0.752941 0.752941 0.752941 +vn 0.336463 0.941697 -0.000002 +v 0.013696 0.167134 0.000001 0.752941 0.752941 0.752941 +vn 0.207247 0.977416 0.041316 +v 0.035837 0.161031 0.014451 0.752941 0.752941 0.752941 +vn 0.211537 0.977370 0.000001 +v 0.037255 0.161031 0.000001 0.752941 0.752941 0.752941 +vn 0.159261 0.986726 0.031744 +v 0.063209 0.156022 0.020142 0.752941 0.752941 0.752941 +vn 0.162549 0.986701 -0.000001 +v 0.065187 0.156022 0.000001 0.752941 0.752941 0.752941 +vn 0.151087 0.988062 0.030104 +v 0.092011 0.151558 0.026130 0.752941 0.752941 0.752941 +vn 0.154192 0.988041 0.000000 +v 0.094575 0.151558 0.000001 0.752941 0.752941 0.752941 +vn 0.180770 0.982866 0.036012 +v 0.119384 0.147096 0.031821 0.752941 0.752941 0.752941 +vn 0.184467 0.982839 0.000001 +v 0.122508 0.147096 0.000001 0.752941 0.752941 0.752941 +vn 0.278933 0.958702 0.055556 +v 0.142473 0.142086 0.036621 0.752941 0.752941 0.752941 +vn 0.284607 0.958644 -0.000001 +v 0.146068 0.142086 0.000001 0.752941 0.752941 0.752941 +vn 0.589887 0.798886 0.117534 +v 0.158420 0.135984 0.039937 0.752941 0.752941 0.752941 +vn 0.601680 0.798737 -0.000003 +v 0.162340 0.135984 0.000001 0.752941 0.752941 0.752941 +vn 0.771340 0.617506 0.154015 +v 0.164371 0.128242 0.041174 0.752941 0.752941 0.752941 +vn 0.786859 0.617132 -0.000003 +v 0.168412 0.128242 0.000001 0.752941 0.752941 0.752941 +vn 0.309970 0.941964 0.128925 +v 0.010025 0.167134 0.018589 0.752941 0.752941 0.752941 +vn 0.194837 0.977482 0.081038 +v 0.031759 0.161031 0.027837 0.752941 0.752941 0.752941 +vn 0.149718 0.986766 0.062265 +v 0.057526 0.156022 0.038800 0.752941 0.752941 0.752941 +vn 0.142029 0.988099 0.059061 +v 0.084637 0.151558 0.050336 0.752941 0.752941 0.752941 +vn 0.169936 0.982919 0.070655 +v 0.110404 0.147096 0.061299 0.752941 0.752941 0.752941 +vn 0.262230 0.958828 0.109013 +v 0.132138 0.142086 0.070545 0.752941 0.752941 0.752941 +vn 0.554863 0.799309 0.230722 +v 0.147149 0.135984 0.076933 0.752941 0.752941 0.752941 +vn 0.725720 0.618110 0.302112 +v 0.152751 0.128242 0.079316 0.752941 0.752941 0.752941 +vn 0.278635 0.942078 0.186684 +v 0.005704 0.167134 0.026641 0.752941 0.752941 0.752941 +vn 0.175123 0.977530 0.117336 +v 0.025288 0.161031 0.039894 0.752941 0.752941 0.752941 +vn 0.134563 0.986795 0.090156 +v 0.048505 0.156022 0.055605 0.752941 0.752941 0.752941 +vn 0.127644 0.988127 0.085516 +v 0.072935 0.151558 0.072136 0.752941 0.752941 0.752941 +vn 0.152716 0.982960 0.102307 +v 0.096153 0.147096 0.087847 0.752941 0.752941 0.752941 +vn 0.235654 0.958930 0.157862 +v 0.115737 0.142086 0.101100 0.752941 0.752941 0.752941 +vn 0.498880 0.799637 0.334215 +v 0.129264 0.135984 0.110254 0.752941 0.752941 0.752941 +vn 0.652728 0.618501 0.437496 +v 0.134311 0.128242 0.113669 0.752941 0.752941 0.752941 +vn 0.237081 0.942117 0.237083 +v -0.000039 0.167134 0.033628 0.752941 0.752941 0.752941 +vn 0.149001 0.977546 0.149009 +v 0.016688 0.161031 0.050355 0.752941 0.752941 0.752941 +vn 0.114488 0.986806 0.114485 +v 0.036520 0.156022 0.070186 0.752941 0.752941 0.752941 +vn 0.108598 0.988136 0.108595 +v 0.057386 0.151558 0.091052 0.752941 0.752941 0.752941 +vn 0.129927 0.982975 0.129922 +v 0.077217 0.147096 0.110884 0.752941 0.752941 0.752941 +vn 0.200482 0.958965 0.200482 +v 0.093944 0.142086 0.127611 0.752941 0.752941 0.752941 +vn 0.424477 0.799778 0.424470 +v 0.105499 0.135984 0.139164 0.752941 0.752941 0.752941 +vn 0.555544 0.618677 0.555527 +v 0.109810 0.128242 0.143475 0.752941 0.752941 0.752941 +vn 0.186709 0.942074 0.278634 +v -0.007024 0.167134 0.039369 0.752941 0.752941 0.752941 +vn 0.117344 0.977529 0.175123 +v 0.006228 0.161031 0.058953 0.752941 0.752941 0.752941 +vn 0.090155 0.986796 0.134559 +v 0.021939 0.156022 0.082172 0.752941 0.752941 0.752941 +vn 0.085517 0.988127 0.127642 +v 0.038471 0.151558 0.106601 0.752941 0.752941 0.752941 +vn 0.102308 0.982961 0.152715 +v 0.054182 0.147096 0.129820 0.752941 0.752941 0.752941 +vn 0.157874 0.958925 0.235666 +v 0.067434 0.142086 0.149404 0.752941 0.752941 0.752941 +vn 0.334185 0.799679 0.498833 +v 0.076587 0.135984 0.162930 0.752941 0.752941 0.752941 +vn 0.437457 0.618609 0.652652 +v 0.080004 0.128242 0.167978 0.752941 0.752941 0.752941 +vn 0.128933 0.941973 0.309940 +v -0.015076 0.167134 0.043692 0.752941 0.752941 0.752941 +vn 0.081047 0.977482 0.194834 +v -0.005829 0.161031 0.065426 0.752941 0.752941 0.752941 +vn 0.062263 0.986766 0.149718 +v 0.005133 0.156022 0.091193 0.752941 0.752941 0.752941 +vn 0.059059 0.988099 0.142031 +v 0.016669 0.151558 0.118304 0.752941 0.752941 0.752941 +vn 0.070649 0.982919 0.169936 +v 0.027632 0.147096 0.144071 0.752941 0.752941 0.752941 +vn 0.109015 0.958827 0.262235 +v 0.036880 0.142086 0.165805 0.752941 0.752941 0.752941 +vn 0.230713 0.799313 0.554861 +v 0.043266 0.135984 0.180816 0.752941 0.752941 0.752941 +vn 0.302095 0.618137 0.725704 +v 0.045650 0.128242 0.186418 0.752941 0.752941 0.752941 +vn 0.065740 0.941813 0.329646 +v -0.024016 0.167134 0.046415 0.752941 0.752941 0.752941 +vn 0.041314 0.977416 0.207246 +v -0.019216 0.161031 0.069504 0.752941 0.752941 0.752941 +vn 0.031744 0.986725 0.159264 +v -0.013525 0.156022 0.096876 0.752941 0.752941 0.752941 +vn 0.030104 0.988062 0.151088 +v -0.007537 0.151558 0.125677 0.752941 0.752941 0.752941 +vn 0.036009 0.982865 0.180775 +v -0.001846 0.147096 0.153050 0.752941 0.752941 0.752941 +vn 0.055540 0.958707 0.278919 +v 0.002954 0.142086 0.176138 0.752941 0.752941 0.752941 +vn 0.117532 0.798873 0.589906 +v 0.006270 0.135984 0.192087 0.752941 0.752941 0.752941 +vn 0.154029 0.617454 0.771379 +v 0.007507 0.128242 0.198037 0.752941 0.752941 0.752941 +vn -0.000001 0.941699 0.336456 +v -0.033666 0.167134 0.047363 0.752941 0.752941 0.752941 +vn -0.000000 0.977370 0.211537 +v -0.033666 0.161031 0.070922 0.752941 0.752941 0.752941 +vn 0.000000 0.986700 0.162549 +v -0.033666 0.156022 0.098854 0.752941 0.752941 0.752941 +vn 0.000001 0.988041 0.154194 +v -0.033666 0.151558 0.128242 0.752941 0.752941 0.752941 +vn 0.000000 0.982837 0.184474 +v -0.033666 0.147096 0.156174 0.752941 0.752941 0.752941 +vn 0.000003 0.958646 0.284600 +v -0.033666 0.142086 0.179733 0.752941 0.752941 0.752941 +vn -0.000005 0.798767 0.601640 +v -0.033666 0.135984 0.196006 0.752941 0.752941 0.752941 +vn -0.000011 0.617185 0.786818 +v -0.033666 0.128242 0.202079 0.752941 0.752941 0.752941 +vn -0.065738 0.941813 0.329647 +v -0.043316 0.167134 0.046415 0.752941 0.752941 0.752941 +vn -0.041314 0.977416 0.207248 +v -0.048116 0.161031 0.069504 0.752941 0.752941 0.752941 +vn -0.031742 0.986726 0.159263 +v -0.053807 0.156022 0.096876 0.752941 0.752941 0.752941 +vn -0.030105 0.988062 0.151088 +v -0.059796 0.151558 0.125677 0.752941 0.752941 0.752941 +vn -0.036009 0.982865 0.180775 +v -0.065487 0.147096 0.153050 0.752941 0.752941 0.752941 +vn -0.055550 0.958706 0.278921 +v -0.070287 0.142086 0.176138 0.752941 0.752941 0.752941 +vn -0.117522 0.798876 0.589903 +v -0.073602 0.135984 0.192087 0.752941 0.752941 0.752941 +vn -0.154014 0.617466 0.771372 +v -0.074840 0.128242 0.198037 0.752941 0.752941 0.752941 +vn -0.128948 0.941971 0.309941 +v -0.052255 0.167134 0.043692 0.752941 0.752941 0.752941 +vn -0.081048 0.977483 0.194828 +v -0.061503 0.161031 0.065426 0.752941 0.752941 0.752941 +vn -0.062266 0.986766 0.149718 +v -0.072466 0.156022 0.091193 0.752941 0.752941 0.752941 +vn -0.059060 0.988099 0.142030 +v -0.084001 0.151558 0.118304 0.752941 0.752941 0.752941 +vn -0.070654 0.982919 0.169937 +v -0.094965 0.147096 0.144071 0.752941 0.752941 0.752941 +vn -0.109012 0.958827 0.262233 +v -0.104211 0.142086 0.165805 0.752941 0.752941 0.752941 +vn -0.230724 0.799303 0.554871 +v -0.110599 0.135984 0.180816 0.752941 0.752941 0.752941 +vn -0.302108 0.618084 0.725743 +v -0.112981 0.128242 0.186418 0.752941 0.752941 0.752941 +vn -0.186698 0.942072 0.278648 +v -0.060307 0.167134 0.039369 0.752941 0.752941 0.752941 +vn -0.117343 0.977528 0.175125 +v -0.073559 0.161031 0.058953 0.752941 0.752941 0.752941 +vn -0.090159 0.986796 0.134557 +v -0.089270 0.156022 0.082172 0.752941 0.752941 0.752941 +vn -0.085518 0.988127 0.127641 +v -0.105802 0.151558 0.106601 0.752941 0.752941 0.752941 +vn -0.102309 0.982960 0.152718 +v -0.121513 0.147096 0.129820 0.752941 0.752941 0.752941 +vn -0.157866 0.958929 0.235657 +v -0.134765 0.142086 0.149403 0.752941 0.752941 0.752941 +vn -0.334206 0.799670 0.498833 +v -0.143919 0.135984 0.162930 0.752941 0.752941 0.752941 +vn -0.437485 0.618578 0.652663 +v -0.147335 0.128242 0.167978 0.752941 0.752941 0.752941 +vn -0.237074 0.942117 0.237091 +v -0.067293 0.167134 0.033628 0.752941 0.752941 0.752941 +vn -0.148998 0.977546 0.149008 +v -0.084021 0.161031 0.050355 0.752941 0.752941 0.752941 +vn -0.114486 0.986805 0.114491 +v -0.103851 0.156022 0.070186 0.752941 0.752941 0.752941 +vn -0.108596 0.988137 0.108594 +v -0.124717 0.151558 0.091052 0.752941 0.752941 0.752941 +vn -0.129921 0.982976 0.129921 +v -0.144549 0.147096 0.110884 0.752941 0.752941 0.752941 +vn -0.200486 0.958961 0.200495 +v -0.161277 0.142086 0.127611 0.752941 0.752941 0.752941 +vn -0.424478 0.799769 0.424486 +v -0.172830 0.135984 0.139164 0.752941 0.752941 0.752941 +vn -0.555531 0.618684 0.555532 +v -0.177141 0.128242 0.143475 0.752941 0.752941 0.752941 +vn -0.278632 0.942077 0.186693 +v -0.073036 0.167134 0.026641 0.752941 0.752941 0.752941 +vn -0.175128 0.977529 0.117335 +v -0.092619 0.161031 0.039894 0.752941 0.752941 0.752941 +vn -0.134560 0.986795 0.090158 +v -0.115838 0.156022 0.055605 0.752941 0.752941 0.752941 +vn -0.127641 0.988126 0.085520 +v -0.140266 0.151558 0.072136 0.752941 0.752941 0.752941 +vn -0.152713 0.982961 0.102305 +v -0.163486 0.147096 0.087847 0.752941 0.752941 0.752941 +vn -0.235661 0.958928 0.157864 +v -0.183070 0.142086 0.101100 0.752941 0.752941 0.752941 +vn -0.498874 0.799633 0.334233 +v -0.196596 0.135984 0.110254 0.752941 0.752941 0.752941 +vn -0.652714 0.618498 0.437520 +v -0.201643 0.128242 0.113669 0.752941 0.752941 0.752941 +vn -0.309950 0.941970 0.128934 +v -0.077358 0.167134 0.018589 0.752941 0.752941 0.752941 +vn -0.194837 0.977482 0.081044 +v -0.099091 0.161031 0.027837 0.752941 0.752941 0.752941 +vn -0.149717 0.986766 0.062263 +v -0.124858 0.156022 0.038800 0.752941 0.752941 0.752941 +vn -0.142030 0.988099 0.059060 +v -0.151970 0.151558 0.050336 0.752941 0.752941 0.752941 +vn -0.169939 0.982918 0.070654 +v -0.177737 0.147096 0.061299 0.752941 0.752941 0.752941 +vn -0.262226 0.958830 0.109007 +v -0.199470 0.142086 0.070545 0.752941 0.752941 0.752941 +vn -0.554865 0.799311 0.230709 +v -0.214482 0.135984 0.076933 0.752941 0.752941 0.752941 +vn -0.725729 0.618106 0.302096 +v -0.220084 0.128242 0.079316 0.752941 0.752941 0.752941 +vn -0.329642 0.941814 0.065746 +v -0.080081 0.167134 0.009651 0.752941 0.752941 0.752941 +vn -0.207248 0.977415 0.041322 +v -0.103169 0.161031 0.014451 0.752941 0.752941 0.752941 +vn -0.159262 0.986726 0.031745 +v -0.130542 0.156022 0.020142 0.752941 0.752941 0.752941 +vn -0.151090 0.988062 0.030104 +v -0.159342 0.151558 0.026130 0.752941 0.752941 0.752941 +vn -0.180771 0.982866 0.036006 +v -0.186715 0.147096 0.031821 0.752941 0.752941 0.752941 +vn -0.278927 0.958705 0.055546 +v -0.209804 0.142086 0.036621 0.752941 0.752941 0.752941 +vn -0.589910 0.798870 0.117529 +v -0.225752 0.135984 0.039937 0.752941 0.752941 0.752941 +vn -0.771382 0.617452 0.154020 +v -0.231702 0.128242 0.041174 0.752941 0.752941 0.752941 +vn -0.336447 0.941702 -0.000003 +v -0.081029 0.167134 0.000001 0.752941 0.752941 0.752941 +vn -0.211538 0.977370 0.000002 +v -0.104588 0.161031 0.000001 0.752941 0.752941 0.752941 +vn -0.162550 0.986700 -0.000000 +v -0.132519 0.156022 0.000001 0.752941 0.752941 0.752941 +vn -0.154195 0.988040 0.000000 +v -0.161908 0.151558 0.000001 0.752941 0.752941 0.752941 +vn -0.184471 0.982838 0.000001 +v -0.189839 0.147096 0.000001 0.752941 0.752941 0.752941 +vn -0.284606 0.958645 0.000003 +v -0.213399 0.142086 0.000001 0.752941 0.752941 0.752941 +vn -0.601648 0.798761 -0.000005 +v -0.229671 0.135984 0.000001 0.752941 0.752941 0.752941 +vn -0.786818 0.617185 -0.000011 +v -0.235744 0.128242 0.000001 0.752941 0.752941 0.752941 +vn -0.329643 0.941815 -0.065732 +v -0.080081 0.167134 -0.009649 0.752941 0.752941 0.752941 +vn -0.207247 0.977416 -0.041323 +v -0.103169 0.161031 -0.014451 0.752941 0.752941 0.752941 +vn -0.159264 0.986726 -0.031741 +v -0.130542 0.156022 -0.020140 0.752941 0.752941 0.752941 +vn -0.151089 0.988062 -0.030104 +v -0.159342 0.151558 -0.026129 0.752941 0.752941 0.752941 +vn -0.180772 0.982866 -0.036008 +v -0.186715 0.147096 -0.031820 0.752941 0.752941 0.752941 +vn -0.278925 0.958705 -0.055550 +v -0.209804 0.142086 -0.036620 0.752941 0.752941 0.752941 +vn -0.589909 0.798872 -0.117514 +v -0.225752 0.135984 -0.039935 0.752941 0.752941 0.752941 +vn -0.771375 0.617466 -0.154000 +v -0.231702 0.128242 -0.041173 0.752941 0.752941 0.752941 +vn -0.309950 0.941971 -0.128926 +v -0.077358 0.167134 -0.018589 0.752941 0.752941 0.752941 +vn -0.194837 0.977482 -0.081042 +v -0.099091 0.161031 -0.027837 0.752941 0.752941 0.752941 +vn -0.149720 0.986766 -0.062264 +v -0.124858 0.156022 -0.038799 0.752941 0.752941 0.752941 +vn -0.142029 0.988099 -0.059058 +v -0.151970 0.151558 -0.050334 0.752941 0.752941 0.752941 +vn -0.169940 0.982919 -0.070649 +v -0.177737 0.147096 -0.061298 0.752941 0.752941 0.752941 +vn -0.262234 0.958828 -0.109008 +v -0.199470 0.142086 -0.070545 0.752941 0.752941 0.752941 +vn -0.554845 0.799327 -0.230703 +v -0.214482 0.135984 -0.076931 0.752941 0.752941 0.752941 +vn -0.725687 0.618152 -0.302104 +v -0.220084 0.128242 -0.079316 0.752941 0.752941 0.752941 +vn -0.278616 0.942080 -0.186703 +v -0.073036 0.167134 -0.026641 0.752941 0.752941 0.752941 +vn -0.175124 0.977529 -0.117340 +v -0.092619 0.161031 -0.039894 0.752941 0.752941 0.752941 +vn -0.134562 0.986795 -0.090156 +v -0.115838 0.156022 -0.055605 0.752941 0.752941 0.752941 +vn -0.127642 0.988127 -0.085519 +v -0.140266 0.151558 -0.072136 0.752941 0.752941 0.752941 +vn -0.152710 0.982961 -0.102308 +v -0.163486 0.147096 -0.087847 0.752941 0.752941 0.752941 +vn -0.235663 0.958927 -0.157867 +v -0.183070 0.142086 -0.101100 0.752941 0.752941 0.752941 +vn -0.498882 0.799632 -0.334223 +v -0.196596 0.135984 -0.110254 0.752941 0.752941 0.752941 +vn -0.652720 0.618506 -0.437501 +v -0.201643 0.128242 -0.113669 0.752941 0.752941 0.752941 +vn -0.237083 0.942112 -0.237099 +v -0.067293 0.167134 -0.033626 0.752941 0.752941 0.752941 +vn -0.149000 0.977546 -0.149006 +v -0.084021 0.161031 -0.050354 0.752941 0.752941 0.752941 +vn -0.114482 0.986806 -0.114490 +v -0.103851 0.156022 -0.070186 0.752941 0.752941 0.752941 +vn -0.108600 0.988136 -0.108598 +v -0.124717 0.151558 -0.091052 0.752941 0.752941 0.752941 +vn -0.129919 0.982976 -0.129922 +v -0.144549 0.147096 -0.110882 0.752941 0.752941 0.752941 +vn -0.200480 0.958965 -0.200485 +v -0.161277 0.142086 -0.127610 0.752941 0.752941 0.752941 +vn -0.424476 0.799774 -0.424477 +v -0.172830 0.135984 -0.139164 0.752941 0.752941 0.752941 +vn -0.555538 0.618676 -0.555533 +v -0.177141 0.128242 -0.143475 0.752941 0.752941 0.752941 +vn -0.186704 0.942075 -0.278631 +v -0.060307 0.167134 -0.039369 0.752941 0.752941 0.752941 +vn -0.117334 0.977529 -0.175127 +v -0.073559 0.161031 -0.058953 0.752941 0.752941 0.752941 +vn -0.090152 0.986796 -0.134561 +v -0.089270 0.156022 -0.082171 0.752941 0.752941 0.752941 +vn -0.085516 0.988127 -0.127644 +v -0.105802 0.151558 -0.106601 0.752941 0.752941 0.752941 +vn -0.102309 0.982960 -0.152717 +v -0.121513 0.147096 -0.129819 0.752941 0.752941 0.752941 +vn -0.157860 0.958930 -0.235654 +v -0.134765 0.142086 -0.149403 0.752941 0.752941 0.752941 +vn -0.334194 0.799668 -0.498844 +v -0.143919 0.135984 -0.162930 0.752941 0.752941 0.752941 +vn -0.437465 0.618577 -0.652676 +v -0.147335 0.128242 -0.167978 0.752941 0.752941 0.752941 +vn -0.128933 0.941967 -0.309958 +v -0.052255 0.167134 -0.043691 0.752941 0.752941 0.752941 +vn -0.081040 0.977482 -0.194836 +v -0.061503 0.161031 -0.065424 0.752941 0.752941 0.752941 +vn -0.062272 0.986766 -0.149716 +v -0.072466 0.156022 -0.091191 0.752941 0.752941 0.752941 +vn -0.059061 0.988099 -0.142030 +v -0.084001 0.151558 -0.118303 0.752941 0.752941 0.752941 +vn -0.070657 0.982919 -0.169937 +v -0.094965 0.147096 -0.144069 0.752941 0.752941 0.752941 +vn -0.109004 0.958833 -0.262218 +v -0.104211 0.142086 -0.165803 0.752941 0.752941 0.752941 +vn -0.230732 0.799289 -0.554888 +v -0.110599 0.135984 -0.180816 0.752941 0.752941 0.752941 +vn -0.302134 0.618038 -0.725772 +v -0.112981 0.128242 -0.186417 0.752941 0.752941 0.752941 +vn -0.065740 0.941812 -0.329649 +v -0.043316 0.167134 -0.046414 0.752941 0.752941 0.752941 +vn -0.041317 0.977416 -0.207245 +v -0.048116 0.161031 -0.069502 0.752941 0.752941 0.752941 +vn -0.031741 0.986727 -0.159257 +v -0.053807 0.156022 -0.096877 0.752941 0.752941 0.752941 +vn -0.030106 0.988062 -0.151087 +v -0.059796 0.151558 -0.125677 0.752941 0.752941 0.752941 +vn -0.036015 0.982865 -0.180775 +v -0.065487 0.147096 -0.153050 0.752941 0.752941 0.752941 +vn -0.055558 0.958701 -0.278937 +v -0.070287 0.142086 -0.176138 0.752941 0.752941 0.752941 +vn -0.117505 0.798915 -0.589854 +v -0.073602 0.135984 -0.192085 0.752941 0.752941 0.752941 +vn -0.153980 0.617570 -0.771296 +v -0.074840 0.128242 -0.198037 0.752941 0.752941 0.752941 +vn -0.000003 0.941698 -0.336460 +v -0.033666 0.167134 -0.047362 0.752941 0.752941 0.752941 +vn -0.000003 0.977370 -0.211535 +v -0.033666 0.161031 -0.070921 0.752941 0.752941 0.752941 +vn -0.000000 0.986700 -0.162550 +v -0.033666 0.156022 -0.098852 0.752941 0.752941 0.752941 +vn 0.000002 0.988041 -0.154191 +v -0.033666 0.151558 -0.128241 0.752941 0.752941 0.752941 +vn 0.000001 0.982838 -0.184472 +v -0.033666 0.147096 -0.156174 0.752941 0.752941 0.752941 +vn 0.000001 0.958646 -0.284602 +v -0.033666 0.142086 -0.179733 0.752941 0.752941 0.752941 +vn -0.000010 0.798719 -0.601705 +v -0.033666 0.135984 -0.196006 0.752941 0.752941 0.752941 +vn -0.000019 0.617079 -0.786901 +v -0.033666 0.128242 -0.202077 0.752941 0.752941 0.752941 +vn 0.065741 0.941812 -0.329649 +v -0.024016 0.167134 -0.046414 0.752941 0.752941 0.752941 +vn 0.041323 0.977416 -0.207244 +v -0.019216 0.161031 -0.069502 0.752941 0.752941 0.752941 +vn 0.031742 0.986727 -0.159257 +v -0.013525 0.156022 -0.096877 0.752941 0.752941 0.752941 +vn 0.030104 0.988062 -0.151090 +v -0.007537 0.151558 -0.125677 0.752941 0.752941 0.752941 +vn 0.036013 0.982865 -0.180773 +v -0.001846 0.147096 -0.153050 0.752941 0.752941 0.752941 +vn 0.055552 0.958702 -0.278935 +v 0.002954 0.142086 -0.176138 0.752941 0.752941 0.752941 +vn 0.117527 0.798911 -0.589855 +v 0.006270 0.135984 -0.192085 0.752941 0.752941 0.752941 +vn 0.154010 0.617558 -0.771299 +v 0.007507 0.128242 -0.198037 0.752941 0.752941 0.752941 +vn 0.128924 0.941970 -0.309953 +v -0.015076 0.167134 -0.043691 0.752941 0.752941 0.752941 +vn 0.081037 0.977481 -0.194843 +v -0.005829 0.161031 -0.065424 0.752941 0.752941 0.752941 +vn 0.062269 0.986767 -0.149714 +v 0.005133 0.156022 -0.091191 0.752941 0.752941 0.752941 +vn 0.059060 0.988099 -0.142032 +v 0.016669 0.151558 -0.118303 0.752941 0.752941 0.752941 +vn 0.070653 0.982919 -0.169936 +v 0.027632 0.147096 -0.144069 0.752941 0.752941 0.752941 +vn 0.109011 0.958831 -0.262220 +v 0.036880 0.142086 -0.165803 0.752941 0.752941 0.752941 +vn 0.230704 0.799302 -0.554880 +v 0.043266 0.135984 -0.180816 0.752941 0.752941 0.752941 +vn 0.302098 0.618084 -0.725747 +v 0.045650 0.128242 -0.186417 0.752941 0.752941 0.752941 +vn 0.186707 0.942080 -0.278616 +v -0.007024 0.167134 -0.039369 0.752941 0.752941 0.752941 +vn 0.117337 0.977529 -0.175125 +v 0.006228 0.161031 -0.058953 0.752941 0.752941 0.752941 +vn 0.090150 0.986796 -0.134563 +v 0.021939 0.156022 -0.082171 0.752941 0.752941 0.752941 +vn 0.085516 0.988127 -0.127644 +v 0.038471 0.151558 -0.106601 0.752941 0.752941 0.752941 +vn 0.102308 0.982960 -0.152718 +v 0.054182 0.147096 -0.129819 0.752941 0.752941 0.752941 +vn 0.157863 0.958928 -0.235660 +v 0.067434 0.142086 -0.149403 0.752941 0.752941 0.752941 +vn 0.334189 0.799681 -0.498827 +v 0.076587 0.135984 -0.162930 0.752941 0.752941 0.752941 +vn 0.437469 0.618611 -0.652642 +v 0.080004 0.128242 -0.167978 0.752941 0.752941 0.752941 +vn 0.237094 0.942110 -0.237099 +v -0.000039 0.167134 -0.033626 0.752941 0.752941 0.752941 +vn 0.149003 0.977545 -0.149007 +v 0.016688 0.161031 -0.050354 0.752941 0.752941 0.752941 +vn 0.114485 0.986806 -0.114484 +v 0.036520 0.156022 -0.070186 0.752941 0.752941 0.752941 +vn 0.108599 0.988136 -0.108599 +v 0.057386 0.151558 -0.091052 0.752941 0.752941 0.752941 +vn 0.129925 0.982975 -0.129922 +v 0.077217 0.147096 -0.110882 0.752941 0.752941 0.752941 +vn 0.200476 0.958968 -0.200475 +v 0.093944 0.142086 -0.127610 0.752941 0.752941 0.752941 +vn 0.424474 0.799777 -0.424474 +v 0.105499 0.135984 -0.139164 0.752941 0.752941 0.752941 +vn 0.555531 0.618687 -0.555528 +v 0.109810 0.128242 -0.143475 0.752941 0.752941 0.752941 +vn 0.278623 0.942081 -0.186688 +v 0.005704 0.167134 -0.026641 0.752941 0.752941 0.752941 +vn 0.175119 0.977529 -0.117343 +v 0.025288 0.161031 -0.039894 0.752941 0.752941 0.752941 +vn 0.134562 0.986795 -0.090155 +v 0.048505 0.156022 -0.055605 0.752941 0.752941 0.752941 +vn 0.127645 0.988127 -0.085514 +v 0.072935 0.151558 -0.072136 0.752941 0.752941 0.752941 +vn 0.152716 0.982960 -0.102308 +v 0.096153 0.147096 -0.087847 0.752941 0.752941 0.752941 +vn 0.235656 0.958929 -0.157862 +v 0.115737 0.142086 -0.101100 0.752941 0.752941 0.752941 +vn 0.498874 0.799640 -0.334216 +v 0.129264 0.135984 -0.110254 0.752941 0.752941 0.752941 +vn 0.652724 0.618498 -0.437506 +v 0.134311 0.128242 -0.113669 0.752941 0.752941 0.752941 +vn 0.309959 0.941969 -0.128918 +v 0.010025 0.167134 -0.018589 0.752941 0.752941 0.752941 +vn 0.194840 0.977482 -0.081036 +v 0.031759 0.161031 -0.027837 0.752941 0.752941 0.752941 +vn 0.149720 0.986766 -0.062263 +v 0.057526 0.156022 -0.038799 0.752941 0.752941 0.752941 +vn 0.142030 0.988099 -0.059059 +v 0.084637 0.151558 -0.050334 0.752941 0.752941 0.752941 +vn 0.169934 0.982919 -0.070654 +v 0.110404 0.147096 -0.061298 0.752941 0.752941 0.752941 +vn 0.262236 0.958826 -0.109019 +v 0.132138 0.142086 -0.070545 0.752941 0.752941 0.752941 +vn 0.554848 0.799327 -0.230696 +v 0.147149 0.135984 -0.076931 0.752941 0.752941 0.752941 +vn 0.725695 0.618149 -0.302090 +v 0.152751 0.128242 -0.079316 0.752941 0.752941 0.752941 +vn 0.329656 0.941810 -0.065734 +v 0.012748 0.167134 -0.009649 0.752941 0.752941 0.752941 +vn 0.207244 0.977416 -0.041315 +v 0.035837 0.161031 -0.014451 0.752941 0.752941 0.752941 +vn 0.159263 0.986726 -0.031741 +v 0.063209 0.156022 -0.020140 0.752941 0.752941 0.752941 +vn 0.151085 0.988062 -0.030104 +v 0.092011 0.151558 -0.026129 0.752941 0.752941 0.752941 +vn 0.180770 0.982866 -0.036011 +v 0.119384 0.147096 -0.031820 0.752941 0.752941 0.752941 +vn 0.278935 0.958702 -0.055554 +v 0.142473 0.142086 -0.036620 0.752941 0.752941 0.752941 +vn 0.589885 0.798889 -0.117527 +v 0.158420 0.135984 -0.039935 0.752941 0.752941 0.752941 +vn 0.771327 0.617523 -0.154014 +v 0.164371 0.128242 -0.041173 0.752941 0.752941 0.752941 +# 2081 vertices, 0 vertices normals + +f 1//1 2//2 3//3 +f 1//1 3//3 4//4 +f 4//4 3//3 5//5 +f 4//4 5//5 6//6 +f 6//6 5//5 7//7 +f 6//6 7//7 8//8 +f 8//8 7//7 9//9 +f 8//8 9//9 10//10 +f 10//10 9//9 11//11 +f 10//10 11//11 12//12 +f 12//12 11//11 13//13 +f 12//12 13//13 14//14 +f 14//14 13//13 15//15 +f 14//14 15//15 16//16 +f 16//16 15//15 17//17 +f 16//16 17//17 18//18 +f 2//2 19//19 20//20 +f 2//2 20//20 3//3 +f 3//3 20//20 21//21 +f 3//3 21//21 5//5 +f 5//5 21//21 22//22 +f 5//5 22//22 7//7 +f 7//7 22//22 23//23 +f 7//7 23//23 9//9 +f 9//9 23//23 24//24 +f 9//9 24//24 11//11 +f 11//11 24//24 25//25 +f 11//11 25//25 13//13 +f 13//13 25//25 26//26 +f 13//13 26//26 15//15 +f 15//15 26//26 27//27 +f 15//15 27//27 17//17 +f 19//19 28//28 29//29 +f 19//19 29//29 20//20 +f 20//20 29//29 30//30 +f 20//20 30//30 21//21 +f 21//21 30//30 31//31 +f 21//21 31//31 22//22 +f 22//22 31//31 32//32 +f 22//22 32//32 23//23 +f 23//23 32//32 33//33 +f 23//23 33//33 24//24 +f 24//24 33//33 34//34 +f 24//24 34//34 25//25 +f 25//25 34//34 35//35 +f 25//25 35//35 26//26 +f 26//26 35//35 36//36 +f 26//26 36//36 27//27 +f 28//28 37//37 38//38 +f 28//28 38//38 29//29 +f 29//29 38//38 39//39 +f 29//29 39//39 30//30 +f 30//30 39//39 40//40 +f 30//30 40//40 31//31 +f 31//31 40//40 41//41 +f 31//31 41//41 32//32 +f 32//32 41//41 42//42 +f 32//32 42//42 33//33 +f 33//33 42//42 43//43 +f 33//33 43//43 34//34 +f 34//34 43//43 44//44 +f 34//34 44//44 35//35 +f 35//35 44//44 45//45 +f 35//35 45//45 36//36 +f 37//37 46//46 47//47 +f 37//37 47//47 38//38 +f 38//38 47//47 48//48 +f 38//38 48//48 39//39 +f 39//39 48//48 49//49 +f 39//39 49//49 40//40 +f 40//40 49//49 50//50 +f 40//40 50//50 41//41 +f 41//41 50//50 51//51 +f 41//41 51//51 42//42 +f 42//42 51//51 52//52 +f 42//42 52//52 43//43 +f 43//43 52//52 53//53 +f 43//43 53//53 44//44 +f 44//44 53//53 54//54 +f 44//44 54//54 45//45 +f 46//46 55//55 56//56 +f 46//46 56//56 47//47 +f 47//47 56//56 57//57 +f 47//47 57//57 48//48 +f 48//48 57//57 58//58 +f 48//48 58//58 49//49 +f 49//49 58//58 59//59 +f 49//49 59//59 50//50 +f 50//50 59//59 60//60 +f 50//50 60//60 51//51 +f 51//51 60//60 61//61 +f 51//51 61//61 52//52 +f 52//52 61//61 62//62 +f 52//52 62//62 53//53 +f 53//53 62//62 63//63 +f 53//53 63//63 54//54 +f 55//55 64//64 65//65 +f 55//55 65//65 56//56 +f 56//56 65//65 66//66 +f 56//56 66//66 57//57 +f 57//57 66//66 67//67 +f 57//57 67//67 58//58 +f 58//58 67//67 68//68 +f 58//58 68//68 59//59 +f 59//59 68//68 69//69 +f 59//59 69//69 60//60 +f 60//60 69//69 70//70 +f 60//60 70//70 61//61 +f 61//61 70//70 71//71 +f 61//61 71//71 62//62 +f 62//62 71//71 72//72 +f 62//62 72//72 63//63 +f 64//64 73//73 74//74 +f 64//64 74//74 65//65 +f 65//65 74//74 75//75 +f 65//65 75//75 66//66 +f 66//66 75//75 76//76 +f 66//66 76//76 67//67 +f 67//67 76//76 77//77 +f 67//67 77//77 68//68 +f 68//68 77//77 78//78 +f 68//68 78//78 69//69 +f 69//69 78//78 79//79 +f 69//69 79//79 70//70 +f 70//70 79//79 80//80 +f 70//70 80//80 71//71 +f 71//71 80//80 81//81 +f 71//71 81//81 72//72 +f 73//73 82//82 83//83 +f 73//73 83//83 74//74 +f 74//74 83//83 84//84 +f 74//74 84//84 75//75 +f 75//75 84//84 85//85 +f 75//75 85//85 76//76 +f 76//76 85//85 86//86 +f 76//76 86//86 77//77 +f 77//77 86//86 87//87 +f 77//77 87//87 78//78 +f 78//78 87//87 88//88 +f 78//78 88//88 79//79 +f 79//79 88//88 89//89 +f 79//79 89//89 80//80 +f 80//80 89//89 90//90 +f 80//80 90//90 81//81 +f 82//82 91//91 92//92 +f 82//82 92//92 83//83 +f 83//83 92//92 93//93 +f 83//83 93//93 84//84 +f 84//84 93//93 94//94 +f 84//84 94//94 85//85 +f 85//85 94//94 95//95 +f 85//85 95//95 86//86 +f 86//86 95//95 96//96 +f 86//86 96//96 87//87 +f 87//87 96//96 97//97 +f 87//87 97//97 88//88 +f 88//88 97//97 98//98 +f 88//88 98//98 89//89 +f 89//89 98//98 99//99 +f 89//89 99//99 90//90 +f 91//91 100//100 101//101 +f 91//91 101//101 92//92 +f 92//92 101//101 102//102 +f 92//92 102//102 93//93 +f 93//93 102//102 103//103 +f 93//93 103//103 94//94 +f 94//94 103//103 104//104 +f 94//94 104//104 95//95 +f 95//95 104//104 105//105 +f 95//95 105//105 96//96 +f 96//96 105//105 106//106 +f 96//96 106//106 97//97 +f 97//97 106//106 107//107 +f 97//97 107//107 98//98 +f 98//98 107//107 108//108 +f 98//98 108//108 99//99 +f 100//100 109//109 110//110 +f 100//100 110//110 101//101 +f 101//101 110//110 111//111 +f 101//101 111//111 102//102 +f 102//102 111//111 112//112 +f 102//102 112//112 103//103 +f 103//103 112//112 113//113 +f 103//103 113//113 104//104 +f 104//104 113//113 114//114 +f 104//104 114//114 105//105 +f 105//105 114//114 115//115 +f 105//105 115//115 106//106 +f 106//106 115//115 116//116 +f 106//106 116//116 107//107 +f 107//107 116//116 117//117 +f 107//107 117//117 108//108 +f 109//109 118//118 119//119 +f 109//109 119//119 110//110 +f 110//110 119//119 120//120 +f 110//110 120//120 111//111 +f 111//111 120//120 121//121 +f 111//111 121//121 112//112 +f 112//112 121//121 122//122 +f 112//112 122//122 113//113 +f 113//113 122//122 123//123 +f 113//113 123//123 114//114 +f 114//114 123//123 124//124 +f 114//114 124//124 115//115 +f 115//115 124//124 125//125 +f 115//115 125//125 116//116 +f 116//116 125//125 126//126 +f 116//116 126//126 117//117 +f 118//118 127//127 128//128 +f 118//118 128//128 119//119 +f 119//119 128//128 129//129 +f 119//119 129//129 120//120 +f 120//120 129//129 130//130 +f 120//120 130//130 121//121 +f 121//121 130//130 131//131 +f 121//121 131//131 122//122 +f 122//122 131//131 132//132 +f 122//122 132//132 123//123 +f 123//123 132//132 133//133 +f 123//123 133//133 124//124 +f 124//124 133//133 134//134 +f 124//124 134//134 125//125 +f 125//125 134//134 135//135 +f 125//125 135//135 126//126 +f 127//127 136//136 137//137 +f 127//127 137//137 128//128 +f 128//128 137//137 138//138 +f 128//128 138//138 129//129 +f 129//129 138//138 139//139 +f 129//129 139//139 130//130 +f 130//130 139//139 140//140 +f 130//130 140//140 131//131 +f 131//131 140//140 141//141 +f 131//131 141//141 132//132 +f 132//132 141//141 142//142 +f 132//132 142//142 133//133 +f 133//133 142//142 143//143 +f 133//133 143//143 134//134 +f 134//134 143//143 144//144 +f 134//134 144//144 135//135 +f 136//136 145//145 146//146 +f 136//136 146//146 137//137 +f 137//137 146//146 147//147 +f 137//137 147//147 138//138 +f 138//138 147//147 148//148 +f 138//138 148//148 139//139 +f 139//139 148//148 149//149 +f 139//139 149//149 140//140 +f 140//140 149//149 150//150 +f 140//140 150//150 141//141 +f 141//141 150//150 151//151 +f 141//141 151//151 142//142 +f 142//142 151//151 152//152 +f 142//142 152//152 143//143 +f 143//143 152//152 153//153 +f 143//143 153//153 144//144 +f 145//145 154//154 155//155 +f 145//145 155//155 146//146 +f 146//146 155//155 156//156 +f 146//146 156//156 147//147 +f 147//147 156//156 157//157 +f 147//147 157//157 148//148 +f 148//148 157//157 158//158 +f 148//148 158//158 149//149 +f 149//149 158//158 159//159 +f 149//149 159//159 150//150 +f 150//150 159//159 160//160 +f 150//150 160//160 151//151 +f 151//151 160//160 161//161 +f 151//151 161//161 152//152 +f 152//152 161//161 162//162 +f 152//152 162//162 153//153 +f 154//154 163//163 164//164 +f 154//154 164//164 155//155 +f 155//155 164//164 165//165 +f 155//155 165//165 156//156 +f 156//156 165//165 166//166 +f 156//156 166//166 157//157 +f 157//157 166//166 167//167 +f 157//157 167//167 158//158 +f 158//158 167//167 168//168 +f 158//158 168//168 159//159 +f 159//159 168//168 169//169 +f 159//159 169//169 160//160 +f 160//160 169//169 170//170 +f 160//160 170//170 161//161 +f 161//161 170//170 171//171 +f 161//161 171//171 162//162 +f 163//163 172//172 173//173 +f 163//163 173//173 164//164 +f 164//164 173//173 174//174 +f 164//164 174//174 165//165 +f 165//165 174//174 175//175 +f 165//165 175//175 166//166 +f 166//166 175//175 176//176 +f 166//166 176//176 167//167 +f 167//167 176//176 177//177 +f 167//167 177//177 168//168 +f 168//168 177//177 178//178 +f 168//168 178//178 169//169 +f 169//169 178//178 179//179 +f 169//169 179//179 170//170 +f 170//170 179//179 180//180 +f 170//170 180//180 171//171 +f 172//172 181//181 182//182 +f 172//172 182//182 173//173 +f 173//173 182//182 183//183 +f 173//173 183//183 174//174 +f 174//174 183//183 184//184 +f 174//174 184//184 175//175 +f 175//175 184//184 185//185 +f 175//175 185//185 176//176 +f 176//176 185//185 186//186 +f 176//176 186//186 177//177 +f 177//177 186//186 187//187 +f 177//177 187//187 178//178 +f 178//178 187//187 188//188 +f 178//178 188//188 179//179 +f 179//179 188//188 189//189 +f 179//179 189//189 180//180 +f 181//181 190//190 191//191 +f 181//181 191//191 182//182 +f 182//182 191//191 192//192 +f 182//182 192//192 183//183 +f 183//183 192//192 193//193 +f 183//183 193//193 184//184 +f 184//184 193//193 194//194 +f 184//184 194//194 185//185 +f 185//185 194//194 195//195 +f 185//185 195//195 186//186 +f 186//186 195//195 196//196 +f 186//186 196//196 187//187 +f 187//187 196//196 197//197 +f 187//187 197//197 188//188 +f 188//188 197//197 198//198 +f 188//188 198//198 189//189 +f 190//190 199//199 200//200 +f 190//190 200//200 191//191 +f 191//191 200//200 201//201 +f 191//191 201//201 192//192 +f 192//192 201//201 202//202 +f 192//192 202//202 193//193 +f 193//193 202//202 203//203 +f 193//193 203//203 194//194 +f 194//194 203//203 204//204 +f 194//194 204//204 195//195 +f 195//195 204//204 205//205 +f 195//195 205//205 196//196 +f 196//196 205//205 206//206 +f 196//196 206//206 197//197 +f 197//197 206//206 207//207 +f 197//197 207//207 198//198 +f 199//199 208//208 209//209 +f 199//199 209//209 200//200 +f 200//200 209//209 210//210 +f 200//200 210//210 201//201 +f 201//201 210//210 211//211 +f 201//201 211//211 202//202 +f 202//202 211//211 212//212 +f 202//202 212//212 203//203 +f 203//203 212//212 213//213 +f 203//203 213//213 204//204 +f 204//204 213//213 214//214 +f 204//204 214//214 205//205 +f 205//205 214//214 215//215 +f 205//205 215//215 206//206 +f 206//206 215//215 216//216 +f 206//206 216//216 207//207 +f 208//208 217//217 218//218 +f 208//208 218//218 209//209 +f 209//209 218//218 219//219 +f 209//209 219//219 210//210 +f 210//210 219//219 220//220 +f 210//210 220//220 211//211 +f 211//211 220//220 221//221 +f 211//211 221//221 212//212 +f 212//212 221//221 222//222 +f 212//212 222//222 213//213 +f 213//213 222//222 223//223 +f 213//213 223//223 214//214 +f 214//214 223//223 224//224 +f 214//214 224//224 215//215 +f 215//215 224//224 225//225 +f 215//215 225//225 216//216 +f 217//217 226//226 227//227 +f 217//217 227//227 218//218 +f 218//218 227//227 228//228 +f 218//218 228//228 219//219 +f 219//219 228//228 229//229 +f 219//219 229//229 220//220 +f 220//220 229//229 230//230 +f 220//220 230//230 221//221 +f 221//221 230//230 231//231 +f 221//221 231//231 222//222 +f 222//222 231//231 232//232 +f 222//222 232//232 223//223 +f 223//223 232//232 233//233 +f 223//223 233//233 224//224 +f 224//224 233//233 234//234 +f 224//224 234//234 225//225 +f 226//226 235//235 236//236 +f 226//226 236//236 227//227 +f 227//227 236//236 237//237 +f 227//227 237//237 228//228 +f 228//228 237//237 238//238 +f 228//228 238//238 229//229 +f 229//229 238//238 239//239 +f 229//229 239//239 230//230 +f 230//230 239//239 240//240 +f 230//230 240//240 231//231 +f 231//231 240//240 241//241 +f 231//231 241//241 232//232 +f 232//232 241//241 242//242 +f 232//232 242//242 233//233 +f 233//233 242//242 243//243 +f 233//233 243//243 234//234 +f 235//235 244//244 245//245 +f 235//235 245//245 236//236 +f 236//236 245//245 246//246 +f 236//236 246//246 237//237 +f 237//237 246//246 247//247 +f 237//237 247//247 238//238 +f 238//238 247//247 248//248 +f 238//238 248//248 239//239 +f 239//239 248//248 249//249 +f 239//239 249//249 240//240 +f 240//240 249//249 250//250 +f 240//240 250//250 241//241 +f 241//241 250//250 251//251 +f 241//241 251//251 242//242 +f 242//242 251//251 252//252 +f 242//242 252//252 243//243 +f 244//244 253//253 254//254 +f 244//244 254//254 245//245 +f 245//245 254//254 255//255 +f 245//245 255//255 246//246 +f 246//246 255//255 256//256 +f 246//246 256//256 247//247 +f 247//247 256//256 257//257 +f 247//247 257//257 248//248 +f 248//248 257//257 258//258 +f 248//248 258//258 249//249 +f 249//249 258//258 259//259 +f 249//249 259//259 250//250 +f 250//250 259//259 260//260 +f 250//250 260//260 251//251 +f 251//251 260//260 261//261 +f 251//251 261//261 252//252 +f 253//253 262//262 263//263 +f 253//253 263//263 254//254 +f 254//254 263//263 264//264 +f 254//254 264//264 255//255 +f 255//255 264//264 265//265 +f 255//255 265//265 256//256 +f 256//256 265//265 266//266 +f 256//256 266//266 257//257 +f 257//257 266//266 267//267 +f 257//257 267//267 258//258 +f 258//258 267//267 268//268 +f 258//258 268//268 259//259 +f 259//259 268//268 269//269 +f 259//259 269//269 260//260 +f 260//260 269//269 270//270 +f 260//260 270//270 261//261 +f 262//262 271//271 272//272 +f 262//262 272//272 263//263 +f 263//263 272//272 273//273 +f 263//263 273//273 264//264 +f 264//264 273//273 274//274 +f 264//264 274//274 265//265 +f 265//265 274//274 275//275 +f 265//265 275//275 266//266 +f 266//266 275//275 276//276 +f 266//266 276//276 267//267 +f 267//267 276//276 277//277 +f 267//267 277//277 268//268 +f 268//268 277//277 278//278 +f 268//268 278//278 269//269 +f 269//269 278//278 279//279 +f 269//269 279//279 270//270 +f 271//271 280//280 281//281 +f 271//271 281//281 272//272 +f 272//272 281//281 282//282 +f 272//272 282//282 273//273 +f 273//273 282//282 283//283 +f 273//273 283//283 274//274 +f 274//274 283//283 284//284 +f 274//274 284//284 275//275 +f 275//275 284//284 285//285 +f 275//275 285//285 276//276 +f 276//276 285//285 286//286 +f 276//276 286//286 277//277 +f 277//277 286//286 287//287 +f 277//277 287//287 278//278 +f 278//278 287//287 288//288 +f 278//278 288//288 279//279 +f 280//280 1//1 4//4 +f 280//280 4//4 281//281 +f 281//281 4//4 6//6 +f 281//281 6//6 282//282 +f 282//282 6//6 8//8 +f 282//282 8//8 283//283 +f 283//283 8//8 10//10 +f 283//283 10//10 284//284 +f 284//284 10//10 12//12 +f 284//284 12//12 285//285 +f 285//285 12//12 14//14 +f 285//285 14//14 286//286 +f 286//286 14//14 16//16 +f 286//286 16//16 287//287 +f 287//287 16//16 18//18 +f 287//287 18//18 288//288 +f 18//18 17//17 289//289 +f 18//18 289//289 290//290 +f 290//290 289//289 291//291 +f 290//290 291//291 292//292 +f 292//292 291//291 293//293 +f 292//292 293//293 294//294 +f 294//294 293//293 295//295 +f 294//294 295//295 296//296 +f 296//296 295//295 297//297 +f 296//296 297//297 298//298 +f 298//298 297//297 299//299 +f 298//298 299//299 300//300 +f 300//300 299//299 301//301 +f 300//300 301//301 302//302 +f 302//302 301//301 303//303 +f 302//302 303//303 304//304 +f 17//17 27//27 305//305 +f 17//17 305//305 289//289 +f 289//289 305//305 306//306 +f 289//289 306//306 291//291 +f 291//291 306//306 307//307 +f 291//291 307//307 293//293 +f 293//293 307//307 308//308 +f 293//293 308//308 295//295 +f 295//295 308//308 309//309 +f 295//295 309//309 297//297 +f 297//297 309//309 310//310 +f 297//297 310//310 299//299 +f 299//299 310//310 311//311 +f 299//299 311//311 301//301 +f 301//301 311//311 312//312 +f 301//301 312//312 303//303 +f 27//27 36//36 313//313 +f 27//27 313//313 305//305 +f 305//305 313//313 314//314 +f 305//305 314//314 306//306 +f 306//306 314//314 315//315 +f 306//306 315//315 307//307 +f 307//307 315//315 316//316 +f 307//307 316//316 308//308 +f 308//308 316//316 317//317 +f 308//308 317//317 309//309 +f 309//309 317//317 318//318 +f 309//309 318//318 310//310 +f 310//310 318//318 319//319 +f 310//310 319//319 311//311 +f 311//311 319//319 320//320 +f 311//311 320//320 312//312 +f 36//36 45//45 321//321 +f 36//36 321//321 313//313 +f 313//313 321//321 322//322 +f 313//313 322//322 314//314 +f 314//314 322//322 323//323 +f 314//314 323//323 315//315 +f 315//315 323//323 324//324 +f 315//315 324//324 316//316 +f 316//316 324//324 325//325 +f 316//316 325//325 317//317 +f 317//317 325//325 326//326 +f 317//317 326//326 318//318 +f 318//318 326//326 327//327 +f 318//318 327//327 319//319 +f 319//319 327//327 328//328 +f 319//319 328//328 320//320 +f 45//45 54//54 329//329 +f 45//45 329//329 321//321 +f 321//321 329//329 330//330 +f 321//321 330//330 322//322 +f 322//322 330//330 331//331 +f 322//322 331//331 323//323 +f 323//323 331//331 332//332 +f 323//323 332//332 324//324 +f 324//324 332//332 333//333 +f 324//324 333//333 325//325 +f 325//325 333//333 334//334 +f 325//325 334//334 326//326 +f 326//326 334//334 335//335 +f 326//326 335//335 327//327 +f 327//327 335//335 336//336 +f 327//327 336//336 328//328 +f 54//54 63//63 337//337 +f 54//54 337//337 329//329 +f 329//329 337//337 338//338 +f 329//329 338//338 330//330 +f 330//330 338//338 339//339 +f 330//330 339//339 331//331 +f 331//331 339//339 340//340 +f 331//331 340//340 332//332 +f 332//332 340//340 341//341 +f 332//332 341//341 333//333 +f 333//333 341//341 342//342 +f 333//333 342//342 334//334 +f 334//334 342//342 343//343 +f 334//334 343//343 335//335 +f 335//335 343//343 344//344 +f 335//335 344//344 336//336 +f 63//63 72//72 345//345 +f 63//63 345//345 337//337 +f 337//337 345//345 346//346 +f 337//337 346//346 338//338 +f 338//338 346//346 347//347 +f 338//338 347//347 339//339 +f 339//339 347//347 348//348 +f 339//339 348//348 340//340 +f 340//340 348//348 349//349 +f 340//340 349//349 341//341 +f 341//341 349//349 350//350 +f 341//341 350//350 342//342 +f 342//342 350//350 351//351 +f 342//342 351//351 343//343 +f 343//343 351//351 352//352 +f 343//343 352//352 344//344 +f 72//72 81//81 353//353 +f 72//72 353//353 345//345 +f 345//345 353//353 354//354 +f 345//345 354//354 346//346 +f 346//346 354//354 355//355 +f 346//346 355//355 347//347 +f 347//347 355//355 356//356 +f 347//347 356//356 348//348 +f 348//348 356//356 357//357 +f 348//348 357//357 349//349 +f 349//349 357//357 358//358 +f 349//349 358//358 350//350 +f 350//350 358//358 359//359 +f 350//350 359//359 351//351 +f 351//351 359//359 360//360 +f 351//351 360//360 352//352 +f 81//81 90//90 361//361 +f 81//81 361//361 353//353 +f 353//353 361//361 362//362 +f 353//353 362//362 354//354 +f 354//354 362//362 363//363 +f 354//354 363//363 355//355 +f 355//355 363//363 364//364 +f 355//355 364//364 356//356 +f 356//356 364//364 365//365 +f 356//356 365//365 357//357 +f 357//357 365//365 366//366 +f 357//357 366//366 358//358 +f 358//358 366//366 367//367 +f 358//358 367//367 359//359 +f 359//359 367//367 368//368 +f 359//359 368//368 360//360 +f 90//90 99//99 369//369 +f 90//90 369//369 361//361 +f 361//361 369//369 370//370 +f 361//361 370//370 362//362 +f 362//362 370//370 371//371 +f 362//362 371//371 363//363 +f 363//363 371//371 372//372 +f 363//363 372//372 364//364 +f 364//364 372//372 373//373 +f 364//364 373//373 365//365 +f 365//365 373//373 374//374 +f 365//365 374//374 366//366 +f 366//366 374//374 375//375 +f 366//366 375//375 367//367 +f 367//367 375//375 376//376 +f 367//367 376//376 368//368 +f 99//99 108//108 377//377 +f 99//99 377//377 369//369 +f 369//369 377//377 378//378 +f 369//369 378//378 370//370 +f 370//370 378//378 379//379 +f 370//370 379//379 371//371 +f 371//371 379//379 380//380 +f 371//371 380//380 372//372 +f 372//372 380//380 381//381 +f 372//372 381//381 373//373 +f 373//373 381//381 382//382 +f 373//373 382//382 374//374 +f 374//374 382//382 383//383 +f 374//374 383//383 375//375 +f 375//375 383//383 384//384 +f 375//375 384//384 376//376 +f 108//108 117//117 385//385 +f 108//108 385//385 377//377 +f 377//377 385//385 386//386 +f 377//377 386//386 378//378 +f 378//378 386//386 387//387 +f 378//378 387//387 379//379 +f 379//379 387//387 388//388 +f 379//379 388//388 380//380 +f 380//380 388//388 389//389 +f 380//380 389//389 381//381 +f 381//381 389//389 390//390 +f 381//381 390//390 382//382 +f 382//382 390//390 391//391 +f 382//382 391//391 383//383 +f 383//383 391//391 392//392 +f 383//383 392//392 384//384 +f 117//117 126//126 393//393 +f 117//117 393//393 385//385 +f 385//385 393//393 394//394 +f 385//385 394//394 386//386 +f 386//386 394//394 395//395 +f 386//386 395//395 387//387 +f 387//387 395//395 396//396 +f 387//387 396//396 388//388 +f 388//388 396//396 397//397 +f 388//388 397//397 389//389 +f 389//389 397//397 398//398 +f 389//389 398//398 390//390 +f 390//390 398//398 399//399 +f 390//390 399//399 391//391 +f 391//391 399//399 400//400 +f 391//391 400//400 392//392 +f 126//126 135//135 401//401 +f 126//126 401//401 393//393 +f 393//393 401//401 402//402 +f 393//393 402//402 394//394 +f 394//394 402//402 403//403 +f 394//394 403//403 395//395 +f 395//395 403//403 404//404 +f 395//395 404//404 396//396 +f 396//396 404//404 405//405 +f 396//396 405//405 397//397 +f 397//397 405//405 406//406 +f 397//397 406//406 398//398 +f 398//398 406//406 407//407 +f 398//398 407//407 399//399 +f 399//399 407//407 408//408 +f 399//399 408//408 400//400 +f 135//135 144//144 409//409 +f 135//135 409//409 401//401 +f 401//401 409//409 410//410 +f 401//401 410//410 402//402 +f 402//402 410//410 411//411 +f 402//402 411//411 403//403 +f 403//403 411//411 412//412 +f 403//403 412//412 404//404 +f 404//404 412//412 413//413 +f 404//404 413//413 405//405 +f 405//405 413//413 414//414 +f 405//405 414//414 406//406 +f 406//406 414//414 415//415 +f 406//406 415//415 407//407 +f 407//407 415//415 416//416 +f 407//407 416//416 408//408 +f 144//144 153//153 417//417 +f 144//144 417//417 409//409 +f 409//409 417//417 418//418 +f 409//409 418//418 410//410 +f 410//410 418//418 419//419 +f 410//410 419//419 411//411 +f 411//411 419//419 420//420 +f 411//411 420//420 412//412 +f 412//412 420//420 421//421 +f 412//412 421//421 413//413 +f 413//413 421//421 422//422 +f 413//413 422//422 414//414 +f 414//414 422//422 423//423 +f 414//414 423//423 415//415 +f 415//415 423//423 424//424 +f 415//415 424//424 416//416 +f 153//153 162//162 425//425 +f 153//153 425//425 417//417 +f 417//417 425//425 426//426 +f 417//417 426//426 418//418 +f 418//418 426//426 427//427 +f 418//418 427//427 419//419 +f 419//419 427//427 428//428 +f 419//419 428//428 420//420 +f 420//420 428//428 429//429 +f 420//420 429//429 421//421 +f 421//421 429//429 430//430 +f 421//421 430//430 422//422 +f 422//422 430//430 431//431 +f 422//422 431//431 423//423 +f 423//423 431//431 432//432 +f 423//423 432//432 424//424 +f 162//162 171//171 433//433 +f 162//162 433//433 425//425 +f 425//425 433//433 434//434 +f 425//425 434//434 426//426 +f 426//426 434//434 435//435 +f 426//426 435//435 427//427 +f 427//427 435//435 436//436 +f 427//427 436//436 428//428 +f 428//428 436//436 437//437 +f 428//428 437//437 429//429 +f 429//429 437//437 438//438 +f 429//429 438//438 430//430 +f 430//430 438//438 439//439 +f 430//430 439//439 431//431 +f 431//431 439//439 440//440 +f 431//431 440//440 432//432 +f 171//171 180//180 441//441 +f 171//171 441//441 433//433 +f 433//433 441//441 442//442 +f 433//433 442//442 434//434 +f 434//434 442//442 443//443 +f 434//434 443//443 435//435 +f 435//435 443//443 444//444 +f 435//435 444//444 436//436 +f 436//436 444//444 445//445 +f 436//436 445//445 437//437 +f 437//437 445//445 446//446 +f 437//437 446//446 438//438 +f 438//438 446//446 447//447 +f 438//438 447//447 439//439 +f 439//439 447//447 448//448 +f 439//439 448//448 440//440 +f 180//180 189//189 449//449 +f 180//180 449//449 441//441 +f 441//441 449//449 450//450 +f 441//441 450//450 442//442 +f 442//442 450//450 451//451 +f 442//442 451//451 443//443 +f 443//443 451//451 452//452 +f 443//443 452//452 444//444 +f 444//444 452//452 453//453 +f 444//444 453//453 445//445 +f 445//445 453//453 454//454 +f 445//445 454//454 446//446 +f 446//446 454//454 455//455 +f 446//446 455//455 447//447 +f 447//447 455//455 456//456 +f 447//447 456//456 448//448 +f 189//189 198//198 457//457 +f 189//189 457//457 449//449 +f 449//449 457//457 458//458 +f 449//449 458//458 450//450 +f 450//450 458//458 459//459 +f 450//450 459//459 451//451 +f 451//451 459//459 460//460 +f 451//451 460//460 452//452 +f 452//452 460//460 461//461 +f 452//452 461//461 453//453 +f 453//453 461//461 462//462 +f 453//453 462//462 454//454 +f 454//454 462//462 463//463 +f 454//454 463//463 455//455 +f 455//455 463//463 464//464 +f 455//455 464//464 456//456 +f 198//198 207//207 465//465 +f 198//198 465//465 457//457 +f 457//457 465//465 466//466 +f 457//457 466//466 458//458 +f 458//458 466//466 467//467 +f 458//458 467//467 459//459 +f 459//459 467//467 468//468 +f 459//459 468//468 460//460 +f 460//460 468//468 469//469 +f 460//460 469//469 461//461 +f 461//461 469//469 470//470 +f 461//461 470//470 462//462 +f 462//462 470//470 471//471 +f 462//462 471//471 463//463 +f 463//463 471//471 472//472 +f 463//463 472//472 464//464 +f 207//207 216//216 473//473 +f 207//207 473//473 465//465 +f 465//465 473//473 474//474 +f 465//465 474//474 466//466 +f 466//466 474//474 475//475 +f 466//466 475//475 467//467 +f 467//467 475//475 476//476 +f 467//467 476//476 468//468 +f 468//468 476//476 477//477 +f 468//468 477//477 469//469 +f 469//469 477//477 478//478 +f 469//469 478//478 470//470 +f 470//470 478//478 479//479 +f 470//470 479//479 471//471 +f 471//471 479//479 480//480 +f 471//471 480//480 472//472 +f 216//216 225//225 481//481 +f 216//216 481//481 473//473 +f 473//473 481//481 482//482 +f 473//473 482//482 474//474 +f 474//474 482//482 483//483 +f 474//474 483//483 475//475 +f 475//475 483//483 484//484 +f 475//475 484//484 476//476 +f 476//476 484//484 485//485 +f 476//476 485//485 477//477 +f 477//477 485//485 486//486 +f 477//477 486//486 478//478 +f 478//478 486//486 487//487 +f 478//478 487//487 479//479 +f 479//479 487//487 488//488 +f 479//479 488//488 480//480 +f 225//225 234//234 489//489 +f 225//225 489//489 481//481 +f 481//481 489//489 490//490 +f 481//481 490//490 482//482 +f 482//482 490//490 491//491 +f 482//482 491//491 483//483 +f 483//483 491//491 492//492 +f 483//483 492//492 484//484 +f 484//484 492//492 493//493 +f 484//484 493//493 485//485 +f 485//485 493//493 494//494 +f 485//485 494//494 486//486 +f 486//486 494//494 495//495 +f 486//486 495//495 487//487 +f 487//487 495//495 496//496 +f 487//487 496//496 488//488 +f 234//234 243//243 497//497 +f 234//234 497//497 489//489 +f 489//489 497//497 498//498 +f 489//489 498//498 490//490 +f 490//490 498//498 499//499 +f 490//490 499//499 491//491 +f 491//491 499//499 500//500 +f 491//491 500//500 492//492 +f 492//492 500//500 501//501 +f 492//492 501//501 493//493 +f 493//493 501//501 502//502 +f 493//493 502//502 494//494 +f 494//494 502//502 503//503 +f 494//494 503//503 495//495 +f 495//495 503//503 504//504 +f 495//495 504//504 496//496 +f 243//243 252//252 505//505 +f 243//243 505//505 497//497 +f 497//497 505//505 506//506 +f 497//497 506//506 498//498 +f 498//498 506//506 507//507 +f 498//498 507//507 499//499 +f 499//499 507//507 508//508 +f 499//499 508//508 500//500 +f 500//500 508//508 509//509 +f 500//500 509//509 501//501 +f 501//501 509//509 510//510 +f 501//501 510//510 502//502 +f 502//502 510//510 511//511 +f 502//502 511//511 503//503 +f 503//503 511//511 512//512 +f 503//503 512//512 504//504 +f 252//252 261//261 513//513 +f 252//252 513//513 505//505 +f 505//505 513//513 514//514 +f 505//505 514//514 506//506 +f 506//506 514//514 515//515 +f 506//506 515//515 507//507 +f 507//507 515//515 516//516 +f 507//507 516//516 508//508 +f 508//508 516//516 517//517 +f 508//508 517//517 509//509 +f 509//509 517//517 518//518 +f 509//509 518//518 510//510 +f 510//510 518//518 519//519 +f 510//510 519//519 511//511 +f 511//511 519//519 520//520 +f 511//511 520//520 512//512 +f 261//261 270//270 521//521 +f 261//261 521//521 513//513 +f 513//513 521//521 522//522 +f 513//513 522//522 514//514 +f 514//514 522//522 523//523 +f 514//514 523//523 515//515 +f 515//515 523//523 524//524 +f 515//515 524//524 516//516 +f 516//516 524//524 525//525 +f 516//516 525//525 517//517 +f 517//517 525//525 526//526 +f 517//517 526//526 518//518 +f 518//518 526//526 527//527 +f 518//518 527//527 519//519 +f 519//519 527//527 528//528 +f 519//519 528//528 520//520 +f 270//270 279//279 529//529 +f 270//270 529//529 521//521 +f 521//521 529//529 530//530 +f 521//521 530//530 522//522 +f 522//522 530//530 531//531 +f 522//522 531//531 523//523 +f 523//523 531//531 532//532 +f 523//523 532//532 524//524 +f 524//524 532//532 533//533 +f 524//524 533//533 525//525 +f 525//525 533//533 534//534 +f 525//525 534//534 526//526 +f 526//526 534//534 535//535 +f 526//526 535//535 527//527 +f 527//527 535//535 536//536 +f 527//527 536//536 528//528 +f 279//279 288//288 537//537 +f 279//279 537//537 529//529 +f 529//529 537//537 538//538 +f 529//529 538//538 530//530 +f 530//530 538//538 539//539 +f 530//530 539//539 531//531 +f 531//531 539//539 540//540 +f 531//531 540//540 532//532 +f 532//532 540//540 541//541 +f 532//532 541//541 533//533 +f 533//533 541//541 542//542 +f 533//533 542//542 534//534 +f 534//534 542//542 543//543 +f 534//534 543//543 535//535 +f 535//535 543//543 544//544 +f 535//535 544//544 536//536 +f 288//288 18//18 290//290 +f 288//288 290//290 537//537 +f 537//537 290//290 292//292 +f 537//537 292//292 538//538 +f 538//538 292//292 294//294 +f 538//538 294//294 539//539 +f 539//539 294//294 296//296 +f 539//539 296//296 540//540 +f 540//540 296//296 298//298 +f 540//540 298//298 541//541 +f 541//541 298//298 300//300 +f 541//541 300//300 542//542 +f 542//542 300//300 302//302 +f 542//542 302//302 543//543 +f 543//543 302//302 304//304 +f 543//543 304//304 544//544 +f 304//304 303//303 545//545 +f 304//304 545//545 546//546 +f 546//546 545//545 547//547 +f 546//546 547//547 548//548 +f 548//548 547//547 549//549 +f 548//548 549//549 550//550 +f 550//550 549//549 551//551 +f 550//550 551//551 552//552 +f 552//552 551//551 553//553 +f 552//552 553//553 554//554 +f 554//554 553//553 555//555 +f 554//554 555//555 556//556 +f 556//556 555//555 557//557 +f 556//556 557//557 558//558 +f 558//558 557//557 559//559 +f 558//558 559//559 560//560 +f 303//303 312//312 561//561 +f 303//303 561//561 545//545 +f 545//545 561//561 562//562 +f 545//545 562//562 547//547 +f 547//547 562//562 563//563 +f 547//547 563//563 549//549 +f 549//549 563//563 564//564 +f 549//549 564//564 551//551 +f 551//551 564//564 565//565 +f 551//551 565//565 553//553 +f 553//553 565//565 566//566 +f 553//553 566//566 555//555 +f 555//555 566//566 567//567 +f 555//555 567//567 557//557 +f 557//557 567//567 568//568 +f 557//557 568//568 559//559 +f 312//312 320//320 569//569 +f 312//312 569//569 561//561 +f 561//561 569//569 570//570 +f 561//561 570//570 562//562 +f 562//562 570//570 571//571 +f 562//562 571//571 563//563 +f 563//563 571//571 572//572 +f 563//563 572//572 564//564 +f 564//564 572//572 573//573 +f 564//564 573//573 565//565 +f 565//565 573//573 574//574 +f 565//565 574//574 566//566 +f 566//566 574//574 575//575 +f 566//566 575//575 567//567 +f 567//567 575//575 576//576 +f 567//567 576//576 568//568 +f 320//320 328//328 577//577 +f 320//320 577//577 569//569 +f 569//569 577//577 578//578 +f 569//569 578//578 570//570 +f 570//570 578//578 579//579 +f 570//570 579//579 571//571 +f 571//571 579//579 580//580 +f 571//571 580//580 572//572 +f 572//572 580//580 581//581 +f 572//572 581//581 573//573 +f 573//573 581//581 582//582 +f 573//573 582//582 574//574 +f 574//574 582//582 583//583 +f 574//574 583//583 575//575 +f 575//575 583//583 584//584 +f 575//575 584//584 576//576 +f 328//328 336//336 585//585 +f 328//328 585//585 577//577 +f 577//577 585//585 586//586 +f 577//577 586//586 578//578 +f 578//578 586//586 587//587 +f 578//578 587//587 579//579 +f 579//579 587//587 588//588 +f 579//579 588//588 580//580 +f 580//580 588//588 589//589 +f 580//580 589//589 581//581 +f 581//581 589//589 590//590 +f 581//581 590//590 582//582 +f 582//582 590//590 591//591 +f 582//582 591//591 583//583 +f 583//583 591//591 592//592 +f 583//583 592//592 584//584 +f 336//336 344//344 593//593 +f 336//336 593//593 585//585 +f 585//585 593//593 594//594 +f 585//585 594//594 586//586 +f 586//586 594//594 595//595 +f 586//586 595//595 587//587 +f 587//587 595//595 596//596 +f 587//587 596//596 588//588 +f 588//588 596//596 597//597 +f 588//588 597//597 589//589 +f 589//589 597//597 598//598 +f 589//589 598//598 590//590 +f 590//590 598//598 599//599 +f 590//590 599//599 591//591 +f 591//591 599//599 600//600 +f 591//591 600//600 592//592 +f 344//344 352//352 601//601 +f 344//344 601//601 593//593 +f 593//593 601//601 602//602 +f 593//593 602//602 594//594 +f 594//594 602//602 603//603 +f 594//594 603//603 595//595 +f 595//595 603//603 604//604 +f 595//595 604//604 596//596 +f 596//596 604//604 605//605 +f 596//596 605//605 597//597 +f 597//597 605//605 606//606 +f 597//597 606//606 598//598 +f 598//598 606//606 607//607 +f 598//598 607//607 599//599 +f 599//599 607//607 608//608 +f 599//599 608//608 600//600 +f 352//352 360//360 609//609 +f 352//352 609//609 601//601 +f 601//601 609//609 610//610 +f 601//601 610//610 602//602 +f 602//602 610//610 611//611 +f 602//602 611//611 603//603 +f 603//603 611//611 612//612 +f 603//603 612//612 604//604 +f 604//604 612//612 613//613 +f 604//604 613//613 605//605 +f 605//605 613//613 614//614 +f 605//605 614//614 606//606 +f 606//606 614//614 615//615 +f 606//606 615//615 607//607 +f 607//607 615//615 616//616 +f 607//607 616//616 608//608 +f 360//360 368//368 617//617 +f 360//360 617//617 609//609 +f 609//609 617//617 618//618 +f 609//609 618//618 610//610 +f 610//610 618//618 619//619 +f 610//610 619//619 611//611 +f 611//611 619//619 620//620 +f 611//611 620//620 612//612 +f 612//612 620//620 621//621 +f 612//612 621//621 613//613 +f 613//613 621//621 622//622 +f 613//613 622//622 614//614 +f 614//614 622//622 623//623 +f 614//614 623//623 615//615 +f 615//615 623//623 624//624 +f 615//615 624//624 616//616 +f 368//368 376//376 625//625 +f 368//368 625//625 617//617 +f 617//617 625//625 626//626 +f 617//617 626//626 618//618 +f 618//618 626//626 627//627 +f 618//618 627//627 619//619 +f 619//619 627//627 628//628 +f 619//619 628//628 620//620 +f 620//620 628//628 629//629 +f 620//620 629//629 621//621 +f 621//621 629//629 630//630 +f 621//621 630//630 622//622 +f 622//622 630//630 631//631 +f 622//622 631//631 623//623 +f 623//623 631//631 632//632 +f 623//623 632//632 624//624 +f 376//376 384//384 633//633 +f 376//376 633//633 625//625 +f 625//625 633//633 634//634 +f 625//625 634//634 626//626 +f 626//626 634//634 635//635 +f 626//626 635//635 627//627 +f 627//627 635//635 636//636 +f 627//627 636//636 628//628 +f 628//628 636//636 637//637 +f 628//628 637//637 629//629 +f 629//629 637//637 638//638 +f 629//629 638//638 630//630 +f 630//630 638//638 639//639 +f 630//630 639//639 631//631 +f 631//631 639//639 640//640 +f 631//631 640//640 632//632 +f 384//384 392//392 641//641 +f 384//384 641//641 633//633 +f 633//633 641//641 642//642 +f 633//633 642//642 634//634 +f 634//634 642//642 643//643 +f 634//634 643//643 635//635 +f 635//635 643//643 644//644 +f 635//635 644//644 636//636 +f 636//636 644//644 645//645 +f 636//636 645//645 637//637 +f 637//637 645//645 646//646 +f 637//637 646//646 638//638 +f 638//638 646//646 647//647 +f 638//638 647//647 639//639 +f 639//639 647//647 648//648 +f 639//639 648//648 640//640 +f 392//392 400//400 649//649 +f 392//392 649//649 641//641 +f 641//641 649//649 650//650 +f 641//641 650//650 642//642 +f 642//642 650//650 651//651 +f 642//642 651//651 643//643 +f 643//643 651//651 652//652 +f 643//643 652//652 644//644 +f 644//644 652//652 653//653 +f 644//644 653//653 645//645 +f 645//645 653//653 654//654 +f 645//645 654//654 646//646 +f 646//646 654//654 655//655 +f 646//646 655//655 647//647 +f 647//647 655//655 656//656 +f 647//647 656//656 648//648 +f 400//400 408//408 657//657 +f 400//400 657//657 649//649 +f 649//649 657//657 658//658 +f 649//649 658//658 650//650 +f 650//650 658//658 659//659 +f 650//650 659//659 651//651 +f 651//651 659//659 660//660 +f 651//651 660//660 652//652 +f 652//652 660//660 661//661 +f 652//652 661//661 653//653 +f 653//653 661//661 662//662 +f 653//653 662//662 654//654 +f 654//654 662//662 663//663 +f 654//654 663//663 655//655 +f 655//655 663//663 664//664 +f 655//655 664//664 656//656 +f 408//408 416//416 665//665 +f 408//408 665//665 657//657 +f 657//657 665//665 666//666 +f 657//657 666//666 658//658 +f 658//658 666//666 667//667 +f 658//658 667//667 659//659 +f 659//659 667//667 668//668 +f 659//659 668//668 660//660 +f 660//660 668//668 669//669 +f 660//660 669//669 661//661 +f 661//661 669//669 670//670 +f 661//661 670//670 662//662 +f 662//662 670//670 671//671 +f 662//662 671//671 663//663 +f 663//663 671//671 672//672 +f 663//663 672//672 664//664 +f 416//416 424//424 673//673 +f 416//416 673//673 665//665 +f 665//665 673//673 674//674 +f 665//665 674//674 666//666 +f 666//666 674//674 675//675 +f 666//666 675//675 667//667 +f 667//667 675//675 676//676 +f 667//667 676//676 668//668 +f 668//668 676//676 677//677 +f 668//668 677//677 669//669 +f 669//669 677//677 678//678 +f 669//669 678//678 670//670 +f 670//670 678//678 679//679 +f 670//670 679//679 671//671 +f 671//671 679//679 680//680 +f 671//671 680//680 672//672 +f 424//424 432//432 681//681 +f 424//424 681//681 673//673 +f 673//673 681//681 682//682 +f 673//673 682//682 674//674 +f 674//674 682//682 683//683 +f 674//674 683//683 675//675 +f 675//675 683//683 684//684 +f 675//675 684//684 676//676 +f 676//676 684//684 685//685 +f 676//676 685//685 677//677 +f 677//677 685//685 686//686 +f 677//677 686//686 678//678 +f 678//678 686//686 687//687 +f 678//678 687//687 679//679 +f 679//679 687//687 688//688 +f 679//679 688//688 680//680 +f 432//432 440//440 689//689 +f 432//432 689//689 681//681 +f 681//681 689//689 690//690 +f 681//681 690//690 682//682 +f 682//682 690//690 691//691 +f 682//682 691//691 683//683 +f 683//683 691//691 692//692 +f 683//683 692//692 684//684 +f 684//684 692//692 693//693 +f 684//684 693//693 685//685 +f 685//685 693//693 694//694 +f 685//685 694//694 686//686 +f 686//686 694//694 695//695 +f 686//686 695//695 687//687 +f 687//687 695//695 696//696 +f 687//687 696//696 688//688 +f 440//440 448//448 697//697 +f 440//440 697//697 689//689 +f 689//689 697//697 698//698 +f 689//689 698//698 690//690 +f 690//690 698//698 699//699 +f 690//690 699//699 691//691 +f 691//691 699//699 700//700 +f 691//691 700//700 692//692 +f 692//692 700//700 701//701 +f 692//692 701//701 693//693 +f 693//693 701//701 702//702 +f 693//693 702//702 694//694 +f 694//694 702//702 703//703 +f 694//694 703//703 695//695 +f 695//695 703//703 704//704 +f 695//695 704//704 696//696 +f 448//448 456//456 705//705 +f 448//448 705//705 697//697 +f 697//697 705//705 706//706 +f 697//697 706//706 698//698 +f 698//698 706//706 707//707 +f 698//698 707//707 699//699 +f 699//699 707//707 708//708 +f 699//699 708//708 700//700 +f 700//700 708//708 709//709 +f 700//700 709//709 701//701 +f 701//701 709//709 710//710 +f 701//701 710//710 702//702 +f 702//702 710//710 711//711 +f 702//702 711//711 703//703 +f 703//703 711//711 712//712 +f 703//703 712//712 704//704 +f 456//456 464//464 713//713 +f 456//456 713//713 705//705 +f 705//705 713//713 714//714 +f 705//705 714//714 706//706 +f 706//706 714//714 715//715 +f 706//706 715//715 707//707 +f 707//707 715//715 716//716 +f 707//707 716//716 708//708 +f 708//708 716//716 717//717 +f 708//708 717//717 709//709 +f 709//709 717//717 718//718 +f 709//709 718//718 710//710 +f 710//710 718//718 719//719 +f 710//710 719//719 711//711 +f 711//711 719//719 720//720 +f 711//711 720//720 712//712 +f 464//464 472//472 721//721 +f 464//464 721//721 713//713 +f 713//713 721//721 722//722 +f 713//713 722//722 714//714 +f 714//714 722//722 723//723 +f 714//714 723//723 715//715 +f 715//715 723//723 724//724 +f 715//715 724//724 716//716 +f 716//716 724//724 725//725 +f 716//716 725//725 717//717 +f 717//717 725//725 726//726 +f 717//717 726//726 718//718 +f 718//718 726//726 727//727 +f 718//718 727//727 719//719 +f 719//719 727//727 728//728 +f 719//719 728//728 720//720 +f 472//472 480//480 729//729 +f 472//472 729//729 721//721 +f 721//721 729//729 730//730 +f 721//721 730//730 722//722 +f 722//722 730//730 731//731 +f 722//722 731//731 723//723 +f 723//723 731//731 732//732 +f 723//723 732//732 724//724 +f 724//724 732//732 733//733 +f 724//724 733//733 725//725 +f 725//725 733//733 734//734 +f 725//725 734//734 726//726 +f 726//726 734//734 735//735 +f 726//726 735//735 727//727 +f 727//727 735//735 736//736 +f 727//727 736//736 728//728 +f 480//480 488//488 737//737 +f 480//480 737//737 729//729 +f 729//729 737//737 738//738 +f 729//729 738//738 730//730 +f 730//730 738//738 739//739 +f 730//730 739//739 731//731 +f 731//731 739//739 740//740 +f 731//731 740//740 732//732 +f 732//732 740//740 741//741 +f 732//732 741//741 733//733 +f 733//733 741//741 742//742 +f 733//733 742//742 734//734 +f 734//734 742//742 743//743 +f 734//734 743//743 735//735 +f 735//735 743//743 744//744 +f 735//735 744//744 736//736 +f 488//488 496//496 745//745 +f 488//488 745//745 737//737 +f 737//737 745//745 746//746 +f 737//737 746//746 738//738 +f 738//738 746//746 747//747 +f 738//738 747//747 739//739 +f 739//739 747//747 748//748 +f 739//739 748//748 740//740 +f 740//740 748//748 749//749 +f 740//740 749//749 741//741 +f 741//741 749//749 750//750 +f 741//741 750//750 742//742 +f 742//742 750//750 751//751 +f 742//742 751//751 743//743 +f 743//743 751//751 752//752 +f 743//743 752//752 744//744 +f 496//496 504//504 753//753 +f 496//496 753//753 745//745 +f 745//745 753//753 754//754 +f 745//745 754//754 746//746 +f 746//746 754//754 755//755 +f 746//746 755//755 747//747 +f 747//747 755//755 756//756 +f 747//747 756//756 748//748 +f 748//748 756//756 757//757 +f 748//748 757//757 749//749 +f 749//749 757//757 758//758 +f 749//749 758//758 750//750 +f 750//750 758//758 759//759 +f 750//750 759//759 751//751 +f 751//751 759//759 760//760 +f 751//751 760//760 752//752 +f 504//504 512//512 761//761 +f 504//504 761//761 753//753 +f 753//753 761//761 762//762 +f 753//753 762//762 754//754 +f 754//754 762//762 763//763 +f 754//754 763//763 755//755 +f 755//755 763//763 764//764 +f 755//755 764//764 756//756 +f 756//756 764//764 765//765 +f 756//756 765//765 757//757 +f 757//757 765//765 766//766 +f 757//757 766//766 758//758 +f 758//758 766//766 767//767 +f 758//758 767//767 759//759 +f 759//759 767//767 768//768 +f 759//759 768//768 760//760 +f 512//512 520//520 769//769 +f 512//512 769//769 761//761 +f 761//761 769//769 770//770 +f 761//761 770//770 762//762 +f 762//762 770//770 771//771 +f 762//762 771//771 763//763 +f 763//763 771//771 772//772 +f 763//763 772//772 764//764 +f 764//764 772//772 773//773 +f 764//764 773//773 765//765 +f 765//765 773//773 774//774 +f 765//765 774//774 766//766 +f 766//766 774//774 775//775 +f 766//766 775//775 767//767 +f 767//767 775//775 776//776 +f 767//767 776//776 768//768 +f 520//520 528//528 777//777 +f 520//520 777//777 769//769 +f 769//769 777//777 778//778 +f 769//769 778//778 770//770 +f 770//770 778//778 779//779 +f 770//770 779//779 771//771 +f 771//771 779//779 780//780 +f 771//771 780//780 772//772 +f 772//772 780//780 781//781 +f 772//772 781//781 773//773 +f 773//773 781//781 782//782 +f 773//773 782//782 774//774 +f 774//774 782//782 783//783 +f 774//774 783//783 775//775 +f 775//775 783//783 784//784 +f 775//775 784//784 776//776 +f 528//528 536//536 785//785 +f 528//528 785//785 777//777 +f 777//777 785//785 786//786 +f 777//777 786//786 778//778 +f 778//778 786//786 787//787 +f 778//778 787//787 779//779 +f 779//779 787//787 788//788 +f 779//779 788//788 780//780 +f 780//780 788//788 789//789 +f 780//780 789//789 781//781 +f 781//781 789//789 790//790 +f 781//781 790//790 782//782 +f 782//782 790//790 791//791 +f 782//782 791//791 783//783 +f 783//783 791//791 792//792 +f 783//783 792//792 784//784 +f 536//536 544//544 793//793 +f 536//536 793//793 785//785 +f 785//785 793//793 794//794 +f 785//785 794//794 786//786 +f 786//786 794//794 795//795 +f 786//786 795//795 787//787 +f 787//787 795//795 796//796 +f 787//787 796//796 788//788 +f 788//788 796//796 797//797 +f 788//788 797//797 789//789 +f 789//789 797//797 798//798 +f 789//789 798//798 790//790 +f 790//790 798//798 799//799 +f 790//790 799//799 791//791 +f 791//791 799//799 800//800 +f 791//791 800//800 792//792 +f 544//544 304//304 546//546 +f 544//544 546//546 793//793 +f 793//793 546//546 548//548 +f 793//793 548//548 794//794 +f 794//794 548//548 550//550 +f 794//794 550//550 795//795 +f 795//795 550//550 552//552 +f 795//795 552//552 796//796 +f 796//796 552//552 554//554 +f 796//796 554//554 797//797 +f 797//797 554//554 556//556 +f 797//797 556//556 798//798 +f 798//798 556//556 558//558 +f 798//798 558//558 799//799 +f 799//799 558//558 560//560 +f 799//799 560//560 800//800 +f 560//560 559//559 801//801 +f 560//560 801//801 802//802 +f 802//802 801//801 803//803 +f 802//802 803//803 804//804 +f 804//804 803//803 805//805 +f 804//804 805//805 806//806 +f 806//806 805//805 807//807 +f 806//806 807//807 808//808 +f 808//808 807//807 809//809 +f 808//808 809//809 810//810 +f 810//810 809//809 811//811 +f 810//810 811//811 812//812 +f 812//812 811//811 813//813 +f 812//812 813//813 814//814 +f 814//814 813//813 815//815 +f 559//559 568//568 816//816 +f 559//559 816//816 801//801 +f 801//801 816//816 817//817 +f 801//801 817//817 803//803 +f 803//803 817//817 818//818 +f 803//803 818//818 805//805 +f 805//805 818//818 819//819 +f 805//805 819//819 807//807 +f 807//807 819//819 820//820 +f 807//807 820//820 809//809 +f 809//809 820//820 821//821 +f 809//809 821//821 811//811 +f 811//811 821//821 822//822 +f 811//811 822//822 813//813 +f 813//813 822//822 815//815 +f 568//568 576//576 823//823 +f 568//568 823//823 816//816 +f 816//816 823//823 824//824 +f 816//816 824//824 817//817 +f 817//817 824//824 825//825 +f 817//817 825//825 818//818 +f 818//818 825//825 826//826 +f 818//818 826//826 819//819 +f 819//819 826//826 827//827 +f 819//819 827//827 820//820 +f 820//820 827//827 828//828 +f 820//820 828//828 821//821 +f 821//821 828//828 829//829 +f 821//821 829//829 822//822 +f 822//822 829//829 815//815 +f 576//576 584//584 830//830 +f 576//576 830//830 823//823 +f 823//823 830//830 831//831 +f 823//823 831//831 824//824 +f 824//824 831//831 832//832 +f 824//824 832//832 825//825 +f 825//825 832//832 833//833 +f 825//825 833//833 826//826 +f 826//826 833//833 834//834 +f 826//826 834//834 827//827 +f 827//827 834//834 835//835 +f 827//827 835//835 828//828 +f 828//828 835//835 836//836 +f 828//828 836//836 829//829 +f 829//829 836//836 815//815 +f 584//584 592//592 837//837 +f 584//584 837//837 830//830 +f 830//830 837//837 838//838 +f 830//830 838//838 831//831 +f 831//831 838//838 839//839 +f 831//831 839//839 832//832 +f 832//832 839//839 840//840 +f 832//832 840//840 833//833 +f 833//833 840//840 841//841 +f 833//833 841//841 834//834 +f 834//834 841//841 842//842 +f 834//834 842//842 835//835 +f 835//835 842//842 843//843 +f 835//835 843//843 836//836 +f 836//836 843//843 815//815 +f 592//592 600//600 844//844 +f 592//592 844//844 837//837 +f 837//837 844//844 845//845 +f 837//837 845//845 838//838 +f 838//838 845//845 846//846 +f 838//838 846//846 839//839 +f 839//839 846//846 847//847 +f 839//839 847//847 840//840 +f 840//840 847//847 848//848 +f 840//840 848//848 841//841 +f 841//841 848//848 849//849 +f 841//841 849//849 842//842 +f 842//842 849//849 850//850 +f 842//842 850//850 843//843 +f 843//843 850//850 815//815 +f 600//600 608//608 851//851 +f 600//600 851//851 844//844 +f 844//844 851//851 852//852 +f 844//844 852//852 845//845 +f 845//845 852//852 853//853 +f 845//845 853//853 846//846 +f 846//846 853//853 854//854 +f 846//846 854//854 847//847 +f 847//847 854//854 855//855 +f 847//847 855//855 848//848 +f 848//848 855//855 856//856 +f 848//848 856//856 849//849 +f 849//849 856//856 857//857 +f 849//849 857//857 850//850 +f 850//850 857//857 815//815 +f 608//608 616//616 858//858 +f 608//608 858//858 851//851 +f 851//851 858//858 859//859 +f 851//851 859//859 852//852 +f 852//852 859//859 860//860 +f 852//852 860//860 853//853 +f 853//853 860//860 861//861 +f 853//853 861//861 854//854 +f 854//854 861//861 862//862 +f 854//854 862//862 855//855 +f 855//855 862//862 863//863 +f 855//855 863//863 856//856 +f 856//856 863//863 864//864 +f 856//856 864//864 857//857 +f 857//857 864//864 815//815 +f 616//616 624//624 865//865 +f 616//616 865//865 858//858 +f 858//858 865//865 866//866 +f 858//858 866//866 859//859 +f 859//859 866//866 867//867 +f 859//859 867//867 860//860 +f 860//860 867//867 868//868 +f 860//860 868//868 861//861 +f 861//861 868//868 869//869 +f 861//861 869//869 862//862 +f 862//862 869//869 870//870 +f 862//862 870//870 863//863 +f 863//863 870//870 871//871 +f 863//863 871//871 864//864 +f 864//864 871//871 815//815 +f 624//624 632//632 872//872 +f 624//624 872//872 865//865 +f 865//865 872//872 873//873 +f 865//865 873//873 866//866 +f 866//866 873//873 874//874 +f 866//866 874//874 867//867 +f 867//867 874//874 875//875 +f 867//867 875//875 868//868 +f 868//868 875//875 876//876 +f 868//868 876//876 869//869 +f 869//869 876//876 877//877 +f 869//869 877//877 870//870 +f 870//870 877//877 878//878 +f 870//870 878//878 871//871 +f 871//871 878//878 815//815 +f 632//632 640//640 879//879 +f 632//632 879//879 872//872 +f 872//872 879//879 880//880 +f 872//872 880//880 873//873 +f 873//873 880//880 881//881 +f 873//873 881//881 874//874 +f 874//874 881//881 882//882 +f 874//874 882//882 875//875 +f 875//875 882//882 883//883 +f 875//875 883//883 876//876 +f 876//876 883//883 884//884 +f 876//876 884//884 877//877 +f 877//877 884//884 885//885 +f 877//877 885//885 878//878 +f 878//878 885//885 815//815 +f 640//640 648//648 886//886 +f 640//640 886//886 879//879 +f 879//879 886//886 887//887 +f 879//879 887//887 880//880 +f 880//880 887//887 888//888 +f 880//880 888//888 881//881 +f 881//881 888//888 889//889 +f 881//881 889//889 882//882 +f 882//882 889//889 890//890 +f 882//882 890//890 883//883 +f 883//883 890//890 891//891 +f 883//883 891//891 884//884 +f 884//884 891//891 892//892 +f 884//884 892//892 885//885 +f 885//885 892//892 815//815 +f 648//648 656//656 893//893 +f 648//648 893//893 886//886 +f 886//886 893//893 894//894 +f 886//886 894//894 887//887 +f 887//887 894//894 895//895 +f 887//887 895//895 888//888 +f 888//888 895//895 896//896 +f 888//888 896//896 889//889 +f 889//889 896//896 897//897 +f 889//889 897//897 890//890 +f 890//890 897//897 898//898 +f 890//890 898//898 891//891 +f 891//891 898//898 899//899 +f 891//891 899//899 892//892 +f 892//892 899//899 815//815 +f 656//656 664//664 900//900 +f 656//656 900//900 893//893 +f 893//893 900//900 901//901 +f 893//893 901//901 894//894 +f 894//894 901//901 902//902 +f 894//894 902//902 895//895 +f 895//895 902//902 903//903 +f 895//895 903//903 896//896 +f 896//896 903//903 904//904 +f 896//896 904//904 897//897 +f 897//897 904//904 905//905 +f 897//897 905//905 898//898 +f 898//898 905//905 906//906 +f 898//898 906//906 899//899 +f 899//899 906//906 815//815 +f 664//664 672//672 907//907 +f 664//664 907//907 900//900 +f 900//900 907//907 908//908 +f 900//900 908//908 901//901 +f 901//901 908//908 909//909 +f 901//901 909//909 902//902 +f 902//902 909//909 910//910 +f 902//902 910//910 903//903 +f 903//903 910//910 911//911 +f 903//903 911//911 904//904 +f 904//904 911//911 912//912 +f 904//904 912//912 905//905 +f 905//905 912//912 913//913 +f 905//905 913//913 906//906 +f 906//906 913//913 815//815 +f 672//672 680//680 914//914 +f 672//672 914//914 907//907 +f 907//907 914//914 915//915 +f 907//907 915//915 908//908 +f 908//908 915//915 916//916 +f 908//908 916//916 909//909 +f 909//909 916//916 917//917 +f 909//909 917//917 910//910 +f 910//910 917//917 918//918 +f 910//910 918//918 911//911 +f 911//911 918//918 919//919 +f 911//911 919//919 912//912 +f 912//912 919//919 920//920 +f 912//912 920//920 913//913 +f 913//913 920//920 815//815 +f 680//680 688//688 921//921 +f 680//680 921//921 914//914 +f 914//914 921//921 922//922 +f 914//914 922//922 915//915 +f 915//915 922//922 923//923 +f 915//915 923//923 916//916 +f 916//916 923//923 924//924 +f 916//916 924//924 917//917 +f 917//917 924//924 925//925 +f 917//917 925//925 918//918 +f 918//918 925//925 926//926 +f 918//918 926//926 919//919 +f 919//919 926//926 927//927 +f 919//919 927//927 920//920 +f 920//920 927//927 815//815 +f 688//688 696//696 928//928 +f 688//688 928//928 921//921 +f 921//921 928//928 929//929 +f 921//921 929//929 922//922 +f 922//922 929//929 930//930 +f 922//922 930//930 923//923 +f 923//923 930//930 931//931 +f 923//923 931//931 924//924 +f 924//924 931//931 932//932 +f 924//924 932//932 925//925 +f 925//925 932//932 933//933 +f 925//925 933//933 926//926 +f 926//926 933//933 934//934 +f 926//926 934//934 927//927 +f 927//927 934//934 815//815 +f 696//696 704//704 935//935 +f 696//696 935//935 928//928 +f 928//928 935//935 936//936 +f 928//928 936//936 929//929 +f 929//929 936//936 937//937 +f 929//929 937//937 930//930 +f 930//930 937//937 938//938 +f 930//930 938//938 931//931 +f 931//931 938//938 939//939 +f 931//931 939//939 932//932 +f 932//932 939//939 940//940 +f 932//932 940//940 933//933 +f 933//933 940//940 941//941 +f 933//933 941//941 934//934 +f 934//934 941//941 815//815 +f 704//704 712//712 942//942 +f 704//704 942//942 935//935 +f 935//935 942//942 943//943 +f 935//935 943//943 936//936 +f 936//936 943//943 944//944 +f 936//936 944//944 937//937 +f 937//937 944//944 945//945 +f 937//937 945//945 938//938 +f 938//938 945//945 946//946 +f 938//938 946//946 939//939 +f 939//939 946//946 947//947 +f 939//939 947//947 940//940 +f 940//940 947//947 948//948 +f 940//940 948//948 941//941 +f 941//941 948//948 815//815 +f 712//712 720//720 949//949 +f 712//712 949//949 942//942 +f 942//942 949//949 950//950 +f 942//942 950//950 943//943 +f 943//943 950//950 951//951 +f 943//943 951//951 944//944 +f 944//944 951//951 952//952 +f 944//944 952//952 945//945 +f 945//945 952//952 953//953 +f 945//945 953//953 946//946 +f 946//946 953//953 954//954 +f 946//946 954//954 947//947 +f 947//947 954//954 955//955 +f 947//947 955//955 948//948 +f 948//948 955//955 815//815 +f 720//720 728//728 956//956 +f 720//720 956//956 949//949 +f 949//949 956//956 957//957 +f 949//949 957//957 950//950 +f 950//950 957//957 958//958 +f 950//950 958//958 951//951 +f 951//951 958//958 959//959 +f 951//951 959//959 952//952 +f 952//952 959//959 960//960 +f 952//952 960//960 953//953 +f 953//953 960//960 961//961 +f 953//953 961//961 954//954 +f 954//954 961//961 962//962 +f 954//954 962//962 955//955 +f 955//955 962//962 815//815 +f 728//728 736//736 963//963 +f 728//728 963//963 956//956 +f 956//956 963//963 964//964 +f 956//956 964//964 957//957 +f 957//957 964//964 965//965 +f 957//957 965//965 958//958 +f 958//958 965//965 966//966 +f 958//958 966//966 959//959 +f 959//959 966//966 967//967 +f 959//959 967//967 960//960 +f 960//960 967//967 968//968 +f 960//960 968//968 961//961 +f 961//961 968//968 969//969 +f 961//961 969//969 962//962 +f 962//962 969//969 815//815 +f 736//736 744//744 970//970 +f 736//736 970//970 963//963 +f 963//963 970//970 971//971 +f 963//963 971//971 964//964 +f 964//964 971//971 972//972 +f 964//964 972//972 965//965 +f 965//965 972//972 973//973 +f 965//965 973//973 966//966 +f 966//966 973//973 974//974 +f 966//966 974//974 967//967 +f 967//967 974//974 975//975 +f 967//967 975//975 968//968 +f 968//968 975//975 976//976 +f 968//968 976//976 969//969 +f 969//969 976//976 815//815 +f 744//744 752//752 977//977 +f 744//744 977//977 970//970 +f 970//970 977//977 978//978 +f 970//970 978//978 971//971 +f 971//971 978//978 979//979 +f 971//971 979//979 972//972 +f 972//972 979//979 980//980 +f 972//972 980//980 973//973 +f 973//973 980//980 981//981 +f 973//973 981//981 974//974 +f 974//974 981//981 982//982 +f 974//974 982//982 975//975 +f 975//975 982//982 983//983 +f 975//975 983//983 976//976 +f 976//976 983//983 815//815 +f 752//752 760//760 984//984 +f 752//752 984//984 977//977 +f 977//977 984//984 985//985 +f 977//977 985//985 978//978 +f 978//978 985//985 986//986 +f 978//978 986//986 979//979 +f 979//979 986//986 987//987 +f 979//979 987//987 980//980 +f 980//980 987//987 988//988 +f 980//980 988//988 981//981 +f 981//981 988//988 989//989 +f 981//981 989//989 982//982 +f 982//982 989//989 990//990 +f 982//982 990//990 983//983 +f 983//983 990//990 815//815 +f 760//760 768//768 991//991 +f 760//760 991//991 984//984 +f 984//984 991//991 992//992 +f 984//984 992//992 985//985 +f 985//985 992//992 993//993 +f 985//985 993//993 986//986 +f 986//986 993//993 994//994 +f 986//986 994//994 987//987 +f 987//987 994//994 995//995 +f 987//987 995//995 988//988 +f 988//988 995//995 996//996 +f 988//988 996//996 989//989 +f 989//989 996//996 997//997 +f 989//989 997//997 990//990 +f 990//990 997//997 815//815 +f 768//768 776//776 998//998 +f 768//768 998//998 991//991 +f 991//991 998//998 999//999 +f 991//991 999//999 992//992 +f 992//992 999//999 1000//1000 +f 992//992 1000//1000 993//993 +f 993//993 1000//1000 1001//1001 +f 993//993 1001//1001 994//994 +f 994//994 1001//1001 1002//1002 +f 994//994 1002//1002 995//995 +f 995//995 1002//1002 1003//1003 +f 995//995 1003//1003 996//996 +f 996//996 1003//1003 1004//1004 +f 996//996 1004//1004 997//997 +f 997//997 1004//1004 815//815 +f 776//776 784//784 1005//1005 +f 776//776 1005//1005 998//998 +f 998//998 1005//1005 1006//1006 +f 998//998 1006//1006 999//999 +f 999//999 1006//1006 1007//1007 +f 999//999 1007//1007 1000//1000 +f 1000//1000 1007//1007 1008//1008 +f 1000//1000 1008//1008 1001//1001 +f 1001//1001 1008//1008 1009//1009 +f 1001//1001 1009//1009 1002//1002 +f 1002//1002 1009//1009 1010//1010 +f 1002//1002 1010//1010 1003//1003 +f 1003//1003 1010//1010 1011//1011 +f 1003//1003 1011//1011 1004//1004 +f 1004//1004 1011//1011 815//815 +f 784//784 792//792 1012//1012 +f 784//784 1012//1012 1005//1005 +f 1005//1005 1012//1012 1013//1013 +f 1005//1005 1013//1013 1006//1006 +f 1006//1006 1013//1013 1014//1014 +f 1006//1006 1014//1014 1007//1007 +f 1007//1007 1014//1014 1015//1015 +f 1007//1007 1015//1015 1008//1008 +f 1008//1008 1015//1015 1016//1016 +f 1008//1008 1016//1016 1009//1009 +f 1009//1009 1016//1016 1017//1017 +f 1009//1009 1017//1017 1010//1010 +f 1010//1010 1017//1017 1018//1018 +f 1010//1010 1018//1018 1011//1011 +f 1011//1011 1018//1018 815//815 +f 792//792 800//800 1019//1019 +f 792//792 1019//1019 1012//1012 +f 1012//1012 1019//1019 1020//1020 +f 1012//1012 1020//1020 1013//1013 +f 1013//1013 1020//1020 1021//1021 +f 1013//1013 1021//1021 1014//1014 +f 1014//1014 1021//1021 1022//1022 +f 1014//1014 1022//1022 1015//1015 +f 1015//1015 1022//1022 1023//1023 +f 1015//1015 1023//1023 1016//1016 +f 1016//1016 1023//1023 1024//1024 +f 1016//1016 1024//1024 1017//1017 +f 1017//1017 1024//1024 1025//1025 +f 1017//1017 1025//1025 1018//1018 +f 1018//1018 1025//1025 815//815 +f 800//800 560//560 802//802 +f 800//800 802//802 1019//1019 +f 1019//1019 802//802 804//804 +f 1019//1019 804//804 1020//1020 +f 1020//1020 804//804 806//806 +f 1020//1020 806//806 1021//1021 +f 1021//1021 806//806 808//808 +f 1021//1021 808//808 1022//1022 +f 1022//1022 808//808 810//810 +f 1022//1022 810//810 1023//1023 +f 1023//1023 810//810 812//812 +f 1023//1023 812//812 1024//1024 +f 1024//1024 812//812 814//814 +f 1024//1024 814//814 1025//1025 +f 1025//1025 814//814 815//815 +f 1026//1026 1027//1027 1028//1028 +f 1026//1026 1028//1028 1029//1029 +f 1029//1029 1028//1028 1030//1030 +f 1029//1029 1030//1030 1031//1031 +f 1031//1031 1030//1030 1032//1032 +f 1031//1031 1032//1032 1033//1033 +f 1033//1033 1032//1032 1034//1034 +f 1033//1033 1034//1034 1035//1035 +f 1035//1035 1034//1034 1036//1036 +f 1035//1035 1036//1036 1037//1037 +f 1037//1037 1036//1036 1038//1038 +f 1037//1037 1038//1038 1039//1039 +f 1039//1039 1038//1038 1040//1040 +f 1039//1039 1040//1040 1041//1041 +f 1041//1041 1040//1040 1042//1042 +f 1041//1041 1042//1042 1043//1043 +f 1027//1027 1044//1044 1045//1045 +f 1027//1027 1045//1045 1028//1028 +f 1028//1028 1045//1045 1046//1046 +f 1028//1028 1046//1046 1030//1030 +f 1030//1030 1046//1046 1047//1047 +f 1030//1030 1047//1047 1032//1032 +f 1032//1032 1047//1047 1048//1048 +f 1032//1032 1048//1048 1034//1034 +f 1034//1034 1048//1048 1049//1049 +f 1034//1034 1049//1049 1036//1036 +f 1036//1036 1049//1049 1050//1050 +f 1036//1036 1050//1050 1038//1038 +f 1038//1038 1050//1050 1051//1051 +f 1038//1038 1051//1051 1040//1040 +f 1040//1040 1051//1051 1052//1052 +f 1040//1040 1052//1052 1042//1042 +f 1044//1044 1053//1053 1054//1054 +f 1044//1044 1054//1054 1045//1045 +f 1045//1045 1054//1054 1055//1055 +f 1045//1045 1055//1055 1046//1046 +f 1046//1046 1055//1055 1056//1056 +f 1046//1046 1056//1056 1047//1047 +f 1047//1047 1056//1056 1057//1057 +f 1047//1047 1057//1057 1048//1048 +f 1048//1048 1057//1057 1058//1058 +f 1048//1048 1058//1058 1049//1049 +f 1049//1049 1058//1058 1059//1059 +f 1049//1049 1059//1059 1050//1050 +f 1050//1050 1059//1059 1060//1060 +f 1050//1050 1060//1060 1051//1051 +f 1051//1051 1060//1060 1061//1061 +f 1051//1051 1061//1061 1052//1052 +f 1053//1053 1062//1062 1063//1063 +f 1053//1053 1063//1063 1054//1054 +f 1054//1054 1063//1063 1064//1064 +f 1054//1054 1064//1064 1055//1055 +f 1055//1055 1064//1064 1065//1065 +f 1055//1055 1065//1065 1056//1056 +f 1056//1056 1065//1065 1066//1066 +f 1056//1056 1066//1066 1057//1057 +f 1057//1057 1066//1066 1067//1067 +f 1057//1057 1067//1067 1058//1058 +f 1058//1058 1067//1067 1068//1068 +f 1058//1058 1068//1068 1059//1059 +f 1059//1059 1068//1068 1069//1069 +f 1059//1059 1069//1069 1060//1060 +f 1060//1060 1069//1069 1070//1070 +f 1060//1060 1070//1070 1061//1061 +f 1062//1062 1071//1071 1072//1072 +f 1062//1062 1072//1072 1063//1063 +f 1063//1063 1072//1072 1073//1073 +f 1063//1063 1073//1073 1064//1064 +f 1064//1064 1073//1073 1074//1074 +f 1064//1064 1074//1074 1065//1065 +f 1065//1065 1074//1074 1075//1075 +f 1065//1065 1075//1075 1066//1066 +f 1066//1066 1075//1075 1076//1076 +f 1066//1066 1076//1076 1067//1067 +f 1067//1067 1076//1076 1077//1077 +f 1067//1067 1077//1077 1068//1068 +f 1068//1068 1077//1077 1078//1078 +f 1068//1068 1078//1078 1069//1069 +f 1069//1069 1078//1078 1079//1079 +f 1069//1069 1079//1079 1070//1070 +f 1071//1071 1080//1080 1081//1081 +f 1071//1071 1081//1081 1072//1072 +f 1072//1072 1081//1081 1082//1082 +f 1072//1072 1082//1082 1073//1073 +f 1073//1073 1082//1082 1083//1083 +f 1073//1073 1083//1083 1074//1074 +f 1074//1074 1083//1083 1084//1084 +f 1074//1074 1084//1084 1075//1075 +f 1075//1075 1084//1084 1085//1085 +f 1075//1075 1085//1085 1076//1076 +f 1076//1076 1085//1085 1086//1086 +f 1076//1076 1086//1086 1077//1077 +f 1077//1077 1086//1086 1087//1087 +f 1077//1077 1087//1087 1078//1078 +f 1078//1078 1087//1087 1088//1088 +f 1078//1078 1088//1088 1079//1079 +f 1080//1080 1089//1089 1090//1090 +f 1080//1080 1090//1090 1081//1081 +f 1081//1081 1090//1090 1091//1091 +f 1081//1081 1091//1091 1082//1082 +f 1082//1082 1091//1091 1092//1092 +f 1082//1082 1092//1092 1083//1083 +f 1083//1083 1092//1092 1093//1093 +f 1083//1083 1093//1093 1084//1084 +f 1084//1084 1093//1093 1094//1094 +f 1084//1084 1094//1094 1085//1085 +f 1085//1085 1094//1094 1095//1095 +f 1085//1085 1095//1095 1086//1086 +f 1086//1086 1095//1095 1096//1096 +f 1086//1086 1096//1096 1087//1087 +f 1087//1087 1096//1096 1097//1097 +f 1087//1087 1097//1097 1088//1088 +f 1089//1089 1098//1098 1099//1099 +f 1089//1089 1099//1099 1090//1090 +f 1090//1090 1099//1099 1100//1100 +f 1090//1090 1100//1100 1091//1091 +f 1091//1091 1100//1100 1101//1101 +f 1091//1091 1101//1101 1092//1092 +f 1092//1092 1101//1101 1102//1102 +f 1092//1092 1102//1102 1093//1093 +f 1093//1093 1102//1102 1103//1103 +f 1093//1093 1103//1103 1094//1094 +f 1094//1094 1103//1103 1104//1104 +f 1094//1094 1104//1104 1095//1095 +f 1095//1095 1104//1104 1105//1105 +f 1095//1095 1105//1105 1096//1096 +f 1096//1096 1105//1105 1106//1106 +f 1096//1096 1106//1106 1097//1097 +f 1098//1098 1107//1107 1108//1108 +f 1098//1098 1108//1108 1099//1099 +f 1099//1099 1108//1108 1109//1109 +f 1099//1099 1109//1109 1100//1100 +f 1100//1100 1109//1109 1110//1110 +f 1100//1100 1110//1110 1101//1101 +f 1101//1101 1110//1110 1111//1111 +f 1101//1101 1111//1111 1102//1102 +f 1102//1102 1111//1111 1112//1112 +f 1102//1102 1112//1112 1103//1103 +f 1103//1103 1112//1112 1113//1113 +f 1103//1103 1113//1113 1104//1104 +f 1104//1104 1113//1113 1114//1114 +f 1104//1104 1114//1114 1105//1105 +f 1105//1105 1114//1114 1115//1115 +f 1105//1105 1115//1115 1106//1106 +f 1107//1107 1116//1116 1117//1117 +f 1107//1107 1117//1117 1108//1108 +f 1108//1108 1117//1117 1118//1118 +f 1108//1108 1118//1118 1109//1109 +f 1109//1109 1118//1118 1119//1119 +f 1109//1109 1119//1119 1110//1110 +f 1110//1110 1119//1119 1120//1120 +f 1110//1110 1120//1120 1111//1111 +f 1111//1111 1120//1120 1121//1121 +f 1111//1111 1121//1121 1112//1112 +f 1112//1112 1121//1121 1122//1122 +f 1112//1112 1122//1122 1113//1113 +f 1113//1113 1122//1122 1123//1123 +f 1113//1113 1123//1123 1114//1114 +f 1114//1114 1123//1123 1124//1124 +f 1114//1114 1124//1124 1115//1115 +f 1116//1116 1125//1125 1126//1126 +f 1116//1116 1126//1126 1117//1117 +f 1117//1117 1126//1126 1127//1127 +f 1117//1117 1127//1127 1118//1118 +f 1118//1118 1127//1127 1128//1128 +f 1118//1118 1128//1128 1119//1119 +f 1119//1119 1128//1128 1129//1129 +f 1119//1119 1129//1129 1120//1120 +f 1120//1120 1129//1129 1130//1130 +f 1120//1120 1130//1130 1121//1121 +f 1121//1121 1130//1130 1131//1131 +f 1121//1121 1131//1131 1122//1122 +f 1122//1122 1131//1131 1132//1132 +f 1122//1122 1132//1132 1123//1123 +f 1123//1123 1132//1132 1133//1133 +f 1123//1123 1133//1133 1124//1124 +f 1125//1125 1134//1134 1135//1135 +f 1125//1125 1135//1135 1126//1126 +f 1126//1126 1135//1135 1136//1136 +f 1126//1126 1136//1136 1127//1127 +f 1127//1127 1136//1136 1137//1137 +f 1127//1127 1137//1137 1128//1128 +f 1128//1128 1137//1137 1138//1138 +f 1128//1128 1138//1138 1129//1129 +f 1129//1129 1138//1138 1139//1139 +f 1129//1129 1139//1139 1130//1130 +f 1130//1130 1139//1139 1140//1140 +f 1130//1130 1140//1140 1131//1131 +f 1131//1131 1140//1140 1141//1141 +f 1131//1131 1141//1141 1132//1132 +f 1132//1132 1141//1141 1142//1142 +f 1132//1132 1142//1142 1133//1133 +f 1134//1134 1143//1143 1144//1144 +f 1134//1134 1144//1144 1135//1135 +f 1135//1135 1144//1144 1145//1145 +f 1135//1135 1145//1145 1136//1136 +f 1136//1136 1145//1145 1146//1146 +f 1136//1136 1146//1146 1137//1137 +f 1137//1137 1146//1146 1147//1147 +f 1137//1137 1147//1147 1138//1138 +f 1138//1138 1147//1147 1148//1148 +f 1138//1138 1148//1148 1139//1139 +f 1139//1139 1148//1148 1149//1149 +f 1139//1139 1149//1149 1140//1140 +f 1140//1140 1149//1149 1150//1150 +f 1140//1140 1150//1150 1141//1141 +f 1141//1141 1150//1150 1151//1151 +f 1141//1141 1151//1151 1142//1142 +f 1143//1143 1152//1152 1153//1153 +f 1143//1143 1153//1153 1144//1144 +f 1144//1144 1153//1153 1154//1154 +f 1144//1144 1154//1154 1145//1145 +f 1145//1145 1154//1154 1155//1155 +f 1145//1145 1155//1155 1146//1146 +f 1146//1146 1155//1155 1156//1156 +f 1146//1146 1156//1156 1147//1147 +f 1147//1147 1156//1156 1157//1157 +f 1147//1147 1157//1157 1148//1148 +f 1148//1148 1157//1157 1158//1158 +f 1148//1148 1158//1158 1149//1149 +f 1149//1149 1158//1158 1159//1159 +f 1149//1149 1159//1159 1150//1150 +f 1150//1150 1159//1159 1160//1160 +f 1150//1150 1160//1160 1151//1151 +f 1152//1152 1161//1161 1162//1162 +f 1152//1152 1162//1162 1153//1153 +f 1153//1153 1162//1162 1163//1163 +f 1153//1153 1163//1163 1154//1154 +f 1154//1154 1163//1163 1164//1164 +f 1154//1154 1164//1164 1155//1155 +f 1155//1155 1164//1164 1165//1165 +f 1155//1155 1165//1165 1156//1156 +f 1156//1156 1165//1165 1166//1166 +f 1156//1156 1166//1166 1157//1157 +f 1157//1157 1166//1166 1167//1167 +f 1157//1157 1167//1167 1158//1158 +f 1158//1158 1167//1167 1168//1168 +f 1158//1158 1168//1168 1159//1159 +f 1159//1159 1168//1168 1169//1169 +f 1159//1159 1169//1169 1160//1160 +f 1161//1161 1026//1026 1029//1029 +f 1161//1161 1029//1029 1162//1162 +f 1162//1162 1029//1029 1031//1031 +f 1162//1162 1031//1031 1163//1163 +f 1163//1163 1031//1031 1033//1033 +f 1163//1163 1033//1033 1164//1164 +f 1164//1164 1033//1033 1035//1035 +f 1164//1164 1035//1035 1165//1165 +f 1165//1165 1035//1035 1037//1037 +f 1165//1165 1037//1037 1166//1166 +f 1166//1166 1037//1037 1039//1039 +f 1166//1166 1039//1039 1167//1167 +f 1167//1167 1039//1039 1041//1041 +f 1167//1167 1041//1041 1168//1168 +f 1168//1168 1041//1041 1043//1043 +f 1168//1168 1043//1043 1169//1169 +f 1043//1043 1042//1042 1170//1170 +f 1043//1043 1170//1170 1171//1171 +f 1171//1171 1170//1170 1172//1172 +f 1171//1171 1172//1172 1173//1173 +f 1173//1173 1172//1172 1174//1174 +f 1173//1173 1174//1174 1175//1175 +f 1175//1175 1174//1174 1176//1176 +f 1175//1175 1176//1176 1177//1177 +f 1177//1177 1176//1176 1178//1178 +f 1177//1177 1178//1178 1179//1179 +f 1179//1179 1178//1178 1180//1180 +f 1179//1179 1180//1180 1181//1181 +f 1181//1181 1180//1180 1182//1182 +f 1181//1181 1182//1182 1183//1183 +f 1183//1183 1182//1182 1184//1184 +f 1183//1183 1184//1184 424//424 +f 1042//1042 1052//1052 1185//1185 +f 1042//1042 1185//1185 1170//1170 +f 1170//1170 1185//1185 1186//1186 +f 1170//1170 1186//1186 1172//1172 +f 1172//1172 1186//1186 1187//1187 +f 1172//1172 1187//1187 1174//1174 +f 1174//1174 1187//1187 1188//1188 +f 1174//1174 1188//1188 1176//1176 +f 1176//1176 1188//1188 1189//1189 +f 1176//1176 1189//1189 1178//1178 +f 1178//1178 1189//1189 1190//1190 +f 1178//1178 1190//1190 1180//1180 +f 1180//1180 1190//1190 1191//1191 +f 1180//1180 1191//1191 1182//1182 +f 1182//1182 1191//1191 1192//1192 +f 1182//1182 1192//1192 1184//1184 +f 1052//1052 1061//1061 1193//1193 +f 1052//1052 1193//1193 1185//1185 +f 1185//1185 1193//1193 1194//1194 +f 1185//1185 1194//1194 1186//1186 +f 1186//1186 1194//1194 1195//1195 +f 1186//1186 1195//1195 1187//1187 +f 1187//1187 1195//1195 1196//1196 +f 1187//1187 1196//1196 1188//1188 +f 1188//1188 1196//1196 1197//1197 +f 1188//1188 1197//1197 1189//1189 +f 1189//1189 1197//1197 1198//1198 +f 1189//1189 1198//1198 1190//1190 +f 1190//1190 1198//1198 1199//1199 +f 1190//1190 1199//1199 1191//1191 +f 1191//1191 1199//1199 1200//1200 +f 1191//1191 1200//1200 1192//1192 +f 1061//1061 1070//1070 1201//1201 +f 1061//1061 1201//1201 1193//1193 +f 1193//1193 1201//1201 1202//1202 +f 1193//1193 1202//1202 1194//1194 +f 1194//1194 1202//1202 1203//1203 +f 1194//1194 1203//1203 1195//1195 +f 1195//1195 1203//1203 1204//1204 +f 1195//1195 1204//1204 1196//1196 +f 1196//1196 1204//1204 1205//1205 +f 1196//1196 1205//1205 1197//1197 +f 1197//1197 1205//1205 1206//1206 +f 1197//1197 1206//1206 1198//1198 +f 1198//1198 1206//1206 1207//1207 +f 1198//1198 1207//1207 1199//1199 +f 1199//1199 1207//1207 1208//1208 +f 1199//1199 1208//1208 1200//1200 +f 1070//1070 1079//1079 1209//1209 +f 1070//1070 1209//1209 1201//1201 +f 1201//1201 1209//1209 1210//1210 +f 1201//1201 1210//1210 1202//1202 +f 1202//1202 1210//1210 1211//1211 +f 1202//1202 1211//1211 1203//1203 +f 1203//1203 1211//1211 1212//1212 +f 1203//1203 1212//1212 1204//1204 +f 1204//1204 1212//1212 1213//1213 +f 1204//1204 1213//1213 1205//1205 +f 1205//1205 1213//1213 1214//1214 +f 1205//1205 1214//1214 1206//1206 +f 1206//1206 1214//1214 1215//1215 +f 1206//1206 1215//1215 1207//1207 +f 1207//1207 1215//1215 1216//1216 +f 1207//1207 1216//1216 1208//1208 +f 1079//1079 1088//1088 1217//1217 +f 1079//1079 1217//1217 1209//1209 +f 1209//1209 1217//1217 1218//1218 +f 1209//1209 1218//1218 1210//1210 +f 1210//1210 1218//1218 1219//1219 +f 1210//1210 1219//1219 1211//1211 +f 1211//1211 1219//1219 1220//1220 +f 1211//1211 1220//1220 1212//1212 +f 1212//1212 1220//1220 1221//1221 +f 1212//1212 1221//1221 1213//1213 +f 1213//1213 1221//1221 1222//1222 +f 1213//1213 1222//1222 1214//1214 +f 1214//1214 1222//1222 1223//1223 +f 1214//1214 1223//1223 1215//1215 +f 1215//1215 1223//1223 1224//1224 +f 1215//1215 1224//1224 1216//1216 +f 1088//1088 1097//1097 1225//1225 +f 1088//1088 1225//1225 1217//1217 +f 1217//1217 1225//1225 1226//1226 +f 1217//1217 1226//1226 1218//1218 +f 1218//1218 1226//1226 1227//1227 +f 1218//1218 1227//1227 1219//1219 +f 1219//1219 1227//1227 1228//1228 +f 1219//1219 1228//1228 1220//1220 +f 1220//1220 1228//1228 1229//1229 +f 1220//1220 1229//1229 1221//1221 +f 1221//1221 1229//1229 1230//1230 +f 1221//1221 1230//1230 1222//1222 +f 1222//1222 1230//1230 1231//1231 +f 1222//1222 1231//1231 1223//1223 +f 1223//1223 1231//1231 1232//1232 +f 1223//1223 1232//1232 1224//1224 +f 1097//1097 1106//1106 1233//1233 +f 1097//1097 1233//1233 1225//1225 +f 1225//1225 1233//1233 1234//1234 +f 1225//1225 1234//1234 1226//1226 +f 1226//1226 1234//1234 1235//1235 +f 1226//1226 1235//1235 1227//1227 +f 1227//1227 1235//1235 1236//1236 +f 1227//1227 1236//1236 1228//1228 +f 1228//1228 1236//1236 1237//1237 +f 1228//1228 1237//1237 1229//1229 +f 1229//1229 1237//1237 1238//1238 +f 1229//1229 1238//1238 1230//1230 +f 1230//1230 1238//1238 1239//1239 +f 1230//1230 1239//1239 1231//1231 +f 1231//1231 1239//1239 1240//1240 +f 1231//1231 1240//1240 1232//1232 +f 1106//1106 1115//1115 1241//1241 +f 1106//1106 1241//1241 1233//1233 +f 1233//1233 1241//1241 1242//1242 +f 1233//1233 1242//1242 1234//1234 +f 1234//1234 1242//1242 1243//1243 +f 1234//1234 1243//1243 1235//1235 +f 1235//1235 1243//1243 1244//1244 +f 1235//1235 1244//1244 1236//1236 +f 1236//1236 1244//1244 1245//1245 +f 1236//1236 1245//1245 1237//1237 +f 1237//1237 1245//1245 1246//1246 +f 1237//1237 1246//1246 1238//1238 +f 1238//1238 1246//1246 1247//1247 +f 1238//1238 1247//1247 1239//1239 +f 1239//1239 1247//1247 1248//1248 +f 1239//1239 1248//1248 1240//1240 +f 1115//1115 1124//1124 1249//1249 +f 1115//1115 1249//1249 1241//1241 +f 1241//1241 1249//1249 1250//1250 +f 1241//1241 1250//1250 1242//1242 +f 1242//1242 1250//1250 1251//1251 +f 1242//1242 1251//1251 1243//1243 +f 1243//1243 1251//1251 1252//1252 +f 1243//1243 1252//1252 1244//1244 +f 1244//1244 1252//1252 1253//1253 +f 1244//1244 1253//1253 1245//1245 +f 1245//1245 1253//1253 1254//1254 +f 1245//1245 1254//1254 1246//1246 +f 1246//1246 1254//1254 1255//1255 +f 1246//1246 1255//1255 1247//1247 +f 1247//1247 1255//1255 1256//1256 +f 1247//1247 1256//1256 1248//1248 +f 1124//1124 1133//1133 1257//1257 +f 1124//1124 1257//1257 1249//1249 +f 1249//1249 1257//1257 1258//1258 +f 1249//1249 1258//1258 1250//1250 +f 1250//1250 1258//1258 1259//1259 +f 1250//1250 1259//1259 1251//1251 +f 1251//1251 1259//1259 1260//1260 +f 1251//1251 1260//1260 1252//1252 +f 1252//1252 1260//1260 1261//1261 +f 1252//1252 1261//1261 1253//1253 +f 1253//1253 1261//1261 1262//1262 +f 1253//1253 1262//1262 1254//1254 +f 1254//1254 1262//1262 1263//1263 +f 1254//1254 1263//1263 1255//1255 +f 1255//1255 1263//1263 1264//1264 +f 1255//1255 1264//1264 1256//1256 +f 1133//1133 1142//1142 1265//1265 +f 1133//1133 1265//1265 1257//1257 +f 1257//1257 1265//1265 1266//1266 +f 1257//1257 1266//1266 1258//1258 +f 1258//1258 1266//1266 1267//1267 +f 1258//1258 1267//1267 1259//1259 +f 1259//1259 1267//1267 1268//1268 +f 1259//1259 1268//1268 1260//1260 +f 1260//1260 1268//1268 1269//1269 +f 1260//1260 1269//1269 1261//1261 +f 1261//1261 1269//1269 1270//1270 +f 1261//1261 1270//1270 1262//1262 +f 1262//1262 1270//1270 1271//1271 +f 1262//1262 1271//1271 1263//1263 +f 1263//1263 1271//1271 1272//1272 +f 1263//1263 1272//1272 1264//1264 +f 1142//1142 1151//1151 1273//1273 +f 1142//1142 1273//1273 1265//1265 +f 1265//1265 1273//1273 1274//1274 +f 1265//1265 1274//1274 1266//1266 +f 1266//1266 1274//1274 1275//1275 +f 1266//1266 1275//1275 1267//1267 +f 1267//1267 1275//1275 1276//1276 +f 1267//1267 1276//1276 1268//1268 +f 1268//1268 1276//1276 1277//1277 +f 1268//1268 1277//1277 1269//1269 +f 1269//1269 1277//1277 1278//1278 +f 1269//1269 1278//1278 1270//1270 +f 1270//1270 1278//1278 1279//1279 +f 1270//1270 1279//1279 1271//1271 +f 1271//1271 1279//1279 1280//1280 +f 1271//1271 1280//1280 1272//1272 +f 1151//1151 1160//1160 1281//1281 +f 1151//1151 1281//1281 1273//1273 +f 1273//1273 1281//1281 1282//1282 +f 1273//1273 1282//1282 1274//1274 +f 1274//1274 1282//1282 1283//1283 +f 1274//1274 1283//1283 1275//1275 +f 1275//1275 1283//1283 1284//1284 +f 1275//1275 1284//1284 1276//1276 +f 1276//1276 1284//1284 1285//1285 +f 1276//1276 1285//1285 1277//1277 +f 1277//1277 1285//1285 1286//1286 +f 1277//1277 1286//1286 1278//1278 +f 1278//1278 1286//1286 1287//1287 +f 1278//1278 1287//1287 1279//1279 +f 1279//1279 1287//1287 1288//1288 +f 1279//1279 1288//1288 1280//1280 +f 1160//1160 1169//1169 1289//1289 +f 1160//1160 1289//1289 1281//1281 +f 1281//1281 1289//1289 1290//1290 +f 1281//1281 1290//1290 1282//1282 +f 1282//1282 1290//1290 1291//1291 +f 1282//1282 1291//1291 1283//1283 +f 1283//1283 1291//1291 1292//1292 +f 1283//1283 1292//1292 1284//1284 +f 1284//1284 1292//1292 1293//1293 +f 1284//1284 1293//1293 1285//1285 +f 1285//1285 1293//1293 1294//1294 +f 1285//1285 1294//1294 1286//1286 +f 1286//1286 1294//1294 1295//1295 +f 1286//1286 1295//1295 1287//1287 +f 1287//1287 1295//1295 1296//1296 +f 1287//1287 1296//1296 1288//1288 +f 1169//1169 1043//1043 1171//1171 +f 1169//1169 1171//1171 1289//1289 +f 1289//1289 1171//1171 1173//1173 +f 1289//1289 1173//1173 1290//1290 +f 1290//1290 1173//1173 1175//1175 +f 1290//1290 1175//1175 1291//1291 +f 1291//1291 1175//1175 1177//1177 +f 1291//1291 1177//1177 1292//1292 +f 1292//1292 1177//1177 1179//1179 +f 1292//1292 1179//1179 1293//1293 +f 1293//1293 1179//1179 1181//1181 +f 1293//1293 1181//1181 1294//1294 +f 1294//1294 1181//1181 1183//1183 +f 1294//1294 1183//1183 1295//1295 +f 1295//1295 1183//1183 424//424 +f 1295//1295 424//424 1296//1296 +f 1297//1297 1298//1298 1299//1299 +f 1297//1297 1299//1299 1300//1300 +f 1300//1300 1299//1299 1301//1301 +f 1300//1300 1301//1301 1302//1302 +f 1302//1302 1301//1301 1303//1303 +f 1302//1302 1303//1303 1304//1304 +f 1304//1304 1303//1303 1305//1305 +f 1304//1304 1305//1305 1306//1306 +f 1306//1306 1305//1305 1307//1307 +f 1306//1306 1307//1307 1308//1308 +f 1308//1308 1307//1307 1309//1309 +f 1308//1308 1309//1309 1310//1310 +f 1310//1310 1309//1309 1311//1311 +f 1310//1310 1311//1311 1312//1312 +f 1312//1312 1311//1311 1313//1313 +f 1312//1312 1313//1313 1314//1314 +f 1298//1298 1315//1315 1316//1316 +f 1298//1298 1316//1316 1299//1299 +f 1299//1299 1316//1316 1317//1317 +f 1299//1299 1317//1317 1301//1301 +f 1301//1301 1317//1317 1318//1318 +f 1301//1301 1318//1318 1303//1303 +f 1303//1303 1318//1318 1319//1319 +f 1303//1303 1319//1319 1305//1305 +f 1305//1305 1319//1319 1320//1320 +f 1305//1305 1320//1320 1307//1307 +f 1307//1307 1320//1320 1321//1321 +f 1307//1307 1321//1321 1309//1309 +f 1309//1309 1321//1321 1322//1322 +f 1309//1309 1322//1322 1311//1311 +f 1311//1311 1322//1322 1323//1323 +f 1311//1311 1323//1323 1313//1313 +f 1315//1315 1324//1324 1325//1325 +f 1315//1315 1325//1325 1316//1316 +f 1316//1316 1325//1325 1326//1326 +f 1316//1316 1326//1326 1317//1317 +f 1317//1317 1326//1326 1327//1327 +f 1317//1317 1327//1327 1318//1318 +f 1318//1318 1327//1327 1328//1328 +f 1318//1318 1328//1328 1319//1319 +f 1319//1319 1328//1328 1329//1329 +f 1319//1319 1329//1329 1320//1320 +f 1320//1320 1329//1329 1330//1330 +f 1320//1320 1330//1330 1321//1321 +f 1321//1321 1330//1330 1331//1331 +f 1321//1321 1331//1331 1322//1322 +f 1322//1322 1331//1331 1332//1332 +f 1322//1322 1332//1332 1323//1323 +f 1324//1324 1333//1333 1334//1334 +f 1324//1324 1334//1334 1325//1325 +f 1325//1325 1334//1334 1335//1335 +f 1325//1325 1335//1335 1326//1326 +f 1326//1326 1335//1335 1336//1336 +f 1326//1326 1336//1336 1327//1327 +f 1327//1327 1336//1336 1337//1337 +f 1327//1327 1337//1337 1328//1328 +f 1328//1328 1337//1337 1338//1338 +f 1328//1328 1338//1338 1329//1329 +f 1329//1329 1338//1338 1339//1339 +f 1329//1329 1339//1339 1330//1330 +f 1330//1330 1339//1339 1340//1340 +f 1330//1330 1340//1340 1331//1331 +f 1331//1331 1340//1340 1341//1341 +f 1331//1331 1341//1341 1332//1332 +f 1333//1333 1342//1342 1343//1343 +f 1333//1333 1343//1343 1334//1334 +f 1334//1334 1343//1343 1344//1344 +f 1334//1334 1344//1344 1335//1335 +f 1335//1335 1344//1344 1345//1345 +f 1335//1335 1345//1345 1336//1336 +f 1336//1336 1345//1345 1346//1346 +f 1336//1336 1346//1346 1337//1337 +f 1337//1337 1346//1346 1347//1347 +f 1337//1337 1347//1347 1338//1338 +f 1338//1338 1347//1347 1348//1348 +f 1338//1338 1348//1348 1339//1339 +f 1339//1339 1348//1348 1349//1349 +f 1339//1339 1349//1349 1340//1340 +f 1340//1340 1349//1349 1350//1350 +f 1340//1340 1350//1350 1341//1341 +f 1342//1342 1351//1351 1352//1352 +f 1342//1342 1352//1352 1343//1343 +f 1343//1343 1352//1352 1353//1353 +f 1343//1343 1353//1353 1344//1344 +f 1344//1344 1353//1353 1354//1354 +f 1344//1344 1354//1354 1345//1345 +f 1345//1345 1354//1354 1355//1355 +f 1345//1345 1355//1355 1346//1346 +f 1346//1346 1355//1355 1356//1356 +f 1346//1346 1356//1356 1347//1347 +f 1347//1347 1356//1356 1357//1357 +f 1347//1347 1357//1357 1348//1348 +f 1348//1348 1357//1357 1358//1358 +f 1348//1348 1358//1358 1349//1349 +f 1349//1349 1358//1358 1359//1359 +f 1349//1349 1359//1359 1350//1350 +f 1351//1351 1360//1360 1361//1361 +f 1351//1351 1361//1361 1352//1352 +f 1352//1352 1361//1361 1362//1362 +f 1352//1352 1362//1362 1353//1353 +f 1353//1353 1362//1362 1363//1363 +f 1353//1353 1363//1363 1354//1354 +f 1354//1354 1363//1363 1364//1364 +f 1354//1354 1364//1364 1355//1355 +f 1355//1355 1364//1364 1365//1365 +f 1355//1355 1365//1365 1356//1356 +f 1356//1356 1365//1365 1366//1366 +f 1356//1356 1366//1366 1357//1357 +f 1357//1357 1366//1366 1367//1367 +f 1357//1357 1367//1367 1358//1358 +f 1358//1358 1367//1367 1368//1368 +f 1358//1358 1368//1368 1359//1359 +f 1360//1360 1369//1369 1370//1370 +f 1360//1360 1370//1370 1361//1361 +f 1361//1361 1370//1370 1371//1371 +f 1361//1361 1371//1371 1362//1362 +f 1362//1362 1371//1371 1372//1372 +f 1362//1362 1372//1372 1363//1363 +f 1363//1363 1372//1372 1373//1373 +f 1363//1363 1373//1373 1364//1364 +f 1364//1364 1373//1373 1374//1374 +f 1364//1364 1374//1374 1365//1365 +f 1365//1365 1374//1374 1375//1375 +f 1365//1365 1375//1375 1366//1366 +f 1366//1366 1375//1375 1376//1376 +f 1366//1366 1376//1376 1367//1367 +f 1367//1367 1376//1376 1377//1377 +f 1367//1367 1377//1377 1368//1368 +f 1369//1369 1378//1378 1379//1379 +f 1369//1369 1379//1379 1370//1370 +f 1370//1370 1379//1379 1380//1380 +f 1370//1370 1380//1380 1371//1371 +f 1371//1371 1380//1380 1381//1381 +f 1371//1371 1381//1381 1372//1372 +f 1372//1372 1381//1381 1382//1382 +f 1372//1372 1382//1382 1373//1373 +f 1373//1373 1382//1382 1383//1383 +f 1373//1373 1383//1383 1374//1374 +f 1374//1374 1383//1383 1384//1384 +f 1374//1374 1384//1384 1375//1375 +f 1375//1375 1384//1384 1385//1385 +f 1375//1375 1385//1385 1376//1376 +f 1376//1376 1385//1385 1386//1386 +f 1376//1376 1386//1386 1377//1377 +f 1378//1378 1387//1387 1388//1388 +f 1378//1378 1388//1388 1379//1379 +f 1379//1379 1388//1388 1389//1389 +f 1379//1379 1389//1389 1380//1380 +f 1380//1380 1389//1389 1390//1390 +f 1380//1380 1390//1390 1381//1381 +f 1381//1381 1390//1390 1391//1391 +f 1381//1381 1391//1391 1382//1382 +f 1382//1382 1391//1391 1392//1392 +f 1382//1382 1392//1392 1383//1383 +f 1383//1383 1392//1392 1393//1393 +f 1383//1383 1393//1393 1384//1384 +f 1384//1384 1393//1393 1394//1394 +f 1384//1384 1394//1394 1385//1385 +f 1385//1385 1394//1394 1395//1395 +f 1385//1385 1395//1395 1386//1386 +f 1387//1387 1396//1396 1397//1397 +f 1387//1387 1397//1397 1388//1388 +f 1388//1388 1397//1397 1398//1398 +f 1388//1388 1398//1398 1389//1389 +f 1389//1389 1398//1398 1399//1399 +f 1389//1389 1399//1399 1390//1390 +f 1390//1390 1399//1399 1400//1400 +f 1390//1390 1400//1400 1391//1391 +f 1391//1391 1400//1400 1401//1401 +f 1391//1391 1401//1401 1392//1392 +f 1392//1392 1401//1401 1402//1402 +f 1392//1392 1402//1402 1393//1393 +f 1393//1393 1402//1402 1403//1403 +f 1393//1393 1403//1403 1394//1394 +f 1394//1394 1403//1403 1404//1404 +f 1394//1394 1404//1404 1395//1395 +f 1396//1396 1405//1405 1406//1406 +f 1396//1396 1406//1406 1397//1397 +f 1397//1397 1406//1406 1407//1407 +f 1397//1397 1407//1407 1398//1398 +f 1398//1398 1407//1407 1408//1408 +f 1398//1398 1408//1408 1399//1399 +f 1399//1399 1408//1408 1409//1409 +f 1399//1399 1409//1409 1400//1400 +f 1400//1400 1409//1409 1410//1410 +f 1400//1400 1410//1410 1401//1401 +f 1401//1401 1410//1410 1411//1411 +f 1401//1401 1411//1411 1402//1402 +f 1402//1402 1411//1411 1412//1412 +f 1402//1402 1412//1412 1403//1403 +f 1403//1403 1412//1412 1413//1413 +f 1403//1403 1413//1413 1404//1404 +f 1405//1405 1414//1414 1415//1415 +f 1405//1405 1415//1415 1406//1406 +f 1406//1406 1415//1415 1416//1416 +f 1406//1406 1416//1416 1407//1407 +f 1407//1407 1416//1416 1417//1417 +f 1407//1407 1417//1417 1408//1408 +f 1408//1408 1417//1417 1418//1418 +f 1408//1408 1418//1418 1409//1409 +f 1409//1409 1418//1418 1419//1419 +f 1409//1409 1419//1419 1410//1410 +f 1410//1410 1419//1419 1420//1420 +f 1410//1410 1420//1420 1411//1411 +f 1411//1411 1420//1420 1421//1421 +f 1411//1411 1421//1421 1412//1412 +f 1412//1412 1421//1421 1422//1422 +f 1412//1412 1422//1422 1413//1413 +f 1414//1414 1423//1423 1424//1424 +f 1414//1414 1424//1424 1415//1415 +f 1415//1415 1424//1424 1425//1425 +f 1415//1415 1425//1425 1416//1416 +f 1416//1416 1425//1425 1426//1426 +f 1416//1416 1426//1426 1417//1417 +f 1417//1417 1426//1426 1427//1427 +f 1417//1417 1427//1427 1418//1418 +f 1418//1418 1427//1427 1428//1428 +f 1418//1418 1428//1428 1419//1419 +f 1419//1419 1428//1428 1429//1429 +f 1419//1419 1429//1429 1420//1420 +f 1420//1420 1429//1429 1430//1430 +f 1420//1420 1430//1430 1421//1421 +f 1421//1421 1430//1430 1431//1431 +f 1421//1421 1431//1431 1422//1422 +f 1423//1423 1432//1432 1433//1433 +f 1423//1423 1433//1433 1424//1424 +f 1424//1424 1433//1433 1434//1434 +f 1424//1424 1434//1434 1425//1425 +f 1425//1425 1434//1434 1435//1435 +f 1425//1425 1435//1435 1426//1426 +f 1426//1426 1435//1435 1436//1436 +f 1426//1426 1436//1436 1427//1427 +f 1427//1427 1436//1436 1437//1437 +f 1427//1427 1437//1437 1428//1428 +f 1428//1428 1437//1437 1438//1438 +f 1428//1428 1438//1438 1429//1429 +f 1429//1429 1438//1438 1439//1439 +f 1429//1429 1439//1439 1430//1430 +f 1430//1430 1439//1439 1440//1440 +f 1430//1430 1440//1440 1431//1431 +f 1432//1432 1297//1297 1300//1300 +f 1432//1432 1300//1300 1433//1433 +f 1433//1433 1300//1300 1302//1302 +f 1433//1433 1302//1302 1434//1434 +f 1434//1434 1302//1302 1304//1304 +f 1434//1434 1304//1304 1435//1435 +f 1435//1435 1304//1304 1306//1306 +f 1435//1435 1306//1306 1436//1436 +f 1436//1436 1306//1306 1308//1308 +f 1436//1436 1308//1308 1437//1437 +f 1437//1437 1308//1308 1310//1310 +f 1437//1437 1310//1310 1438//1438 +f 1438//1438 1310//1310 1312//1312 +f 1438//1438 1312//1312 1439//1439 +f 1439//1439 1312//1312 1314//1314 +f 1439//1439 1314//1314 1440//1440 +f 1314//1314 1313//1313 1441//1441 +f 1314//1314 1441//1441 1442//1442 +f 1442//1442 1441//1441 1443//1443 +f 1442//1442 1443//1443 1444//1444 +f 1444//1444 1443//1443 1445//1445 +f 1444//1444 1445//1445 1446//1446 +f 1446//1446 1445//1445 1447//1447 +f 1446//1446 1447//1447 1448//1448 +f 1448//1448 1447//1447 1449//1449 +f 1448//1448 1449//1449 1450//1450 +f 1450//1450 1449//1449 1451//1451 +f 1450//1450 1451//1451 1452//1452 +f 1452//1452 1451//1451 1453//1453 +f 1452//1452 1453//1453 1454//1454 +f 1454//1454 1453//1453 1455//1455 +f 1454//1454 1455//1455 1456//1456 +f 1313//1313 1323//1323 1457//1457 +f 1313//1313 1457//1457 1441//1441 +f 1441//1441 1457//1457 1458//1458 +f 1441//1441 1458//1458 1443//1443 +f 1443//1443 1458//1458 1459//1459 +f 1443//1443 1459//1459 1445//1445 +f 1445//1445 1459//1459 1460//1460 +f 1445//1445 1460//1460 1447//1447 +f 1447//1447 1460//1460 1461//1461 +f 1447//1447 1461//1461 1449//1449 +f 1449//1449 1461//1461 1462//1462 +f 1449//1449 1462//1462 1451//1451 +f 1451//1451 1462//1462 1463//1463 +f 1451//1451 1463//1463 1453//1453 +f 1453//1453 1463//1463 1464//1464 +f 1453//1453 1464//1464 1455//1455 +f 1323//1323 1332//1332 1465//1465 +f 1323//1323 1465//1465 1457//1457 +f 1457//1457 1465//1465 1466//1466 +f 1457//1457 1466//1466 1458//1458 +f 1458//1458 1466//1466 1467//1467 +f 1458//1458 1467//1467 1459//1459 +f 1459//1459 1467//1467 1468//1468 +f 1459//1459 1468//1468 1460//1460 +f 1460//1460 1468//1468 1469//1469 +f 1460//1460 1469//1469 1461//1461 +f 1461//1461 1469//1469 1470//1470 +f 1461//1461 1470//1470 1462//1462 +f 1462//1462 1470//1470 1471//1471 +f 1462//1462 1471//1471 1463//1463 +f 1463//1463 1471//1471 1472//1472 +f 1463//1463 1472//1472 1464//1464 +f 1332//1332 1341//1341 1473//1473 +f 1332//1332 1473//1473 1465//1465 +f 1465//1465 1473//1473 1474//1474 +f 1465//1465 1474//1474 1466//1466 +f 1466//1466 1474//1474 1475//1475 +f 1466//1466 1475//1475 1467//1467 +f 1467//1467 1475//1475 1476//1476 +f 1467//1467 1476//1476 1468//1468 +f 1468//1468 1476//1476 1477//1477 +f 1468//1468 1477//1477 1469//1469 +f 1469//1469 1477//1477 1478//1478 +f 1469//1469 1478//1478 1470//1470 +f 1470//1470 1478//1478 1479//1479 +f 1470//1470 1479//1479 1471//1471 +f 1471//1471 1479//1479 1480//1480 +f 1471//1471 1480//1480 1472//1472 +f 1341//1341 1350//1350 1481//1481 +f 1341//1341 1481//1481 1473//1473 +f 1473//1473 1481//1481 1482//1482 +f 1473//1473 1482//1482 1474//1474 +f 1474//1474 1482//1482 1483//1483 +f 1474//1474 1483//1483 1475//1475 +f 1475//1475 1483//1483 1484//1484 +f 1475//1475 1484//1484 1476//1476 +f 1476//1476 1484//1484 1485//1485 +f 1476//1476 1485//1485 1477//1477 +f 1477//1477 1485//1485 1486//1486 +f 1477//1477 1486//1486 1478//1478 +f 1478//1478 1486//1486 1487//1487 +f 1478//1478 1487//1487 1479//1479 +f 1479//1479 1487//1487 1488//1488 +f 1479//1479 1488//1488 1480//1480 +f 1350//1350 1359//1359 1489//1489 +f 1350//1350 1489//1489 1481//1481 +f 1481//1481 1489//1489 1490//1490 +f 1481//1481 1490//1490 1482//1482 +f 1482//1482 1490//1490 1491//1491 +f 1482//1482 1491//1491 1483//1483 +f 1483//1483 1491//1491 1492//1492 +f 1483//1483 1492//1492 1484//1484 +f 1484//1484 1492//1492 1493//1493 +f 1484//1484 1493//1493 1485//1485 +f 1485//1485 1493//1493 1494//1494 +f 1485//1485 1494//1494 1486//1486 +f 1486//1486 1494//1494 1495//1495 +f 1486//1486 1495//1495 1487//1487 +f 1487//1487 1495//1495 1496//1496 +f 1487//1487 1496//1496 1488//1488 +f 1359//1359 1368//1368 1497//1497 +f 1359//1359 1497//1497 1489//1489 +f 1489//1489 1497//1497 1498//1498 +f 1489//1489 1498//1498 1490//1490 +f 1490//1490 1498//1498 1499//1499 +f 1490//1490 1499//1499 1491//1491 +f 1491//1491 1499//1499 1500//1500 +f 1491//1491 1500//1500 1492//1492 +f 1492//1492 1500//1500 1501//1501 +f 1492//1492 1501//1501 1493//1493 +f 1493//1493 1501//1501 1502//1502 +f 1493//1493 1502//1502 1494//1494 +f 1494//1494 1502//1502 1503//1503 +f 1494//1494 1503//1503 1495//1495 +f 1495//1495 1503//1503 1504//1504 +f 1495//1495 1504//1504 1496//1496 +f 1368//1368 1377//1377 1505//1505 +f 1368//1368 1505//1505 1497//1497 +f 1497//1497 1505//1505 1506//1506 +f 1497//1497 1506//1506 1498//1498 +f 1498//1498 1506//1506 1507//1507 +f 1498//1498 1507//1507 1499//1499 +f 1499//1499 1507//1507 1508//1508 +f 1499//1499 1508//1508 1500//1500 +f 1500//1500 1508//1508 1509//1509 +f 1500//1500 1509//1509 1501//1501 +f 1501//1501 1509//1509 1510//1510 +f 1501//1501 1510//1510 1502//1502 +f 1502//1502 1510//1510 1511//1511 +f 1502//1502 1511//1511 1503//1503 +f 1503//1503 1511//1511 1512//1512 +f 1503//1503 1512//1512 1504//1504 +f 1377//1377 1386//1386 1513//1513 +f 1377//1377 1513//1513 1505//1505 +f 1505//1505 1513//1513 1514//1514 +f 1505//1505 1514//1514 1506//1506 +f 1506//1506 1514//1514 1515//1515 +f 1506//1506 1515//1515 1507//1507 +f 1507//1507 1515//1515 1516//1516 +f 1507//1507 1516//1516 1508//1508 +f 1508//1508 1516//1516 1517//1517 +f 1508//1508 1517//1517 1509//1509 +f 1509//1509 1517//1517 1518//1518 +f 1509//1509 1518//1518 1510//1510 +f 1510//1510 1518//1518 1519//1519 +f 1510//1510 1519//1519 1511//1511 +f 1511//1511 1519//1519 1520//1520 +f 1511//1511 1520//1520 1512//1512 +f 1386//1386 1395//1395 1521//1521 +f 1386//1386 1521//1521 1513//1513 +f 1513//1513 1521//1521 1522//1522 +f 1513//1513 1522//1522 1514//1514 +f 1514//1514 1522//1522 1523//1523 +f 1514//1514 1523//1523 1515//1515 +f 1515//1515 1523//1523 1524//1524 +f 1515//1515 1524//1524 1516//1516 +f 1516//1516 1524//1524 1525//1525 +f 1516//1516 1525//1525 1517//1517 +f 1517//1517 1525//1525 1526//1526 +f 1517//1517 1526//1526 1518//1518 +f 1518//1518 1526//1526 1527//1527 +f 1518//1518 1527//1527 1519//1519 +f 1519//1519 1527//1527 1528//1528 +f 1519//1519 1528//1528 1520//1520 +f 1395//1395 1404//1404 1529//1529 +f 1395//1395 1529//1529 1521//1521 +f 1521//1521 1529//1529 1530//1530 +f 1521//1521 1530//1530 1522//1522 +f 1522//1522 1530//1530 1531//1531 +f 1522//1522 1531//1531 1523//1523 +f 1523//1523 1531//1531 1532//1532 +f 1523//1523 1532//1532 1524//1524 +f 1524//1524 1532//1532 1533//1533 +f 1524//1524 1533//1533 1525//1525 +f 1525//1525 1533//1533 1534//1534 +f 1525//1525 1534//1534 1526//1526 +f 1526//1526 1534//1534 1535//1535 +f 1526//1526 1535//1535 1527//1527 +f 1527//1527 1535//1535 1536//1536 +f 1527//1527 1536//1536 1528//1528 +f 1404//1404 1413//1413 1537//1537 +f 1404//1404 1537//1537 1529//1529 +f 1529//1529 1537//1537 1538//1538 +f 1529//1529 1538//1538 1530//1530 +f 1530//1530 1538//1538 1539//1539 +f 1530//1530 1539//1539 1531//1531 +f 1531//1531 1539//1539 1540//1540 +f 1531//1531 1540//1540 1532//1532 +f 1532//1532 1540//1540 1541//1541 +f 1532//1532 1541//1541 1533//1533 +f 1533//1533 1541//1541 1542//1542 +f 1533//1533 1542//1542 1534//1534 +f 1534//1534 1542//1542 1543//1543 +f 1534//1534 1543//1543 1535//1535 +f 1535//1535 1543//1543 1544//1544 +f 1535//1535 1544//1544 1536//1536 +f 1413//1413 1422//1422 1545//1545 +f 1413//1413 1545//1545 1537//1537 +f 1537//1537 1545//1545 1546//1546 +f 1537//1537 1546//1546 1538//1538 +f 1538//1538 1546//1546 1547//1547 +f 1538//1538 1547//1547 1539//1539 +f 1539//1539 1547//1547 1548//1548 +f 1539//1539 1548//1548 1540//1540 +f 1540//1540 1548//1548 1549//1549 +f 1540//1540 1549//1549 1541//1541 +f 1541//1541 1549//1549 1550//1550 +f 1541//1541 1550//1550 1542//1542 +f 1542//1542 1550//1550 1551//1551 +f 1542//1542 1551//1551 1543//1543 +f 1543//1543 1551//1551 1552//1552 +f 1543//1543 1552//1552 1544//1544 +f 1422//1422 1431//1431 1553//1553 +f 1422//1422 1553//1553 1545//1545 +f 1545//1545 1553//1553 1554//1554 +f 1545//1545 1554//1554 1546//1546 +f 1546//1546 1554//1554 1555//1555 +f 1546//1546 1555//1555 1547//1547 +f 1547//1547 1555//1555 1556//1556 +f 1547//1547 1556//1556 1548//1548 +f 1548//1548 1556//1556 1557//1557 +f 1548//1548 1557//1557 1549//1549 +f 1549//1549 1557//1557 1558//1558 +f 1549//1549 1558//1558 1550//1550 +f 1550//1550 1558//1558 1559//1559 +f 1550//1550 1559//1559 1551//1551 +f 1551//1551 1559//1559 1560//1560 +f 1551//1551 1560//1560 1552//1552 +f 1431//1431 1440//1440 1561//1561 +f 1431//1431 1561//1561 1553//1553 +f 1553//1553 1561//1561 1562//1562 +f 1553//1553 1562//1562 1554//1554 +f 1554//1554 1562//1562 1563//1563 +f 1554//1554 1563//1563 1555//1555 +f 1555//1555 1563//1563 1564//1564 +f 1555//1555 1564//1564 1556//1556 +f 1556//1556 1564//1564 1565//1565 +f 1556//1556 1565//1565 1557//1557 +f 1557//1557 1565//1565 1566//1566 +f 1557//1557 1566//1566 1558//1558 +f 1558//1558 1566//1566 1567//1567 +f 1558//1558 1567//1567 1559//1559 +f 1559//1559 1567//1567 1568//1568 +f 1559//1559 1568//1568 1560//1560 +f 1440//1440 1314//1314 1442//1442 +f 1440//1440 1442//1442 1561//1561 +f 1561//1561 1442//1442 1444//1444 +f 1561//1561 1444//1444 1562//1562 +f 1562//1562 1444//1444 1446//1446 +f 1562//1562 1446//1446 1563//1563 +f 1563//1563 1446//1446 1448//1448 +f 1563//1563 1448//1448 1564//1564 +f 1564//1564 1448//1448 1450//1450 +f 1564//1564 1450//1450 1565//1565 +f 1565//1565 1450//1450 1452//1452 +f 1565//1565 1452//1452 1566//1566 +f 1566//1566 1452//1452 1454//1454 +f 1566//1566 1454//1454 1567//1567 +f 1567//1567 1454//1454 1456//1456 +f 1567//1567 1456//1456 1568//1568 +f 1569//1569 1570//1570 1571//1571 +f 1570//1570 1569//1569 1572//1572 +f 1570//1570 1572//1572 1573//1573 +f 1573//1573 1572//1572 1574//1574 +f 1573//1573 1574//1574 1575//1575 +f 1575//1575 1574//1574 1576//1576 +f 1575//1575 1576//1576 1577//1577 +f 1577//1577 1576//1576 1578//1578 +f 1577//1577 1578//1578 1579//1579 +f 1579//1579 1578//1578 1580//1580 +f 1579//1579 1580//1580 1581//1581 +f 1581//1581 1580//1580 1582//1582 +f 1581//1581 1582//1582 1583//1583 +f 1583//1583 1582//1582 1584//1584 +f 1583//1583 1584//1584 1585//1585 +f 1586//1586 1569//1569 1571//1571 +f 1569//1569 1586//1586 1587//1587 +f 1569//1569 1587//1587 1572//1572 +f 1572//1572 1587//1587 1588//1588 +f 1572//1572 1588//1588 1574//1574 +f 1574//1574 1588//1588 1589//1589 +f 1574//1574 1589//1589 1576//1576 +f 1576//1576 1589//1589 1590//1590 +f 1576//1576 1590//1590 1578//1578 +f 1578//1578 1590//1590 1591//1591 +f 1578//1578 1591//1591 1580//1580 +f 1580//1580 1591//1591 1592//1592 +f 1580//1580 1592//1592 1582//1582 +f 1582//1582 1592//1592 1593//1593 +f 1582//1582 1593//1593 1584//1584 +f 1594//1594 1586//1586 1571//1571 +f 1586//1586 1594//1594 1595//1595 +f 1586//1586 1595//1595 1587//1587 +f 1587//1587 1595//1595 1596//1596 +f 1587//1587 1596//1596 1588//1588 +f 1588//1588 1596//1596 1597//1597 +f 1588//1588 1597//1597 1589//1589 +f 1589//1589 1597//1597 1598//1598 +f 1589//1589 1598//1598 1590//1590 +f 1590//1590 1598//1598 1599//1599 +f 1590//1590 1599//1599 1591//1591 +f 1591//1591 1599//1599 1600//1600 +f 1591//1591 1600//1600 1592//1592 +f 1592//1592 1600//1600 1601//1601 +f 1592//1592 1601//1601 1593//1593 +f 1602//1602 1594//1594 1571//1571 +f 1594//1594 1602//1602 1603//1603 +f 1594//1594 1603//1603 1595//1595 +f 1595//1595 1603//1603 1604//1604 +f 1595//1595 1604//1604 1596//1596 +f 1596//1596 1604//1604 1605//1605 +f 1596//1596 1605//1605 1597//1597 +f 1597//1597 1605//1605 1606//1606 +f 1597//1597 1606//1606 1598//1598 +f 1598//1598 1606//1606 1607//1607 +f 1598//1598 1607//1607 1599//1599 +f 1599//1599 1607//1607 1608//1608 +f 1599//1599 1608//1608 1600//1600 +f 1600//1600 1608//1608 1609//1609 +f 1600//1600 1609//1609 1601//1601 +f 1610//1610 1602//1602 1571//1571 +f 1602//1602 1610//1610 1611//1611 +f 1602//1602 1611//1611 1603//1603 +f 1603//1603 1611//1611 1612//1612 +f 1603//1603 1612//1612 1604//1604 +f 1604//1604 1612//1612 1613//1613 +f 1604//1604 1613//1613 1605//1605 +f 1605//1605 1613//1613 1614//1614 +f 1605//1605 1614//1614 1606//1606 +f 1606//1606 1614//1614 1615//1615 +f 1606//1606 1615//1615 1607//1607 +f 1607//1607 1615//1615 1616//1616 +f 1607//1607 1616//1616 1608//1608 +f 1608//1608 1616//1616 1617//1617 +f 1608//1608 1617//1617 1609//1609 +f 1618//1618 1610//1610 1571//1571 +f 1610//1610 1618//1618 1619//1619 +f 1610//1610 1619//1619 1611//1611 +f 1611//1611 1619//1619 1620//1620 +f 1611//1611 1620//1620 1612//1612 +f 1612//1612 1620//1620 1621//1621 +f 1612//1612 1621//1621 1613//1613 +f 1613//1613 1621//1621 1622//1622 +f 1613//1613 1622//1622 1614//1614 +f 1614//1614 1622//1622 1623//1623 +f 1614//1614 1623//1623 1615//1615 +f 1615//1615 1623//1623 1624//1624 +f 1615//1615 1624//1624 1616//1616 +f 1616//1616 1624//1624 1625//1625 +f 1616//1616 1625//1625 1617//1617 +f 1626//1626 1618//1618 1571//1571 +f 1618//1618 1626//1626 1627//1627 +f 1618//1618 1627//1627 1619//1619 +f 1619//1619 1627//1627 1628//1628 +f 1619//1619 1628//1628 1620//1620 +f 1620//1620 1628//1628 1629//1629 +f 1620//1620 1629//1629 1621//1621 +f 1621//1621 1629//1629 1630//1630 +f 1621//1621 1630//1630 1622//1622 +f 1622//1622 1630//1630 1631//1631 +f 1622//1622 1631//1631 1623//1623 +f 1623//1623 1631//1631 1632//1632 +f 1623//1623 1632//1632 1624//1624 +f 1624//1624 1632//1632 1633//1633 +f 1624//1624 1633//1633 1625//1625 +f 1634//1634 1626//1626 1571//1571 +f 1626//1626 1634//1634 1635//1635 +f 1626//1626 1635//1635 1627//1627 +f 1627//1627 1635//1635 1636//1636 +f 1627//1627 1636//1636 1628//1628 +f 1628//1628 1636//1636 1637//1637 +f 1628//1628 1637//1637 1629//1629 +f 1629//1629 1637//1637 1638//1638 +f 1629//1629 1638//1638 1630//1630 +f 1630//1630 1638//1638 1639//1639 +f 1630//1630 1639//1639 1631//1631 +f 1631//1631 1639//1639 1640//1640 +f 1631//1631 1640//1640 1632//1632 +f 1632//1632 1640//1640 1641//1641 +f 1632//1632 1641//1641 1633//1633 +f 1642//1642 1634//1634 1571//1571 +f 1634//1634 1642//1642 1643//1643 +f 1634//1634 1643//1643 1635//1635 +f 1635//1635 1643//1643 1644//1644 +f 1635//1635 1644//1644 1636//1636 +f 1636//1636 1644//1644 1645//1645 +f 1636//1636 1645//1645 1637//1637 +f 1637//1637 1645//1645 1646//1646 +f 1637//1637 1646//1646 1638//1638 +f 1638//1638 1646//1646 1647//1647 +f 1638//1638 1647//1647 1639//1639 +f 1639//1639 1647//1647 1648//1648 +f 1639//1639 1648//1648 1640//1640 +f 1640//1640 1648//1648 1649//1649 +f 1640//1640 1649//1649 1641//1641 +f 1650//1650 1642//1642 1571//1571 +f 1642//1642 1650//1650 1651//1651 +f 1642//1642 1651//1651 1643//1643 +f 1643//1643 1651//1651 1652//1652 +f 1643//1643 1652//1652 1644//1644 +f 1644//1644 1652//1652 1653//1653 +f 1644//1644 1653//1653 1645//1645 +f 1645//1645 1653//1653 1654//1654 +f 1645//1645 1654//1654 1646//1646 +f 1646//1646 1654//1654 1655//1655 +f 1646//1646 1655//1655 1647//1647 +f 1647//1647 1655//1655 1656//1656 +f 1647//1647 1656//1656 1648//1648 +f 1648//1648 1656//1656 1657//1657 +f 1648//1648 1657//1657 1649//1649 +f 1658//1658 1650//1650 1571//1571 +f 1650//1650 1658//1658 1659//1659 +f 1650//1650 1659//1659 1651//1651 +f 1651//1651 1659//1659 1660//1660 +f 1651//1651 1660//1660 1652//1652 +f 1652//1652 1660//1660 1661//1661 +f 1652//1652 1661//1661 1653//1653 +f 1653//1653 1661//1661 1662//1662 +f 1653//1653 1662//1662 1654//1654 +f 1654//1654 1662//1662 1663//1663 +f 1654//1654 1663//1663 1655//1655 +f 1655//1655 1663//1663 1664//1664 +f 1655//1655 1664//1664 1656//1656 +f 1656//1656 1664//1664 1665//1665 +f 1656//1656 1665//1665 1657//1657 +f 1666//1666 1658//1658 1571//1571 +f 1658//1658 1666//1666 1667//1667 +f 1658//1658 1667//1667 1659//1659 +f 1659//1659 1667//1667 1668//1668 +f 1659//1659 1668//1668 1660//1660 +f 1660//1660 1668//1668 1669//1669 +f 1660//1660 1669//1669 1661//1661 +f 1661//1661 1669//1669 1670//1670 +f 1661//1661 1670//1670 1662//1662 +f 1662//1662 1670//1670 1671//1671 +f 1662//1662 1671//1671 1663//1663 +f 1663//1663 1671//1671 1672//1672 +f 1663//1663 1672//1672 1664//1664 +f 1664//1664 1672//1672 1673//1673 +f 1664//1664 1673//1673 1665//1665 +f 1674//1674 1666//1666 1571//1571 +f 1666//1666 1674//1674 1675//1675 +f 1666//1666 1675//1675 1667//1667 +f 1667//1667 1675//1675 1676//1676 +f 1667//1667 1676//1676 1668//1668 +f 1668//1668 1676//1676 1677//1677 +f 1668//1668 1677//1677 1669//1669 +f 1669//1669 1677//1677 1678//1678 +f 1669//1669 1678//1678 1670//1670 +f 1670//1670 1678//1678 1679//1679 +f 1670//1670 1679//1679 1671//1671 +f 1671//1671 1679//1679 1680//1680 +f 1671//1671 1680//1680 1672//1672 +f 1672//1672 1680//1680 1681//1681 +f 1672//1672 1681//1681 1673//1673 +f 1682//1682 1674//1674 1571//1571 +f 1674//1674 1682//1682 1683//1683 +f 1674//1674 1683//1683 1675//1675 +f 1675//1675 1683//1683 1684//1684 +f 1675//1675 1684//1684 1676//1676 +f 1676//1676 1684//1684 1685//1685 +f 1676//1676 1685//1685 1677//1677 +f 1677//1677 1685//1685 1686//1686 +f 1677//1677 1686//1686 1678//1678 +f 1678//1678 1686//1686 1687//1687 +f 1678//1678 1687//1687 1679//1679 +f 1679//1679 1687//1687 1688//1688 +f 1679//1679 1688//1688 1680//1680 +f 1680//1680 1688//1688 1689//1689 +f 1680//1680 1689//1689 1681//1681 +f 1690//1690 1682//1682 1571//1571 +f 1682//1682 1690//1690 1691//1691 +f 1682//1682 1691//1691 1683//1683 +f 1683//1683 1691//1691 1692//1692 +f 1683//1683 1692//1692 1684//1684 +f 1684//1684 1692//1692 1693//1693 +f 1684//1684 1693//1693 1685//1685 +f 1685//1685 1693//1693 1694//1694 +f 1685//1685 1694//1694 1686//1686 +f 1686//1686 1694//1694 1695//1695 +f 1686//1686 1695//1695 1687//1687 +f 1687//1687 1695//1695 1696//1696 +f 1687//1687 1696//1696 1688//1688 +f 1688//1688 1696//1696 1697//1697 +f 1688//1688 1697//1697 1689//1689 +f 1698//1698 1690//1690 1571//1571 +f 1690//1690 1698//1698 1699//1699 +f 1690//1690 1699//1699 1691//1691 +f 1691//1691 1699//1699 1700//1700 +f 1691//1691 1700//1700 1692//1692 +f 1692//1692 1700//1700 1701//1701 +f 1692//1692 1701//1701 1693//1693 +f 1693//1693 1701//1701 1702//1702 +f 1693//1693 1702//1702 1694//1694 +f 1694//1694 1702//1702 1703//1703 +f 1694//1694 1703//1703 1695//1695 +f 1695//1695 1703//1703 1704//1704 +f 1695//1695 1704//1704 1696//1696 +f 1696//1696 1704//1704 1705//1705 +f 1696//1696 1705//1705 1697//1697 +f 1706//1706 1698//1698 1571//1571 +f 1698//1698 1706//1706 1707//1707 +f 1698//1698 1707//1707 1699//1699 +f 1699//1699 1707//1707 1708//1708 +f 1699//1699 1708//1708 1700//1700 +f 1700//1700 1708//1708 1709//1709 +f 1700//1700 1709//1709 1701//1701 +f 1701//1701 1709//1709 1710//1710 +f 1701//1701 1710//1710 1702//1702 +f 1702//1702 1710//1710 1711//1711 +f 1702//1702 1711//1711 1703//1703 +f 1703//1703 1711//1711 1712//1712 +f 1703//1703 1712//1712 1704//1704 +f 1704//1704 1712//1712 1713//1713 +f 1704//1704 1713//1713 1705//1705 +f 1714//1714 1706//1706 1571//1571 +f 1706//1706 1714//1714 1715//1715 +f 1706//1706 1715//1715 1707//1707 +f 1707//1707 1715//1715 1716//1716 +f 1707//1707 1716//1716 1708//1708 +f 1708//1708 1716//1716 1717//1717 +f 1708//1708 1717//1717 1709//1709 +f 1709//1709 1717//1717 1718//1718 +f 1709//1709 1718//1718 1710//1710 +f 1710//1710 1718//1718 1719//1719 +f 1710//1710 1719//1719 1711//1711 +f 1711//1711 1719//1719 1720//1720 +f 1711//1711 1720//1720 1712//1712 +f 1712//1712 1720//1720 1721//1721 +f 1712//1712 1721//1721 1713//1713 +f 1722//1722 1714//1714 1571//1571 +f 1714//1714 1722//1722 1723//1723 +f 1714//1714 1723//1723 1715//1715 +f 1715//1715 1723//1723 1724//1724 +f 1715//1715 1724//1724 1716//1716 +f 1716//1716 1724//1724 1725//1725 +f 1716//1716 1725//1725 1717//1717 +f 1717//1717 1725//1725 1726//1726 +f 1717//1717 1726//1726 1718//1718 +f 1718//1718 1726//1726 1727//1727 +f 1718//1718 1727//1727 1719//1719 +f 1719//1719 1727//1727 1728//1728 +f 1719//1719 1728//1728 1720//1720 +f 1720//1720 1728//1728 1729//1729 +f 1720//1720 1729//1729 1721//1721 +f 1730//1730 1722//1722 1571//1571 +f 1722//1722 1730//1730 1731//1731 +f 1722//1722 1731//1731 1723//1723 +f 1723//1723 1731//1731 1732//1732 +f 1723//1723 1732//1732 1724//1724 +f 1724//1724 1732//1732 1733//1733 +f 1724//1724 1733//1733 1725//1725 +f 1725//1725 1733//1733 1734//1734 +f 1725//1725 1734//1734 1726//1726 +f 1726//1726 1734//1734 1735//1735 +f 1726//1726 1735//1735 1727//1727 +f 1727//1727 1735//1735 1736//1736 +f 1727//1727 1736//1736 1728//1728 +f 1728//1728 1736//1736 1737//1737 +f 1728//1728 1737//1737 1729//1729 +f 1738//1738 1730//1730 1571//1571 +f 1730//1730 1738//1738 1739//1739 +f 1730//1730 1739//1739 1731//1731 +f 1731//1731 1739//1739 1740//1740 +f 1731//1731 1740//1740 1732//1732 +f 1732//1732 1740//1740 1741//1741 +f 1732//1732 1741//1741 1733//1733 +f 1733//1733 1741//1741 1742//1742 +f 1733//1733 1742//1742 1734//1734 +f 1734//1734 1742//1742 1743//1743 +f 1734//1734 1743//1743 1735//1735 +f 1735//1735 1743//1743 1744//1744 +f 1735//1735 1744//1744 1736//1736 +f 1736//1736 1744//1744 1745//1745 +f 1736//1736 1745//1745 1737//1737 +f 1746//1746 1738//1738 1571//1571 +f 1738//1738 1746//1746 1747//1747 +f 1738//1738 1747//1747 1739//1739 +f 1739//1739 1747//1747 1748//1748 +f 1739//1739 1748//1748 1740//1740 +f 1740//1740 1748//1748 1749//1749 +f 1740//1740 1749//1749 1741//1741 +f 1741//1741 1749//1749 1750//1750 +f 1741//1741 1750//1750 1742//1742 +f 1742//1742 1750//1750 1751//1751 +f 1742//1742 1751//1751 1743//1743 +f 1743//1743 1751//1751 1752//1752 +f 1743//1743 1752//1752 1744//1744 +f 1744//1744 1752//1752 1753//1753 +f 1744//1744 1753//1753 1745//1745 +f 1754//1754 1746//1746 1571//1571 +f 1746//1746 1754//1754 1755//1755 +f 1746//1746 1755//1755 1747//1747 +f 1747//1747 1755//1755 1756//1756 +f 1747//1747 1756//1756 1748//1748 +f 1748//1748 1756//1756 1757//1757 +f 1748//1748 1757//1757 1749//1749 +f 1749//1749 1757//1757 1758//1758 +f 1749//1749 1758//1758 1750//1750 +f 1750//1750 1758//1758 1759//1759 +f 1750//1750 1759//1759 1751//1751 +f 1751//1751 1759//1759 1760//1760 +f 1751//1751 1760//1760 1752//1752 +f 1752//1752 1760//1760 1761//1761 +f 1752//1752 1761//1761 1753//1753 +f 1762//1762 1754//1754 1571//1571 +f 1754//1754 1762//1762 1763//1763 +f 1754//1754 1763//1763 1755//1755 +f 1755//1755 1763//1763 1764//1764 +f 1755//1755 1764//1764 1756//1756 +f 1756//1756 1764//1764 1765//1765 +f 1756//1756 1765//1765 1757//1757 +f 1757//1757 1765//1765 1766//1766 +f 1757//1757 1766//1766 1758//1758 +f 1758//1758 1766//1766 1767//1767 +f 1758//1758 1767//1767 1759//1759 +f 1759//1759 1767//1767 1768//1768 +f 1759//1759 1768//1768 1760//1760 +f 1760//1760 1768//1768 1769//1769 +f 1760//1760 1769//1769 1761//1761 +f 1770//1770 1762//1762 1571//1571 +f 1762//1762 1770//1770 1771//1771 +f 1762//1762 1771//1771 1763//1763 +f 1763//1763 1771//1771 1772//1772 +f 1763//1763 1772//1772 1764//1764 +f 1764//1764 1772//1772 1773//1773 +f 1764//1764 1773//1773 1765//1765 +f 1765//1765 1773//1773 1774//1774 +f 1765//1765 1774//1774 1766//1766 +f 1766//1766 1774//1774 1775//1775 +f 1766//1766 1775//1775 1767//1767 +f 1767//1767 1775//1775 1776//1776 +f 1767//1767 1776//1776 1768//1768 +f 1768//1768 1776//1776 1777//1777 +f 1768//1768 1777//1777 1769//1769 +f 1778//1778 1770//1770 1571//1571 +f 1770//1770 1778//1778 1779//1779 +f 1770//1770 1779//1779 1771//1771 +f 1771//1771 1779//1779 1780//1780 +f 1771//1771 1780//1780 1772//1772 +f 1772//1772 1780//1780 1781//1781 +f 1772//1772 1781//1781 1773//1773 +f 1773//1773 1781//1781 1782//1782 +f 1773//1773 1782//1782 1774//1774 +f 1774//1774 1782//1782 1783//1783 +f 1774//1774 1783//1783 1775//1775 +f 1775//1775 1783//1783 1784//1784 +f 1775//1775 1784//1784 1776//1776 +f 1776//1776 1784//1784 1785//1785 +f 1776//1776 1785//1785 1777//1777 +f 1786//1786 1778//1778 1571//1571 +f 1778//1778 1786//1786 1787//1787 +f 1778//1778 1787//1787 1779//1779 +f 1779//1779 1787//1787 1788//1788 +f 1779//1779 1788//1788 1780//1780 +f 1780//1780 1788//1788 1789//1789 +f 1780//1780 1789//1789 1781//1781 +f 1781//1781 1789//1789 1790//1790 +f 1781//1781 1790//1790 1782//1782 +f 1782//1782 1790//1790 1791//1791 +f 1782//1782 1791//1791 1783//1783 +f 1783//1783 1791//1791 1792//1792 +f 1783//1783 1792//1792 1784//1784 +f 1784//1784 1792//1792 1793//1793 +f 1784//1784 1793//1793 1785//1785 +f 1794//1794 1786//1786 1571//1571 +f 1786//1786 1794//1794 1795//1795 +f 1786//1786 1795//1795 1787//1787 +f 1787//1787 1795//1795 1796//1796 +f 1787//1787 1796//1796 1788//1788 +f 1788//1788 1796//1796 1797//1797 +f 1788//1788 1797//1797 1789//1789 +f 1789//1789 1797//1797 1798//1798 +f 1789//1789 1798//1798 1790//1790 +f 1790//1790 1798//1798 1799//1799 +f 1790//1790 1799//1799 1791//1791 +f 1791//1791 1799//1799 1800//1800 +f 1791//1791 1800//1800 1792//1792 +f 1792//1792 1800//1800 1801//1801 +f 1792//1792 1801//1801 1793//1793 +f 1802//1802 1794//1794 1571//1571 +f 1794//1794 1802//1802 1803//1803 +f 1794//1794 1803//1803 1795//1795 +f 1795//1795 1803//1803 1804//1804 +f 1795//1795 1804//1804 1796//1796 +f 1796//1796 1804//1804 1805//1805 +f 1796//1796 1805//1805 1797//1797 +f 1797//1797 1805//1805 1806//1806 +f 1797//1797 1806//1806 1798//1798 +f 1798//1798 1806//1806 1807//1807 +f 1798//1798 1807//1807 1799//1799 +f 1799//1799 1807//1807 1808//1808 +f 1799//1799 1808//1808 1800//1800 +f 1800//1800 1808//1808 1809//1809 +f 1800//1800 1809//1809 1801//1801 +f 1810//1810 1802//1802 1571//1571 +f 1802//1802 1810//1810 1811//1811 +f 1802//1802 1811//1811 1803//1803 +f 1803//1803 1811//1811 1812//1812 +f 1803//1803 1812//1812 1804//1804 +f 1804//1804 1812//1812 1813//1813 +f 1804//1804 1813//1813 1805//1805 +f 1805//1805 1813//1813 1814//1814 +f 1805//1805 1814//1814 1806//1806 +f 1806//1806 1814//1814 1815//1815 +f 1806//1806 1815//1815 1807//1807 +f 1807//1807 1815//1815 1816//1816 +f 1807//1807 1816//1816 1808//1808 +f 1808//1808 1816//1816 1817//1817 +f 1808//1808 1817//1817 1809//1809 +f 1818//1818 1810//1810 1571//1571 +f 1810//1810 1818//1818 1819//1819 +f 1810//1810 1819//1819 1811//1811 +f 1811//1811 1819//1819 1820//1820 +f 1811//1811 1820//1820 1812//1812 +f 1812//1812 1820//1820 1821//1821 +f 1812//1812 1821//1821 1813//1813 +f 1813//1813 1821//1821 1822//1822 +f 1813//1813 1822//1822 1814//1814 +f 1814//1814 1822//1822 1823//1823 +f 1814//1814 1823//1823 1815//1815 +f 1815//1815 1823//1823 1824//1824 +f 1815//1815 1824//1824 1816//1816 +f 1816//1816 1824//1824 1825//1825 +f 1816//1816 1825//1825 1817//1817 +f 1570//1570 1818//1818 1571//1571 +f 1818//1818 1570//1570 1573//1573 +f 1818//1818 1573//1573 1819//1819 +f 1819//1819 1573//1573 1575//1575 +f 1819//1819 1575//1575 1820//1820 +f 1820//1820 1575//1575 1577//1577 +f 1820//1820 1577//1577 1821//1821 +f 1821//1821 1577//1577 1579//1579 +f 1821//1821 1579//1579 1822//1822 +f 1822//1822 1579//1579 1581//1581 +f 1822//1822 1581//1581 1823//1823 +f 1823//1823 1581//1581 1583//1583 +f 1823//1823 1583//1583 1824//1824 +f 1824//1824 1583//1583 1585//1585 +f 1824//1824 1585//1585 1825//1825 +f 1585//1585 1584//1584 1826//1826 +f 1585//1585 1826//1826 1827//1827 +f 1827//1827 1826//1826 1828//1828 +f 1827//1827 1828//1828 1829//1829 +f 1829//1829 1828//1828 1830//1830 +f 1829//1829 1830//1830 1831//1831 +f 1831//1831 1830//1830 1832//1832 +f 1831//1831 1832//1832 1833//1833 +f 1833//1833 1832//1832 1834//1834 +f 1833//1833 1834//1834 1835//1835 +f 1835//1835 1834//1834 1836//1836 +f 1835//1835 1836//1836 1837//1837 +f 1837//1837 1836//1836 1838//1838 +f 1837//1837 1838//1838 1839//1839 +f 1839//1839 1838//1838 1840//1840 +f 1839//1839 1840//1840 1841//1841 +f 1584//1584 1593//1593 1842//1842 +f 1584//1584 1842//1842 1826//1826 +f 1826//1826 1842//1842 1843//1843 +f 1826//1826 1843//1843 1828//1828 +f 1828//1828 1843//1843 1844//1844 +f 1828//1828 1844//1844 1830//1830 +f 1830//1830 1844//1844 1845//1845 +f 1830//1830 1845//1845 1832//1832 +f 1832//1832 1845//1845 1846//1846 +f 1832//1832 1846//1846 1834//1834 +f 1834//1834 1846//1846 1847//1847 +f 1834//1834 1847//1847 1836//1836 +f 1836//1836 1847//1847 1848//1848 +f 1836//1836 1848//1848 1838//1838 +f 1838//1838 1848//1848 1849//1849 +f 1838//1838 1849//1849 1840//1840 +f 1593//1593 1601//1601 1850//1850 +f 1593//1593 1850//1850 1842//1842 +f 1842//1842 1850//1850 1851//1851 +f 1842//1842 1851//1851 1843//1843 +f 1843//1843 1851//1851 1852//1852 +f 1843//1843 1852//1852 1844//1844 +f 1844//1844 1852//1852 1853//1853 +f 1844//1844 1853//1853 1845//1845 +f 1845//1845 1853//1853 1854//1854 +f 1845//1845 1854//1854 1846//1846 +f 1846//1846 1854//1854 1855//1855 +f 1846//1846 1855//1855 1847//1847 +f 1847//1847 1855//1855 1856//1856 +f 1847//1847 1856//1856 1848//1848 +f 1848//1848 1856//1856 1857//1857 +f 1848//1848 1857//1857 1849//1849 +f 1601//1601 1609//1609 1858//1858 +f 1601//1601 1858//1858 1850//1850 +f 1850//1850 1858//1858 1859//1859 +f 1850//1850 1859//1859 1851//1851 +f 1851//1851 1859//1859 1860//1860 +f 1851//1851 1860//1860 1852//1852 +f 1852//1852 1860//1860 1861//1861 +f 1852//1852 1861//1861 1853//1853 +f 1853//1853 1861//1861 1862//1862 +f 1853//1853 1862//1862 1854//1854 +f 1854//1854 1862//1862 1863//1863 +f 1854//1854 1863//1863 1855//1855 +f 1855//1855 1863//1863 1864//1864 +f 1855//1855 1864//1864 1856//1856 +f 1856//1856 1864//1864 1865//1865 +f 1856//1856 1865//1865 1857//1857 +f 1609//1609 1617//1617 1866//1866 +f 1609//1609 1866//1866 1858//1858 +f 1858//1858 1866//1866 1867//1867 +f 1858//1858 1867//1867 1859//1859 +f 1859//1859 1867//1867 1868//1868 +f 1859//1859 1868//1868 1860//1860 +f 1860//1860 1868//1868 1869//1869 +f 1860//1860 1869//1869 1861//1861 +f 1861//1861 1869//1869 1870//1870 +f 1861//1861 1870//1870 1862//1862 +f 1862//1862 1870//1870 1871//1871 +f 1862//1862 1871//1871 1863//1863 +f 1863//1863 1871//1871 1872//1872 +f 1863//1863 1872//1872 1864//1864 +f 1864//1864 1872//1872 1873//1873 +f 1864//1864 1873//1873 1865//1865 +f 1617//1617 1625//1625 1874//1874 +f 1617//1617 1874//1874 1866//1866 +f 1866//1866 1874//1874 1875//1875 +f 1866//1866 1875//1875 1867//1867 +f 1867//1867 1875//1875 1876//1876 +f 1867//1867 1876//1876 1868//1868 +f 1868//1868 1876//1876 1877//1877 +f 1868//1868 1877//1877 1869//1869 +f 1869//1869 1877//1877 1878//1878 +f 1869//1869 1878//1878 1870//1870 +f 1870//1870 1878//1878 1879//1879 +f 1870//1870 1879//1879 1871//1871 +f 1871//1871 1879//1879 1880//1880 +f 1871//1871 1880//1880 1872//1872 +f 1872//1872 1880//1880 1881//1881 +f 1872//1872 1881//1881 1873//1873 +f 1625//1625 1633//1633 1882//1882 +f 1625//1625 1882//1882 1874//1874 +f 1874//1874 1882//1882 1883//1883 +f 1874//1874 1883//1883 1875//1875 +f 1875//1875 1883//1883 1884//1884 +f 1875//1875 1884//1884 1876//1876 +f 1876//1876 1884//1884 1885//1885 +f 1876//1876 1885//1885 1877//1877 +f 1877//1877 1885//1885 1886//1886 +f 1877//1877 1886//1886 1878//1878 +f 1878//1878 1886//1886 1887//1887 +f 1878//1878 1887//1887 1879//1879 +f 1879//1879 1887//1887 1888//1888 +f 1879//1879 1888//1888 1880//1880 +f 1880//1880 1888//1888 1889//1889 +f 1880//1880 1889//1889 1881//1881 +f 1633//1633 1641//1641 1890//1890 +f 1633//1633 1890//1890 1882//1882 +f 1882//1882 1890//1890 1891//1891 +f 1882//1882 1891//1891 1883//1883 +f 1883//1883 1891//1891 1892//1892 +f 1883//1883 1892//1892 1884//1884 +f 1884//1884 1892//1892 1893//1893 +f 1884//1884 1893//1893 1885//1885 +f 1885//1885 1893//1893 1894//1894 +f 1885//1885 1894//1894 1886//1886 +f 1886//1886 1894//1894 1895//1895 +f 1886//1886 1895//1895 1887//1887 +f 1887//1887 1895//1895 1896//1896 +f 1887//1887 1896//1896 1888//1888 +f 1888//1888 1896//1896 1897//1897 +f 1888//1888 1897//1897 1889//1889 +f 1641//1641 1649//1649 1898//1898 +f 1641//1641 1898//1898 1890//1890 +f 1890//1890 1898//1898 1899//1899 +f 1890//1890 1899//1899 1891//1891 +f 1891//1891 1899//1899 1900//1900 +f 1891//1891 1900//1900 1892//1892 +f 1892//1892 1900//1900 1901//1901 +f 1892//1892 1901//1901 1893//1893 +f 1893//1893 1901//1901 1902//1902 +f 1893//1893 1902//1902 1894//1894 +f 1894//1894 1902//1902 1903//1903 +f 1894//1894 1903//1903 1895//1895 +f 1895//1895 1903//1903 1904//1904 +f 1895//1895 1904//1904 1896//1896 +f 1896//1896 1904//1904 1905//1905 +f 1896//1896 1905//1905 1897//1897 +f 1649//1649 1657//1657 1906//1906 +f 1649//1649 1906//1906 1898//1898 +f 1898//1898 1906//1906 1907//1907 +f 1898//1898 1907//1907 1899//1899 +f 1899//1899 1907//1907 1908//1908 +f 1899//1899 1908//1908 1900//1900 +f 1900//1900 1908//1908 1909//1909 +f 1900//1900 1909//1909 1901//1901 +f 1901//1901 1909//1909 1910//1910 +f 1901//1901 1910//1910 1902//1902 +f 1902//1902 1910//1910 1911//1911 +f 1902//1902 1911//1911 1903//1903 +f 1903//1903 1911//1911 1912//1912 +f 1903//1903 1912//1912 1904//1904 +f 1904//1904 1912//1912 1913//1913 +f 1904//1904 1913//1913 1905//1905 +f 1657//1657 1665//1665 1914//1914 +f 1657//1657 1914//1914 1906//1906 +f 1906//1906 1914//1914 1915//1915 +f 1906//1906 1915//1915 1907//1907 +f 1907//1907 1915//1915 1916//1916 +f 1907//1907 1916//1916 1908//1908 +f 1908//1908 1916//1916 1917//1917 +f 1908//1908 1917//1917 1909//1909 +f 1909//1909 1917//1917 1918//1918 +f 1909//1909 1918//1918 1910//1910 +f 1910//1910 1918//1918 1919//1919 +f 1910//1910 1919//1919 1911//1911 +f 1911//1911 1919//1919 1920//1920 +f 1911//1911 1920//1920 1912//1912 +f 1912//1912 1920//1920 1921//1921 +f 1912//1912 1921//1921 1913//1913 +f 1665//1665 1673//1673 1922//1922 +f 1665//1665 1922//1922 1914//1914 +f 1914//1914 1922//1922 1923//1923 +f 1914//1914 1923//1923 1915//1915 +f 1915//1915 1923//1923 1924//1924 +f 1915//1915 1924//1924 1916//1916 +f 1916//1916 1924//1924 1925//1925 +f 1916//1916 1925//1925 1917//1917 +f 1917//1917 1925//1925 1926//1926 +f 1917//1917 1926//1926 1918//1918 +f 1918//1918 1926//1926 1927//1927 +f 1918//1918 1927//1927 1919//1919 +f 1919//1919 1927//1927 1928//1928 +f 1919//1919 1928//1928 1920//1920 +f 1920//1920 1928//1928 1929//1929 +f 1920//1920 1929//1929 1921//1921 +f 1673//1673 1681//1681 1930//1930 +f 1673//1673 1930//1930 1922//1922 +f 1922//1922 1930//1930 1931//1931 +f 1922//1922 1931//1931 1923//1923 +f 1923//1923 1931//1931 1932//1932 +f 1923//1923 1932//1932 1924//1924 +f 1924//1924 1932//1932 1933//1933 +f 1924//1924 1933//1933 1925//1925 +f 1925//1925 1933//1933 1934//1934 +f 1925//1925 1934//1934 1926//1926 +f 1926//1926 1934//1934 1935//1935 +f 1926//1926 1935//1935 1927//1927 +f 1927//1927 1935//1935 1936//1936 +f 1927//1927 1936//1936 1928//1928 +f 1928//1928 1936//1936 1937//1937 +f 1928//1928 1937//1937 1929//1929 +f 1681//1681 1689//1689 1938//1938 +f 1681//1681 1938//1938 1930//1930 +f 1930//1930 1938//1938 1939//1939 +f 1930//1930 1939//1939 1931//1931 +f 1931//1931 1939//1939 1940//1940 +f 1931//1931 1940//1940 1932//1932 +f 1932//1932 1940//1940 1941//1941 +f 1932//1932 1941//1941 1933//1933 +f 1933//1933 1941//1941 1942//1942 +f 1933//1933 1942//1942 1934//1934 +f 1934//1934 1942//1942 1943//1943 +f 1934//1934 1943//1943 1935//1935 +f 1935//1935 1943//1943 1944//1944 +f 1935//1935 1944//1944 1936//1936 +f 1936//1936 1944//1944 1945//1945 +f 1936//1936 1945//1945 1937//1937 +f 1689//1689 1697//1697 1946//1946 +f 1689//1689 1946//1946 1938//1938 +f 1938//1938 1946//1946 1947//1947 +f 1938//1938 1947//1947 1939//1939 +f 1939//1939 1947//1947 1948//1948 +f 1939//1939 1948//1948 1940//1940 +f 1940//1940 1948//1948 1949//1949 +f 1940//1940 1949//1949 1941//1941 +f 1941//1941 1949//1949 1950//1950 +f 1941//1941 1950//1950 1942//1942 +f 1942//1942 1950//1950 1951//1951 +f 1942//1942 1951//1951 1943//1943 +f 1943//1943 1951//1951 1952//1952 +f 1943//1943 1952//1952 1944//1944 +f 1944//1944 1952//1952 1953//1953 +f 1944//1944 1953//1953 1945//1945 +f 1697//1697 1705//1705 1954//1954 +f 1697//1697 1954//1954 1946//1946 +f 1946//1946 1954//1954 1955//1955 +f 1946//1946 1955//1955 1947//1947 +f 1947//1947 1955//1955 1956//1956 +f 1947//1947 1956//1956 1948//1948 +f 1948//1948 1956//1956 1957//1957 +f 1948//1948 1957//1957 1949//1949 +f 1949//1949 1957//1957 1958//1958 +f 1949//1949 1958//1958 1950//1950 +f 1950//1950 1958//1958 1959//1959 +f 1950//1950 1959//1959 1951//1951 +f 1951//1951 1959//1959 1960//1960 +f 1951//1951 1960//1960 1952//1952 +f 1952//1952 1960//1960 1961//1961 +f 1952//1952 1961//1961 1953//1953 +f 1705//1705 1713//1713 1962//1962 +f 1705//1705 1962//1962 1954//1954 +f 1954//1954 1962//1962 1963//1963 +f 1954//1954 1963//1963 1955//1955 +f 1955//1955 1963//1963 1964//1964 +f 1955//1955 1964//1964 1956//1956 +f 1956//1956 1964//1964 1965//1965 +f 1956//1956 1965//1965 1957//1957 +f 1957//1957 1965//1965 1966//1966 +f 1957//1957 1966//1966 1958//1958 +f 1958//1958 1966//1966 1967//1967 +f 1958//1958 1967//1967 1959//1959 +f 1959//1959 1967//1967 1968//1968 +f 1959//1959 1968//1968 1960//1960 +f 1960//1960 1968//1968 1969//1969 +f 1960//1960 1969//1969 1961//1961 +f 1713//1713 1721//1721 1970//1970 +f 1713//1713 1970//1970 1962//1962 +f 1962//1962 1970//1970 1971//1971 +f 1962//1962 1971//1971 1963//1963 +f 1963//1963 1971//1971 1972//1972 +f 1963//1963 1972//1972 1964//1964 +f 1964//1964 1972//1972 1973//1973 +f 1964//1964 1973//1973 1965//1965 +f 1965//1965 1973//1973 1974//1974 +f 1965//1965 1974//1974 1966//1966 +f 1966//1966 1974//1974 1975//1975 +f 1966//1966 1975//1975 1967//1967 +f 1967//1967 1975//1975 1976//1976 +f 1967//1967 1976//1976 1968//1968 +f 1968//1968 1976//1976 1977//1977 +f 1968//1968 1977//1977 1969//1969 +f 1721//1721 1729//1729 1978//1978 +f 1721//1721 1978//1978 1970//1970 +f 1970//1970 1978//1978 1979//1979 +f 1970//1970 1979//1979 1971//1971 +f 1971//1971 1979//1979 1980//1980 +f 1971//1971 1980//1980 1972//1972 +f 1972//1972 1980//1980 1981//1981 +f 1972//1972 1981//1981 1973//1973 +f 1973//1973 1981//1981 1982//1982 +f 1973//1973 1982//1982 1974//1974 +f 1974//1974 1982//1982 1983//1983 +f 1974//1974 1983//1983 1975//1975 +f 1975//1975 1983//1983 1984//1984 +f 1975//1975 1984//1984 1976//1976 +f 1976//1976 1984//1984 1985//1985 +f 1976//1976 1985//1985 1977//1977 +f 1729//1729 1737//1737 1986//1986 +f 1729//1729 1986//1986 1978//1978 +f 1978//1978 1986//1986 1987//1987 +f 1978//1978 1987//1987 1979//1979 +f 1979//1979 1987//1987 1988//1988 +f 1979//1979 1988//1988 1980//1980 +f 1980//1980 1988//1988 1989//1989 +f 1980//1980 1989//1989 1981//1981 +f 1981//1981 1989//1989 1990//1990 +f 1981//1981 1990//1990 1982//1982 +f 1982//1982 1990//1990 1991//1991 +f 1982//1982 1991//1991 1983//1983 +f 1983//1983 1991//1991 1992//1992 +f 1983//1983 1992//1992 1984//1984 +f 1984//1984 1992//1992 1993//1993 +f 1984//1984 1993//1993 1985//1985 +f 1737//1737 1745//1745 1994//1994 +f 1737//1737 1994//1994 1986//1986 +f 1986//1986 1994//1994 1995//1995 +f 1986//1986 1995//1995 1987//1987 +f 1987//1987 1995//1995 1996//1996 +f 1987//1987 1996//1996 1988//1988 +f 1988//1988 1996//1996 1997//1997 +f 1988//1988 1997//1997 1989//1989 +f 1989//1989 1997//1997 1998//1998 +f 1989//1989 1998//1998 1990//1990 +f 1990//1990 1998//1998 1999//1999 +f 1990//1990 1999//1999 1991//1991 +f 1991//1991 1999//1999 2000//2000 +f 1991//1991 2000//2000 1992//1992 +f 1992//1992 2000//2000 2001//2001 +f 1992//1992 2001//2001 1993//1993 +f 1745//1745 1753//1753 2002//2002 +f 1745//1745 2002//2002 1994//1994 +f 1994//1994 2002//2002 2003//2003 +f 1994//1994 2003//2003 1995//1995 +f 1995//1995 2003//2003 2004//2004 +f 1995//1995 2004//2004 1996//1996 +f 1996//1996 2004//2004 2005//2005 +f 1996//1996 2005//2005 1997//1997 +f 1997//1997 2005//2005 2006//2006 +f 1997//1997 2006//2006 1998//1998 +f 1998//1998 2006//2006 2007//2007 +f 1998//1998 2007//2007 1999//1999 +f 1999//1999 2007//2007 2008//2008 +f 1999//1999 2008//2008 2000//2000 +f 2000//2000 2008//2008 2009//2009 +f 2000//2000 2009//2009 2001//2001 +f 1753//1753 1761//1761 2010//2010 +f 1753//1753 2010//2010 2002//2002 +f 2002//2002 2010//2010 2011//2011 +f 2002//2002 2011//2011 2003//2003 +f 2003//2003 2011//2011 2012//2012 +f 2003//2003 2012//2012 2004//2004 +f 2004//2004 2012//2012 2013//2013 +f 2004//2004 2013//2013 2005//2005 +f 2005//2005 2013//2013 2014//2014 +f 2005//2005 2014//2014 2006//2006 +f 2006//2006 2014//2014 2015//2015 +f 2006//2006 2015//2015 2007//2007 +f 2007//2007 2015//2015 2016//2016 +f 2007//2007 2016//2016 2008//2008 +f 2008//2008 2016//2016 2017//2017 +f 2008//2008 2017//2017 2009//2009 +f 1761//1761 1769//1769 2018//2018 +f 1761//1761 2018//2018 2010//2010 +f 2010//2010 2018//2018 2019//2019 +f 2010//2010 2019//2019 2011//2011 +f 2011//2011 2019//2019 2020//2020 +f 2011//2011 2020//2020 2012//2012 +f 2012//2012 2020//2020 2021//2021 +f 2012//2012 2021//2021 2013//2013 +f 2013//2013 2021//2021 2022//2022 +f 2013//2013 2022//2022 2014//2014 +f 2014//2014 2022//2022 2023//2023 +f 2014//2014 2023//2023 2015//2015 +f 2015//2015 2023//2023 2024//2024 +f 2015//2015 2024//2024 2016//2016 +f 2016//2016 2024//2024 2025//2025 +f 2016//2016 2025//2025 2017//2017 +f 1769//1769 1777//1777 2026//2026 +f 1769//1769 2026//2026 2018//2018 +f 2018//2018 2026//2026 2027//2027 +f 2018//2018 2027//2027 2019//2019 +f 2019//2019 2027//2027 2028//2028 +f 2019//2019 2028//2028 2020//2020 +f 2020//2020 2028//2028 2029//2029 +f 2020//2020 2029//2029 2021//2021 +f 2021//2021 2029//2029 2030//2030 +f 2021//2021 2030//2030 2022//2022 +f 2022//2022 2030//2030 2031//2031 +f 2022//2022 2031//2031 2023//2023 +f 2023//2023 2031//2031 2032//2032 +f 2023//2023 2032//2032 2024//2024 +f 2024//2024 2032//2032 2033//2033 +f 2024//2024 2033//2033 2025//2025 +f 1777//1777 1785//1785 2034//2034 +f 1777//1777 2034//2034 2026//2026 +f 2026//2026 2034//2034 2035//2035 +f 2026//2026 2035//2035 2027//2027 +f 2027//2027 2035//2035 2036//2036 +f 2027//2027 2036//2036 2028//2028 +f 2028//2028 2036//2036 2037//2037 +f 2028//2028 2037//2037 2029//2029 +f 2029//2029 2037//2037 2038//2038 +f 2029//2029 2038//2038 2030//2030 +f 2030//2030 2038//2038 2039//2039 +f 2030//2030 2039//2039 2031//2031 +f 2031//2031 2039//2039 2040//2040 +f 2031//2031 2040//2040 2032//2032 +f 2032//2032 2040//2040 2041//2041 +f 2032//2032 2041//2041 2033//2033 +f 1785//1785 1793//1793 2042//2042 +f 1785//1785 2042//2042 2034//2034 +f 2034//2034 2042//2042 2043//2043 +f 2034//2034 2043//2043 2035//2035 +f 2035//2035 2043//2043 2044//2044 +f 2035//2035 2044//2044 2036//2036 +f 2036//2036 2044//2044 2045//2045 +f 2036//2036 2045//2045 2037//2037 +f 2037//2037 2045//2045 2046//2046 +f 2037//2037 2046//2046 2038//2038 +f 2038//2038 2046//2046 2047//2047 +f 2038//2038 2047//2047 2039//2039 +f 2039//2039 2047//2047 2048//2048 +f 2039//2039 2048//2048 2040//2040 +f 2040//2040 2048//2048 2049//2049 +f 2040//2040 2049//2049 2041//2041 +f 1793//1793 1801//1801 2050//2050 +f 1793//1793 2050//2050 2042//2042 +f 2042//2042 2050//2050 2051//2051 +f 2042//2042 2051//2051 2043//2043 +f 2043//2043 2051//2051 2052//2052 +f 2043//2043 2052//2052 2044//2044 +f 2044//2044 2052//2052 2053//2053 +f 2044//2044 2053//2053 2045//2045 +f 2045//2045 2053//2053 2054//2054 +f 2045//2045 2054//2054 2046//2046 +f 2046//2046 2054//2054 2055//2055 +f 2046//2046 2055//2055 2047//2047 +f 2047//2047 2055//2055 2056//2056 +f 2047//2047 2056//2056 2048//2048 +f 2048//2048 2056//2056 2057//2057 +f 2048//2048 2057//2057 2049//2049 +f 1801//1801 1809//1809 2058//2058 +f 1801//1801 2058//2058 2050//2050 +f 2050//2050 2058//2058 2059//2059 +f 2050//2050 2059//2059 2051//2051 +f 2051//2051 2059//2059 2060//2060 +f 2051//2051 2060//2060 2052//2052 +f 2052//2052 2060//2060 2061//2061 +f 2052//2052 2061//2061 2053//2053 +f 2053//2053 2061//2061 2062//2062 +f 2053//2053 2062//2062 2054//2054 +f 2054//2054 2062//2062 2063//2063 +f 2054//2054 2063//2063 2055//2055 +f 2055//2055 2063//2063 2064//2064 +f 2055//2055 2064//2064 2056//2056 +f 2056//2056 2064//2064 2065//2065 +f 2056//2056 2065//2065 2057//2057 +f 1809//1809 1817//1817 2066//2066 +f 1809//1809 2066//2066 2058//2058 +f 2058//2058 2066//2066 2067//2067 +f 2058//2058 2067//2067 2059//2059 +f 2059//2059 2067//2067 2068//2068 +f 2059//2059 2068//2068 2060//2060 +f 2060//2060 2068//2068 2069//2069 +f 2060//2060 2069//2069 2061//2061 +f 2061//2061 2069//2069 2070//2070 +f 2061//2061 2070//2070 2062//2062 +f 2062//2062 2070//2070 2071//2071 +f 2062//2062 2071//2071 2063//2063 +f 2063//2063 2071//2071 2072//2072 +f 2063//2063 2072//2072 2064//2064 +f 2064//2064 2072//2072 2073//2073 +f 2064//2064 2073//2073 2065//2065 +f 1817//1817 1825//1825 2074//2074 +f 1817//1817 2074//2074 2066//2066 +f 2066//2066 2074//2074 2075//2075 +f 2066//2066 2075//2075 2067//2067 +f 2067//2067 2075//2075 2076//2076 +f 2067//2067 2076//2076 2068//2068 +f 2068//2068 2076//2076 2077//2077 +f 2068//2068 2077//2077 2069//2069 +f 2069//2069 2077//2077 2078//2078 +f 2069//2069 2078//2078 2070//2070 +f 2070//2070 2078//2078 2079//2079 +f 2070//2070 2079//2079 2071//2071 +f 2071//2071 2079//2079 2080//2080 +f 2071//2071 2080//2080 2072//2072 +f 2072//2072 2080//2080 2081//2081 +f 2072//2072 2081//2081 2073//2073 +f 1825//1825 1585//1585 1827//1827 +f 1825//1825 1827//1827 2074//2074 +f 2074//2074 1827//1827 1829//1829 +f 2074//2074 1829//1829 2075//2075 +f 2075//2075 1829//1829 1831//1831 +f 2075//2075 1831//1831 2076//2076 +f 2076//2076 1831//1831 1833//1833 +f 2076//2076 1833//1833 2077//2077 +f 2077//2077 1833//1833 1835//1835 +f 2077//2077 1835//1835 2078//2078 +f 2078//2078 1835//1835 1837//1837 +f 2078//2078 1837//1837 2079//2079 +f 2079//2079 1837//1837 1839//1839 +f 2079//2079 1839//1839 2080//2080 +f 2080//2080 1839//1839 1841//1841 +f 2080//2080 1841//1841 2081//2081 +# 4032 faces, 0 coords texture + +# End of File \ No newline at end of file diff --git a/dev/MinGfx/data/test.png b/dev/MinGfx/data/test.png new file mode 100644 index 0000000..4e888f2 Binary files /dev/null and b/dev/MinGfx/data/test.png differ diff --git a/dev/MinGfx/doc/Doxyfile.in b/dev/MinGfx/doc/Doxyfile.in new file mode 100644 index 0000000..41de5d5 --- /dev/null +++ b/dev/MinGfx/doc/Doxyfile.in @@ -0,0 +1,312 @@ +# Doxyfile 1.8.10 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "MinGfx Toolkit" +PROJECT_NUMBER = @MinGfx_Toolkit_VERSION_MAJOR@.@MinGfx_Toolkit_VERSION_MINOR@ +PROJECT_BRIEF = "A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs." +PROJECT_LOGO = +OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \ + @PROJECT_BINARY_DIR@ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +QT_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = NO +FILE_VERSION_FILTER = +LAYOUT_FILE = @CMAKE_CURRENT_SOURCE_DIR@/doc/DoxygenLayout.xml +CITE_BIB_FILES = +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/doc @CMAKE_CURRENT_SOURCE_DIR@/src +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.h *.md +RECURSIVE = YES +EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/src/external @CMAKE_CURRENT_SOURCE_DIR@/src/shaders +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = mainpage.md +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = @CMAKE_CURRENT_SOURCE_DIR@/doc/header.html +HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/doc/footer.html +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/doc/customdoxygen.css +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 0 +HTML_COLORSTYLE_SAT = 0 +HTML_COLORSTYLE_GAMMA = 100 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = YES +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = YES +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +DIA_PATH = +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = NO +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/dev/MinGfx/doc/DoxygenLayout.xml b/dev/MinGfx/doc/DoxygenLayout.xml new file mode 100644 index 0000000..07e6378 --- /dev/null +++ b/dev/MinGfx/doc/DoxygenLayout.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/MinGfx/doc/api.md b/dev/MinGfx/doc/api.md new file mode 100644 index 0000000..58c78eb --- /dev/null +++ b/dev/MinGfx/doc/api.md @@ -0,0 +1,64 @@ +API - MinGfx Programming Reference Organized by Topic {#api} +========== + +# API by Topic + +| Application Class | +|-------------------| +| [GraphicsApp](@ref mingfx::GraphicsApp) | + + +| 3D Models | +|-----------| +| [QuickShapes](@ref mingfx::QuickShapes) | +| [Mesh](@ref mingfx::Mesh) | + + +| Color and Textures | +|--------------------| +| [Color](@ref mingfx::Color) | +| [Texture2D](@ref mingfx::Texture2D) | + + +| Graphics Math | +|---------------| +| [Matrix4](@ref mingfx::Matrix4) | +| [Point2](@ref mingfx::Point2) | +| [Point3](@ref mingfx::Point3) | +| [Vector2](@ref mingfx::Vector2) | +| [Vector3](@ref mingfx::Vector3) | +| [Ray](@ref mingfx::Ray) | +| [Quaternion](@ref mingfx::Quaternion) | +| [GfxMath](@ref mingfx::GfxMath) | + + +| Shader Programs | +|-----------------| +| [DefaultShader](@ref mingfx::DefaultShader) | +| - [DefaultShader::LightProperties](@ref mingfx::DefaultShader::LightProperties) | +| - [DefaultShader::MaterialProperties](@ref mingfx::DefaultShader::MaterialProperties) | +| [ShaderProgram](@ref mingfx::ShaderProgram) | + + +| User Interface | +|----------------| +| [CraftCam](@ref mingfx::CraftCam) | +| [UniCam](@ref mingfx::UniCam) | + + +| File I/O and System Routines | +|------------------------------| +| [Platform](@ref mingfx::Platform) | + + + + +# Coding Style + +The library follows the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html), in part as an example for students, since this style is also used in several courses. There are several things that programmers who are not familiar with the Google style might find unusual. These are the most common style rules to note: +- C++ source filenames are all lowercase with underscores, and a .cc extension is used instead of .cpp. +- Variable names are all lowercase with underscores. +- Class member variables are named the same as regular variables but with a trailing _, as in my\_member\_var\_. +- Functions start with capital letters unless they are small getter or setter methods. +- There are many other rules, a solid discussion of pros/cons, and an automated style checker [here](https://google.github.io/styleguide/cppguide.html). + diff --git a/dev/MinGfx/doc/customdoxygen.css b/dev/MinGfx/doc/customdoxygen.css new file mode 100644 index 0000000..e1c976b --- /dev/null +++ b/dev/MinGfx/doc/customdoxygen.css @@ -0,0 +1,524 @@ +body, table, div, p, dl { + font: 400 14px/22px "Helvetica", "Arial", sans-serif; + text-decoration: none; + font-weight: normal; +} + +tr { + background-image: none; + background-color: #FFFFFF; +} + +h1.groupheader { + font-size: 100%; + text-decoration: none; + font-weight: normal; +} + +#titlearea +{ + padding: 10px; + margin: 0px; + width: 100%; + border-top: 5px solid black; + border-bottom: 5px solid black; +} + + +div.header +{ + background-image: none; + background-color: #FFFFFF; + margin: 0px; + border-bottom: none; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + + + +.title { + font: 400 14px/28px "Helvetica", "Arial", sans-serif; + font-size: 150%; + font-weight: normal; + margin: 10px 2px; + background-image: none; + background-color: white; + text-transform:uppercase; +} + + +h2.groupheader { + border-bottom: 1px solid black; + color: black; + font-size: 110%; + font-weight: normal; + text-transform:uppercase; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1 { + font-size: 150%; + background-color: rgb(26, 93, 117); + color: white; + padding: 4px; + margin-top: 60px; + margin-bottom: 0px; +} + +h2 { + font-size: 125%; + text-transform:uppercase; + margin-top: 50px; +} + +h3 { + font-size: 110%; + margin-top: 40px; +} + +h4 { + font-size: 100%; +} + +h5 { + font-size: 100%; +} + +h6 { + font-size: 100%; +} + + + +h1, h2, h3, h4, h5, h6 { + font-weight: normal; + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: none; +} + +dt { + padding-top: 20px; + font-weight: normal; + text-decoration: underline; +} + + + + +.tabs, .tabs2, .tabs3 { + text-transform:uppercase; + font-weight:normal; + color:rgb(190,190,190); + background-image: none; + background-color: black; + width: 100%; + z-index: 101; + font-size: 14px; + font-family: "Helvetica", "Arial", sans-serif; + text-shadow: none; +} + +.tabs2 { + color: white; + border-top:1px solid rgb(150,150,150); + font-size: 10px; + text-shadow: none; +} +.tabs3 { + color: white; + font-size: 9px; + text-shadow: none; +} + +.tablist { + margin: 0; + padding: 0; + display: table; + background-color: black; + font-weight: normal; + text-shadow: none; +} + +.tablist li { + float: left; + display: table-cell; + background-image: none; + line-height: 30px; + list-style: none; + font-weight: normal; + text-shadow: none; +} + +.tablist a { + display: block; + padding: 0 30px; + font-weight: normal; + background-image: none; + color:rgb(150,150,150); + text-decoration: none; + outline: none; + text-shadow: none; +} + +.tabs3 .tablist a { + padding: 0 10px; + text-shadow: none; +} + +.tablist a:hover { + background-image: none; + background-repeat:repeat-x; + color:white; + text-decoration: none; + font-weight: normal; + text-shadow: none; + text-decoration: underline; +} + +.tablist li.current a { + background-image: none; + color: rgb(42, 153, 193); + text-shadow: none; +} + + +.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:white; + font-size: 12px; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: white; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:white; +} + + + +div.qindex, div.navpath { + width: 100%; + line-height: 100%; + border-top:1px solid rgb(150,150,150); + background-color: black; +} + +.navpath ul { + font-size: 11px; + background-image: none; + height: 20px; + line-height: 20px; + color: rgb(150,150,150); + border: none; + overflow: hidden; + margin: 0px; + padding: 0px; +} + +.navpath li { + padding-left:30px; +} + +.navpath li.navelem a { + height: 20px; + display: block; + text-decoration: none; + outline: none; + color: rgb(150,150,150); + font-family: "Helvetica", "Arial", sans-serif; + text-shadow: none; + text-decoration: none; +} + +.navpath li.navelem a:hover { + background-image: none; + background-repeat:repeat-x; + color: white; + text-decoration: none; + font-weight: normal; + text-shadow: none; + text-decoration: underline; +} + +a.el { + font-weight: normal; + color: rgb(42, 153, 193); +} + +hr { + height: 0px; + border: none; + border-top: 1px solid black; +} + +hr.footer { + border-top: 0px; +} + + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: white; + border: none; + margin: 0px; + padding: 0 0 0 0; +} + +.memItemLeft, .memItemRight { + padding-top: 8px; +} + + + +.memSeparator { + border-bottom: 1px solid #EEEEEE; + line-height: 1px; + padding: 8px 0 0 0; +} + + + + +pre.fragment { + border: none; + border-left: 3px solid rgb(42, 153, 193); + background-color: white; + padding: 4px 6px; + margin: 4px 2px 4px 30px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 100%; +} + +div.fragment { + border: none; + border-left: 3px solid rgb(42, 153, 193); + background-color: white; + padding: 4px 6px; + margin: 4px 2px 4px 30px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 100%; +} + +div.line { + font-family: monospace, fixed; + font-size: 100%; + min-height: 13px; + line-height: 1.0; + 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+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +span.comment { + color: #800000; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #068000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: white; + border: none; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #EEEEEE; + border-left: 1px solid #EEEEEE; + border-right: 1px solid #EEEEEE; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: normal; + text-shadow: none; + background-image: none; + background-repeat:repeat-x; + background-color: white; + /* opera specific markup */ + box-shadow: none; + /* firefox specific markup */ + -moz-box-shadow: none; + /* webkit specific markup */ + -webkit-box-shadow: none; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #EEEEEE; + border-left: 1px solid #EEEEEE; + border-right: 1px solid #EEEEEE; + padding: 6px 10px 2px 10px; + background-color: white; + border-top-width: 0; + background-image: none; + background-repeat:repeat-x; + /* opera specific markup */ + box-shadow: none; + /* firefox specific markup */ + -moz-box-shadow: none; + /* webkit specific markup */ + -webkit-box-shadow: none; +} + +.paramname { + color: #148caf; + white-space: nowrap; +} + + +a { + color: rgb(42, 153, 193); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: rgb(42, 153, 193); +} + + +span.lineno { + width: 0px; + padding-right: 4px; + text-align: right; + border-right: 0px; + background-color: #E8E8E8; + white-space: pre; +} + +#MSearchBox { + margin-top: 2px; +} + + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; + width: 33%; +} + +table.doxtable td, table.doxtable th { + border: 0px solid #373737; + padding: 3px 7px 2px; + font-size: 110%; +} + +table.doxtable th { + background-color: white; + color: black; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + font-weight: normal; + text-transform: uppercase; + text-align: left; +} + +p code { + background-color: #E8E8E8; +} diff --git a/dev/MinGfx/doc/footer.html b/dev/MinGfx/doc/footer.html new file mode 100644 index 0000000..3e7e4f4 --- /dev/null +++ b/dev/MinGfx/doc/footer.html @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/dev/MinGfx/doc/header.html b/dev/MinGfx/doc/header.html new file mode 100644 index 0000000..7160b77 --- /dev/null +++ b/dev/MinGfx/doc/header.html @@ -0,0 +1,55 @@ + + + + + + + +$projectname: $title +$title + + + +$treeview +$search +$mathjax + +$extrastylesheet + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+
$projectname +  $projectnumber +
+
$projectbrief
+
+
$projectbrief
+
$searchbox
+
+ + diff --git a/dev/MinGfx/doc/index.html b/dev/MinGfx/doc/index.html new file mode 100644 index 0000000..7252082 --- /dev/null +++ b/dev/MinGfx/doc/index.html @@ -0,0 +1,2 @@ + + diff --git a/dev/MinGfx/doc/installation.md b/dev/MinGfx/doc/installation.md new file mode 100644 index 0000000..e1c67a5 --- /dev/null +++ b/dev/MinGfx/doc/installation.md @@ -0,0 +1,200 @@ +Installation Guide {#installation} +========== + +# Prereqs {#install-prereqs} + +MinGfx is built using the cross-platform CMake tool. Before building MinGfx, you will need to install CMake version 3.9 or higher (https://cmake.org/). On Mac, you will need to have Xcode installed as well as the [optional Xcode command line tools](https://www.embarcadero.com/starthere/xe5/mobdevsetup/ios/en/installing_the_commandline_tools.html). + +If you haven't already, you'll want to clone the MinGfx source code using git, so make sure you have git installed as well. + + +# Background for CMake Beginners {#cmake-background} + +If you are new to CMake, this is the minimum background you should have before building MinGfx. + +CMake is a cross-platform tool for generating native Unix Makefiles and project workspaces (e.g., Xcode projects, Visual Studio solutions) for building projects. Projects use CMakeLists.txt files to describe how they should be built. These files provide input for the cmake application, which uses them to generate project files for a variety of development environments. CMake can generate Makefiles for building MinGfx on linux systems or project files for building MinGfx with popular IDEs (e.g., XCode, Visual Studio, Eclipse, CodeBLocks). + +There are three versions of the cmake application that are provided with the install from Kitware. You can use any of these with MinGfx: +1. *cmake* is the command line version where all build options must be specified on the command line. +2. *ccmake* is a visual interface that runs in a terminal. This is nice because all of the available build options are listed for you to see at once, and you can simply press the SPACEBAR to turn them on/off or type in specific values. The downside for ccmake is that it does not have a separate log window, so status messages flash by so fast that you cannot read them, and input from spin-off cmake processes (like those used in the MinGfx configure step) are not captured correctly. It's possible to still use ccmake with MinGfx, but we do not recommend it. +3. *cmake-gui* is an OS-specific windowed version. Like ccmake, the GUI provides a useful list all of the available build options. Unlike ccmake, it also includes a nice scrollable log of all of the status messages. So, this is the preferred version for new users and for the first time you build a project. + +With CMake, it's best to do an out-of-source build. That means that when you start CMake you must tell it two paths: 1. the path to the MinGfx source tree, AND 2. the path to the place where you would like all the built files to be created. When running cmake-gui, these can be set interactively with a file selection dialog, but all three versions respond to command line options, and this is generally the easiest way to start up cmake. So, we suggest starting *cmake-gui* from the command line. First cd to the directory you wish to use for the built files, then pass a single required command line argument for the path to the MinGfx source tree. Usually, you will see this written as a series of 3 steps -- the common idiom for cmake builds: +~~~ +// from within the root of the project's source directory +mkdir build +cd build +cmake-gui .. +~~~ + +If you are using *cmake* you can pass a variety of other options to CMake on the command line with flags such as -D AUTOBUILD_NANOGUI=ON, to tell MinGfx to autobuild the nanogui library that it depends upon. With *cmake*, you can end up with a long string of arguments in order to setup the build you want. With *cmake-gui*, you set all of these build options within the user interface instead, and this is how we will proceed in the instructions that follow. + + +# Setup a New Graphics Build Tree {#build-tree} + +Here's a complete annotated list of steps to setup a new build tree for creating graphics programs. In truth, you don't need to create this entire build tree strucutre just to work with MinGfx, but this is good practice, and a good guide for students. + + +## 1. Create a Linux-Style Directory Tree + +Libraries will get installed to a lib/ directory. Include files will go in include/, executables in bin/, and we'll put the source we are developing inside dev/. + +~~~ +mkdir -p /Users/keefe/courses/csci4611/sw +cd /Users/courses/csci4611/sw +mkdir lib +mkdir include +mkdir bin +mkdir dev +~~~ + +IMPORTANT: On Windows, you will need to add the `bin` directory you just created to your PATH environment variable. If you have not done this before, you will find many instructions online. Here is one good description of [how to add a directory to the PATH environment variable on Windows](https://www.java.com/en/download/help/path.xml). + + + +## 2. Download the MinGfx Project +To download use: +~~~ +cd dev +git clone http://github.com/ivlab/MinGfx +~~~ + + +## 3. Create an Initial CMake Build Configuration + +~~~ +cd MinGfx +mkdir build +cd build +cmake-gui .. +~~~ + +Press the 'Configure' button. Then, select the Generator you would like to use from the list provided (e.g., Xcode, Visual Studio, Unix Makefiles). Click Done. + +Wait for CMake to do an initial configuration. This will populate an initial list of CMake and MinGfx build options. Each time you run configure, *cmake-gui* will display any new configuration options highlighted in *red*. So, do not be alarmed when the whole options window turns red during this first configure operation -- that is normal behavior since at this point, all of the options are new. + +Do you see an error in the CMake output window? If so, don't worry about this yet, we'll come back to it in a minute. + + +## 4. Set the CMAKE_INSTALL_PREFIX Variable to the Root of Your Directory Tree + +Now, using cmake-gui, scroll through the table of variables until you find the one named CMAKE_INSTALL_PREFIX. Click on it and edit its value to point to the root of the directory tree you created in Step 1. The root for the example tree used in Step 1 would be /Users/keefe/courses/csci4611/sw. In other words, the root is the last directory before you get to lib, include, bin, and dev. + +Once you make this change, you can press the Configure button again. It doesn't hurt to press Configure multiple times. You need to do it at least once after every change you make. Notice how the variables highlighted in red go away when you do this because they are no longer new options -- cmake knows that you have already had a chance to see them once. + + +## 5. If Needed, Set AUTOBUILD_NANOGUI to ON and Build Dependencies + +Now, take a look at the output window at the bottom of cmake-gui. If you see the following error there, then we'll address that next. If not, then nanogui must already be installed on your system, and you can skip to step 6. +~~~ +Searching for NanoGUI library... +Could NOT find NANOGUI (missing: NANOGUI_LIBRARIES) +CMake Error at cmake/UseNanoGUI.cmake:96 (message): +The NanoGUI library was not found on the system. You can: (1) install +NanoGUI yourself, (2) point cmake to an already-installed version of +NanoGUI by adding the installation prefix of NanoGUI to the +CMAKE_PREFIX_PATH environment variable, or (3) set AUTOBUILD_NANOGUI to ON +and run cmake configure again. AUTOBUILD_NANOGUI will: 1. download +NanoGUI, 2. build NanoGUI, and 3. install NanoGUI to the +CMAKE_INSTALL_PREFIX (currently set to +/Users/keefe/courses/tmp/MinGfx/build/install). If you want to use the +AUTOBUILD feature, adjust CMAKE_INSTALL_PREFIX as desired now, set +AUTOBUILD_NANOGUI to ON, and then run cmake configure again. +Call Stack (most recent call first): +src/CMakeLists.txt:80 (UseNanoGUI) +CMakeLists.txt:186 (include) +~~~ +This error tells us that cmake could not find the nanogui library pre-installed on our system. Luckily, MinGfx includes support for downloading, building, and installing nanogui for you using the AUTOBUILD_NANOGUI feature. + +Scroll through the list of CMake variables again until you find AUTOBUILD_NANOGUI and click on the checkbox next to it to turn it on. Now, click Configure again. This time the configure step will take a while, perhaps 5 minutes, to run because it will be downloading, building, and installing nanogui and all of its dependencies. + +This step should finish without an error. If you do see an error and you are working with this as part of a UMN course, you may need to stop now and ask for help from a TA or on the class forum -- perhaps there is something we haven't planned for in the particular setup of your computer. + + +## 6. Generate the Build System / Project Files + +Finally, you are ready to press the Generate button. This is the step that will actually generate the Unix Makefiles, Visual Studio Solution File, or Xcode Project File needed to build MinGfx. + + +## 7. Build MinGfx with the Specified Options + +Click Open Project if you generated project files for an IDE, or if you generated Unix Makefiles return to your shell and the build directory. Now, build the project as you normally would in these enviornments. + +For Xcode: `click the Triangle button to build the ALL_BUILD target` + +For Visual Studio: In the Solution Explorer Window `right click on ALL_BUILD` and select `Build` + +For Unix Makefiles: run `make all`. + + +## 8. Install the Library to your Directory Tree + +For Xcode: `click on ALL_BUILD to reveal a dropdown list and select install` then `click the Triangle button` + +For Visual Studio: In the Solution Explorer Window `right click on INSTALL` and select `Build`. + +For Unix Makefiles: run `make install`. + +To see if it worked take a look in the lib, include, and bin directories within the root of the tree you setup in Step 1. You should see the test programs inside bin/ and folders for MinVR-1.0 inside lib/ and include/. + + +## 9. Run a Test Program + +For Xcode: `click on ALL_BUILD to reveal a dropdown list and select mingfx-test-gui-plus-opengl` then `click the Triangle button` + +For Visual Studio: In the Solution Explorer Window `right click on mingfx-test-gui-plus-opengl` then selece `Set as StartUp Project`. Now, `click the green triangle button to run the program`. IMPORTANT NOTE: When the program runs it will need to find some .dlls that were installed to your `bin` directory in Step 8. So, the bin directory *must be in your windows PATH*. If you skipped this part of Step 1, go back and add `bin` to your PATH environment variable now. Then, you may need to restart Visual Studio for it to recognize the new setting. + +For Unix Makefiles: from within the build directory run: `tests/mingfx-gui-plus-opengl` + + + + +# Create Your Own Graphics Program {#example} + +*Prereq:* Before getting started, make sure you have installed MinGfx, going all the way through the 9th step above. + +The project in the MinGfx/example folder is an example of a stand-alone project that uses a separate cmake build system. This means we can copy it and move it out of the MinGfx source tree to serve as a starting point for your own project. Let's do that now. + +~~~ +cd /Users/courses/csci4611/sw/dev (or wherever you put your dev directory) +cp -r MinGfx/example/ mingfx-example +~~~ + +Now, before we build the example, we need to make sure it knows where to find MinGfx. +~~~ +cd mingfx-example +open up the CMakeLists.txt file in your favorite text editor +~~~ + +Near the top of the file, find the following lines +~~~ +# !!!!!!!!!!!!! EDIT THE FOLLOWING LINE AS NEEDED !!!!!!!!!!!!! +list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../build/install ../../..) +~~~ +and add a path to the end of the list to point to the ROOT of your directory tree, for example: +~~~ +# !!!!!!!!!!!!! EDIT THE FOLLOWING LINE AS NEEDED !!!!!!!!!!!!! +list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../build/install ../../.. /Users/keefe/courses/cs4611/sw) +~~~ + +Now, we're ready to build this example using the same cmake idiom as before: +~~~ +mkdir build +cd build +cmake-gui .. +~~~ +Then, click *Configure*. If you want to install this example program, you may now edit the CMAKE_INSTALL_PREFIX as before and rerun *Configure*. It should not be necessary to change any of the other cmake variables for this example program. + +Next, click *Generate* to produce project files for your IDE or makefiles. + +Next, build the example program within your IDE or by running `make`. + +Finally, you can run your first example graphics program with the command: +~~~ +./mingfx-example +~~~ + +You can change the name of the executable, add more header and source files to the project and make other changes to the build process by editing the CMakeLists.txt file, but remember that after each change, you must run CMake's *Configure* and *Generate* steps again. + +To reiterate the point above, if you are using an IDE, it is important to remember to add new files to your project by editing the CMakeLists.txt file NOT by using File->Add To Project.. or whatever option is provided inside your IDE. Since we using CMake to generate the IDE's project files, and we may want to switch to a different IDE or to Makefiles in the future, the CMakeLists.txt file needs to be treated as the master record of all of the build settings. + diff --git a/dev/MinGfx/doc/mainpage.md b/dev/MinGfx/doc/mainpage.md new file mode 100644 index 0000000..db77de5 --- /dev/null +++ b/dev/MinGfx/doc/mainpage.md @@ -0,0 +1,27 @@ +MinGfx Toolkit Documentation {#mainpage} +========== + +## Getting Started +1. [libMinGfx Installation Guide](@ref installation) +2. [Create Your Own Graphics Program by Copying an Example](@ref example) +3. [Bookmark the API - The MinGfx Programming Reference Organized by Topic](@ref api) + +## Programming Guide +* [MinGfx Programming Reference](@ref api) +* Adding NanoGUI Elements (buttons, sliders, other GUI widgets) + - [NanoGUI Documentation](https://nanogui.readthedocs.io/en/latest/) + - [NanoGUI GitHub Repo](https://github.com/wjakob/nanogui) +* Drawing Using NanoVG (for 2D vector graphics) + - [NanoVG Documentation](https://github.com/memononen/NanoVG) + - [nanovg.h -- the best place to see all the possible commands](https://github.com/memononen/nanovg/blob/master/src/nanovg.h) +* Drawing Using OpenGL (for 3D graphics) + - [learnopengl.com](https://learnopengl.com/Introduction) + - [Google for OpenGL 3.3 Guide](https://www.google.com/search?q=opengl+3.3+guide) + + +## Overview + +The MinGfx Toolkit is a minimal library for writing cross-platform (Windows, OSX, linux) graphics programs with modern OpenGL 3.3+ support. Application programmers should subclass from MinGfx::GraphicsApp, which provides callbacks for several styles of rendering and user interfaces. On-screen graphical user interfaces can be created with built-in support for NanoGUI. 2D vector graphics rendering is supported by linking with NanoVG. 3D graphics rendering is supported via MinGfx::Mesh, MinGfx::Shader, MinGfx::Texture2D, and related classes. Additionally, application programmers can do whatever custom 2D or 3D rendering is needed with direct calls to OpenGL. + +The library is maintained by Prof. Daniel Keefe (dfk@umn.edu) and is used for instructional purposes in UMN computer science courses (CSci-4611, CSci-3081W, ...) as well as some research projects. See LICENSE.txt for additional details. + diff --git a/dev/MinGfx/docs/html/aabb_8h.html b/dev/MinGfx/docs/html/aabb_8h.html new file mode 100644 index 0000000..1310e5d --- /dev/null +++ b/dev/MinGfx/docs/html/aabb_8h.html @@ -0,0 +1,117 @@ + + + + + + + +MinGfx Toolkit: src/aabb.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
aabb.h File Reference
+
+
+
#include "point3.h"
+#include "vector3.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::AABB
 A 3D axis-aligned bounding box defined by two corners (min and max). More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+ + + +

+Functions

AABB mingfx::operator+ (const AABB &A, const AABB &B)
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/aabb_8h_source.html b/dev/MinGfx/docs/html/aabb_8h_source.html new file mode 100644 index 0000000..bef9f18 --- /dev/null +++ b/dev/MinGfx/docs/html/aabb_8h_source.html @@ -0,0 +1,185 @@ + + + + + + + +MinGfx Toolkit: src/aabb.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
aabb.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  David Schroeder, 2010-ish, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  Dan Keefe, 2018, University of Minnesota
+
12  ...
+
13  */
+
14 
+
15 #ifndef SRC_AABB_H_
+
16 #define SRC_AABB_H_
+
17 
+
18 #include "point3.h"
+
19 #include "vector3.h"
+
20 
+
21 namespace mingfx {
+
22 
+
23 // forward declaration
+
24 class Mesh;
+
25 
+
31 class AABB {
+
32 public:
+
34  AABB();
+
35 
+
37  AABB(const Point3 &a);
+
38 
+
40  AABB(const Point3 &a, const Point3 &b, const Point3 &c);
+
41 
+
44  AABB(const Vector3 &extents);
+
45 
+
48  AABB(const Point3 &center, const Vector3 &extents);
+
49 
+
51  AABB(const Mesh &mesh);
+
52 
+
54  AABB(const Mesh &mesh, unsigned int tri_id);
+
55 
+
56  virtual ~AABB();
+
57 
+ +
60 
+
63  float Volume() const;
+
64 
+
66  Point3 min() const;
+
67 
+
69  Point3 max() const;
+
70 
+
74  void set_user_data(int data);
+
75 
+
79  int user_data();
+
80 
+
81 private:
+
82 
+
83  Point3 min_, max_;
+
84 
+
85  int user_data_;
+
86 
+
87  friend AABB operator+(const AABB &A, const AABB &B);
+
88 };
+
89 
+
90 // Returns an AABB that contains both A and B completely (kind of like a union)
+
91 AABB operator+(const AABB &A, const AABB &B);
+
92 
+
93 
+
94 } // end namespace
+
95 
+
96 #endif
+
A 3D axis-aligned bounding box defined by two corners (min and max).
Definition: aabb.h:31
+
AABB(const Vector3 &extents)
Box centered at the origin with width, height, and depth specified by the vector.
+
float Volume() const
Returns the volume of the box or -1.0 when empty and 0.0 if the box contains just a single point.
+
AABB(const Mesh &mesh, unsigned int tri_id)
Box that contains just triangle number "tri_id" from the specified mesh.
+
int user_data()
You can set this to whatever you want in order to use it as a handle into your own program....
+
Point3 min() const
Returns the coordinates for the minimum corner of the box.
+
Vector3 Dimensions() const
Returns the dimensions of the box in x, y, and z as a 3D vector.
+
AABB(const Point3 &a)
Box that contains a single point.
+
friend AABB operator+(const AABB &A, const AABB &B)
+
AABB(const Point3 &center, const Vector3 &extents)
Box centered at the center with width, height, and depth specified by the vector.
+
AABB(const Mesh &mesh)
Box that contains a whole mesh.
+
AABB(const Point3 &a, const Point3 &b, const Point3 &c)
Box that contains a triangle defined by 3 points.
+
Point3 max() const
Returns the coordinates for the maximum corner of the box.
+
void set_user_data(int data)
You can set this to whatever you want in order to use it as a handle into your own program....
+
virtual ~AABB()
+
AABB()
Creates an empty box.
+
A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
Definition: mesh.h:127
+
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Definition: point3.h:52
+
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Definition: vector3.h:62
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+
AABB operator+(const AABB &A, const AABB &B)
+ + +
+ + + + + diff --git a/dev/MinGfx/docs/html/annotated.html b/dev/MinGfx/docs/html/annotated.html new file mode 100644 index 0000000..549003b --- /dev/null +++ b/dev/MinGfx/docs/html/annotated.html @@ -0,0 +1,119 @@ + + + + + + + +MinGfx Toolkit: Class List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 NmingfxNamespace for the MinGfx Toolkit
 CAABBA 3D axis-aligned bounding box defined by two corners (min and max)
 CBVHA Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersection tests by carving up space into a hierarchy of partitions represented in a tree
 CColorRepresents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with OpenGL
 CCraftCamThis implements a user interface for controlling the camera with the mouse
 CDefaultShaderA simple GLSL shader for textured per-fragment Phong shading with multiple light sources
 CLightPropertiesSmall data structure to hold per-light properties
 CMaterialPropertiesSmall data structure to hold properties of the material to be lit
 CGfxMathThis class holds a variety of static math functions that are useful to have defined with creating graphics programs
 CGraphicsAppThis is the main application base class for the MinGfx Toolkit
 CMatrix4A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be compatible with OpenGL
 CMeshA triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader
 CPlatformProvides access to the underlying file system and other platform-specific routines
 CPoint2A 2D Point with floating point coordinates, used for storing 2D texture coordinates, screen-space graphics, and mouse input
 CPoint3A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graphics operations
 CQuaternionA quaternion to represent rotations in 3D space
 CQuickShapesThis class provides a quick way to draw shapes for use in debugging or simple scenes
 CRayStores the mathematical object of a ray that begins at an origin (a 3D point) and points in a direction (a unit 3D vector)
 CShaderProgramA wrapper around GLSL shader programs
 CTextShader
 CTextFormat
 CTexture2DA wrapper around a 2D texture that supports loading images from files or setting texture color data directly
 CUniCamThis implements a user interface for controlling the camera with the mouse
 CVector2A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements, and screen-space vectors
 CVector3A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graphics operations
 Cstbrp_context
 Cstbrp_node
 Cstbrp_rect
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/api.html b/dev/MinGfx/docs/html/api.html new file mode 100644 index 0000000..5e0df60 --- /dev/null +++ b/dev/MinGfx/docs/html/api.html @@ -0,0 +1,168 @@ + + + + + + + +MinGfx Toolkit: API - MinGfx Programming Reference Organized by Topic + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
API - MinGfx Programming Reference Organized by Topic
+
+
+

+

+API by Topic

+ + + + + +
Application Class
GraphicsApp
+ + + + + + + +
3D Models
QuickShapes
Mesh
+ + + + + + + +
Color and Textures
Color
Texture2D
+ + + + + + + + + + + + + + + + + + + +
Graphics Math
Matrix4
Point2
Point3
Vector2
Vector3
Ray
Quaternion
GfxMath
+ + + + + + + + + + + +
Shader Programs
DefaultShader
- DefaultShader::LightProperties
- DefaultShader::MaterialProperties
ShaderProgram
+ + + + + + + +
User Interface
CraftCam
UniCam
+ + + + + +
File I/O and System Routines
Platform
+

+Coding Style

+

The library follows the Google C++ Style Guide, in part as an example for students, since this style is also used in several courses. There are several things that programmers who are not familiar with the Google style might find unusual. These are the most common style rules to note:

    +
  • C++ source filenames are all lowercase with underscores, and a .cc extension is used instead of .cpp.
  • +
  • Variable names are all lowercase with underscores.
  • +
  • Class member variables are named the same as regular variables but with a trailing _, as in my_member_var_.
  • +
  • Functions start with capital letters unless they are small getter or setter methods.
  • +
  • There are many other rules, a solid discussion of pros/cons, and an automated style checker here.
  • +
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/api_8md.html b/dev/MinGfx/docs/html/api_8md.html new file mode 100644 index 0000000..5bb16f2 --- /dev/null +++ b/dev/MinGfx/docs/html/api_8md.html @@ -0,0 +1,87 @@ + + + + + + + +MinGfx Toolkit: doc/api.md File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
doc/api.md File Reference
+
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/bc_s.png b/dev/MinGfx/docs/html/bc_s.png new file mode 100644 index 0000000..21d5d36 Binary files /dev/null and b/dev/MinGfx/docs/html/bc_s.png differ diff --git a/dev/MinGfx/docs/html/bdwn.png b/dev/MinGfx/docs/html/bdwn.png new file mode 100644 index 0000000..f057806 Binary files /dev/null and b/dev/MinGfx/docs/html/bdwn.png differ diff --git a/dev/MinGfx/docs/html/bvh_8h.html b/dev/MinGfx/docs/html/bvh_8h.html new file mode 100644 index 0000000..d87f356 --- /dev/null +++ b/dev/MinGfx/docs/html/bvh_8h.html @@ -0,0 +1,111 @@ + + + + + + + +MinGfx Toolkit: src/bvh.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
bvh.h File Reference
+
+
+
#include "aabb.h"
+#include "point3.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::BVH
 A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersection tests by carving up space into a hierarchy of partitions represented in a tree. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/bvh_8h_source.html b/dev/MinGfx/docs/html/bvh_8h_source.html new file mode 100644 index 0000000..2cbbadf --- /dev/null +++ b/dev/MinGfx/docs/html/bvh_8h_source.html @@ -0,0 +1,177 @@ + + + + + + + +MinGfx Toolkit: src/bvh.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
bvh.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  David Schroeder, 2010-ish, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  Dan Keefe, 2018, University of Minnesota
+
12  ...
+
13  */
+
14 
+
15 #ifndef SRC_BVH_H_
+
16 #define SRC_BVH_H_
+
17 
+
18 #include "aabb.h"
+
19 #include "point3.h"
+
20 
+
21 
+
22 namespace mingfx {
+
23 
+
24 // forward declarations
+
25 class Mesh;
+
26 class Ray;
+
27 
+
28 
+
40 class BVH {
+
41 public:
+
43  BVH();
+
44 
+
45  virtual ~BVH();
+
46 
+
57  void CreateFromMesh(const Mesh &mesh);
+
58 
+
59 
+
63  void CreateFromListOfBoxes(const std::vector<AABB> &boxes);
+
64 
+
65 
+
73  std::vector<int> IntersectAndReturnUserData(const Ray &r) const;
+
74 
+
75 
+
76 private:
+
77 
+
78  // Simple internal data structure for storing each node of the BVH tree.
+
79  class Node {
+
80  public:
+
81  Node() : child1(NULL), child2(NULL) {}
+
82 
+
83  // Links to children
+
84  Node *child1;
+
85  Node *child2;
+
86 
+
87  // Contains all geometry below this node.
+
88  AABB box;
+
89  };
+
90 
+
91 
+
92  // for now, the copy constructor is private so no copies are allowed.
+
93  // eventually, this would be good to implement and then it can be made public.
+
94  BVH(const BVH &other);
+
95 
+
96  void BuildHierarchyRecursive(Node *node, std::vector<AABB> boxes);
+
97  void IntersectRecursive(const Ray &r, Node *node, std::vector<int> *data_list) const;
+
98  void FreeNodeRecursive(Node* node);
+
99 
+
100  Node* root_;
+
101 };
+
102 
+
103 
+
104 } // end namespace
+
105 
+
106 #endif
+ +
A 3D axis-aligned bounding box defined by two corners (min and max).
Definition: aabb.h:31
+
A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersecti...
Definition: bvh.h:40
+
void CreateFromMesh(const Mesh &mesh)
Creates a bounding volume hierarchy where each leaf node contains a single triangle from the mesh.
+
void CreateFromListOfBoxes(const std::vector< AABB > &boxes)
Creates a BVH where each leaf node contains one of the boxes passed in to the function.
+
BVH()
Initializes the class with an empty hierarchy.
+
virtual ~BVH()
+
std::vector< int > IntersectAndReturnUserData(const Ray &r) const
Traverse the BVH to find leaf nodes whose AABBs are intersected by the ray.
+
A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
Definition: mesh.h:127
+
Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a directi...
Definition: ray.h:54
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+ +
+ + + + + diff --git a/dev/MinGfx/docs/html/classes.html b/dev/MinGfx/docs/html/classes.html new file mode 100644 index 0000000..58382ef --- /dev/null +++ b/dev/MinGfx/docs/html/classes.html @@ -0,0 +1,132 @@ + + + + + + + +MinGfx Toolkit: Class Index + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class Index
+
+ + + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b-members.html new file mode 100644 index 0000000..68f1b69 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b-members.html @@ -0,0 +1,109 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::AABB Member List
+
+
+ +

This is the complete list of members for mingfx::AABB, including all inherited members.

+ + + + + + + + + + + + + + + + +
AABB()mingfx::AABB
AABB(const Point3 &a)mingfx::AABB
AABB(const Point3 &a, const Point3 &b, const Point3 &c)mingfx::AABB
AABB(const Vector3 &extents)mingfx::AABB
AABB(const Point3 &center, const Vector3 &extents)mingfx::AABB
AABB(const Mesh &mesh)mingfx::AABB
AABB(const Mesh &mesh, unsigned int tri_id)mingfx::AABB
Dimensions() constmingfx::AABB
max() constmingfx::AABB
min() constmingfx::AABB
operator+(const AABB &A, const AABB &B)mingfx::AABBfriend
set_user_data(int data)mingfx::AABB
user_data()mingfx::AABB
Volume() constmingfx::AABB
~AABB()mingfx::AABBvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b.html b/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b.html new file mode 100644 index 0000000..e4ba05b --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_a_a_b_b.html @@ -0,0 +1,509 @@ + + + + + + + +MinGfx Toolkit: mingfx::AABB Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::AABB Class Reference
+
+
+

Detailed Description

+

A 3D axis-aligned bounding box defined by two corners (min and max).

+

AABBs can be added together using the + operator to make them grow to cover the extents of both boxes. Each box can also store a user_id (int), which can be used to associate the box with some other object in your program.

+ +

Definition at line 31 of file aabb.h.

+
+

#include <aabb.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 AABB ()
 Creates an empty box. More...
 
 AABB (const Point3 &a)
 Box that contains a single point. More...
 
 AABB (const Point3 &a, const Point3 &b, const Point3 &c)
 Box that contains a triangle defined by 3 points. More...
 
 AABB (const Vector3 &extents)
 Box centered at the origin with width, height, and depth specified by the vector. More...
 
 AABB (const Point3 &center, const Vector3 &extents)
 Box centered at the center with width, height, and depth specified by the vector. More...
 
 AABB (const Mesh &mesh)
 Box that contains a whole mesh. More...
 
 AABB (const Mesh &mesh, unsigned int tri_id)
 Box that contains just triangle number "tri_id" from the specified mesh. More...
 
virtual ~AABB ()
 
Vector3 Dimensions () const
 Returns the dimensions of the box in x, y, and z as a 3D vector. More...
 
float Volume () const
 Returns the volume of the box or -1.0 when empty and 0.0 if the box contains just a single point. More...
 
Point3 min () const
 Returns the coordinates for the minimum corner of the box. More...
 
Point3 max () const
 Returns the coordinates for the maximum corner of the box. More...
 
void set_user_data (int data)
 You can set this to whatever you want in order to use it as a handle into your own program. The intent is to make it possible for you to associate this AABB with the id of some object in your application. More...
 
int user_data ()
 You can set this to whatever you want in order to use it as a handle into your own program. The intent is to make it possible for you to associate this AABB with the id of some object in your application. More...
 
+ + + +

+Friends

AABB operator+ (const AABB &A, const AABB &B)
 
+

Constructor & Destructor Documentation

+ +

◆ AABB() [1/7]

+ +
+
+ + + + + + + +
mingfx::AABB::AABB ()
+
+ +

Creates an empty box.

+ +
+
+ +

◆ AABB() [2/7]

+ +
+
+ + + + + + + + +
mingfx::AABB::AABB (const Point3a)
+
+ +

Box that contains a single point.

+ +
+
+ +

◆ AABB() [3/7]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::AABB::AABB (const Point3a,
const Point3b,
const Point3c 
)
+
+ +

Box that contains a triangle defined by 3 points.

+ +
+
+ +

◆ AABB() [4/7]

+ +
+
+ + + + + + + + +
mingfx::AABB::AABB (const Vector3extents)
+
+ +

Box centered at the origin with width, height, and depth specified by the vector.

+ +
+
+ +

◆ AABB() [5/7]

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::AABB::AABB (const Point3center,
const Vector3extents 
)
+
+ +

Box centered at the center with width, height, and depth specified by the vector.

+ +
+
+ +

◆ AABB() [6/7]

+ +
+
+ + + + + + + + +
mingfx::AABB::AABB (const Meshmesh)
+
+ +

Box that contains a whole mesh.

+ +
+
+ +

◆ AABB() [7/7]

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::AABB::AABB (const Meshmesh,
unsigned int tri_id 
)
+
+ +

Box that contains just triangle number "tri_id" from the specified mesh.

+ +
+
+ +

◆ ~AABB()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::AABB::~AABB ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ Dimensions()

+ +
+
+ + + + + + + +
Vector3 mingfx::AABB::Dimensions () const
+
+ +

Returns the dimensions of the box in x, y, and z as a 3D vector.

+ +
+
+ +

◆ max()

+ +
+
+ + + + + + + +
Point3 mingfx::AABB::max () const
+
+ +

Returns the coordinates for the maximum corner of the box.

+ +
+
+ +

◆ min()

+ +
+
+ + + + + + + +
Point3 mingfx::AABB::min () const
+
+ +

Returns the coordinates for the minimum corner of the box.

+ +
+
+ +

◆ set_user_data()

+ +
+
+ + + + + + + + +
void mingfx::AABB::set_user_data (int data)
+
+ +

You can set this to whatever you want in order to use it as a handle into your own program. The intent is to make it possible for you to associate this AABB with the id of some object in your application.

+ +
+
+ +

◆ user_data()

+ +
+
+ + + + + + + +
int mingfx::AABB::user_data ()
+
+ +

You can set this to whatever you want in order to use it as a handle into your own program. The intent is to make it possible for you to associate this AABB with the id of some object in your application.

+ +
+
+ +

◆ Volume()

+ +
+
+ + + + + + + +
float mingfx::AABB::Volume () const
+
+ +

Returns the volume of the box or -1.0 when empty and 0.0 if the box contains just a single point.

+ +
+
+

Friends And Related Function Documentation

+ +

◆ operator+

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
AABB operator+ (const AABBA,
const AABBB 
)
+
+friend
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h-members.html new file mode 100644 index 0000000..68ec3cc --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h-members.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::BVH Member List
+
+
+ +

This is the complete list of members for mingfx::BVH, including all inherited members.

+ + + + + + +
BVH()mingfx::BVH
CreateFromListOfBoxes(const std::vector< AABB > &boxes)mingfx::BVH
CreateFromMesh(const Mesh &mesh)mingfx::BVH
IntersectAndReturnUserData(const Ray &r) constmingfx::BVH
~BVH()mingfx::BVHvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h.html b/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h.html new file mode 100644 index 0000000..032d128 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_b_v_h.html @@ -0,0 +1,232 @@ + + + + + + + +MinGfx Toolkit: mingfx::BVH Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::BVH Class Reference
+
+
+

Detailed Description

+

A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersection tests by carving up space into a hierarchy of partitions represented in a tree.

+

Each node of the tree is represented as an AABB (Axis-Aligned Bounding Box) that contains all of the nodes under it. Different objects can be stored inside each bounding box. For example, when a BVH is created for a mesh, each leaf node can contain a AABB that contains just a single triangle. Or, when a BVH is created for an entire scene, you could have each leaf node contain an entire mesh or other object within the scene. In each case, use AABB's set_user_data() and user_data() methods to store a handle for whetever you want to store inside the nodes.

+ +

Definition at line 40 of file bvh.h.

+
+

#include <bvh.h>

+ + + + + + + + + + + + + + + + +

+Public Member Functions

 BVH ()
 Initializes the class with an empty hierarchy. More...
 
virtual ~BVH ()
 
void CreateFromMesh (const Mesh &mesh)
 Creates a bounding volume hierarchy where each leaf node contains a single triangle from the mesh. More...
 
void CreateFromListOfBoxes (const std::vector< AABB > &boxes)
 Creates a BVH where each leaf node contains one of the boxes passed in to the function. More...
 
std::vector< int > IntersectAndReturnUserData (const Ray &r) const
 Traverse the BVH to find leaf nodes whose AABBs are intersected by the ray. More...
 
+

Constructor & Destructor Documentation

+ +

◆ BVH()

+ +
+
+ + + + + + + +
mingfx::BVH::BVH ()
+
+ +

Initializes the class with an empty hierarchy.

+ +
+
+ +

◆ ~BVH()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::BVH::~BVH ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ CreateFromListOfBoxes()

+ +
+
+ + + + + + + + +
void mingfx::BVH::CreateFromListOfBoxes (const std::vector< AABB > & boxes)
+
+ +

Creates a BVH where each leaf node contains one of the boxes passed in to the function.

+ +
+
+ +

◆ CreateFromMesh()

+ +
+
+ + + + + + + + +
void mingfx::BVH::CreateFromMesh (const Meshmesh)
+
+ +

Creates a bounding volume hierarchy where each leaf node contains a single triangle from the mesh.

+

For leaf nodes, the triangle index can be retrieved with:

int tri_id = leafnode->box.user_data();
+

The user_data will be -1 for non-leaf nodes. Once the structure has been created, it can be used to perform fast ray-mesh intersection tests. See Ray::FastIntersectMesh().

+ +
+
+ +

◆ IntersectAndReturnUserData()

+ +
+
+ + + + + + + + +
std::vector<int> mingfx::BVH::IntersectAndReturnUserData (const Rayr) const
+
+ +

Traverse the BVH to find leaf nodes whose AABBs are intersected by the ray.

+

These are candidates to test more thoroughly using whatever ray-object intersection test is appropriate for the objects stored inside the AABB. This routine returns the user_data for each AABB leaf node. In the case of a BVH created using CreateFromMesh, this means it stores the indices to the mesh triangles that should be tested for ray-triangle intersection.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_color-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_color-members.html new file mode 100644 index 0000000..2ad8cd6 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_color-members.html @@ -0,0 +1,109 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Color Member List
+
+
+ +

This is the complete list of members for mingfx::Color, including all inherited members.

+ + + + + + + + + + + + + + + + +
Color()mingfx::Color
Color(float red, float green, float blue, float alpha=1.0)mingfx::Color
Color(float *p)mingfx::Color
Color(const std::vector< float > &vals)mingfx::Color
Color(const Color &p)mingfx::Color
Lerp(const Color &b, float alpha) constmingfx::Color
Lerp(const Color &a, const Color &b, float alpha)mingfx::Colorstatic
operator!=(const Color &p) constmingfx::Color
operator=(const Color &p)mingfx::Color
operator==(const Color &p) constmingfx::Color
operator[](const int i) constmingfx::Color
operator[](const int i)mingfx::Color
ToVector() constmingfx::Color
value_ptr() constmingfx::Color
~Color()mingfx::Colorvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_color.html b/dev/MinGfx/docs/html/classmingfx_1_1_color.html new file mode 100644 index 0000000..d863be4 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_color.html @@ -0,0 +1,529 @@ + + + + + + + +MinGfx Toolkit: mingfx::Color Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+ +
+

Detailed Description

+

Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with OpenGL.

+

Example usage:

Color black(0, 0, 0);
+
Color white(1, 1, 1);
+
Color gray(0.5, 0.5, 0.5);
+
Color tranparent_red(1.0, 0.0, 0.0, 0.5);
+
Color orange(1.0, 0.65, 0.0);
+
+
float red_component_of_orange = orange[0];
+
float green_component_of_orange = orange[1];
+
float blue_component_of_orange = orange[2];
+
float alpha_component_of_orange = orange[3];
+
+
// Use value_ptr() to send the array of floats directly to OpenGL commands
+
glColor4fv(orange.value_ptr());
+
Color()
Defaults to black.
+
+

Definition at line 41 of file color.h.

+
+

#include <color.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Color ()
 Defaults to black. More...
 
 Color (float red, float green, float blue, float alpha=1.0)
 Constructs a color. Alpha defaults to 1.0 (completely opaque) More...
 
 Color (float *p)
 Constructs a point given a pointer to float array. More...
 
 Color (const std::vector< float > &vals)
 Constructs a point given a 3 or 4-element vector of floats. More...
 
 Color (const Color &p)
 Copy constructor. More...
 
virtual ~Color ()
 Color destructor. More...
 
bool operator== (const Color &p) const
 Check for equality. More...
 
bool operator!= (const Color &p) const
 Check for inequality. More...
 
Coloroperator= (const Color &p)
 Assignment operator. More...
 
float operator[] (const int i) const
 Accesses the ith component of the color, stored in RGBA order. More...
 
float & operator[] (const int i)
 Accesses the ith coordinate of the color, stored in RGBA order. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array. More...
 
std::vector< float > ToVector () const
 
Color Lerp (const Color &b, float alpha) const
 Linear interpolation between this color and another. Alpha=0.0 returns this color, and alpha=1.0 returns the other color, other values blend between the two via a linear interpolation on each color channel. More...
 
+ + + + +

+Static Public Member Functions

static Color Lerp (const Color &a, const Color &b, float alpha)
 Linear interpolation between two colors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two via a linear interpolation on each color channel. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Color() [1/5]

+ +
+
+ + + + + + + +
mingfx::Color::Color ()
+
+ +

Defaults to black.

+ +
+
+ +

◆ Color() [2/5]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::Color::Color (float red,
float green,
float blue,
float alpha = 1.0 
)
+
+ +

Constructs a color. Alpha defaults to 1.0 (completely opaque)

+ +
+
+ +

◆ Color() [3/5]

+ +
+
+ + + + + + + + +
mingfx::Color::Color (float * p)
+
+ +

Constructs a point given a pointer to float array.

+ +
+
+ +

◆ Color() [4/5]

+ +
+
+ + + + + + + + +
mingfx::Color::Color (const std::vector< float > & vals)
+
+ +

Constructs a point given a 3 or 4-element vector of floats.

+ +
+
+ +

◆ Color() [5/5]

+ +
+
+ + + + + + + + +
mingfx::Color::Color (const Colorp)
+
+ +

Copy constructor.

+ +
+
+ +

◆ ~Color()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Color::~Color ()
+
+virtual
+
+ +

Color destructor.

+ +
+
+

Member Function Documentation

+ +

◆ Lerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Color mingfx::Color::Lerp (const Colora,
const Colorb,
float alpha 
)
+
+static
+
+ +

Linear interpolation between two colors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two via a linear interpolation on each color channel.

+ +
+
+ +

◆ Lerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Color mingfx::Color::Lerp (const Colorb,
float alpha 
) const
+
+ +

Linear interpolation between this color and another. Alpha=0.0 returns this color, and alpha=1.0 returns the other color, other values blend between the two via a linear interpolation on each color channel.

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Color::operator!= (const Colorp) const
+
+ +

Check for inequality.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Color& mingfx::Color::operator= (const Colorp)
+
+ +

Assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Color::operator== (const Colorp) const
+
+ +

Check for equality.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Color::operator[] (const int i)
+
+ +

Accesses the ith coordinate of the color, stored in RGBA order.

+ +
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Color::operator[] (const int i) const
+
+ +

Accesses the ith component of the color, stored in RGBA order.

+ +
+
+ +

◆ ToVector()

+ +
+
+ + + + + + + +
std::vector<float> mingfx::Color::ToVector () const
+
+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Color::value_ptr () const
+
+ +

Returns a const pointer to the raw data array.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam-members.html new file mode 100644 index 0000000..758badd --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam-members.html @@ -0,0 +1,110 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::CraftCam Member List
+
+
+ +

This is the complete list of members for mingfx::CraftCam, including all inherited members.

+ + + + + + + + + + + + + + + + + +
CraftCam()mingfx::CraftCam
CraftCam(const Matrix4 &initial_view_matrix)mingfx::CraftCam
eye()mingfx::CraftCam
look()mingfx::CraftCam
look_scale()mingfx::CraftCam
OnMouseMove(const Vector2 &normalized_mouse_delta)mingfx::CraftCam
rotation_scale()mingfx::CraftCam
set_look_scale(float s)mingfx::CraftCam
set_rotation_scale(float s)mingfx::CraftCam
set_translation_scale(float s)mingfx::CraftCam
set_view_matrix(Matrix4 view_matrix)mingfx::CraftCam
translation_scale()mingfx::CraftCam
UpdateHeight(float new_y_value)mingfx::CraftCam
UpdateSimulation(double dt, GLFWwindow *window_ptr)mingfx::CraftCam
view_matrix()mingfx::CraftCam
~CraftCam()mingfx::CraftCamvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html new file mode 100644 index 0000000..502b4cb --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_craft_cam.html @@ -0,0 +1,541 @@ + + + + + + + +MinGfx Toolkit: mingfx::CraftCam Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::CraftCam Class Reference
+
+
+

Detailed Description

+

This implements a user interface for controlling the camera with the mouse.

+

This interface is appropriate for "first person" camera control, as in games like Minecraft.

+

Use the arrow keys or A,S,W,Z keys to move around in the virtual world. UP/DOWN and W/Z move forward and back. LEFT/RIGHT or A/S rotate your body to face left or right. You can rotate and tilt your head to look left/right/up/down by moving the mouse. In Minecraft, that movement happens whenever you move the mouse, regardless of whether you are holding down a mouse button, but in some games you want to hold the camera still while you use the mouse to draw on the screen or do something else. It's possible to use this interface both ways by calling the MouseMove() function either every time the mouse moves, or only when the mouse is in a dragging mode.

+

Example usage:

// Create a global or member variable in your MyGraphicsApp class:
+
CraftCam cam_;
+
+
+
// If you want to always rotate the view with the mouse, use this:
+
void MyGraphicsApp::OnMouseMove(const Point2 &pos, const Vector2 &delta) {
+
Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);
+
cam_.OnMouseMove(delta_ndc);
+
}
+
+
// Alternatively, if you want to only rotate the view when the mouse button is
+
// held down, use this instead. Call cam_.OnMouseMove() in either one function
+
// or the other, but not both!
+
// void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) {
+
// Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);
+
// cam_.OnMouseMove(delta_ndc);
+
// }
+
+
// This tells the camera to simulate walking based on the keyboard keys currently
+
// pressed. You need to pass a pointer to the underlying GLFW window created by
+
// GraphicsApp.
+
void MyGraphicsApp::UpdateSimulation(double dt) {
+
cam_.UpdateSimulation(dt, window());
+
}
+
+
void MyGraphicsApp::InitOpenGL() {
+
cam_.set_view_matrix(Matrix4::lookAt(Point3(0,2,2), Point3(0,2,0), Vector3(0,1,0)););
+
}
+
+
void MyGraphicsApp::DrawOpenGL() {
+
// draw your scene using the view matrix from the camera
+
Matrix4 proj_matrix = Matrix4::perspective(60, aspect_ratio(), 1, 200);
+
Matrix4 view_matrix = cam_.view_matrix();
+
Matrix4 model_matrix = Matrix4::RotateY(to_radians(45.0));
+
quick_shapes.DrawCube(model_matrix, view_matirx, proj_matrix, Color(1,1,1));
+
}
+
Matrix4 view_matrix()
Access the camera view matrix created by the CraftCam interactions via this method and use it to draw...
+
CraftCam()
Creates a CraftCam object with an initial view matrix = identity.
+
+

Definition at line 79 of file craft_cam.h.

+
+

#include <craft_cam.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 CraftCam ()
 Creates a CraftCam object with an initial view matrix = identity. More...
 
 CraftCam (const Matrix4 &initial_view_matrix)
 Creates a CraftCam object with the supplied initial view matrix. More...
 
virtual ~CraftCam ()
 
void UpdateSimulation (double dt, GLFWwindow *window_ptr)
 Call this from your app's UpdateSimulation() method. This tells the camera to simulate walking based on the keyboard keys currently pressed. You need to pass a pointer to the underlying GLFW window created by GraphicsApp. Example: More...
 
void OnMouseMove (const Vector2 &normalized_mouse_delta)
 Call this from your app's OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to always rotate the view with the mouse. Remember to convert the mouse coordinates (usually reported by window managers in pixels) into normalized device coordinates: More...
 
Matrix4 view_matrix ()
 Access the camera view matrix created by the CraftCam interactions via this method and use it to draw the geometry in your scence. For example, within GraphicsApp::DrawUsingOpenGL(), you might have: More...
 
Point3 eye ()
 Returns the "eye" point (i.e., focal point) of the camera in world space coordinates. More...
 
Vector3 look ()
 Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates. More...
 
void UpdateHeight (float new_y_value)
 Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix, then use set_view_matrix(), but if you just want to update the height, e.g., while walking around a bumpy terrain, then use this. More...
 
void set_view_matrix (Matrix4 view_matrix)
 This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix. More...
 
float translation_scale ()
 This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. More...
 
void set_translation_scale (float s)
 This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up. More...
 
float rotation_scale ()
 This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. More...
 
void set_rotation_scale (float s)
 This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. More...
 
float look_scale ()
 This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. More...
 
void set_look_scale (float s)
 This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up. More...
 
+

Constructor & Destructor Documentation

+ +

◆ CraftCam() [1/2]

+ +
+
+ + + + + + + +
mingfx::CraftCam::CraftCam ()
+
+ +

Creates a CraftCam object with an initial view matrix = identity.

+ +
+
+ +

◆ CraftCam() [2/2]

+ +
+
+ + + + + + + + +
mingfx::CraftCam::CraftCam (const Matrix4initial_view_matrix)
+
+ +

Creates a CraftCam object with the supplied initial view matrix.

+ +
+
+ +

◆ ~CraftCam()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::CraftCam::~CraftCam ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ eye()

+ +
+
+ + + + + + + +
Point3 mingfx::CraftCam::eye ()
+
+ +

Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.

+ +
+
+ +

◆ look()

+ +
+
+ + + + + + + +
Vector3 mingfx::CraftCam::look ()
+
+ +

Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.

+ +
+
+ +

◆ look_scale()

+ +
+
+ + + + + + + +
float mingfx::CraftCam::look_scale ()
+
+ +

This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up.

+ +
+
+ +

◆ OnMouseMove()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::OnMouseMove (const Vector2normalized_mouse_delta)
+
+ +

Call this from your app's OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to always rotate the view with the mouse. Remember to convert the mouse coordinates (usually reported by window managers in pixels) into normalized device coordinates:

+
void MyGraphicsApp::OnMouseMove(const Point2 &pos, const Vector2 &delta) {
+
Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);
+
cam_.OnMouseMove(delta_ndc);
+
}
+

Alternatively, if you want to only rotate the view when the mouse button is held down, use On*MouseDrag() instead:

void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) {
+
Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos);
+
cam_.OnMouseMove(delta_ndc);
+
}
+
+
+
+ +

◆ rotation_scale()

+ +
+
+ + + + + + + +
float mingfx::CraftCam::rotation_scale ()
+
+ +

This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up.

+ +
+
+ +

◆ set_look_scale()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::set_look_scale (float s)
+
+ +

This is the scale factor used to speed up / slow down looking around when moving the head with the mouse. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up.

+ +
+
+ +

◆ set_rotation_scale()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::set_rotation_scale (float s)
+
+ +

This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, smaller values will make the camera turn slower, larger values will speed it up.

+ +
+
+ +

◆ set_translation_scale()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::set_translation_scale (float s)
+
+ +

This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up.

+ +
+
+ +

◆ set_view_matrix()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::set_view_matrix (Matrix4 view_matrix)
+
+ +

This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix.

+ +
+
+ +

◆ translation_scale()

+ +
+
+ + + + + + + +
float mingfx::CraftCam::translation_scale ()
+
+ +

This is the scale factor used to speed up / slow down forward/backward translation when walking for the UP / DOWN keys. It defaults to 1.0, smaller values will make the camera walk slower, larger values will speed it up.

+ +
+
+ +

◆ UpdateHeight()

+ +
+
+ + + + + + + + +
void mingfx::CraftCam::UpdateHeight (float new_y_value)
+
+ +

Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix, then use set_view_matrix(), but if you just want to update the height, e.g., while walking around a bumpy terrain, then use this.

+ +
+
+ +

◆ UpdateSimulation()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::CraftCam::UpdateSimulation (double dt,
GLFWwindow * window_ptr 
)
+
+ +

Call this from your app's UpdateSimulation() method. This tells the camera to simulate walking based on the keyboard keys currently pressed. You need to pass a pointer to the underlying GLFW window created by GraphicsApp. Example:

+
void MyGraphicsApp::UpdateSimulation(double dt) {
+
cam_.UpdateSimulation(dt, window());
+
}
+
+
+
+ +

◆ view_matrix()

+ +
+
+ + + + + + + +
Matrix4 mingfx::CraftCam::view_matrix ()
+
+ +

Access the camera view matrix created by the CraftCam interactions via this method and use it to draw the geometry in your scence. For example, within GraphicsApp::DrawUsingOpenGL(), you might have:

+
Matrix4 P = Matrix4::Perspective(30, aspect_ratio(), 1, 20);
+
Matrix4 V = cam.view_matrix();
+
Matrix4 M = Matrix4::RotateY(GfxMath::ToRadians(45.0));
+
quick_shapes.DrawCube(M, V, P, Color(1,1,1));
+
static float ToRadians(float degrees)
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader-members.html new file mode 100644 index 0000000..e68c9e0 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader-members.html @@ -0,0 +1,105 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::DefaultShader Member List
+
+
+ +

This is the complete list of members for mingfx::DefaultShader, including all inherited members.

+ + + + + + + + + + + + +
AddLight(LightProperties light)mingfx::DefaultShader
DefaultShader(bool add_default_light=true)mingfx::DefaultShader
Draw(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, Mesh *mesh, const MaterialProperties &material)mingfx::DefaultShader
Init()mingfx::DefaultShader
light(int i)mingfx::DefaultShader
MAX_LIGHTSmingfx::DefaultShaderstatic
num_lights()mingfx::DefaultShader
SetLight(int i, LightProperties light)mingfx::DefaultShader
StopProgram()mingfx::DefaultShader
UseProgram(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const MaterialProperties &material)mingfx::DefaultShader
~DefaultShader()mingfx::DefaultShadervirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader.html new file mode 100644 index 0000000..3787d3d --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader.html @@ -0,0 +1,465 @@ + + + + + + + +MinGfx Toolkit: mingfx::DefaultShader Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::DefaultShader Class Reference
+
+
+

Detailed Description

+

A simple GLSL shader for textured per-fragment Phong shading with multiple light sources.

+

This can be used to draw 3D models stored in a mingfx::Mesh data structure or you can use it with your own geometry data structures. Lighting properties are stored within the class itself since these are considered part of the shading model. Material properties are considered properties of the meshes or other materials you wish to draw so these are stored outside of the class and passed into the Draw() or UseProgram() functions.

+

An example of using DefaultShader to render a mesh:

DefaultShader phong_shader;
+
Mesh teapot;
+
DefaultShader::MaterialProperties teapot_material;
+
+
void Init() {
+
// initialize the shader
+
DefaultShader::LightProperties red_light;
+
red_light.position = Point3(-10, 5, 5);
+
red_light.diffuseIntensity = Color(1,0,0);
+
phong_shader.AddLight(red_light);
+
+
// initialize the mesh
+
teapot.LoadFromOBJ(Platform::FindMinGfxDataFile("teapot.obj"));
+
}
+
+
void DrawUsingOpenGL() {
+
Matrix4 M;
+
Matrix4 V = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0));
+
Matrix4 P = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0);
+
phong_shader.Draw(M, V, P, teapot, teapot_material);
+
}
+
void Init()
This loads vertex and fragment shaders from files, compiles them, and links them. So,...
+
DefaultShader(bool add_default_light=true)
The constructor defaults to adding a single white light to the scene at (10,10,10)....
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up)
Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the des...
+
static std::string FindMinGfxDataFile(const std::string &basename)
Searches for a data file that ships with MinGfx.
+
+

Definition at line 62 of file default_shader.h.

+
+

#include <default_shader.h>

+ + + + + + + + +

+Classes

class  LightProperties
 Small data structure to hold per-light properties. More...
 
class  MaterialProperties
 Small data structure to hold properties of the material to be lit. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 DefaultShader (bool add_default_light=true)
 The constructor defaults to adding a single white light to the scene at (10,10,10). Change this by passing it 'false'. The constructor does not load and compile the shader right away. This is done inside Init(). More...
 
virtual ~DefaultShader ()
 
void AddLight (LightProperties light)
 Multiple lights are supported, this adds one to the end of the list. Up to MAX_LIGHTS can be added. More...
 
void SetLight (int i, LightProperties light)
 Changes the properties for a light that was already added. More...
 
void Init ()
 This loads vertex and fragment shaders from files, compiles them, and links them. So, it must be called from within an active OpenGL context, for example, from within GraphicsApp::Init() or GraphicsApp::DrawUsingOpenGL(). If you call Draw() before calling Init(), then Init() will be called as the first step within Draw(). So, if you do not mind a slowdown on the very first frame of your program, it is fine to skip calling Init(). More...
 
void Draw (const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, Mesh *mesh, const MaterialProperties &material)
 This starts the shader and sets its uniform variables based upon the current set of lights, the material properties passed in, and the model, view, and projection matrices. Then, it calls mesh->Draw(). After drawing, it disables the shader. More...
 
void UseProgram (const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const MaterialProperties &material)
 Only needed if you do not want to draw a Mesh. This does all of the same setup for drawing that the Draw() function does and then it returns so that you may draw your own geometry however you want. After doing your draw must call StopProgram() to turn off the shader. More...
 
void StopProgram ()
 Only needed if you do not want to draw a Mesh. Call this after UseProgram() and after drawing your geometry to turn off the shader. More...
 
int num_lights ()
 
LightProperties light (int i)
 
+ + + + +

+Static Public Attributes

static const unsigned int MAX_LIGHTS = 10
 If changed, this needs to also be changed in the glsl shader code. More...
 
+

Constructor & Destructor Documentation

+ +

◆ DefaultShader()

+ +
+
+ + + + + + + + +
mingfx::DefaultShader::DefaultShader (bool add_default_light = true)
+
+ +

The constructor defaults to adding a single white light to the scene at (10,10,10). Change this by passing it 'false'. The constructor does not load and compile the shader right away. This is done inside Init().

+ +
+
+ +

◆ ~DefaultShader()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::DefaultShader::~DefaultShader ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ AddLight()

+ +
+
+ + + + + + + + +
void mingfx::DefaultShader::AddLight (LightProperties light)
+
+ +

Multiple lights are supported, this adds one to the end of the list. Up to MAX_LIGHTS can be added.

+ +
+
+ +

◆ Draw()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::DefaultShader::Draw (const Matrix4model,
const Matrix4view,
const Matrix4projection,
Meshmesh,
const MaterialPropertiesmaterial 
)
+
+ +

This starts the shader and sets its uniform variables based upon the current set of lights, the material properties passed in, and the model, view, and projection matrices. Then, it calls mesh->Draw(). After drawing, it disables the shader.

+ +
+
+ +

◆ Init()

+ +
+
+ + + + + + + +
void mingfx::DefaultShader::Init ()
+
+ +

This loads vertex and fragment shaders from files, compiles them, and links them. So, it must be called from within an active OpenGL context, for example, from within GraphicsApp::Init() or GraphicsApp::DrawUsingOpenGL(). If you call Draw() before calling Init(), then Init() will be called as the first step within Draw(). So, if you do not mind a slowdown on the very first frame of your program, it is fine to skip calling Init().

+ +
+
+ +

◆ light()

+ +
+
+ + + + + + + + +
LightProperties mingfx::DefaultShader::light (int i)
+
+ +
+
+ +

◆ num_lights()

+ +
+
+ + + + + + + +
int mingfx::DefaultShader::num_lights ()
+
+ +
+
+ +

◆ SetLight()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::DefaultShader::SetLight (int i,
LightProperties light 
)
+
+ +

Changes the properties for a light that was already added.

+ +
+
+ +

◆ StopProgram()

+ +
+
+ + + + + + + +
void mingfx::DefaultShader::StopProgram ()
+
+ +

Only needed if you do not want to draw a Mesh. Call this after UseProgram() and after drawing your geometry to turn off the shader.

+ +
+
+ +

◆ UseProgram()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::DefaultShader::UseProgram (const Matrix4model,
const Matrix4view,
const Matrix4projection,
const MaterialPropertiesmaterial 
)
+
+ +

Only needed if you do not want to draw a Mesh. This does all of the same setup for drawing that the Draw() function does and then it returns so that you may draw your own geometry however you want. After doing your draw must call StopProgram() to turn off the shader.

+ +
+
+

Member Data Documentation

+ +

◆ MAX_LIGHTS

+ +
+
+ + + + + +
+ + + + +
const unsigned int mingfx::DefaultShader::MAX_LIGHTS = 10
+
+static
+
+ +

If changed, this needs to also be changed in the glsl shader code.

+ +

Definition at line 66 of file default_shader.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties-members.html new file mode 100644 index 0000000..5eb35e8 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties-members.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::DefaultShader::LightProperties Member List
+
+ + + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties.html new file mode 100644 index 0000000..b2a402d --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_light_properties.html @@ -0,0 +1,214 @@ + + + + + + + +MinGfx Toolkit: mingfx::DefaultShader::LightProperties Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::DefaultShader::LightProperties Class Reference
+
+
+

Detailed Description

+

Small data structure to hold per-light properties.

+ +

Definition at line 88 of file default_shader.h.

+
+

#include <default_shader.h>

+ + + + +

+Public Member Functions

 LightProperties ()
 
+ + + + + + + + + +

+Public Attributes

Point3 position
 
Color ambient_intensity
 
Color diffuse_intensity
 
Color specular_intensity
 
+

Constructor & Destructor Documentation

+ +

◆ LightProperties()

+ +
+
+ + + + + +
+ + + + + + + +
mingfx::DefaultShader::LightProperties::LightProperties ()
+
+inline
+
+ +

Definition at line 96 of file default_shader.h.

+ +
+
+

Member Data Documentation

+ +

◆ ambient_intensity

+ +
+
+ + + + +
Color mingfx::DefaultShader::LightProperties::ambient_intensity
+
+ +

Definition at line 91 of file default_shader.h.

+ +
+
+ +

◆ diffuse_intensity

+ +
+
+ + + + +
Color mingfx::DefaultShader::LightProperties::diffuse_intensity
+
+ +

Definition at line 92 of file default_shader.h.

+ +
+
+ +

◆ position

+ +
+
+ + + + +
Point3 mingfx::DefaultShader::LightProperties::position
+
+ +

Definition at line 90 of file default_shader.h.

+ +
+
+ +

◆ specular_intensity

+ +
+
+ + + + +
Color mingfx::DefaultShader::LightProperties::specular_intensity
+
+ +

Definition at line 93 of file default_shader.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties-members.html new file mode 100644 index 0000000..83ee843 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties-members.html @@ -0,0 +1,100 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::DefaultShader::MaterialProperties Member List
+
+ + + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties.html b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties.html new file mode 100644 index 0000000..27400b1 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_default_shader_1_1_material_properties.html @@ -0,0 +1,232 @@ + + + + + + + +MinGfx Toolkit: mingfx::DefaultShader::MaterialProperties Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::DefaultShader::MaterialProperties Class Reference
+
+
+

Detailed Description

+

Small data structure to hold properties of the material to be lit.

+ +

Definition at line 70 of file default_shader.h.

+
+

#include <default_shader.h>

+ + + + +

+Public Member Functions

 MaterialProperties ()
 
+ + + + + + + + + + + +

+Public Attributes

Color ambient_reflectance
 
Color diffuse_reflectance
 
Color specular_reflectance
 
float shinniness
 
Texture2D surface_texture
 
+

Constructor & Destructor Documentation

+ +

◆ MaterialProperties()

+ +
+
+ + + + + +
+ + + + + + + +
mingfx::DefaultShader::MaterialProperties::MaterialProperties ()
+
+inline
+
+ +

Definition at line 80 of file default_shader.h.

+ +
+
+

Member Data Documentation

+ +

◆ ambient_reflectance

+ +
+
+ + + + +
Color mingfx::DefaultShader::MaterialProperties::ambient_reflectance
+
+ +

Definition at line 72 of file default_shader.h.

+ +
+
+ +

◆ diffuse_reflectance

+ +
+
+ + + + +
Color mingfx::DefaultShader::MaterialProperties::diffuse_reflectance
+
+ +

Definition at line 73 of file default_shader.h.

+ +
+
+ +

◆ shinniness

+ +
+
+ + + + +
float mingfx::DefaultShader::MaterialProperties::shinniness
+
+ +

Definition at line 75 of file default_shader.h.

+ +
+
+ +

◆ specular_reflectance

+ +
+
+ + + + +
Color mingfx::DefaultShader::MaterialProperties::specular_reflectance
+
+ +

Definition at line 74 of file default_shader.h.

+ +
+
+ +

◆ surface_texture

+ +
+
+ + + + +
Texture2D mingfx::DefaultShader::MaterialProperties::surface_texture
+
+ +

Definition at line 76 of file default_shader.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math-members.html new file mode 100644 index 0000000..f0ee0f2 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math-members.html @@ -0,0 +1,107 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::GfxMath Member List
+
+
+ +

This is the complete list of members for mingfx::GfxMath, including all inherited members.

+ + + + + + + + + + + + + + +
Clamp(float x, float a, float b)mingfx::GfxMathstatic
HALF_PImingfx::GfxMathstatic
iLerp(int a, int b, float alpha)mingfx::GfxMathstatic
Lerp(float a, float b, float alpha)mingfx::GfxMathstatic
PImingfx::GfxMathstatic
ScreenToDepthPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float planeDepth)mingfx::GfxMathstatic
ScreenToNearPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt)mingfx::GfxMathstatic
ScreenToWorld(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float normalizedZ)mingfx::GfxMathstatic
ToDegrees(float radians)mingfx::GfxMathstatic
ToDegrees(Vector3 radians)mingfx::GfxMathstatic
ToRadians(float degrees)mingfx::GfxMathstatic
ToRadians(Vector3 degrees)mingfx::GfxMathstatic
TWO_PImingfx::GfxMathstatic
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math.html b/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math.html new file mode 100644 index 0000000..938c08c --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_gfx_math.html @@ -0,0 +1,591 @@ + + + + + + + +MinGfx Toolkit: mingfx::GfxMath Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::GfxMath Class Reference
+
+
+

Detailed Description

+

This class holds a variety of static math functions that are useful to have defined with creating graphics programs.

+ +

Definition at line 28 of file gfxmath.h.

+
+

#include <gfxmath.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static float Clamp (float x, float a, float b)
 Returns a if x is less than a and b if x is greater than b. More...
 
static float ToRadians (float degrees)
 
static float ToDegrees (float radians)
 
static Vector3 ToRadians (Vector3 degrees)
 
static Vector3 ToDegrees (Vector3 radians)
 
static float Lerp (float a, float b, float alpha)
 
static int iLerp (int a, int b, float alpha)
 
static Point3 ScreenToNearPlane (const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt)
 Converts a 2D point on the filmplane represented in Normalized Device Coorindates, which means (-1,1) for the top left corner of the screen and (1,-1) for the bottom right corner, to a 3D point that lies on the camera's near plane. Useful for converting mouse coordinates into a 3D point. Remember that this uses NORMALIZED device coordinates for the screenPt, not pixels. GraphicsApp and most other graphics engines report mouse move events in pixels, so you need to convert these to normalized device coordinates first. If you are using GraphicsApp, you can do this with: Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos);. More...
 
static Point3 ScreenToDepthPlane (const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float planeDepth)
 Similar to filmplane2D_to_nearplane3D() but here rather than using the nearplane, you specify the depth of the plane to use as a distance away from the camera's focal point. More...
 
static Point3 ScreenToWorld (const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float normalizedZ)
 Converts a 2D point on the filmplane represented in Normalized Device Coorindates, which means (-1,1) for the top left corner of the screen and (1,-1) for the bottom right corner, to a 3D point in the world. The depth buffer value under the pixel must be supplied. If you are using GraphicsApp, you can use the mouse pos in pixels to get the required arguments like this: Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos); float normZ = graphicsApp->z_value_at_pixel(mousePos);. More...
 
+ + + + + + + +

+Static Public Attributes

static const float PI
 
static const float TWO_PI
 
static const float HALF_PI
 
+

Member Function Documentation

+ +

◆ Clamp()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static float mingfx::GfxMath::Clamp (float x,
float a,
float b 
)
+
+static
+
+ +

Returns a if x is less than a and b if x is greater than b.

+ +
+
+ +

◆ iLerp()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int mingfx::GfxMath::iLerp (int a,
int b,
float alpha 
)
+
+static
+
+ +
+
+ +

◆ Lerp()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static float mingfx::GfxMath::Lerp (float a,
float b,
float alpha 
)
+
+static
+
+ +
+
+ +

◆ ScreenToDepthPlane()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Point3 mingfx::GfxMath::ScreenToDepthPlane (const Matrix4viewMatrix,
const Matrix4projMatrix,
const Point2normalizedScreenPt,
float planeDepth 
)
+
+static
+
+ +

Similar to filmplane2D_to_nearplane3D() but here rather than using the nearplane, you specify the depth of the plane to use as a distance away from the camera's focal point.

+ +
+
+ +

◆ ScreenToNearPlane()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Point3 mingfx::GfxMath::ScreenToNearPlane (const Matrix4viewMatrix,
const Matrix4projMatrix,
const Point2normalizedScreenPt 
)
+
+static
+
+ +

Converts a 2D point on the filmplane represented in Normalized Device Coorindates, which means (-1,1) for the top left corner of the screen and (1,-1) for the bottom right corner, to a 3D point that lies on the camera's near plane. Useful for converting mouse coordinates into a 3D point. Remember that this uses NORMALIZED device coordinates for the screenPt, not pixels. GraphicsApp and most other graphics engines report mouse move events in pixels, so you need to convert these to normalized device coordinates first. If you are using GraphicsApp, you can do this with: Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos);.

+ +
+
+ +

◆ ScreenToWorld()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Point3 mingfx::GfxMath::ScreenToWorld (const Matrix4viewMatrix,
const Matrix4projMatrix,
const Point2normalizedScreenPt,
float normalizedZ 
)
+
+static
+
+ +

Converts a 2D point on the filmplane represented in Normalized Device Coorindates, which means (-1,1) for the top left corner of the screen and (1,-1) for the bottom right corner, to a 3D point in the world. The depth buffer value under the pixel must be supplied. If you are using GraphicsApp, you can use the mouse pos in pixels to get the required arguments like this: Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos); float normZ = graphicsApp->z_value_at_pixel(mousePos);.

+ +
+
+ +

◆ ToDegrees() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static float mingfx::GfxMath::ToDegrees (float radians)
+
+static
+
+ +
+
+ +

◆ ToDegrees() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static Vector3 mingfx::GfxMath::ToDegrees (Vector3 radians)
+
+static
+
+ +
+
+ +

◆ ToRadians() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static float mingfx::GfxMath::ToRadians (float degrees)
+
+static
+
+ +
+
+ +

◆ ToRadians() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static Vector3 mingfx::GfxMath::ToRadians (Vector3 degrees)
+
+static
+
+ +
+
+

Member Data Documentation

+ +

◆ HALF_PI

+ +
+
+ + + + + +
+ + + + +
const float mingfx::GfxMath::HALF_PI
+
+static
+
+ +

Definition at line 74 of file gfxmath.h.

+ +
+
+ +

◆ PI

+ +
+
+ + + + + +
+ + + + +
const float mingfx::GfxMath::PI
+
+static
+
+ +

Definition at line 72 of file gfxmath.h.

+ +
+
+ +

◆ TWO_PI

+ +
+
+ + + + + +
+ + + + +
const float mingfx::GfxMath::TWO_PI
+
+static
+
+ +

Definition at line 73 of file gfxmath.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app-members.html new file mode 100644 index 0000000..d8ef647 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app-members.html @@ -0,0 +1,137 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::GraphicsApp Member List
+
+
+ +

This is the complete list of members for mingfx::GraphicsApp, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
aspect_ratio()mingfx::GraphicsAppvirtual
DrawUsingNanoVG(NVGcontext *ctx)mingfx::GraphicsAppinlinevirtual
DrawUsingOpenGL()mingfx::GraphicsAppinlinevirtual
framebuffer_height()mingfx::GraphicsAppvirtual
framebuffer_width()mingfx::GraphicsAppvirtual
GraphicsApp(int width, int height, const std::string &caption)mingfx::GraphicsApp
InitGraphicsContext()mingfx::GraphicsAppvirtual
InitNanoGUI()mingfx::GraphicsAppinlinevirtual
InitOpenGL()mingfx::GraphicsAppinlinevirtual
IsKeyDown(int key)mingfx::GraphicsAppvirtual
IsLeftMouseDown()mingfx::GraphicsAppvirtual
IsMiddleMouseDown()mingfx::GraphicsAppvirtual
IsRightMouseDown()mingfx::GraphicsAppvirtual
NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC)mingfx::GraphicsAppvirtual
NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC)mingfx::GraphicsAppvirtual
OnKeyDown(const char *c, int modifiers)mingfx::GraphicsAppinlinevirtual
OnKeyRepeat(const char *c, int modifiers)mingfx::GraphicsAppinlinevirtual
OnKeyUp(const char *c, int modifiers)mingfx::GraphicsAppinlinevirtual
OnLeftMouseDown(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta)mingfx::GraphicsAppinlinevirtual
OnLeftMouseUp(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnMiddleMouseDown(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta)mingfx::GraphicsAppinlinevirtual
OnMiddleMouseUp(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnMouseMove(const Point2 &pos, const Vector2 &delta)mingfx::GraphicsAppinlinevirtual
OnRightMouseDown(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnRightMouseDrag(const Point2 &pos, const Vector2 &delta)mingfx::GraphicsAppinlinevirtual
OnRightMouseUp(const Point2 &pos)mingfx::GraphicsAppinlinevirtual
OnSpecialKeyDown(int key, int scancode, int modifiers)mingfx::GraphicsAppinlinevirtual
OnSpecialKeyRepeat(int key, int scancode, int modifiers)mingfx::GraphicsAppinlinevirtual
OnSpecialKeyUp(int key, int scancode, int modifiers)mingfx::GraphicsAppinlinevirtual
OnWindowResize(int new_width, int new_height)mingfx::GraphicsAppinlinevirtual
PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels)mingfx::GraphicsAppvirtual
PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels)mingfx::GraphicsAppvirtual
ReadZValueAtPixel(const Point2 &pointInPixels, unsigned int whichBuffer=GL_BACK)mingfx::GraphicsAppvirtual
ResizeWindow(int new_width, int new_height)mingfx::GraphicsAppvirtual
Run()mingfx::GraphicsAppvirtual
screen()mingfx::GraphicsAppvirtual
UpdateSimulation(double dt)mingfx::GraphicsAppinlinevirtual
window()mingfx::GraphicsAppvirtual
window_height()mingfx::GraphicsAppvirtual
window_width()mingfx::GraphicsAppvirtual
~GraphicsApp()mingfx::GraphicsAppvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app.html b/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app.html new file mode 100644 index 0000000..15fe349 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_graphics_app.html @@ -0,0 +1,1837 @@ + + + + + + + +MinGfx Toolkit: mingfx::GraphicsApp Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::GraphicsApp Class Reference
+
+
+

Detailed Description

+

This is the main application base class for the MinGfx Toolkit.

+


+

+

Create a Subclass:

+

To create your own graphics application, you should create a subclass of GraphicsApp and then override some key functions:

+
    +
  1. User Input: To get input from the keyboard and mouse, override OnMouseMove() and/or the other On...() functions.
  2. +
  3. Drawing Graphics: To draw graphics override one or more of the Draw*() functions.
      +
    • DrawUsingNanoVG() is the right place to make 2D drawing calls using the nanovg library.
    • +
    • DrawUsingOpenGL() is the right place to make 2D or 3D drawing calls using OpenGL. This includes drawing using the Mesh, QuickShapes, DefaultShader, ShaderProgram, and all other MinGfx classes since these are all based on OpenGL.
    • +
    • InitNanoGUI() is the right place to create nanogui windows to add a 2D user interface to your app.
    • +
    • InitOpenGL() is the right place to load textures, meshes, shaders, and other graphics objects that can only be created after the OpenGL context exists.
    • +
    +
  4. +
  5. Physics, Animation, AI, etc.: Override the UpdateSimulation() function to do other non-graphics calculations required by your program. This is called automatically once per frame.
  6. +
+

Keep in mind that internally the app uses a rendering loop that looks something like this:

InitNanoGUI(); // your hook for initializing NanoGUI widgets
+
InitOpenGL(); // your hook for initializing OpenGL graphics
+
while (!program_ready_to_close) {
+
// user input
+
internal_get_input_events_from_operating_system();
+
OnMouseMove(); // your hook for processing input
+
On*(); // all other event callbacks -- your hook for processing input
+
+
// phyics, etc.
+
UpdateSimulation(); // your hook for physics, animation, AI, etc.
+
+
// draw graphics
+
internal_render_gui_elements_using_nanogui();
+
DrawUsingNanoVG(); // your hook for drawing 2D vector graphics
+
DrawUsingOpenGL(); // your hook for 2D/3D rendering with OpenGL
+
}
+
virtual void OnMouseMove(const Point2 &pos, const Vector2 &delta)
If the mouse has moved in the past frame and no mouse buttons are currently pressed,...
Definition: graphics_app.h:165
+
virtual void DrawUsingOpenGL()
Override this to draw graphics using raw OpenGL 2D or 3D graphics calls.
Definition: graphics_app.h:317
+
virtual void DrawUsingNanoVG(NVGcontext *ctx)
Override this to draw graphics using the nanovg vector graphics library, which provides an easy way t...
Definition: graphics_app.h:311
+
virtual void InitOpenGL()
Override this to initialize the OpenGL context with textures, vertex buffers, etc.
Definition: graphics_app.h:297
+
virtual void UpdateSimulation(double dt)
Called once per frame.
Definition: graphics_app.h:306
+
virtual void InitNanoGUI()
Called at the beginning of the Run() method.
Definition: graphics_app.h:284
+

A Complete Example with GUI Widgets

+

If you wish to add some buttons, sliders, etc. in your application, you can do this inside GraphicsApp by accessing the NanoGUI library. You will need to pass NanoGUI a nanogui::screen object, which you can get from the screen() function. NanoGui setup should be done in the constructor, like this:

#include <mingfx.h>
+
using namespace mingfx;
+
+
class MyApp : public GraphcisApp {
+
public:
+
MyApp() : GraphicsApp(1024,768, "My Amazing App") {
+
}
+
+
virtual ~MyApp() {}
+
+
void InitNanoGUI() {
+
// Setup the GUI window
+
nanogui::Window *window = new nanogui::Window(screen(), "My GUI Panel");
+
window->setPosition(Eigen::Vector2i(10, 10));
+
window->setSize(Eigen::Vector2i(400,200));
+
window->setLayout(new nanogui::GroupLayout());
+
+
nanogui::Button pause_btn = new nanogui::Button(window, "Pause");
+
pause_btn->setCallback(std::bind(&MyApp::OnPauseBtnPressed, this));
+
pause_btn->setTooltip("Toggle playback.");
+
+
screen()->performLayout();
+
}
+
+
void InitOpenGL() {
+
glClearColor(0.0, 0.0, 0.0, 1);
+
}
+
+
// this callback is for the nanogui pause_btn defined above
+
void OnPauseBtnPressed() {
+
std::cout << "Pause pressed." << std::endl;
+
}
+
+
// this callback is built into the base GraphicsApp class
+
void OnMouseMove(const Point2 &pos, const Vector2 &delta) {
+
std::cout << "Mouse moved to " << pos << std::endl;
+
}
+
+
void DrawUsingOpenGL() {
+
Matrix4 model = Matrix4::Translation(Vector3(-1,0,0)) * Matrix4::Scale(Vector3(0.5, 0.5, 0.5));
+
Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0));
+
Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0);
+
quick_shapes_.DrawCube(model, view, proj, Color(1,1,1));
+
}
+
+
private:
+
QuickShapes quick_shapes_;
+
};
+
+
+
int main(int argc, const char *argv[]) {
+
MyApp app;
+
app.Run();
+
return 0;
+
}
+
virtual GLFWwindow * window()
Access to the underlying GLFWwindow object.
+
GraphicsApp(int width, int height, const std::string &caption)
Constructs a new app but does not yet run it.
+
virtual float aspect_ratio()
Returns width/height for the current shape of the window.
+
virtual nanogui::Screen * screen()
Access to the underlying NanoGUI Screen object.
+
static Matrix4 Scale(const Vector3 &v)
Returns the scale matrix described by the vector.
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up)
Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the des...
+
static Matrix4 Translation(const Vector3 &v)
Returns the translation matrix described by the vector.
+
Includes the entire MinGfx library and calls using namespace mingfx.
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+
+

Definition at line 135 of file graphics_app.h.

+
+

#include <graphics_app.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 GraphicsApp (int width, int height, const std::string &caption)
 Constructs a new app but does not yet run it. More...
 
virtual ~GraphicsApp ()
 The destructor will shutdown the graphics system and window. More...
 
virtual void OnMouseMove (const Point2 &pos, const Vector2 &delta)
 If the mouse has moved in the past frame and no mouse buttons are currently pressed, then this callback function will be called to report the new position of the mouse to you. More...
 
virtual void OnLeftMouseDown (const Point2 &pos)
 If the mouse button was pressed down since the last frame, then this function will be called to notify you. More...
 
virtual void OnLeftMouseDrag (const Point2 &pos, const Vector2 &delta)
 If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening. More...
 
virtual void OnLeftMouseUp (const Point2 &pos)
 If the mouse button was released since the last frame, then this function will be called to notify you. More...
 
virtual void OnMiddleMouseDown (const Point2 &pos)
 If the mouse button was pressed down since the last frame, then this function will be called to notify you. More...
 
virtual void OnMiddleMouseDrag (const Point2 &pos, const Vector2 &delta)
 If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening. More...
 
virtual void OnMiddleMouseUp (const Point2 &pos)
 If the mouse button was released since the last frame, then this function will be called to notify you. More...
 
virtual void OnRightMouseDown (const Point2 &pos)
 If the mouse button was pressed down since the last frame, then this function will be called to notify you. More...
 
virtual void OnRightMouseDrag (const Point2 &pos, const Vector2 &delta)
 If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening. More...
 
virtual void OnRightMouseUp (const Point2 &pos)
 If the mouse button was released since the last frame, then this function will be called to notify you. More...
 
virtual void OnKeyDown (const char *c, int modifiers)
 Transforms a keyboard down event into the actual character typed. More...
 
virtual void OnKeyRepeat (const char *c, int modifiers)
 Transforms a keyboard repeat event into the actual character typed. More...
 
virtual void OnKeyUp (const char *c, int modifiers)
 Transforms a keyboard up event into the actual character typed. More...
 
virtual void OnSpecialKeyDown (int key, int scancode, int modifiers)
 The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html. More...
 
virtual void OnSpecialKeyRepeat (int key, int scancode, int modifiers)
 The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html. More...
 
virtual void OnSpecialKeyUp (int key, int scancode, int modifiers)
 The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html. More...
 
virtual void OnWindowResize (int new_width, int new_height)
 Override this to respond when the graphics window and/or framebuffer are resized, either by the user dragging the window or through a call to ResizeWindow(). More...
 
virtual void Run ()
 After creating a new GraphicsApp, call this to start the app's mainloop. More...
 
virtual void InitNanoGUI ()
 Called at the beginning of the Run() method. More...
 
virtual void InitOpenGL ()
 Override this to initialize the OpenGL context with textures, vertex buffers, etc. More...
 
virtual void UpdateSimulation (double dt)
 Called once per frame. More...
 
virtual void DrawUsingNanoVG (NVGcontext *ctx)
 Override this to draw graphics using the nanovg vector graphics library, which provides an easy way to draw 2D shapes to the screen. More...
 
virtual void DrawUsingOpenGL ()
 Override this to draw graphics using raw OpenGL 2D or 3D graphics calls. More...
 
virtual bool IsKeyDown (int key)
 True if the specified is is currently held down. Uses the GLFW key codes found here: http://www.glfw.org/docs/latest/group__keys.html. More...
 
virtual bool IsLeftMouseDown ()
 True if the left mouse button is currently held down. More...
 
virtual bool IsMiddleMouseDown ()
 True if the middle mouse button is currently held down. More...
 
virtual bool IsRightMouseDown ()
 True if the right mouse button is currently held down. More...
 
virtual int window_width ()
 Returns the current width of the client area of the window in pixels. More...
 
virtual int window_height ()
 Returns the current height of the client area of the window in pixels. More...
 
virtual int framebuffer_width ()
 Returns the current width of the framebuffer in pixels. More...
 
virtual int framebuffer_height ()
 Returns the current height of the framebuffer in pixels. More...
 
virtual float aspect_ratio ()
 Returns width/height for the current shape of the window. More...
 
virtual Point2 PixelsToNormalizedDeviceCoords (const Point2 &pointInPixels)
 Transforms a point in viewport coordinates (pixels where top left = (0,0) and bottom right = (window_width()-1, window_height()-1)) to normalized device coordinates, (top left = (-1,1) bottom right (1,-1)). More...
 
virtual Point2 NormalizedDeviceCoordsToPixels (const Point2 &pointInNDC)
 Transforms a point in normalized device coordinates (top left = (-1,1) bottom right (1,-1)) to pixels (top left = (0,0), bottom right = (window width-1, window height-1)) More...
 
virtual Vector2 PixelsToNormalizedDeviceCoords (const Vector2 &vectorInPixels)
 Transforms a vector in viewport coordinates (pixels where top left = (0,0) and bottom right = (window width-1, window height-1)) to normalized device coordinates, (top left = (-1,1) bottom right (1,-1)). More...
 
virtual Vector2 NormalizedDeviceCoordsToPixels (const Vector2 &pointInNDC)
 Transforms a vector in normalized device coordinates (top left = (-1,1) bottom right (1,-1)) to pixels (top left = (0,0), bottom right = (window width-1, window height-1)) More...
 
virtual float ReadZValueAtPixel (const Point2 &pointInPixels, unsigned int whichBuffer=GL_BACK)
 Returns the z buffer value under the specified pixel. z will be 0 at the near plane and +1 at the far plane. More...
 
virtual nanogui::Screen * screen ()
 Access to the underlying NanoGUI Screen object. More...
 
virtual GLFWwindow * window ()
 Access to the underlying GLFWwindow object. More...
 
virtual void ResizeWindow (int new_width, int new_height)
 Cause the graphics windows to resize programmatically rather than by dragging on the corner manually. More...
 
virtual void InitGraphicsContext ()
 Users cannot make any graphics calls (e.g., setting the clear color, saving mesh data to the GPU) until the graphics context is initialized by calling this method. More...
 
+

Constructor & Destructor Documentation

+ +

◆ GraphicsApp()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::GraphicsApp::GraphicsApp (int width,
int height,
const std::string & caption 
)
+
+ +

Constructs a new app but does not yet run it.

+
Parameters
+ + + + +
widthThe width of the client area of the window in pixels.
heightThe height of the client area of the window in pixels.
captionThe caption for the window's title bar.
+
+
+ +
+
+ +

◆ ~GraphicsApp()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::GraphicsApp::~GraphicsApp ()
+
+virtual
+
+ +

The destructor will shutdown the graphics system and window.

+ +
+
+

Member Function Documentation

+ +

◆ aspect_ratio()

+ +
+
+ + + + + +
+ + + + + + + +
virtual float mingfx::GraphicsApp::aspect_ratio ()
+
+virtual
+
+ +

Returns width/height for the current shape of the window.

+ +
+
+ +

◆ DrawUsingNanoVG()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::DrawUsingNanoVG (NVGcontext * ctx)
+
+inlinevirtual
+
+ +

Override this to draw graphics using the nanovg vector graphics library, which provides an easy way to draw 2D shapes to the screen.

+ +

Definition at line 311 of file graphics_app.h.

+ +
+
+ +

◆ DrawUsingOpenGL()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void mingfx::GraphicsApp::DrawUsingOpenGL ()
+
+inlinevirtual
+
+ +

Override this to draw graphics using raw OpenGL 2D or 3D graphics calls.

+ +

Definition at line 317 of file graphics_app.h.

+ +
+
+ +

◆ framebuffer_height()

+ +
+
+ + + + + +
+ + + + + + + +
virtual int mingfx::GraphicsApp::framebuffer_height ()
+
+virtual
+
+ +

Returns the current height of the framebuffer in pixels.

+

Note that on some displays (e.g., Mac Retina) the framebuffer is larger than the window.

+ +
+
+ +

◆ framebuffer_width()

+ +
+
+ + + + + +
+ + + + + + + +
virtual int mingfx::GraphicsApp::framebuffer_width ()
+
+virtual
+
+ +

Returns the current width of the framebuffer in pixels.

+

Note that on some displays (e.g., Mac Retina) the framebuffer is larger than the window.

+ +
+
+ +

◆ InitGraphicsContext()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void mingfx::GraphicsApp::InitGraphicsContext ()
+
+virtual
+
+ +

Users cannot make any graphics calls (e.g., setting the clear color, saving mesh data to the GPU) until the graphics context is initialized by calling this method.

+

It is called automatically by the Run() method before calling the InitNanoGUI() and InitOpenGL() methods. So, users should place all of their graphics initialization code inside one of those two methods.

+ +
+
+ +

◆ InitNanoGUI()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void mingfx::GraphicsApp::InitNanoGUI ()
+
+inlinevirtual
+
+ +

Called at the beginning of the Run() method.

+

Override this to initialize any NanoGUI graphics related properties including 2D windows, buttons, sliders, etc...

+

IMPORTANT: Put any NanoGUI initialization code here, NOT in the constructors of the classes that you create, or, create your classes from within this function. The graphics calls will fail if the OpenGL context has not yet been initialized, and it is not guaranteed to be initialized until this function has been called.

+ +

Definition at line 284 of file graphics_app.h.

+ +
+
+ +

◆ InitOpenGL()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void mingfx::GraphicsApp::InitOpenGL ()
+
+inlinevirtual
+
+ +

Override this to initialize the OpenGL context with textures, vertex buffers, etc.

+

that you will use later inside DrawUsingOpenGL(). This InitOpenGL() function is called once on program startup just after the OpenGL drawing context is created.

+

IMPORTANT: Put any OpenGL initialization code here, NOT in the constructors of the classes that you create, or, create your classes from within this function. The graphics calls will fail if the OpenGL context has not yet been initialized, and it is not guaranteed to be initialized until this function has been called.

+ +

Definition at line 297 of file graphics_app.h.

+ +
+
+ +

◆ IsKeyDown()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual bool mingfx::GraphicsApp::IsKeyDown (int key)
+
+virtual
+
+ +

True if the specified is is currently held down. Uses the GLFW key codes found here: http://www.glfw.org/docs/latest/group__keys.html.

+ +
+
+ +

◆ IsLeftMouseDown()

+ +
+
+ + + + + +
+ + + + + + + +
virtual bool mingfx::GraphicsApp::IsLeftMouseDown ()
+
+virtual
+
+ +

True if the left mouse button is currently held down.

+ +
+
+ +

◆ IsMiddleMouseDown()

+ +
+
+ + + + + +
+ + + + + + + +
virtual bool mingfx::GraphicsApp::IsMiddleMouseDown ()
+
+virtual
+
+ +

True if the middle mouse button is currently held down.

+ +
+
+ +

◆ IsRightMouseDown()

+ +
+
+ + + + + +
+ + + + + + + +
virtual bool mingfx::GraphicsApp::IsRightMouseDown ()
+
+virtual
+
+ +

True if the right mouse button is currently held down.

+ +
+
+ +

◆ NormalizedDeviceCoordsToPixels() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
virtual Point2 mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels (const Point2pointInNDC)
+
+virtual
+
+ +

Transforms a point in normalized device coordinates (top left = (-1,1) bottom right (1,-1)) to pixels (top left = (0,0), bottom right = (window width-1, window height-1))

+ +
+
+ +

◆ NormalizedDeviceCoordsToPixels() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
virtual Vector2 mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels (const Vector2pointInNDC)
+
+virtual
+
+ +

Transforms a vector in normalized device coordinates (top left = (-1,1) bottom right (1,-1)) to pixels (top left = (0,0), bottom right = (window width-1, window height-1))

+ +
+
+ +

◆ OnKeyDown()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnKeyDown (const char * c,
int modifiers 
)
+
+inlinevirtual
+
+ +

Transforms a keyboard down event into the actual character typed.

+
Parameters
+ + + +
cThe character for the key that was pressed.
modifiersIf any modifiers (Alt, Ctrl, Shift, etc.) were held at the same time, then these are encoded in this int. See the detailed description here: http://www.glfw.org/docs/latest/group__mods.html
+
+
+ +

Definition at line 225 of file graphics_app.h.

+ +
+
+ +

◆ OnKeyRepeat()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnKeyRepeat (const char * c,
int modifiers 
)
+
+inlinevirtual
+
+ +

Transforms a keyboard repeat event into the actual character typed.

+
Parameters
+ + + +
cThe character for the key that was pressed.
modifiersIf any modifiers (Alt, Ctrl, Shift, etc.) were held at the same time, then these are encoded in this int. See the detailed description here: http://www.glfw.org/docs/latest/group__mods.html
+
+
+ +

Definition at line 233 of file graphics_app.h.

+ +
+
+ +

◆ OnKeyUp()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnKeyUp (const char * c,
int modifiers 
)
+
+inlinevirtual
+
+ +

Transforms a keyboard up event into the actual character typed.

+
Parameters
+ + + +
cThe character for the key that was pressed.
modifiersIf any modifiers (Alt, Ctrl, Shift, etc.) were held at the same time, then these are encoded in this int. See the detailed description here: http://www.glfw.org/docs/latest/group__mods.html
+
+
+ +

Definition at line 241 of file graphics_app.h.

+ +
+
+ +

◆ OnLeftMouseDown()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnLeftMouseDown (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was pressed down since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
+
+
+ +

Definition at line 174 of file graphics_app.h.

+ +
+
+ +

◆ OnLeftMouseDrag()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnLeftMouseDrag (const Point2pos,
const Vector2delta 
)
+
+inlinevirtual
+
+ +

If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening.

+
Parameters
+ + + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
deltaThis is the change in the position of the mouse in pixels since the last frame.
+
+
+ +

Definition at line 187 of file graphics_app.h.

+ +
+
+ +

◆ OnLeftMouseUp()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnLeftMouseUp (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was released since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width()-1, window_height()-1) is the bottom right corner.
+
+
+ +

Definition at line 196 of file graphics_app.h.

+ +
+
+ +

◆ OnMiddleMouseDown()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnMiddleMouseDown (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was pressed down since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
+
+
+ +

Definition at line 200 of file graphics_app.h.

+ +
+
+ +

◆ OnMiddleMouseDrag()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnMiddleMouseDrag (const Point2pos,
const Vector2delta 
)
+
+inlinevirtual
+
+ +

If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening.

+
Parameters
+ + + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
deltaThis is the change in the position of the mouse in pixels since the last frame.
+
+
+ +

Definition at line 203 of file graphics_app.h.

+ +
+
+ +

◆ OnMiddleMouseUp()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnMiddleMouseUp (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was released since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width()-1, window_height()-1) is the bottom right corner.
+
+
+ +

Definition at line 206 of file graphics_app.h.

+ +
+
+ +

◆ OnMouseMove()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnMouseMove (const Point2pos,
const Vector2delta 
)
+
+inlinevirtual
+
+ +

If the mouse has moved in the past frame and no mouse buttons are currently pressed, then this callback function will be called to report the new position of the mouse to you.

+
Parameters
+ + + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
deltaThis is the change in the position of the mouse in pixels since the last frame.
+
+
+ +

Definition at line 165 of file graphics_app.h.

+ +
+
+ +

◆ OnRightMouseDown()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnRightMouseDown (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was pressed down since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
+
+
+ +

Definition at line 210 of file graphics_app.h.

+ +
+
+ +

◆ OnRightMouseDrag()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnRightMouseDrag (const Point2pos,
const Vector2delta 
)
+
+inlinevirtual
+
+ +

If the mouse button is held down and the mouse has moved in the past frame then this function will be called to tell you that a "dragging" operation is happening.

+
Parameters
+ + + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width(), window_height()) is the bottom right corner.
deltaThis is the change in the position of the mouse in pixels since the last frame.
+
+
+ +

Definition at line 213 of file graphics_app.h.

+ +
+
+ +

◆ OnRightMouseUp()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::OnRightMouseUp (const Point2pos)
+
+inlinevirtual
+
+ +

If the mouse button was released since the last frame, then this function will be called to notify you.

+
Parameters
+ + +
posThis is the current position of the mouse in pixels, where (0,0) is at the top left corner of the screen and (window_width()-1, window_height()-1) is the bottom right corner.
+
+
+ +

Definition at line 216 of file graphics_app.h.

+ +
+
+ +

◆ OnSpecialKeyDown()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnSpecialKeyDown (int key,
int scancode,
int modifiers 
)
+
+inlinevirtual
+
+ +

The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html.

+ +

Definition at line 247 of file graphics_app.h.

+ +
+
+ +

◆ OnSpecialKeyRepeat()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnSpecialKeyRepeat (int key,
int scancode,
int modifiers 
)
+
+inlinevirtual
+
+ +

The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html.

+ +

Definition at line 251 of file graphics_app.h.

+ +
+
+ +

◆ OnSpecialKeyUp()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnSpecialKeyUp (int key,
int scancode,
int modifiers 
)
+
+inlinevirtual
+
+ +

The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/group__keys.html.

+ +

Definition at line 255 of file graphics_app.h.

+ +
+
+ +

◆ OnWindowResize()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::OnWindowResize (int new_width,
int new_height 
)
+
+inlinevirtual
+
+ +

Override this to respond when the graphics window and/or framebuffer are resized, either by the user dragging the window or through a call to ResizeWindow().

+ +

Definition at line 261 of file graphics_app.h.

+ +
+
+ +

◆ PixelsToNormalizedDeviceCoords() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
virtual Point2 mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords (const Point2pointInPixels)
+
+virtual
+
+ +

Transforms a point in viewport coordinates (pixels where top left = (0,0) and bottom right = (window_width()-1, window_height()-1)) to normalized device coordinates, (top left = (-1,1) bottom right (1,-1)).

+ +
+
+ +

◆ PixelsToNormalizedDeviceCoords() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
virtual Vector2 mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords (const Vector2vectorInPixels)
+
+virtual
+
+ +

Transforms a vector in viewport coordinates (pixels where top left = (0,0) and bottom right = (window width-1, window height-1)) to normalized device coordinates, (top left = (-1,1) bottom right (1,-1)).

+ +
+
+ +

◆ ReadZValueAtPixel()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual float mingfx::GraphicsApp::ReadZValueAtPixel (const Point2pointInPixels,
unsigned int whichBuffer = GL_BACK 
)
+
+virtual
+
+ +

Returns the z buffer value under the specified pixel. z will be 0 at the near plane and +1 at the far plane.

+ +
+
+ +

◆ ResizeWindow()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
virtual void mingfx::GraphicsApp::ResizeWindow (int new_width,
int new_height 
)
+
+virtual
+
+ +

Cause the graphics windows to resize programmatically rather than by dragging on the corner manually.

+ +
+
+ +

◆ Run()

+ +
+
+ + + + + +
+ + + + + + + +
virtual void mingfx::GraphicsApp::Run ()
+
+virtual
+
+ +

After creating a new GraphicsApp, call this to start the app's mainloop.

+

Each time through the mainloop the app will: 1. respond any user input events by calling the On*() callback methods, 2. call UpdateSimulation(), and 3. call the two Draw*() methods. Note that Run() does not return until the user closes the app and the program is ready to shutdown.

+ +
+
+ +

◆ screen()

+ +
+
+ + + + + +
+ + + + + + + +
virtual nanogui::Screen* mingfx::GraphicsApp::screen ()
+
+virtual
+
+ +

Access to the underlying NanoGUI Screen object.

+ +
+
+ +

◆ UpdateSimulation()

+ +
+
+ + + + + +
+ + + + + + + + +
virtual void mingfx::GraphicsApp::UpdateSimulation (double dt)
+
+inlinevirtual
+
+ +

Called once per frame.

+

Override this and fill it in to update your simulation code or any other updates you need to make to your model that are timed rather than in response to user input.

+
Parameters
+ + +
dtis the elapsed time since the last call.
+
+
+ +

Definition at line 306 of file graphics_app.h.

+ +
+
+ +

◆ window()

+ +
+
+ + + + + +
+ + + + + + + +
virtual GLFWwindow* mingfx::GraphicsApp::window ()
+
+virtual
+
+ +

Access to the underlying GLFWwindow object.

+ +
+
+ +

◆ window_height()

+ +
+
+ + + + + +
+ + + + + + + +
virtual int mingfx::GraphicsApp::window_height ()
+
+virtual
+
+ +

Returns the current height of the client area of the window in pixels.

+ +
+
+ +

◆ window_width()

+ +
+
+ + + + + +
+ + + + + + + +
virtual int mingfx::GraphicsApp::window_width ()
+
+virtual
+
+ +

Returns the current width of the client area of the window in pixels.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_matrix4-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_matrix4-members.html new file mode 100644 index 0000000..4b96bca --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_matrix4-members.html @@ -0,0 +1,127 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Matrix4 Member List
+
+
+ +

This is the complete list of members for mingfx::Matrix4, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2)mingfx::Matrix4static
Cofactor() constmingfx::Matrix4
ColumnToPoint3(int c) constmingfx::Matrix4
ColumnToVector3(int c) constmingfx::Matrix4
Determinant() constmingfx::Matrix4
FromRowMajorElements(const float r1c1, const float r1c2, const float r1c3, const float r1c4, const float r2c1, const float r2c2, const float r2c3, const float r2c4, const float r3c1, const float r3c2, const float r3c3, const float r3c4, const float r4c1, const float r4c2, const float r4c3, const float r4c4)mingfx::Matrix4static
Frustum(float left, float right, float bottom, float top, float near_plane_dist, float far_plane_dist)mingfx::Matrix4static
Inverse() constmingfx::Matrix4
LookAt(Point3 eye, Point3 target, Vector3 up)mingfx::Matrix4static
Matrix4()mingfx::Matrix4
Matrix4(const float *a)mingfx::Matrix4
Matrix4(const std::vector< float > &a)mingfx::Matrix4
Matrix4(const Matrix4 &m2)mingfx::Matrix4
operator!=(const Matrix4 &m2) constmingfx::Matrix4
operator()(const int row, const int col) constmingfx::Matrix4
operator()(const int row, const int col)mingfx::Matrix4
operator=(const Matrix4 &m2)mingfx::Matrix4
operator==(const Matrix4 &m2) constmingfx::Matrix4
operator[](const int i) constmingfx::Matrix4
operator[](const int i)mingfx::Matrix4
Orthonormal() constmingfx::Matrix4
Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)mingfx::Matrix4static
Rotation(const Point3 &p, const Vector3 &v, const float a)mingfx::Matrix4static
RotationX(const float radians)mingfx::Matrix4static
RotationY(const float radians)mingfx::Matrix4static
RotationZ(const float radians)mingfx::Matrix4static
Scale(const Vector3 &v)mingfx::Matrix4static
SubDeterminant(int exclude_row, int exclude_col) constmingfx::Matrix4
ToVector() constmingfx::Matrix4
Translation(const Vector3 &v)mingfx::Matrix4static
Transpose() constmingfx::Matrix4
value_ptr() constmingfx::Matrix4
~Matrix4()mingfx::Matrix4virtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_matrix4.html b/dev/MinGfx/docs/html/classmingfx_1_1_matrix4.html new file mode 100644 index 0000000..f687d82 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_matrix4.html @@ -0,0 +1,1240 @@ + + + + + + + +MinGfx Toolkit: mingfx::Matrix4 Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Matrix4 Class Reference
+
+
+

Detailed Description

+

A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be compatible with OpenGL.

+

Examples:

// constructing various matrices:
+
Matrix4 T = Matrix4::Translation(Vector3(1,0,0));
+
Matrix4 S = Matrix4::Scale(Vector3(2,2,2));
+
Matrix4 R = Matrix4::RotateX(GfxMath::toRadians(45.0));
+
+
// compose matrices together by multiplication
+
Matrix4 M = T * R * S;
+
Matrix4 Minv = M.Inverse();
+
+
// transforming points, vectors, etc.
+
Point3 p1(1,1,1);
+
Point3 p2 = M * p1;
+
+
Vector3 v1(1,1,1);
+
Vector3 v2 = M * v1;
+
+
Ray r1(p1, v1);
+
Ray r2 = M * r1;
+
static Matrix4 Scale(const Vector3 &v)
Returns the scale matrix described by the vector.
+
Matrix4()
The default constructor creates an identity matrix:
+
static Matrix4 Translation(const Vector3 &v)
Returns the translation matrix described by the vector.
+
+

Definition at line 50 of file matrix4.h.

+
+

#include <matrix4.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Matrix4 ()
 The default constructor creates an identity matrix: More...
 
 Matrix4 (const float *a)
 Constructs a matrix given from an array of 16 floats in OpenGL matrix format (i.e., column major). More...
 
 Matrix4 (const std::vector< float > &a)
 Constructs a matrix given from a vector of 16 floats in OpenGL matrix format (i.e., column major). More...
 
 Matrix4 (const Matrix4 &m2)
 Copy constructor. More...
 
virtual ~Matrix4 ()
 Destructor. More...
 
bool operator== (const Matrix4 &m2) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Matrix4 &m2) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Matrix4operator= (const Matrix4 &m2)
 Matrix assignment operator. More...
 
const float * value_ptr () const
 Returns a pointer to the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order. More...
 
float operator[] (const int i) const
 Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order. More...
 
float & operator[] (const int i)
 Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order. More...
 
float operator() (const int row, const int col) const
 Access an individual element of the array using the syntax: Matrix4 mat; float row1col2 = mat(1,2);. More...
 
float & operator() (const int row, const int col)
 Access an individual element of the array using the syntax: Matrix4 mat; mat(1,2) = 1.0;. More...
 
Vector3 ColumnToVector3 (int c) const
 Returns the c-th column of the matrix as a Vector type, e.g.,: Vector3 xAxis = mat.getColumnAsVector3(0); Vector3 yAxis = mat.getColumnAsVector3(1); Vector3 zAxis = mat.getColumnAsVector3(2);. More...
 
Point3 ColumnToPoint3 (int c) const
 Returns the c-th column of the matrix as a Vector type, e.g.,: Point3 pos = mat.getColumnAsPoint3(3);. More...
 
std::vector< float > ToVector () const
 
Matrix4 Inverse () const
 Returns the inverse of the 4x4 matrix if it is nonsingular. If it is singular, then returns the identity matrix. More...
 
Matrix4 Orthonormal () const
 Returns an orthonormal version of the matrix, i.e., guarantees that the rotational component of the matrix is built from column vectors that are all unit vectors and orthogonal to each other. More...
 
Matrix4 Transpose () const
 Returns the transpose of the matrix. More...
 
float SubDeterminant (int exclude_row, int exclude_col) const
 Returns the determinant of the 3x3 matrix formed by excluding the specified row and column from the 4x4 matrix. More...
 
Matrix4 Cofactor () const
 Returns the cofactor matrix. More...
 
float Determinant () const
 Returns the determinant of the 4x4 matrix. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static Matrix4 FromRowMajorElements (const float r1c1, const float r1c2, const float r1c3, const float r1c4, const float r2c1, const float r2c2, const float r2c3, const float r2c4, const float r3c1, const float r3c2, const float r3c3, const float r3c4, const float r4c1, const float r4c2, const float r4c3, const float r4c4)
 Returns a matrix constructed from individual elements passed in row major order so that the matrix looks "correct" on the screen as you write this constructor on 4 lines of code as below. More...
 
static Matrix4 Scale (const Vector3 &v)
 Returns the scale matrix described by the vector. More...
 
static Matrix4 Translation (const Vector3 &v)
 Returns the translation matrix described by the vector. More...
 
static Matrix4 RotationX (const float radians)
 Returns the rotation matrix about the x axis by the specified angle. More...
 
static Matrix4 RotationY (const float radians)
 Returns the rotation matrix about the y axis by the specified angle. More...
 
static Matrix4 RotationZ (const float radians)
 Returns the rotation matrix about the z axis by the specified angle. More...
 
static Matrix4 Rotation (const Point3 &p, const Vector3 &v, const float a)
 Returns the rotation matrix around the vector v placed at point p, rotate by angle a. More...
 
static Matrix4 Align (const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2)
 Creates a transformation matrix that maps a coordinate space, a, defined one point, a_p, and two vectors, a_v1 and a_v2, to a new coordinate space, b, also defined by one point, b_p, and two vectors, b_v1 and b_v2. The transformation will thus include both some rotation and some translation. Pseudocode example of aligning a billboard defined in the XY plane with a normal in the +Z direction and that rotates around the Y axis with a camera: More...
 
static Matrix4 LookAt (Point3 eye, Point3 target, Vector3 up)
 Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the desired 'target' point with the top of the screen pointed as closely as possible in the direction of the 'up' vector. More...
 
static Matrix4 Perspective (float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
 Returns a perspective projection matrix equivalent to the one gluPerspective creates. More...
 
static Matrix4 Frustum (float left, float right, float bottom, float top, float near_plane_dist, float far_plane_dist)
 Returns a projection matrix equivalent the one glFrustum creates. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Matrix4() [1/4]

+ +
+
+ + + + + + + +
mingfx::Matrix4::Matrix4 ()
+
+ +

The default constructor creates an identity matrix:

+ +
+
+ +

◆ Matrix4() [2/4]

+ +
+
+ + + + + + + + +
mingfx::Matrix4::Matrix4 (const float * a)
+
+ +

Constructs a matrix given from an array of 16 floats in OpenGL matrix format (i.e., column major).

+ +
+
+ +

◆ Matrix4() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Matrix4::Matrix4 (const std::vector< float > & a)
+
+ +

Constructs a matrix given from a vector of 16 floats in OpenGL matrix format (i.e., column major).

+ +
+
+ +

◆ Matrix4() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Matrix4::Matrix4 (const Matrix4m2)
+
+ +

Copy constructor.

+ +
+
+ +

◆ ~Matrix4()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Matrix4::~Matrix4 ()
+
+virtual
+
+ +

Destructor.

+ +
+
+

Member Function Documentation

+ +

◆ Align()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::Align (const Point3a_p,
const Vector3a_v1,
const Vector3a_v2,
const Point3b_p,
const Vector3b_v1,
const Vector3b_v2 
)
+
+static
+
+ +

Creates a transformation matrix that maps a coordinate space, a, defined one point, a_p, and two vectors, a_v1 and a_v2, to a new coordinate space, b, also defined by one point, b_p, and two vectors, b_v1 and b_v2. The transformation will thus include both some rotation and some translation. Pseudocode example of aligning a billboard defined in the XY plane with a normal in the +Z direction and that rotates around the Y axis with a camera:

+
// define a coordiante space for a canonical billboard geometry defined
+
// right at the origin.
+
Point3 a_p = Point3(0,0,0); // billboard's initial base position
+
Vector3 a_v1 = Vector3(0,1,0); // billboard's initial up direction
+
Vector3 a_v2 = Vector3(0,0,1); // billboard's initial normal direction
+
+
// define a coordinate space for where we want this billboard to go and
+
// the direction it should be facing
+
Point3 b_p = desired_base_pos; // new position for the billboard
+
Vector3 b_v1 = Vector3(0,1,0); // +Y is still up, doesn't change
+
Vector3 b_v2 = (camera.eye() - desired_base_pos); // the normal should point toward the camera
+
b_v2[1] = 0.0; // with 0 change in Y so the billboard does not tilt
+
b_v2.Normalize(); // convert to a unit vector
+
+
Matrix4 billboard_model_matrix = Matrix4::Align(a_p, a_v1, a_v2, b_p, b_v1, b_v2);
+
static Matrix4 Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2)
Creates a transformation matrix that maps a coordinate space, a, defined one point,...
+
+
+
+ +

◆ Cofactor()

+ +
+
+ + + + + + + +
Matrix4 mingfx::Matrix4::Cofactor () const
+
+ +

Returns the cofactor matrix.

+ +
+
+ +

◆ ColumnToPoint3()

+ +
+
+ + + + + + + + +
Point3 mingfx::Matrix4::ColumnToPoint3 (int c) const
+
+ +

Returns the c-th column of the matrix as a Vector type, e.g.,: Point3 pos = mat.getColumnAsPoint3(3);.

+ +
+
+ +

◆ ColumnToVector3()

+ +
+
+ + + + + + + + +
Vector3 mingfx::Matrix4::ColumnToVector3 (int c) const
+
+ +

Returns the c-th column of the matrix as a Vector type, e.g.,: Vector3 xAxis = mat.getColumnAsVector3(0); Vector3 yAxis = mat.getColumnAsVector3(1); Vector3 zAxis = mat.getColumnAsVector3(2);.

+ +
+
+ +

◆ Determinant()

+ +
+
+ + + + + + + +
float mingfx::Matrix4::Determinant () const
+
+ +

Returns the determinant of the 4x4 matrix.

+ +
+
+ +

◆ FromRowMajorElements()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::FromRowMajorElements (const float r1c1,
const float r1c2,
const float r1c3,
const float r1c4,
const float r2c1,
const float r2c2,
const float r2c3,
const float r2c4,
const float r3c1,
const float r3c2,
const float r3c3,
const float r3c4,
const float r4c1,
const float r4c2,
const float r4c3,
const float r4c4 
)
+
+static
+
+ +

Returns a matrix constructed from individual elements passed in row major order so that the matrix looks "correct" on the screen as you write this constructor on 4 lines of code as below.

+

Note the that internally the matrix constructed will be stored in a 16 element column major array to be consistent with OpenGL.

+ +
+
+ +

◆ Frustum()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::Frustum (float left,
float right,
float bottom,
float top,
float near_plane_dist,
float far_plane_dist 
)
+
+static
+
+ +

Returns a projection matrix equivalent the one glFrustum creates.

+ +
+
+ +

◆ Inverse()

+ +
+
+ + + + + + + +
Matrix4 mingfx::Matrix4::Inverse () const
+
+ +

Returns the inverse of the 4x4 matrix if it is nonsingular. If it is singular, then returns the identity matrix.

+ +
+
+ +

◆ LookAt()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::LookAt (Point3 eye,
Point3 target,
Vector3 up 
)
+
+static
+
+ +

Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the desired 'target' point with the top of the screen pointed as closely as possible in the direction of the 'up' vector.

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Matrix4::operator!= (const Matrix4m2) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator()() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
float& mingfx::Matrix4::operator() (const int row,
const int col 
)
+
+ +

Access an individual element of the array using the syntax: Matrix4 mat; mat(1,2) = 1.0;.

+ +
+
+ +

◆ operator()() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
float mingfx::Matrix4::operator() (const int row,
const int col 
) const
+
+ +

Access an individual element of the array using the syntax: Matrix4 mat; float row1col2 = mat(1,2);.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Matrix4& mingfx::Matrix4::operator= (const Matrix4m2)
+
+ +

Matrix assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Matrix4::operator== (const Matrix4m2) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Matrix4::operator[] (const int i)
+
+ +

Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order.

+ +
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Matrix4::operator[] (const int i) const
+
+ +

Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order.

+ +
+
+ +

◆ Orthonormal()

+ +
+
+ + + + + + + +
Matrix4 mingfx::Matrix4::Orthonormal () const
+
+ +

Returns an orthonormal version of the matrix, i.e., guarantees that the rotational component of the matrix is built from column vectors that are all unit vectors and orthogonal to each other.

+ +
+
+ +

◆ Perspective()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::Perspective (float fov_y_in_degrees,
float aspect_ratio,
float near_plane_dist,
float far_plane_dist 
)
+
+static
+
+ +

Returns a perspective projection matrix equivalent to the one gluPerspective creates.

+ +
+
+ +

◆ Rotation()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Matrix4 mingfx::Matrix4::Rotation (const Point3p,
const Vector3v,
const float a 
)
+
+static
+
+ +

Returns the rotation matrix around the vector v placed at point p, rotate by angle a.

+ +
+
+ +

◆ RotationX()

+ +
+
+ + + + + +
+ + + + + + + + +
static Matrix4 mingfx::Matrix4::RotationX (const float radians)
+
+static
+
+ +

Returns the rotation matrix about the x axis by the specified angle.

+ +
+
+ +

◆ RotationY()

+ +
+
+ + + + + +
+ + + + + + + + +
static Matrix4 mingfx::Matrix4::RotationY (const float radians)
+
+static
+
+ +

Returns the rotation matrix about the y axis by the specified angle.

+ +
+
+ +

◆ RotationZ()

+ +
+
+ + + + + +
+ + + + + + + + +
static Matrix4 mingfx::Matrix4::RotationZ (const float radians)
+
+static
+
+ +

Returns the rotation matrix about the z axis by the specified angle.

+ +
+
+ +

◆ Scale()

+ +
+
+ + + + + +
+ + + + + + + + +
static Matrix4 mingfx::Matrix4::Scale (const Vector3v)
+
+static
+
+ +

Returns the scale matrix described by the vector.

+ +
+
+ +

◆ SubDeterminant()

+ +
+
+ + + + + + + + + + + + + + + + + + +
float mingfx::Matrix4::SubDeterminant (int exclude_row,
int exclude_col 
) const
+
+ +

Returns the determinant of the 3x3 matrix formed by excluding the specified row and column from the 4x4 matrix.

+ +
+
+ +

◆ ToVector()

+ +
+
+ + + + + + + +
std::vector<float> mingfx::Matrix4::ToVector () const
+
+ +
+
+ +

◆ Translation()

+ +
+
+ + + + + +
+ + + + + + + + +
static Matrix4 mingfx::Matrix4::Translation (const Vector3v)
+
+static
+
+ +

Returns the translation matrix described by the vector.

+ +
+
+ +

◆ Transpose()

+ +
+
+ + + + + + + +
Matrix4 mingfx::Matrix4::Transpose () const
+
+ +

Returns the transpose of the matrix.

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Matrix4::value_ptr () const
+
+ +

Returns a pointer to the raw data array used to store the matrix. This is a 1D array of 16-elements stored in column-major order.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_mesh-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_mesh-members.html new file mode 100644 index 0000000..614b6dc --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_mesh-members.html @@ -0,0 +1,127 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Mesh Member List
+
+
+ +

This is the complete list of members for mingfx::Mesh, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AddTriangle(Point3 v1, Point3 v2, Point3 v3)mingfx::Mesh
BuildBVH()mingfx::Mesh
bvh_ptr()mingfx::Mesh
CalcPerFaceNormals()mingfx::Mesh
CalcPerVertexNormals()mingfx::Mesh
Draw()mingfx::Mesh
LoadFromOBJ(const std::string &filename)mingfx::Mesh
Mesh()mingfx::Mesh
Mesh(const Mesh &other)mingfx::Mesh
num_triangles() constmingfx::Mesh
num_vertices() constmingfx::Mesh
read_color_data(int vertex_id) constmingfx::Mesh
read_normal_data(int vertex_id) constmingfx::Mesh
read_tex_coords_data(int texture_unit, int vertex_id) constmingfx::Mesh
read_triangle_indices_data(int triangle_id) constmingfx::Mesh
read_vertex_data(int vertex_id) constmingfx::Mesh
SetColors(int triangle_id, Color c1, Color c2, Color c3)mingfx::Mesh
SetColors(const std::vector< Color > &colors)mingfx::Mesh
SetColors(float *colors_array, int num_colors)mingfx::Mesh
SetIndices(const std::vector< unsigned int > index_array)mingfx::Mesh
SetIndices(unsigned int *index_array, int num_indices)mingfx::Mesh
SetInstanceTransforms(const std::vector< Matrix4 > &xforms)mingfx::Mesh
SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)mingfx::Mesh
SetNormals(const std::vector< Vector3 > &norms)mingfx::Mesh
SetNormals(float *norms_array, int num_norms)mingfx::Mesh
SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)mingfx::Mesh
SetTexCoords(int texture_unit, const std::vector< Point2 > &tex_coords)mingfx::Mesh
SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)mingfx::Mesh
SetVertices(const std::vector< Point3 > &verts)mingfx::Mesh
SetVertices(float *verts_array, int num_verts)mingfx::Mesh
UpdateGPUMemory()mingfx::Mesh
UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3)mingfx::Mesh
~Mesh()mingfx::Meshvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_mesh.html b/dev/MinGfx/docs/html/classmingfx_1_1_mesh.html new file mode 100644 index 0000000..785bff3 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_mesh.html @@ -0,0 +1,1131 @@ + + + + + + + +MinGfx Toolkit: mingfx::Mesh Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Mesh Class Reference
+
+
+

Detailed Description

+

A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.

+

The mesh can be created algorithmically by adding triangles one at a time or it can be loaded from an .obj file.

+

Vertices are required – you cannot have a mesh without vertices, but other attributes (normals, colors, texture coordinates) are optional. When Draw() is called the mesh will automatically set these other attributes if available.

+

Example of loading from a file:

// during initialization
+
Mesh m;
+
m.LoadFromOBJ(Platform::FindMinGfxDataFile("teapot.obj"));
+
// also create a shader to draw it.
+
DefaultShader s;
+
+
+
// later to draw
+
Matrix4 M;
+
Matrix4 V = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0));
+
Matrix4 P = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0);
+
s.Draw(M, V, P, m, DefaultShader::MaterialProperties());
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up)
Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the des...
+
Mesh()
Creates an empty mesh.
+
static std::string FindMinGfxDataFile(const std::string &basename)
Searches for a data file that ships with MinGfx.
+

Example of creating a mesh algorithmically:

Mesh mesh1;
+
int tri_id;
+
// add a first triangle
+
tri_id = mesh1.AddTriangle(Point3(0,0,0), Point3(1,0,0), Point3(1,1,0));
+
// set attributes for the vertices
+
mesh1.SetNormals(tri_id, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1));
+
mesh1.SetTexCoords(tri_id, 0, Point2(0,1), Point2(1,1), Point2(1,0));
+
+
// add a second triangle and attributes
+
tri_id = mesh1.AddTriangle(Point3(0,0,0), Point3(1,1,0), Point3(0,1,0));
+
mesh1.SetNormals(tri_id, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1));
+
mesh1.SetTexCoords(tri_id, 0, Point2(0,1), Point2(1,0), Point2(0,0));
+
+
// call this when done to save to the GPU
+
mesh1.UpdateGPUMemory();
+
+
// then you can draw the same way as in the previous example.
+

In the mode used above where you add one triangle at a time there is no way to reuse vertices in multiple triangles. If you need to do this for efficiency or other reasons, then you can use an indexed faces mode where you set the mesh data structures directly.

+

Example of creating a mesh that renders in an indexed faces mode:

std::vector<unsigned int> indices;
+
std::vector<Point3> vertices;
+
std::vector<Vector3> normals;
+
std::vector<Point2> texcoords;
+
+
// four vertices, each requires 3 floats: (x,y,z)
+
vertices.push_back(Point3(0,0,0));
+
vertices.push_back(Point3(1,0,0));
+
vertices.push_back(Point3(1,1,0));
+
vertices.push_back(Point3(0,1,0));
+
+
// four normals, each requires 3 floats: (x,y,z)
+
normals.push_back(Vector3(0,0,1));
+
normals.push_back(Vector3(0,0,1));
+
normals.push_back(Vector3(0,0,1));
+
normals.push_back(Vector3(0,0,1));
+
+
// four texture coords, each requires 2 floats: (u,v)
+
texcoords.push_back(Point2(0,1));
+
texcoords.push_back(Point2(1,1));
+
texcoords.push_back(Point2(1,0));
+
texcoords.push_back(Point2(0,0));
+
+
// indices into the arrays above for the first triangle
+
indices.push_back(0);
+
indices.push_back(1);
+
indices.push_back(2);
+
+
// indices for the second triangle, note some are reused
+
indices.push_back(0);
+
indices.push_back(2);
+
indices.push_back(3);
+
+
Mesh mesh1;
+
mesh1.SetVertices(vertices);
+
mesh1.SetNormals(normals);
+
mesh1.SetTexCoords(0, texcoords);
+
mesh1.SetIndices(indices);
+
mesh1.UpdateGPUMemory();
+
+
// then you can draw the same way as in the previous example.
+
+

Definition at line 127 of file mesh.h.

+
+

#include <mesh.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Mesh ()
 Creates an empty mesh. More...
 
 Mesh (const Mesh &other)
 Copies all data and sets GPU dirty bit for the new mesh. More...
 
virtual ~Mesh ()
 
void LoadFromOBJ (const std::string &filename)
 This reads a mesh stored in the common Wavefront Obj file format. More...
 
int AddTriangle (Point3 v1, Point3 v2, Point3 v3)
 Adds a triangle to the mesh datastructure and returns a triangle ID. More...
 
void UpdateTriangle (int triangle_id, Point3 v1, Point3 v2, Point3 v3)
 Updates the vertex positions for a triangle that has already been added to the mesh. More...
 
void SetNormals (int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)
 Sets the normals for the three vertices of a triangle that has already been added to the mesh. More...
 
void SetColors (int triangle_id, Color c1, Color c2, Color c3)
 Sets per-vertex colors for the three vertices of a triangle that has already been added to the mesh. More...
 
void SetTexCoords (int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)
 Sets the texture coordinates for the three vertices of a triangle that has already been added to the mesh. More...
 
void SetVertices (const std::vector< Point3 > &verts)
 Sets the vertex array for the mesh directly. More...
 
void SetNormals (const std::vector< Vector3 > &norms)
 Sets the normal array for the mesh directly. More...
 
void SetColors (const std::vector< Color > &colors)
 Sets the per-vertex colors array for the mesh directly. More...
 
void SetTexCoords (int texture_unit, const std::vector< Point2 > &tex_coords)
 Sets a texture coordinates array for the mesh directly. More...
 
void SetIndices (const std::vector< unsigned int > index_array)
 Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indices forms one triangle: (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ... More...
 
void SetInstanceTransforms (const std::vector< Matrix4 > &xforms)
 
void SetVertices (float *verts_array, int num_verts)
 Sets the vertex array for the mesh directly. Vertices are stored as (x,y,z), (x,y,z), (x,y,z), ... This version of the function accepts a C-style array rather than std::vector<> More...
 
void SetNormals (float *norms_array, int num_norms)
 Sets the normal array for the mesh directly. Normals are stored as (x,y,z), (x,y,z), (x,y,z), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<> More...
 
void SetColors (float *colors_array, int num_colors)
 Sets the per-vertex colors array for the mesh directly. Colors are stored as (r,g,b,a), (r,g,b,a), (r,g,b,a), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<> More...
 
void SetTexCoords (int texture_unit, float *tex_coords_array, int num_tex_coords)
 Sets a texture coordinates array for the mesh directly. Tex coords are stored as (u,v), (u,v), (u,v), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<> More...
 
void SetIndices (unsigned int *index_array, int num_indices)
 Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indices forms one triangle: (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ... This version of the function accepts a C-style array rather than std::vector<> More...
 
void UpdateGPUMemory ()
 This copies the entire mesh data structure to a vertex array in GPU memory, which must happen before you can draw the mesh. More...
 
void Draw ()
 This sends the mesh vertices and attributes down the graphics pipe using glDrawArrays() for the non-indexed mode and glDrawElements() for the indexed mode. More...
 
void CalcPerFaceNormals ()
 This (re)calculates the normals for the mesh and stores them with the mesh data structure. More...
 
void CalcPerVertexNormals ()
 This (re)calculates the normals for the mesh and stores them with the mesh data structure. More...
 
void BuildBVH ()
 This (re)calculates a Bounding Volume Hierarchy for the mesh, which can be used together with Ray::FastIntersectMesh() to do faster ray-mesh intersection testing. More...
 
BVHbvh_ptr ()
 Returns a pointer to the underlying BVH data structure. More...
 
int num_vertices () const
 The total number of vertices in the mesh. More...
 
Point3 read_vertex_data (int vertex_id) const
 Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number. Also see num_vertices(). Use the SetVertices() function to set (or edit) vertex data. More...
 
Vector3 read_normal_data (int vertex_id) const
 Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number. Also see num_vertices(). Use the SetNormals() function to set (or edit) per-vertex normal data. More...
 
Color read_color_data (int vertex_id) const
 Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number. Also see num_vertices(). Use the SetColors() function to set (or edit) per-vertex color data. More...
 
Point2 read_tex_coords_data (int texture_unit, int vertex_id) const
 Read only access to per-vertex texture coordinates data. Data are returned as a Point2. Indexed by vertex number. Also see num_vertices(). Use the SetTexCoords() function to set (or edit) per-vertex tex coords. More...
 
int num_triangles () const
 The total number of triangles in the mesh. More...
 
std::vector< unsigned int > read_triangle_indices_data (int triangle_id) const
 Read only access to the indices that make up a particular triangle. Data are returned as a 3-element array. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Mesh() [1/2]

+ +
+
+ + + + + + + +
mingfx::Mesh::Mesh ()
+
+ +

Creates an empty mesh.

+ +
+
+ +

◆ Mesh() [2/2]

+ +
+
+ + + + + + + + +
mingfx::Mesh::Mesh (const Meshother)
+
+ +

Copies all data and sets GPU dirty bit for the new mesh.

+ +
+
+ +

◆ ~Mesh()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Mesh::~Mesh ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ AddTriangle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mingfx::Mesh::AddTriangle (Point3 v1,
Point3 v2,
Point3 v3 
)
+
+ +

Adds a triangle to the mesh datastructure and returns a triangle ID.

+

The ID should then be used as the first argument for follow-on calls to SetNormals(), SetColors(), and SetTexCoords(). The vertices must be specified in counter-clockwise order so that the normal of the triangle can be determined following the right-hand rule.

+ +
+
+ +

◆ BuildBVH()

+ +
+
+ + + + + + + +
void mingfx::Mesh::BuildBVH ()
+
+ +

This (re)calculates a Bounding Volume Hierarchy for the mesh, which can be used together with Ray::FastIntersectMesh() to do faster ray-mesh intersection testing.

+ +
+
+ +

◆ bvh_ptr()

+ +
+
+ + + + + + + +
BVH* mingfx::Mesh::bvh_ptr ()
+
+ +

Returns a pointer to the underlying BVH data structure.

+

If the data struture has not yet been build or needs to be updated due to a change in the geometry of the mesh, then the BVH is recalculated before returning the pointer.

+ +
+
+ +

◆ CalcPerFaceNormals()

+ +
+
+ + + + + + + +
void mingfx::Mesh::CalcPerFaceNormals ()
+
+ +

This (re)calculates the normals for the mesh and stores them with the mesh data structure.

+

It assumes a faceted mesh, like a cube, where each triangle has separate vertices. The normal is calculated for each triangle face and then the result is associated with each vertex that makes up the triangle. If you have a smooth mesh where vertices are shared between multiple faces then use CalcPerVertexNormals() instead.

+ +
+
+ +

◆ CalcPerVertexNormals()

+ +
+
+ + + + + + + +
void mingfx::Mesh::CalcPerVertexNormals ()
+
+ +

This (re)calculates the normals for the mesh and stores them with the mesh data structure.

+

It assumes a smooth mesh, like a sphere, where each vertex belongs to one or more triangles. Each vertex normal is calculated as a weighted sum of the face normals for adjacent faces. The weighting is based upon the relative areas of the neighboring faces (i.e., a large neighboring triangle contributes more to the vertex normal than a small one).

+ +
+
+ +

◆ Draw()

+ +
+
+ + + + + + + +
void mingfx::Mesh::Draw ()
+
+ +

This sends the mesh vertices and attributes down the graphics pipe using glDrawArrays() for the non-indexed mode and glDrawElements() for the indexed mode.

+

This is just the geometry – for anything to show up on the screen, you must already have a ShaderProgram enabled before calling this function.

+ +
+
+ +

◆ LoadFromOBJ()

+ +
+
+ + + + + + + + +
void mingfx::Mesh::LoadFromOBJ (const std::string & filename)
+
+ +

This reads a mesh stored in the common Wavefront Obj file format.

+

The loader here is simplistic and not guaranteed to work on all valid .obj files, but it should work on many simple ones. UpdateGPUMemory() is called automatically after the model is loaded.

+ +
+
+ +

◆ num_triangles()

+ +
+
+ + + + + + + +
int mingfx::Mesh::num_triangles () const
+
+ +

The total number of triangles in the mesh.

+ +
+
+ +

◆ num_vertices()

+ +
+
+ + + + + + + +
int mingfx::Mesh::num_vertices () const
+
+ +

The total number of vertices in the mesh.

+ +
+
+ +

◆ read_color_data()

+ +
+
+ + + + + + + + +
Color mingfx::Mesh::read_color_data (int vertex_id) const
+
+ +

Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number. Also see num_vertices(). Use the SetColors() function to set (or edit) per-vertex color data.

+ +
+
+ +

◆ read_normal_data()

+ +
+
+ + + + + + + + +
Vector3 mingfx::Mesh::read_normal_data (int vertex_id) const
+
+ +

Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number. Also see num_vertices(). Use the SetNormals() function to set (or edit) per-vertex normal data.

+ +
+
+ +

◆ read_tex_coords_data()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Point2 mingfx::Mesh::read_tex_coords_data (int texture_unit,
int vertex_id 
) const
+
+ +

Read only access to per-vertex texture coordinates data. Data are returned as a Point2. Indexed by vertex number. Also see num_vertices(). Use the SetTexCoords() function to set (or edit) per-vertex tex coords.

+ +
+
+ +

◆ read_triangle_indices_data()

+ +
+
+ + + + + + + + +
std::vector<unsigned int> mingfx::Mesh::read_triangle_indices_data (int triangle_id) const
+
+ +

Read only access to the indices that make up a particular triangle. Data are returned as a 3-element array.

+ +
+
+ +

◆ read_vertex_data()

+ +
+
+ + + + + + + + +
Point3 mingfx::Mesh::read_vertex_data (int vertex_id) const
+
+ +

Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number. Also see num_vertices(). Use the SetVertices() function to set (or edit) vertex data.

+ +
+
+ +

◆ SetColors() [1/3]

+ +
+
+ + + + + + + + +
void mingfx::Mesh::SetColors (const std::vector< Color > & colors)
+
+ +

Sets the per-vertex colors array for the mesh directly.

+ +
+
+ +

◆ SetColors() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetColors (float * colors_array,
int num_colors 
)
+
+ +

Sets the per-vertex colors array for the mesh directly. Colors are stored as (r,g,b,a), (r,g,b,a), (r,g,b,a), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<>

+ +
+
+ +

◆ SetColors() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetColors (int triangle_id,
Color c1,
Color c2,
Color c3 
)
+
+ +

Sets per-vertex colors for the three vertices of a triangle that has already been added to the mesh.

+ +
+
+ +

◆ SetIndices() [1/2]

+ +
+
+ + + + + + + + +
void mingfx::Mesh::SetIndices (const std::vector< unsigned int > index_array)
+
+ +

Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indices forms one triangle: (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ...

+ +
+
+ +

◆ SetIndices() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetIndices (unsigned int * index_array,
int num_indices 
)
+
+ +

Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indices forms one triangle: (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ... This version of the function accepts a C-style array rather than std::vector<>

+ +
+
+ +

◆ SetInstanceTransforms()

+ +
+
+ + + + + + + + +
void mingfx::Mesh::SetInstanceTransforms (const std::vector< Matrix4 > & xforms)
+
+ +
+
+ +

◆ SetNormals() [1/3]

+ +
+
+ + + + + + + + +
void mingfx::Mesh::SetNormals (const std::vector< Vector3 > & norms)
+
+ +

Sets the normal array for the mesh directly.

+ +
+
+ +

◆ SetNormals() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetNormals (float * norms_array,
int num_norms 
)
+
+ +

Sets the normal array for the mesh directly. Normals are stored as (x,y,z), (x,y,z), (x,y,z), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<>

+ +
+
+ +

◆ SetNormals() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetNormals (int triangle_id,
Vector3 n1,
Vector3 n2,
Vector3 n3 
)
+
+ +

Sets the normals for the three vertices of a triangle that has already been added to the mesh.

+ +
+
+ +

◆ SetTexCoords() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetTexCoords (int texture_unit,
const std::vector< Point2 > & tex_coords 
)
+
+ +

Sets a texture coordinates array for the mesh directly.

+ +
+
+ +

◆ SetTexCoords() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetTexCoords (int texture_unit,
float * tex_coords_array,
int num_tex_coords 
)
+
+ +

Sets a texture coordinates array for the mesh directly. Tex coords are stored as (u,v), (u,v), (u,v), ... following the same ordering as was used for SetVertices(). This version of the function accepts a C-style array rather than std::vector<>

+ +
+
+ +

◆ SetTexCoords() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetTexCoords (int triangle_id,
int texture_unit,
Point2 uv1,
Point2 uv2,
Point2 uv3 
)
+
+ +

Sets the texture coordinates for the three vertices of a triangle that has already been added to the mesh.

+

The first textureUnit is 0, and you should always use 0 for this parameter unless you are doing multi-texturing.

+ +
+
+ +

◆ SetVertices() [1/2]

+ +
+
+ + + + + + + + +
void mingfx::Mesh::SetVertices (const std::vector< Point3 > & verts)
+
+ +

Sets the vertex array for the mesh directly.

+ +
+
+ +

◆ SetVertices() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::SetVertices (float * verts_array,
int num_verts 
)
+
+ +

Sets the vertex array for the mesh directly. Vertices are stored as (x,y,z), (x,y,z), (x,y,z), ... This version of the function accepts a C-style array rather than std::vector<>

+ +
+
+ +

◆ UpdateGPUMemory()

+ +
+
+ + + + + + + +
void mingfx::Mesh::UpdateGPUMemory ()
+
+ +

This copies the entire mesh data structure to a vertex array in GPU memory, which must happen before you can draw the mesh.

+

For large meshes, this can take some time, so you may want to call this during initialization immediately after generating the mesh. If you do not, it will be called automatically for you the first time Draw() is called. If the mesh contains normals, per- vertex colors and/or texture coordinates these are added as attributes within the vertex array.

+ +
+
+ +

◆ UpdateTriangle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::Mesh::UpdateTriangle (int triangle_id,
Point3 v1,
Point3 v2,
Point3 v3 
)
+
+ +

Updates the vertex positions for a triangle that has already been added to the mesh.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_platform-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_platform-members.html new file mode 100644 index 0000000..8f34046 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_platform-members.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Platform Member List
+
+
+ +

This is the complete list of members for mingfx::Platform, including all inherited members.

+ + + + + + +
FileExists(const std::string &filename)mingfx::Platformstatic
FindFile(const std::string &basename, const std::vector< std::string > &searchpath)mingfx::Platformstatic
FindFile(const std::string &basename, const std::string &searchpath)mingfx::Platformstatic
FindMinGfxDataFile(const std::string &basename)mingfx::Platformstatic
FindMinGfxShaderFile(const std::string &basename)mingfx::Platformstatic
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_platform.html b/dev/MinGfx/docs/html/classmingfx_1_1_platform.html new file mode 100644 index 0000000..924da10 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_platform.html @@ -0,0 +1,289 @@ + + + + + + + +MinGfx Toolkit: mingfx::Platform Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Platform Class Reference
+
+
+

Detailed Description

+

Provides access to the underlying file system and other platform-specific routines.

+ +

Definition at line 26 of file platform.h.

+
+

#include <platform.h>

+ + + + + + + + + + + + + + + +

+Static Public Member Functions

static bool FileExists (const std::string &filename)
 True if filename is found and can be opened for reading on the system. More...
 
static std::string FindFile (const std::string &basename, const std::vector< std::string > &searchpath)
 
static std::string FindFile (const std::string &basename, const std::string &searchpath)
 
static std::string FindMinGfxDataFile (const std::string &basename)
 Searches for a data file that ships with MinGfx. More...
 
static std::string FindMinGfxShaderFile (const std::string &basename)
 Searches for a shader file that ships with MinGfx. More...
 
+

Member Function Documentation

+ +

◆ FileExists()

+ +
+
+ + + + + +
+ + + + + + + + +
static bool mingfx::Platform::FileExists (const std::string & filename)
+
+static
+
+ +

True if filename is found and can be opened for reading on the system.

+ +
+
+ +

◆ FindFile() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static std::string mingfx::Platform::FindFile (const std::string & basename,
const std::string & searchpath 
)
+
+static
+
+ +
+
+ +

◆ FindFile() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static std::string mingfx::Platform::FindFile (const std::string & basename,
const std::vector< std::string > & searchpath 
)
+
+static
+
+ +
+
+ +

◆ FindMinGfxDataFile()

+ +
+
+ + + + + +
+ + + + + + + + +
static std::string mingfx::Platform::FindMinGfxDataFile (const std::string & basename)
+
+static
+
+ +

Searches for a data file that ships with MinGfx.

+

This will look in the following locations in order:

    +
  1. the current working directory.
  2. +
  3. a subdirectory called data within the current working directory.
  4. +
  5. the installed data directory INSTALL_PREFIX/share/MinGfx-1.0/data.
  6. +
  7. the data directory in the MinGfx build tree. If the file is found, the full path is returned, else basename is returned.
  8. +
+ +
+
+ +

◆ FindMinGfxShaderFile()

+ +
+
+ + + + + +
+ + + + + + + + +
static std::string mingfx::Platform::FindMinGfxShaderFile (const std::string & basename)
+
+static
+
+ +

Searches for a shader file that ships with MinGfx.

+

This will look in the following locations in order:

    +
  1. the current working directory.
  2. +
  3. a subdirectory called shaders within the current working directory.
  4. +
  5. the installed shaders directory INSTALL_PREFIX/share/MinGfx-1.0/shaders.
  6. +
  7. the shaders directory in the MinGfx build tree. If the file is found, the full path is returned, else basename is returned.
  8. +
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_point2-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_point2-members.html new file mode 100644 index 0000000..12e0b99 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_point2-members.html @@ -0,0 +1,113 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Point2 Member List
+
+
+ +

This is the complete list of members for mingfx::Point2, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + +
Lerp(const Point2 &b, float alpha) constmingfx::Point2
Lerp(const Point2 &a, const Point2 &b, float alpha)mingfx::Point2static
One()mingfx::Point2static
operator!=(const Point2 &p) constmingfx::Point2
operator=(const Point2 &p)mingfx::Point2
operator==(const Point2 &p) constmingfx::Point2
operator[](const int i) constmingfx::Point2
operator[](const int i)mingfx::Point2
Origin()mingfx::Point2static
Point2()mingfx::Point2
Point2(float x, float y)mingfx::Point2
Point2(float *p)mingfx::Point2
Point2(const Point2 &p)mingfx::Point2
value_ptr() constmingfx::Point2
w() constmingfx::Point2inline
x() constmingfx::Point2inline
y() constmingfx::Point2inline
Zero()mingfx::Point2static
~Point2()mingfx::Point2virtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_point2.html b/dev/MinGfx/docs/html/classmingfx_1_1_point2.html new file mode 100644 index 0000000..4d53aa7 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_point2.html @@ -0,0 +1,650 @@ + + + + + + + +MinGfx Toolkit: mingfx::Point2 Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Point2 Class Reference
+
+
+

Detailed Description

+

A 2D Point with floating point coordinates, used for storing 2D texture coordinates, screen-space graphics, and mouse input.

+ +

Definition at line 28 of file point2.h.

+
+

#include <point2.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Point2 ()
 Default point at the origin. More...
 
 Point2 (float x, float y)
 Constructs a point given (x,y,1), where the 1 comes from the use of homogeneous coordinates in computer graphics. More...
 
 Point2 (float *p)
 Constructs a point given a pointer to x,y data. More...
 
 Point2 (const Point2 &p)
 Copy constructor for point. More...
 
virtual ~Point2 ()
 Point destructor. More...
 
bool operator== (const Point2 &p) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Point2 &p) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Point2operator= (const Point2 &p)
 Assignment operator. More...
 
float operator[] (const int i) const
 Read only access to the ith coordinate of the point. More...
 
float & operator[] (const int i)
 Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coordinate rather than just request its value. Example: More...
 
float x () const
 Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1.0; form if you need to set the value. More...
 
float y () const
 Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1.0; form if you need to set the value. More...
 
float w () const
 In homogeneous coordinates, the w coordinate for all points is 1.0. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array. More...
 
Point2 Lerp (const Point2 &b, float alpha) const
 Linear interpolation between this point and another. Alpha=0.0 returns this point, and alpha=1.0 returns the other point, other values blend between the two. More...
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

static const Point2Origin ()
 (0,0) - a shortcut for a special point that is frequently needed More...
 
static const Point2Zero ()
 (0,0) - a shortcut for a special point that is frequently needed More...
 
static const Point2One ()
 (1,1) - a shortcut for a special point that is frequently needed More...
 
static Point2 Lerp (const Point2 &a, const Point2 &b, float alpha)
 Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Point2() [1/4]

+ +
+
+ + + + + + + +
mingfx::Point2::Point2 ()
+
+ +

Default point at the origin.

+ +
+
+ +

◆ Point2() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::Point2::Point2 (float x,
float y 
)
+
+ +

Constructs a point given (x,y,1), where the 1 comes from the use of homogeneous coordinates in computer graphics.

+ +
+
+ +

◆ Point2() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Point2::Point2 (float * p)
+
+ +

Constructs a point given a pointer to x,y data.

+ +
+
+ +

◆ Point2() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Point2::Point2 (const Point2p)
+
+ +

Copy constructor for point.

+ +
+
+ +

◆ ~Point2()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Point2::~Point2 ()
+
+virtual
+
+ +

Point destructor.

+ +
+
+

Member Function Documentation

+ +

◆ Lerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Point2 mingfx::Point2::Lerp (const Point2a,
const Point2b,
float alpha 
)
+
+static
+
+ +

Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two.

+ +
+
+ +

◆ Lerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Point2 mingfx::Point2::Lerp (const Point2b,
float alpha 
) const
+
+ +

Linear interpolation between this point and another. Alpha=0.0 returns this point, and alpha=1.0 returns the other point, other values blend between the two.

+ +
+
+ +

◆ One()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point2& mingfx::Point2::One ()
+
+static
+
+ +

(1,1) - a shortcut for a special point that is frequently needed

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Point2::operator!= (const Point2p) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Point2& mingfx::Point2::operator= (const Point2p)
+
+ +

Assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Point2::operator== (const Point2p) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Point2::operator[] (const int i)
+
+ +

Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coordinate rather than just request its value. Example:

+
+
a[0] = 5.0; // set the x-coordinate of the point
+
Point2()
Default point at the origin.
+
+
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Point2::operator[] (const int i) const
+
+ +

Read only access to the ith coordinate of the point.

+ +
+
+ +

◆ Origin()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point2& mingfx::Point2::Origin ()
+
+static
+
+ +

(0,0) - a shortcut for a special point that is frequently needed

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Point2::value_ptr () const
+
+ +

Returns a const pointer to the raw data array.

+ +
+
+ +

◆ w()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point2::w () const
+
+inline
+
+ +

In homogeneous coordinates, the w coordinate for all points is 1.0.

+ +

Definition at line 76 of file point2.h.

+ +
+
+ +

◆ x()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point2::x () const
+
+inline
+
+ +

Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1.0; form if you need to set the value.

+ +

Definition at line 69 of file point2.h.

+ +
+
+ +

◆ y()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point2::y () const
+
+inline
+
+ +

Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1.0; form if you need to set the value.

+ +

Definition at line 73 of file point2.h.

+ +
+
+ +

◆ Zero()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point2& mingfx::Point2::Zero ()
+
+static
+
+ +

(0,0) - a shortcut for a special point that is frequently needed

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_point3-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_point3-members.html new file mode 100644 index 0000000..4aa7e82 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_point3-members.html @@ -0,0 +1,117 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Point3 Member List
+
+
+ +

This is the complete list of members for mingfx::Point3, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + +
ClosestPoint(const std::vector< Point3 > &point_list)mingfx::Point3
ClosestPointOnPlane(const Point3 &plane_origin, const Vector3 &plane_normal)mingfx::Point3
DistanceToPlane(const Point3 &plane_origin, const Vector3 &plane_normal)mingfx::Point3
Lerp(const Point3 &b, float alpha) constmingfx::Point3
Lerp(const Point3 &a, const Point3 &b, float alpha)mingfx::Point3static
One()mingfx::Point3static
operator!=(const Point3 &p) constmingfx::Point3
operator=(const Point3 &p)mingfx::Point3
operator==(const Point3 &p) constmingfx::Point3
operator[](const int i) constmingfx::Point3
operator[](const int i)mingfx::Point3
Origin()mingfx::Point3static
Point3()mingfx::Point3
Point3(float x, float y, float z)mingfx::Point3
Point3(float *p)mingfx::Point3
Point3(const Point3 &p)mingfx::Point3
value_ptr() constmingfx::Point3
w() constmingfx::Point3inline
x() constmingfx::Point3inline
y() constmingfx::Point3inline
z() constmingfx::Point3inline
Zero()mingfx::Point3static
~Point3()mingfx::Point3virtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_point3.html b/dev/MinGfx/docs/html/classmingfx_1_1_point3.html new file mode 100644 index 0000000..2166d0e --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_point3.html @@ -0,0 +1,795 @@ + + + + + + + +MinGfx Toolkit: mingfx::Point3 Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Point3 Class Reference
+
+
+

Detailed Description

+

A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graphics operations.

+

Point3s can be transformed by a Matrix4. Example:

Point3 a(0,0,1);
+
std::cout << a << std::endl;
+
+
Matrix4 M = Matrix4::Translation(Vector3(0,0,-1));
+
Point3 b = M * a;
+
std::cout << b << std::endl;
+
+
// you can access the individual components of the point in two ways:
+
Point3 p(1,2,3);
+
float option1 = p.x();
+
float option2 = p[0];
+
+
// to set an individual component of the point use the [] operator:
+
Point3 p2;
+
p2[0] = 0.4;
+
p2[1] = 1.2;
+
p2[2] = 3.1;
+
static Matrix4 Translation(const Vector3 &v)
Returns the translation matrix described by the vector.
+
Point3()
Default point at the origin.
+
+

Definition at line 52 of file point3.h.

+
+

#include <point3.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Point3 ()
 Default point at the origin. More...
 
 Point3 (float x, float y, float z)
 Constructs a point given (x,y,z,1), where the 1 comes from the use of homogeneous coordinates in computer graphics. More...
 
 Point3 (float *p)
 Constructs a point given a pointer to x,y,z data. More...
 
 Point3 (const Point3 &p)
 Copy constructor for point. More...
 
virtual ~Point3 ()
 Point destructor. More...
 
bool operator== (const Point3 &p) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Point3 &p) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Point3operator= (const Point3 &p)
 Assignment operator. More...
 
float operator[] (const int i) const
 Read only access to the ith coordinate of the point. More...
 
float & operator[] (const int i)
 Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coordinate rather than just request its value. Example: More...
 
float x () const
 Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1.0; form if you need to set the value. More...
 
float y () const
 Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1.0; form if you need to set the value. More...
 
float z () const
 Read only access to the z coordinate. Can also use my_point[2]. Use the my_point[2] = 1.0; form if you need to set the value. More...
 
float w () const
 In homogeneous coordinates, the w coordinate for all points is 1.0. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array. More...
 
Point3 Lerp (const Point3 &b, float alpha) const
 Linear interpolation between this point and another. Alpha=0.0 returns this point, and alpha=1.0 returns the other point, other values blend between the two. More...
 
float DistanceToPlane (const Point3 &plane_origin, const Vector3 &plane_normal)
 Returns the shortest (i.e., perpendicular) distance from this point to a plane defined by a point and a normal. More...
 
Point3 ClosestPointOnPlane (const Point3 &plane_origin, const Vector3 &plane_normal)
 Returns the perpendicular projection of this point onto a plane defined by a point and a normal. More...
 
Point3 ClosestPoint (const std::vector< Point3 > &point_list)
 Given a list of points, returns the closest in the last to the current point. More...
 
+ + + + + + + + + + + + + +

+Static Public Member Functions

static const Point3Origin ()
 (0,0,0) - a shortcut for a special point that is frequently needed More...
 
static const Point3Zero ()
 (0,0,0) - a shortcut for a special point that is frequently needed More...
 
static const Point3One ()
 (1,1,1) - a shortcut for a special point that is frequently needed More...
 
static Point3 Lerp (const Point3 &a, const Point3 &b, float alpha)
 Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Point3() [1/4]

+ +
+
+ + + + + + + +
mingfx::Point3::Point3 ()
+
+ +

Default point at the origin.

+ +
+
+ +

◆ Point3() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::Point3::Point3 (float x,
float y,
float z 
)
+
+ +

Constructs a point given (x,y,z,1), where the 1 comes from the use of homogeneous coordinates in computer graphics.

+ +
+
+ +

◆ Point3() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Point3::Point3 (float * p)
+
+ +

Constructs a point given a pointer to x,y,z data.

+ +
+
+ +

◆ Point3() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Point3::Point3 (const Point3p)
+
+ +

Copy constructor for point.

+ +
+
+ +

◆ ~Point3()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Point3::~Point3 ()
+
+virtual
+
+ +

Point destructor.

+ +
+
+

Member Function Documentation

+ +

◆ ClosestPoint()

+ +
+
+ + + + + + + + +
Point3 mingfx::Point3::ClosestPoint (const std::vector< Point3 > & point_list)
+
+ +

Given a list of points, returns the closest in the last to the current point.

+ +
+
+ +

◆ ClosestPointOnPlane()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Point3 mingfx::Point3::ClosestPointOnPlane (const Point3plane_origin,
const Vector3plane_normal 
)
+
+ +

Returns the perpendicular projection of this point onto a plane defined by a point and a normal.

+ +
+
+ +

◆ DistanceToPlane()

+ +
+
+ + + + + + + + + + + + + + + + + + +
float mingfx::Point3::DistanceToPlane (const Point3plane_origin,
const Vector3plane_normal 
)
+
+ +

Returns the shortest (i.e., perpendicular) distance from this point to a plane defined by a point and a normal.

+ +
+
+ +

◆ Lerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Point3 mingfx::Point3::Lerp (const Point3a,
const Point3b,
float alpha 
)
+
+static
+
+ +

Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two.

+ +
+
+ +

◆ Lerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Point3 mingfx::Point3::Lerp (const Point3b,
float alpha 
) const
+
+ +

Linear interpolation between this point and another. Alpha=0.0 returns this point, and alpha=1.0 returns the other point, other values blend between the two.

+ +
+
+ +

◆ One()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point3& mingfx::Point3::One ()
+
+static
+
+ +

(1,1,1) - a shortcut for a special point that is frequently needed

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Point3::operator!= (const Point3p) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Point3& mingfx::Point3::operator= (const Point3p)
+
+ +

Assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Point3::operator== (const Point3p) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Point3::operator[] (const int i)
+
+ +

Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coordinate rather than just request its value. Example:

+
+
a[0] = 5.0; // set the x-coordinate of the point
+
+
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Point3::operator[] (const int i) const
+
+ +

Read only access to the ith coordinate of the point.

+ +
+
+ +

◆ Origin()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point3& mingfx::Point3::Origin ()
+
+static
+
+ +

(0,0,0) - a shortcut for a special point that is frequently needed

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Point3::value_ptr () const
+
+ +

Returns a const pointer to the raw data array.

+ +
+
+ +

◆ w()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point3::w () const
+
+inline
+
+ +

In homogeneous coordinates, the w coordinate for all points is 1.0.

+ +

Definition at line 104 of file point3.h.

+ +
+
+ +

◆ x()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point3::x () const
+
+inline
+
+ +

Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1.0; form if you need to set the value.

+ +

Definition at line 93 of file point3.h.

+ +
+
+ +

◆ y()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point3::y () const
+
+inline
+
+ +

Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1.0; form if you need to set the value.

+ +

Definition at line 97 of file point3.h.

+ +
+
+ +

◆ z()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Point3::z () const
+
+inline
+
+ +

Read only access to the z coordinate. Can also use my_point[2]. Use the my_point[2] = 1.0; form if you need to set the value.

+ +

Definition at line 101 of file point3.h.

+ +
+
+ +

◆ Zero()

+ +
+
+ + + + + +
+ + + + + + + +
static const Point3& mingfx::Point3::Zero ()
+
+static
+
+ +

(0,0,0) - a shortcut for a special point that is frequently needed

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_quaternion-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_quaternion-members.html new file mode 100644 index 0000000..4015421 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_quaternion-members.html @@ -0,0 +1,119 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Quaternion Member List
+
+
+ +

This is the complete list of members for mingfx::Quaternion, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Conjugate() constmingfx::Quaternion
Dot(const Quaternion &q) constmingfx::Quaternion
FromAxisAngle(const Vector3 &axis, float angle)mingfx::Quaternionstatic
FromEulerAnglesZYX(const Vector3 &angles)mingfx::Quaternionstatic
Length() constmingfx::Quaternion
Normalize()mingfx::Quaternion
operator!=(const Quaternion &q) constmingfx::Quaternion
operator=(const Quaternion &q)mingfx::Quaternion
operator==(const Quaternion &q) constmingfx::Quaternion
operator[](const int i) constmingfx::Quaternion
operator[](const int i)mingfx::Quaternion
Quaternion()mingfx::Quaternion
Quaternion(float qx, float qy, float qz, float qw)mingfx::Quaternion
Quaternion(float *ptr)mingfx::Quaternion
Quaternion(const Quaternion &other)mingfx::Quaternion
Slerp(const Quaternion &other, float alpha) constmingfx::Quaternion
Slerp(const Quaternion &a, const Quaternion &b, float alpha)mingfx::Quaternionstatic
ToEulerAnglesZYX() constmingfx::Quaternion
ToUnit() constmingfx::Quaternion
value_ptr() constmingfx::Quaternion
w() constmingfx::Quaternioninline
x() constmingfx::Quaternioninline
y() constmingfx::Quaternioninline
z() constmingfx::Quaternioninline
~Quaternion()mingfx::Quaternionvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_quaternion.html b/dev/MinGfx/docs/html/classmingfx_1_1_quaternion.html new file mode 100644 index 0000000..3bce21e --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_quaternion.html @@ -0,0 +1,818 @@ + + + + + + + +MinGfx Toolkit: mingfx::Quaternion Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Quaternion Class Reference
+
+
+

Detailed Description

+

A quaternion to represent rotations in 3D space.

+

The main use of quaternions within the library is to support smooth interpolation between rotations, since this is not possible using Euler angles or rotation matrices. The class includes a Slerp routine for spherical interpolation between rotations. Example use:

// find a rotation 1/2 way between r1 and r2, both originally expressed in Euler angles
+
+
Vector3 euler1 = GfxMath::ToRadians(Vector3(0,0,60));
+
Vector3 euler2 = GfxMath::ToRadians(Vector3(45,45,60));
+
+ + +
+
float alpha = 0.5;
+
Quaternion q_half_way = q1.Slerp(q2, alpha);
+
Vector3 new_euler_angles = GfxMath::ToDegrees(q_half_way.ToEulerAnglesZYX());
+
static float ToRadians(float degrees)
+
static float ToDegrees(float radians)
+
static Quaternion FromEulerAnglesZYX(const Vector3 &angles)
Creates a new quaternion from a rotation defined in Euler angles.
+
Quaternion()
Creates a quat with the identity rotation.
+
+

Definition at line 41 of file quaternion.h.

+
+

#include <quaternion.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Quaternion ()
 Creates a quat with the identity rotation. More...
 
 Quaternion (float qx, float qy, float qz, float qw)
 Creates a quat from the 4 parameters. More...
 
 Quaternion (float *ptr)
 Creates a quate from a pointer to 4 floating point numbers in the order qx, qy, qz, qw. More...
 
 Quaternion (const Quaternion &other)
 Copy constructor. More...
 
virtual ~Quaternion ()
 
bool operator== (const Quaternion &q) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Quaternion &q) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Quaternionoperator= (const Quaternion &q)
 Assignment operator. More...
 
float operator[] (const int i) const
 Read only access to the ith coordinate of the quaternion (qx, qy, qz, qw). More...
 
float & operator[] (const int i)
 Writable access the ith coordinate of the quaternion (qx, qy, qz, qw). More...
 
float x () const
 Read only access to the x coordinate of the imaginary part of the quaternion. More...
 
float y () const
 Read only access to the y coordinate of the imaginary part of the quaternion. More...
 
float z () const
 Read only access to the z coordinate of the imaginary part of the quaternion. More...
 
float w () const
 Read only access to the w, real part, of the quaternion. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array, stored in the order qx, qy, qz, qw. More...
 
float Dot (const Quaternion &q) const
 Returns the dot product of this quaternion with another. More...
 
float Length () const
 Returns the length of the quaternion. More...
 
void Normalize ()
 Normalizes the quat by making it unit length. More...
 
Quaternion ToUnit () const
 Returns a normalized (i.e., unit length) version of the quaternion without modifying the original. More...
 
Quaternion Conjugate () const
 Returns the conjugate of the quaternion. More...
 
Vector3 ToEulerAnglesZYX () const
 Converts the rotation specified by the quaternion into Euler angles. More...
 
Quaternion Slerp (const Quaternion &other, float alpha) const
 Uses spherical interpolation to interpoloate between the rotation stored in this quaternion and the rotation stored in another. More...
 
+ + + + + + + + + + +

+Static Public Member Functions

static Quaternion FromAxisAngle (const Vector3 &axis, float angle)
 Creates a new quaternion that describes a rotation by angle radians about. More...
 
static Quaternion FromEulerAnglesZYX (const Vector3 &angles)
 Creates a new quaternion from a rotation defined in Euler angles. More...
 
static Quaternion Slerp (const Quaternion &a, const Quaternion &b, float alpha)
 Uses spherical interpolation to interpoloate between the rotations specified by two quaternions. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Quaternion() [1/4]

+ +
+
+ + + + + + + +
mingfx::Quaternion::Quaternion ()
+
+ +

Creates a quat with the identity rotation.

+ +
+
+ +

◆ Quaternion() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::Quaternion::Quaternion (float qx,
float qy,
float qz,
float qw 
)
+
+ +

Creates a quat from the 4 parameters.

+ +
+
+ +

◆ Quaternion() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Quaternion::Quaternion (float * ptr)
+
+ +

Creates a quate from a pointer to 4 floating point numbers in the order qx, qy, qz, qw.

+ +
+
+ +

◆ Quaternion() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Quaternion::Quaternion (const Quaternionother)
+
+ +

Copy constructor.

+ +
+
+ +

◆ ~Quaternion()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Quaternion::~Quaternion ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ Conjugate()

+ +
+
+ + + + + + + +
Quaternion mingfx::Quaternion::Conjugate () const
+
+ +

Returns the conjugate of the quaternion.

+ +
+
+ +

◆ Dot()

+ +
+
+ + + + + + + + +
float mingfx::Quaternion::Dot (const Quaternionq) const
+
+ +

Returns the dot product of this quaternion with another.

+ +
+
+ +

◆ FromAxisAngle()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static Quaternion mingfx::Quaternion::FromAxisAngle (const Vector3axis,
float angle 
)
+
+static
+
+ +

Creates a new quaternion that describes a rotation by angle radians about.

+ +
+
+ +

◆ FromEulerAnglesZYX()

+ +
+
+ + + + + +
+ + + + + + + + +
static Quaternion mingfx::Quaternion::FromEulerAnglesZYX (const Vector3angles)
+
+static
+
+ +

Creates a new quaternion from a rotation defined in Euler angles.

+ +
+
+ +

◆ Length()

+ +
+
+ + + + + + + +
float mingfx::Quaternion::Length () const
+
+ +

Returns the length of the quaternion.

+ +
+
+ +

◆ Normalize()

+ +
+
+ + + + + + + +
void mingfx::Quaternion::Normalize ()
+
+ +

Normalizes the quat by making it unit length.

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Quaternion::operator!= (const Quaternionq) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Quaternion& mingfx::Quaternion::operator= (const Quaternionq)
+
+ +

Assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Quaternion::operator== (const Quaternionq) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Quaternion::operator[] (const int i)
+
+ +

Writable access the ith coordinate of the quaternion (qx, qy, qz, qw).

+ +
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Quaternion::operator[] (const int i) const
+
+ +

Read only access to the ith coordinate of the quaternion (qx, qy, qz, qw).

+ +
+
+ +

◆ Slerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Quaternion mingfx::Quaternion::Slerp (const Quaterniona,
const Quaternionb,
float alpha 
)
+
+static
+
+ +

Uses spherical interpolation to interpoloate between the rotations specified by two quaternions.

+ +
+
+ +

◆ Slerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Quaternion mingfx::Quaternion::Slerp (const Quaternionother,
float alpha 
) const
+
+ +

Uses spherical interpolation to interpoloate between the rotation stored in this quaternion and the rotation stored in another.

+ +
+
+ +

◆ ToEulerAnglesZYX()

+ +
+
+ + + + + + + +
Vector3 mingfx::Quaternion::ToEulerAnglesZYX () const
+
+ +

Converts the rotation specified by the quaternion into Euler angles.

+ +
+
+ +

◆ ToUnit()

+ +
+
+ + + + + + + +
Quaternion mingfx::Quaternion::ToUnit () const
+
+ +

Returns a normalized (i.e., unit length) version of the quaternion without modifying the original.

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Quaternion::value_ptr () const
+
+ +

Returns a const pointer to the raw data array, stored in the order qx, qy, qz, qw.

+ +
+
+ +

◆ w()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Quaternion::w () const
+
+inline
+
+ +

Read only access to the w, real part, of the quaternion.

+ +

Definition at line 83 of file quaternion.h.

+ +
+
+ +

◆ x()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Quaternion::x () const
+
+inline
+
+ +

Read only access to the x coordinate of the imaginary part of the quaternion.

+ +

Definition at line 74 of file quaternion.h.

+ +
+
+ +

◆ y()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Quaternion::y () const
+
+inline
+
+ +

Read only access to the y coordinate of the imaginary part of the quaternion.

+ +

Definition at line 77 of file quaternion.h.

+ +
+
+ +

◆ z()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Quaternion::z () const
+
+inline
+
+ +

Read only access to the z coordinate of the imaginary part of the quaternion.

+ +

Definition at line 80 of file quaternion.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes-members.html new file mode 100644 index 0000000..6b52b39 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes-members.html @@ -0,0 +1,111 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::QuickShapes Member List
+
+
+ +

This is the complete list of members for mingfx::QuickShapes, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
default_shader()mingfx::QuickShapes
DrawArrow(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, Point3 p, Vector3 dir, float radius)mingfx::QuickShapes
DrawAxes(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix)mingfx::QuickShapes
DrawBrush(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawCone(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawCube(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawCylinder(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawFullscreenTexture(const Color &color, const Texture2D &texture)mingfx::QuickShapes
DrawLines(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const std::vector< Point3 > &points, LinesType linesType, float radius)mingfx::QuickShapes
DrawLineSegment(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Point3 &p1, const Point3 &p2, float radius)mingfx::QuickShapes
DrawSphere(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)mingfx::QuickShapes
DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Texture2D &texture)mingfx::QuickShapes
LinesType enum namemingfx::QuickShapes
material()mingfx::QuickShapes
QuickShapes()mingfx::QuickShapes
~QuickShapes()mingfx::QuickShapesvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes.html b/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes.html new file mode 100644 index 0000000..f499aff --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_quick_shapes.html @@ -0,0 +1,844 @@ + + + + + + + +MinGfx Toolkit: mingfx::QuickShapes Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::QuickShapes Class Reference
+
+
+

Detailed Description

+

This class provides a quick way to draw shapes for use in debugging or simple scenes.

+

You can specify the color for each shape as part of the Draw...() call. Other lighting parameters (the intensity of the light, advanced material properties) are pre-set to reasonable defaults that apply to all of the shapes drawn. You can edit these if you wish, but note that the intent of this class is just to provide a quick way to draw shapes – this is not the right tool to use if you wish to do quality renderings and use multiple types of materials.

+

Example usage: ~~~ define a new QuickShapes object during initialization, or as a class member variable QuickShapes quick_shapes;

+

void DrawUsingOpenGL() { later, in your draw routine, use it to draw shapes Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0);

+

Matrix4 m_cube = Matrix4::Translation(Vector3(-2.5,0,0)) * Matrix4::Scale(Vector3(0.5, 0.5, 0.5)); quick_shapes.DrawCube(m_cube, view, proj, Color(1,1,1));

+

Matrix4 m_sphere = Matrix4::Scale(Vector3(2.5, 2.5, 2.5)); quick_shapes.DrawSphere(m_sphere, view, proj, Color(1,1,1));

+

Matrix4 m_loop; std::vector<Point3> loop; loop.push_back(Point3( 4.0, 4.0, -4.0)); loop.push_back(Point3(-4.0, 4.0, -4.0)); loop.push_back(Point3(-4.0, 4.0, 4.0)); loop.push_back(Point3( 4.0, 4.0, 4.0)); quick_shapes.DrawLines(m_loop, view, proj, Color(1,1,1), loop, QuickShapes::LinesType::LINE_LOOP, 0.1); } ~~~

+ +

Definition at line 69 of file quick_shapes.h.

+
+

#include <quick_shapes.h>

+ + + + +

+Public Types

enum class  LinesType { LINES +, LINE_STRIP +, LINE_LOOP + }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 QuickShapes ()
 
virtual ~QuickShapes ()
 
void DrawCube (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws a cube with extents -1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property. More...
 
void DrawCylinder (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws a cylinder with radius 1 and height y=-1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property. More...
 
void DrawCone (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws a cone with radius 1 and height y=-1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property. More...
 
void DrawSphere (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws a sphere with radius 1 given the model, view, and projection matrices provided and using the supplied color as a material property. More...
 
void DrawBrush (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws the classic 3D paintbrush cursor from the 2001 Keefe et al. More...
 
void DrawLineSegment (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Point3 &p1, const Point3 &p2, float radius)
 Draws a cylinder between the two points. More...
 
void DrawLines (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const std::vector< Point3 > &points, LinesType linesType, float radius)
 Draws a series of line segments. More...
 
void DrawArrow (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, Point3 p, Vector3 dir, float radius)
 Draws an arrow originating at point p and extending in the direction and length specified by dir. More...
 
void DrawAxes (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix)
 Draws a right handed set of axes at the coordinate frame specified by the modelMatrix. More...
 
void DrawSquare (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
 Draws a square in the X-Y plane with extents -1 to 1 and normal in the +Y direction. More...
 
void DrawSquare (const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Texture2D &texture)
 Draws a square, which you can deform into some other shape by adjusting the model matrix, and applies a texture to it. More...
 
void DrawFullscreenTexture (const Color &color, const Texture2D &texture)
 Draws a background texture across the whole screen. More...
 
DefaultShaderdefault_shader ()
 Returns a pointer to the default shader used internally by the Draw class so that you may change the default lighting properties if you wish. More...
 
DefaultShader::MaterialPropertiesmaterial ()
 Returns a pointer to the default material properties for the shapes so that you may adjust the reflectance properties used by all the shapes if needed. More...
 
+

Member Enumeration Documentation

+ +

◆ LinesType

+ +
+
+ + + + + +
+ + + + +
enum mingfx::QuickShapes::LinesType
+
+strong
+
+ + + + +
Enumerator
LINES 
LINE_STRIP 
LINE_LOOP 
+ +

Definition at line 134 of file quick_shapes.h.

+ +
+
+

Constructor & Destructor Documentation

+ +

◆ QuickShapes()

+ +
+
+ + + + + + + +
mingfx::QuickShapes::QuickShapes ()
+
+ +
+
+ +

◆ ~QuickShapes()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::QuickShapes::~QuickShapes ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ default_shader()

+ +
+
+ + + + + + + +
DefaultShader* mingfx::QuickShapes::default_shader ()
+
+ +

Returns a pointer to the default shader used internally by the Draw class so that you may change the default lighting properties if you wish.

+ +
+
+ +

◆ DrawArrow()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawArrow (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor,
Point3 p,
Vector3 dir,
float radius 
)
+
+ +

Draws an arrow originating at point p and extending in the direction and length specified by dir.

+

radius is the radius of the cylinder used to draw the shaft of the arrow.

+ +
+
+ +

◆ DrawAxes()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawAxes (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix 
)
+
+ +

Draws a right handed set of axes at the coordinate frame specified by the modelMatrix.

+

The arrows are 1 unit in length and colored based on the axis: X=red, Y=green, Z=blue.

+ +
+
+ +

◆ DrawBrush()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawBrush (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws the classic 3D paintbrush cursor from the 2001 Keefe et al.

+

CavePainting paper. The tip of the brush is at (0,0,0), the front flat edge runs along the X axis, and the handle runs in the +Z direction.

+ +
+
+ +

◆ DrawCone()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawCone (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws a cone with radius 1 and height y=-1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property.

+ +
+
+ +

◆ DrawCube()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawCube (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws a cube with extents -1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property.

+ +
+
+ +

◆ DrawCylinder()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawCylinder (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws a cylinder with radius 1 and height y=-1 to 1 given the model, view, and projection matrices provided and using the supplied color as a material property.

+ +
+
+ +

◆ DrawFullscreenTexture()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawFullscreenTexture (const Colorcolor,
const Texture2Dtexture 
)
+
+ +

Draws a background texture across the whole screen.

+

Typically, you will want to do this before any other draw calls.

+ +
+
+ +

◆ DrawLines()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawLines (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor,
const std::vector< Point3 > & points,
LinesType linesType,
float radius 
)
+
+ +

Draws a series of line segments.

+

Using linesType=LINES connects each consecutive pair of points in the points array with a line. A linesType=LINE_STRIP will connect each point to the next. And, a linesType=LINE_LOOP will connect each point to the next and in addition connect the last to the first. Example:

Matrix4 model;
+
Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0));
+
Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0);
+
std::vector<Point3> loop;
+
loop.push_back(Point3( 4.0, 4.0, -4.0));
+
loop.push_back(Point3(-4.0, 4.0, -4.0));
+
loop.push_back(Point3(-4.0, 4.0, 4.0));
+
loop.push_back(Point3( 4.0, 4.0, 4.0));
+
quick_shapes.DrawLines(model, view, proj, Color(1,1,1), loop, QuickShapes::LinesType::LINE_LOOP, 0.1);
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up)
Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the des...
+ +
+
+
+ +

◆ DrawLineSegment()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawLineSegment (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor,
const Point3p1,
const Point3p2,
float radius 
)
+
+ +

Draws a cylinder between the two points.

+ +
+
+ +

◆ DrawSphere()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawSphere (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws a sphere with radius 1 given the model, view, and projection matrices provided and using the supplied color as a material property.

+ +
+
+ +

◆ DrawSquare() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawSquare (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor 
)
+
+ +

Draws a square in the X-Y plane with extents -1 to 1 and normal in the +Y direction.

+

Uses the model, view, and projection matrices provided and the supplied color as a material property.

+ +
+
+ +

◆ DrawSquare() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::QuickShapes::DrawSquare (const Matrix4modelMatrix,
const Matrix4viewMatrix,
const Matrix4projectionMatrix,
const Colorcolor,
const Texture2Dtexture 
)
+
+ +

Draws a square, which you can deform into some other shape by adjusting the model matrix, and applies a texture to it.

+

The texture must already be bound to the OpenGL textureID provided. The square lies in the X-Y plane with extents -1 to 1 and normal in the +Y direction. No lighting is applied.

+ +
+
+ +

◆ material()

+ +
+
+ + + + + + + +
DefaultShader::MaterialProperties* mingfx::QuickShapes::material ()
+
+ +

Returns a pointer to the default material properties for the shapes so that you may adjust the reflectance properties used by all the shapes if needed.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_ray-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_ray-members.html new file mode 100644 index 0000000..f27cee9 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_ray-members.html @@ -0,0 +1,110 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Ray Member List
+
+
+ +

This is the complete list of members for mingfx::Ray, including all inherited members.

+ + + + + + + + + + + + + + + + + +
direction() constmingfx::Ray
FastIntersectMesh(Mesh *mesh, float *iTime, Point3 *iPoint, int *iTriangleID) constmingfx::Ray
IntersectAABB(const AABB &box, float *iTime) constmingfx::Ray
IntersectMesh(const Mesh &mesh, float *iTime, Point3 *iPoint, int *iTriangleID) constmingfx::Ray
IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal, float *iTime, Point3 *iPoint) constmingfx::Ray
IntersectQuad(const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4, float *iTime, Point3 *iPoint) constmingfx::Ray
IntersectSphere(const Point3 &center, float radius, float *iTime, Point3 *iPoint) constmingfx::Ray
IntersectTriangle(const Point3 &v1, const Point3 &v2, const Point3 &v3, float *iTime, Point3 *iPoint) constmingfx::Ray
Length() constmingfx::Ray
operator!=(const Ray &other) constmingfx::Ray
operator==(const Ray &other) constmingfx::Ray
origin() constmingfx::Ray
Ray()mingfx::Ray
Ray(const Point3 &origin, const Vector3 &direction)mingfx::Ray
set(Point3 newOrigin, Vector3 newDir)mingfx::Ray
~Ray()mingfx::Rayvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_ray.html b/dev/MinGfx/docs/html/classmingfx_1_1_ray.html new file mode 100644 index 0000000..0c5b500 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_ray.html @@ -0,0 +1,689 @@ + + + + + + + +MinGfx Toolkit: mingfx::Ray Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Ray Class Reference
+
+
+

Detailed Description

+

Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a direction (a unit 3D vector).

+

Rays can intersect a variety of other computer graphics objects, such as planes, triangles, spheres, 3D meshes, etc. These intersections can be tested with the Intersect...() methods. The Ray can also be transformed by a Matrix4. Example:

// Create a pick ray from the mouse position
+
void MyGraphicsApp::OnLeftMouseDown(const Point2 &pos) {
+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos);
+
float mouse_z = ReadZValueAtPixel(pos);
+
Point3 mouse_3d = GfxMath::ScreenToNearPlane(view_matrix, proj_matrix, mouse_xy, mouse_z);
+
Matrix4 camera_matrix = view_matrix.Inverse();
+
Point3 eye = camera_matrix.ColumnToPoint3(3);
+
+
Ray pick_ray(eye, mouse_3d - eye);
+
+
// check to see if the ray intersects a sphere
+
float t;
+
Point3 p;
+
if (pick_ray.IntersectSphere(Point3(0,0,0), 2.0, &t, &p)) {
+
std::cout << "Mouse pointing at sphere! Intersection point = " << p << std::endl;
+
}
+
}
+
static Point3 ScreenToNearPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt)
Converts a 2D point on the filmplane represented in Normalized Device Coorindates,...
+
Ray()
Defaults to a ray at the origin and pointing in the -Z direction.
+
+

Definition at line 54 of file ray.h.

+
+

#include <ray.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Ray ()
 Defaults to a ray at the origin and pointing in the -Z direction. More...
 
 Ray (const Point3 &origin, const Vector3 &direction)
 Creates a ray from a 3D origin and direction. More...
 
virtual ~Ray ()
 Ray destructor. More...
 
bool operator== (const Ray &other) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Ray &other) const
 Check for "inequality", taking floating point imprecision into account. More...
 
float Length () const
 Returns the length of the direction vector. More...
 
bool IntersectPlane (const Point3 &planePt, const Vector3 &planeNormal, float *iTime, Point3 *iPoint) const
 Checks to see if the ray intersects a plane defined by a point and a normal. More...
 
bool IntersectTriangle (const Point3 &v1, const Point3 &v2, const Point3 &v3, float *iTime, Point3 *iPoint) const
 Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3. More...
 
bool IntersectQuad (const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4, float *iTime, Point3 *iPoint) const
 Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4. More...
 
bool IntersectSphere (const Point3 &center, float radius, float *iTime, Point3 *iPoint) const
 Checks to see if the ray intersects a sphere defined by a center point and a radius. More...
 
bool IntersectMesh (const Mesh &mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
 Checks to see if the ray intersects a triangle mesh. More...
 
bool FastIntersectMesh (Mesh *mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
 Checks to see if the ray intersects a triangle mesh. More...
 
bool IntersectAABB (const AABB &box, float *iTime) const
 Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box). More...
 
Point3 origin () const
 Returns the origin. More...
 
Vector3 direction () const
 Returns the direction. More...
 
void set (Point3 newOrigin, Vector3 newDir)
 Sets a new origin and direction. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Ray() [1/2]

+ +
+
+ + + + + + + +
mingfx::Ray::Ray ()
+
+ +

Defaults to a ray at the origin and pointing in the -Z direction.

+ +
+
+ +

◆ Ray() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::Ray::Ray (const Point3origin,
const Vector3direction 
)
+
+ +

Creates a ray from a 3D origin and direction.

+ +
+
+ +

◆ ~Ray()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Ray::~Ray ()
+
+virtual
+
+ +

Ray destructor.

+ +
+
+

Member Function Documentation

+ +

◆ direction()

+ +
+
+ + + + + + + +
Vector3 mingfx::Ray::direction () const
+
+ +

Returns the direction.

+ +
+
+ +

◆ FastIntersectMesh()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::FastIntersectMesh (Meshmesh,
float * iTime,
Point3iPoint,
int * iTriangleID 
) const
+
+ +

Checks to see if the ray intersects a triangle mesh.

+

This uses a BVH (Bounding Volume Hierarchy) to accelerate the ray-triangle intersection tests. Each mesh can optionally store a BVH. If a BVH has already been calculated for the mesh (done with Mesh::CalculateBVH()), then this function will be much faster than the brute-force IntersectMesh() function. If a BVH has not already been calculated for the mesh, the first call to FastIntersectMesh() will trigger the mesh to create a BVH (not a fast operation) but then subsequent calls to FastIntersectMesh() will be fast.

+ +
+
+ +

◆ IntersectAABB()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectAABB (const AABBbox,
float * iTime 
) const
+
+ +

Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box).

+

Typically, this is the first step of a more detailed intersection test and we don't care about the actual point of intersection, just whether it intersects or not. So, we don't bother calculating the iPoint. We get the iTime for free though, so we do return that. You can calc the iPoint if you want using:

float t;
+
if (ray.IntersectAABB(box, &t)) {
+
Point3 iPoint = ray.origin() + t*ray.direction();
+
}
+
+
+
+ +

◆ IntersectMesh()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectMesh (const Meshmesh,
float * iTime,
Point3iPoint,
int * iTriangleID 
) const
+
+ +

Checks to see if the ray intersects a triangle mesh.

+

This is a brute-force check over each triangle in the mesh. If there was an intersection, true is returned, iTime is set to the intersection time, iPoint is set to the intersection point, and iTriangleID is set to the ID of the closest intersected triangle along the ray.

+ +
+
+ +

◆ IntersectPlane()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectPlane (const Point3planePt,
const Vector3planeNormal,
float * iTime,
Point3iPoint 
) const
+
+ +

Checks to see if the ray intersects a plane defined by a point and a normal.

+

If there was an intersection, true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point. The plane is considered to be 1-sided. That is the intersection will only occur if the ray hits the plane from its front side as determined by the plane's normal.

+ +
+
+ +

◆ IntersectQuad()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectQuad (const Point3v1,
const Point3v2,
const Point3v3,
const Point3v4,
float * iTime,
Point3iPoint 
) const
+
+ +

Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4.

+

The vertices must be provided in counter-clockwise order so that the normal of the triangle can be determined via the right-hand rule. The intersection will only happen if the ray hits the front side of the triangle. If there was an intersection, true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point.

+ +
+
+ +

◆ IntersectSphere()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectSphere (const Point3center,
float radius,
float * iTime,
Point3iPoint 
) const
+
+ +

Checks to see if the ray intersects a sphere defined by a center point and a radius.

+

If there was an intersection, true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point.

+ +
+
+ +

◆ IntersectTriangle()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Ray::IntersectTriangle (const Point3v1,
const Point3v2,
const Point3v3,
float * iTime,
Point3iPoint 
) const
+
+ +

Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3.

+

The vertices must be provided in counter-clockwise order so that the normal of the triangle can be determined via the right-hand rule. The intersection will only happen if the ray hits the front side of the triangle. If there was an intersection, true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point.

+ +
+
+ +

◆ Length()

+ +
+
+ + + + + + + +
float mingfx::Ray::Length () const
+
+ +

Returns the length of the direction vector.

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Ray::operator!= (const Rayother) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Ray::operator== (const Rayother) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ origin()

+ +
+
+ + + + + + + +
Point3 mingfx::Ray::origin () const
+
+ +

Returns the origin.

+ +
+
+ +

◆ set()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::Ray::set (Point3 newOrigin,
Vector3 newDir 
)
+
+ +

Sets a new origin and direction.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_shader_program-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_shader_program-members.html new file mode 100644 index 0000000..1964ba3 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_shader_program-members.html @@ -0,0 +1,127 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::ShaderProgram Member List
+
+
+ +

This is the complete list of members for mingfx::ShaderProgram, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AddFragmentShaderFromFile(const std::string &file)mingfx::ShaderProgram
AddFragmentShaderFromSource(const std::string &code)mingfx::ShaderProgram
AddVertexShaderFromFile(const std::string &file)mingfx::ShaderProgram
AddVertexShaderFromSource(const std::string &code)mingfx::ShaderProgram
BindTexture(const std::string &name, const Texture2D &tex)mingfx::ShaderProgram
BindTexture(const std::string &name, const Texture2D &tex, int texUnit)mingfx::ShaderProgram
initialized()mingfx::ShaderProgram
LinkProgram()mingfx::ShaderProgram
SetUniform(const std::string &name, const Point2 &p)mingfx::ShaderProgram
SetUniform(const std::string &name, const Vector2 &v)mingfx::ShaderProgram
SetUniform(const std::string &name, const Point3 &p)mingfx::ShaderProgram
SetUniform(const std::string &name, const Vector3 &v)mingfx::ShaderProgram
SetUniform(const std::string &name, const Matrix4 &m)mingfx::ShaderProgram
SetUniform(const std::string &name, const Color &c)mingfx::ShaderProgram
SetUniform(const std::string &name, int i)mingfx::ShaderProgram
SetUniform(const std::string &name, unsigned int ui)mingfx::ShaderProgram
SetUniform(const std::string &name, float f)mingfx::ShaderProgram
SetUniformArray1(const std::string &name, int *i, int count)mingfx::ShaderProgram
SetUniformArray1(const std::string &name, unsigned int *ui, int count)mingfx::ShaderProgram
SetUniformArray1(const std::string &name, float *f, int count)mingfx::ShaderProgram
SetUniformArray2(const std::string &name, int *i, int count)mingfx::ShaderProgram
SetUniformArray2(const std::string &name, unsigned int *ui, int count)mingfx::ShaderProgram
SetUniformArray2(const std::string &name, float *f, int count)mingfx::ShaderProgram
SetUniformArray3(const std::string &name, int *i, int count)mingfx::ShaderProgram
SetUniformArray3(const std::string &name, unsigned int *ui, int count)mingfx::ShaderProgram
SetUniformArray3(const std::string &name, float *f, int count)mingfx::ShaderProgram
SetUniformArray4(const std::string &name, int *i, int count)mingfx::ShaderProgram
SetUniformArray4(const std::string &name, unsigned int *ui, int count)mingfx::ShaderProgram
SetUniformArray4(const std::string &name, float *f, int count)mingfx::ShaderProgram
ShaderProgram()mingfx::ShaderProgram
StopProgram()mingfx::ShaderProgram
UseProgram()mingfx::ShaderProgram
~ShaderProgram()mingfx::ShaderProgramvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_shader_program.html b/dev/MinGfx/docs/html/classmingfx_1_1_shader_program.html new file mode 100644 index 0000000..26f8de9 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_shader_program.html @@ -0,0 +1,1202 @@ + + + + + + + +MinGfx Toolkit: mingfx::ShaderProgram Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::ShaderProgram Class Reference
+
+
+

Detailed Description

+

A wrapper around GLSL shader programs.

+

This class supports loading vertex and fragment shaders from files or strings, compiling them, and then linking them into a shader program. Uniform variables within the shader programs can be set in order to pass parameters from C++ code into the shader program. Textures can also be bound to the shader. Example usage:

ShaderProgram shader_prog;
+
+
void MyGraphicsApp::InitOpenGL() {
+
shader_prog.AddVertexShaderFromFile(Platform::findFile("my_shader.vert", searchPath));
+
shader_prog.AddFragmentShaderFromFile(Platform::findFile("my_shader.frag", searchPath));
+
shader_prog.LinkProgram();
+
}
+
+
void MyGraphicsApp::DrawUsingOpenGL() {
+
// Activate the shader program
+
shader_prog.UseProgram();
+
+
// Pass uniforms and textures from C++ to the GPU Shader Program
+
shader_prog.SetUniform("ModelMatrix", modelMat);
+
shader_prog.SetUniform("ViewMatrix", viewMat);
+
shader_prog.SetUniform("ProjectionMatrix", projMat);
+
shader_prog.SetUniform("LightPosition", Point3(2,2,2));
+
shader_prog.BindTexture("SurfaceTexture", my_tex);
+
+
// Draw whatever geometry you want now
+
mesh1.Draw();
+
mesh2.Draw();
+
+
// Deactivate the shader program
+
shader_prog.StopProgram();
+
}
+
ShaderProgram()
Creates an empty ShaderProgram object.
+
+

Definition at line 66 of file shader_program.h.

+
+

#include <shader_program.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 ShaderProgram ()
 Creates an empty ShaderProgram object. More...
 
virtual ~ShaderProgram ()
 
bool AddVertexShaderFromFile (const std::string &file)
 Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL()). This loads the shader from the file and compiles it. An error will be printed to stderr if there are any compilation errors. More...
 
bool AddVertexShaderFromSource (const std::string &code)
 This loads and compiles a shader from a string. An error will be printed to stderr if there are any compilation errors. More...
 
bool AddFragmentShaderFromFile (const std::string &file)
 Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL()). This loads the shader from the file and compiles it. An error will be printed to stderr if there are any compilation errors. More...
 
bool AddFragmentShaderFromSource (const std::string &code)
 This loads and compiles a shader from a string. An error will be printed to stderr if there are any compilation errors. More...
 
bool LinkProgram ()
 Call this after adding vertex and fragment shaders in order to link them together to create the full shader program. An error will be printed to stderr if there are any linking errors. More...
 
void UseProgram ()
 Call this first to make the shader program active, then call SetUniform() to pass data from your C++ program into the shader code via the named uniform variables that appear in the code. Then render whatever geometry you wish with your own glDrawArrays() call(s). Finally, call StopProgram() to turn off the shader program. More...
 
void SetUniform (const std::string &name, const Point2 &p)
 Passes the x,y values of point p to the shader program and stores the result in the shader variable named name, which should be of type vec2. More...
 
void SetUniform (const std::string &name, const Vector2 &v)
 Passes the x,y values of vector v to the shader program and stores the result in the shader variable named name, which should be of type vec2. More...
 
void SetUniform (const std::string &name, const Point3 &p)
 Passes the x,y,z,1 values of point p to the shader program and stores the result in the shader variable named name, which should be of type vec4. More...
 
void SetUniform (const std::string &name, const Vector3 &v)
 Passes the x,y,z,0 values of vector v to the shader program and stores the result in the shader variable named name, which should be of type vec4. More...
 
void SetUniform (const std::string &name, const Matrix4 &m)
 Passes the column-major 16 float values of matrix m to the shader program and stores the result in the shader variable named name, which should be of type mat4. More...
 
void SetUniform (const std::string &name, const Color &c)
 Passes the r,g,b,a values of color c to the shader program and stores the result in the shader variable named name, which should be of type vec4. More...
 
void SetUniform (const std::string &name, int i)
 Passes the int to the shader program and stores the result in the shader variable named name, which should be of type int. More...
 
void SetUniform (const std::string &name, unsigned int ui)
 Passes the unsigned int to the shader program and stores the result in the shader variable named name, which should be of type uint. More...
 
void SetUniform (const std::string &name, float f)
 Passes the float to the shader program and stores the result in the shader variable named name, which should be of type float. More...
 
void SetUniformArray1 (const std::string &name, int *i, int count)
 Passes an array of count ints to the shader program and stores the result in the shader variable named name, which should be of type int name[count]. More...
 
void SetUniformArray1 (const std::string &name, unsigned int *ui, int count)
 Passes an array of count unsigned ints to the shader program and stores the result in the shader variable named name, which should be of type uint name[count]. More...
 
void SetUniformArray1 (const std::string &name, float *f, int count)
 Passes an array of count floats to the shader program and stores the result in the shader variable named name, which should be of type float name[count]. More...
 
void SetUniformArray2 (const std::string &name, int *i, int count)
 Passes an array of count 2D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec2 name[count]. More...
 
void SetUniformArray2 (const std::string &name, unsigned int *ui, int count)
 Passes an array of count 2D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec2 name[count]. More...
 
void SetUniformArray2 (const std::string &name, float *f, int count)
 Passes an array of count 2D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec2 name[count]. More...
 
void SetUniformArray3 (const std::string &name, int *i, int count)
 Passes an array of count 3D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec3 name[count]. More...
 
void SetUniformArray3 (const std::string &name, unsigned int *ui, int count)
 Passes an array of count 3D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec3 name[count]. More...
 
void SetUniformArray3 (const std::string &name, float *f, int count)
 Passes an array of count 3D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec3 name[count]. More...
 
void SetUniformArray4 (const std::string &name, int *i, int count)
 Passes an array of count 4D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec4 name[count]. More...
 
void SetUniformArray4 (const std::string &name, unsigned int *ui, int count)
 Passes an array of count 4D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec4 name[count]. More...
 
void SetUniformArray4 (const std::string &name, float *f, int count)
 Passes an array of count 4D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec4 name[count]. More...
 
void BindTexture (const std::string &name, const Texture2D &tex)
 Binds a Texture2D to a sampler2D in the shader program. This version automatically selects an available texture unit, i.e., one not already used by this shader program. More...
 
void BindTexture (const std::string &name, const Texture2D &tex, int texUnit)
 Binds a Texture2D to a sampler2D in the shader program. This version allows you to specify the texture unit to use. More...
 
void StopProgram ()
 Call this after rendering geometry to deactivate the shader. More...
 
bool initialized ()
 Returns true if the shader program has been successfully compiled and linked. More...
 
+

Constructor & Destructor Documentation

+ +

◆ ShaderProgram()

+ +
+
+ + + + + + + +
mingfx::ShaderProgram::ShaderProgram ()
+
+ +

Creates an empty ShaderProgram object.

+ +
+
+ +

◆ ~ShaderProgram()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::ShaderProgram::~ShaderProgram ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ AddFragmentShaderFromFile()

+ +
+
+ + + + + + + + +
bool mingfx::ShaderProgram::AddFragmentShaderFromFile (const std::string & file)
+
+ +

Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL()). This loads the shader from the file and compiles it. An error will be printed to stderr if there are any compilation errors.

+ +
+
+ +

◆ AddFragmentShaderFromSource()

+ +
+
+ + + + + + + + +
bool mingfx::ShaderProgram::AddFragmentShaderFromSource (const std::string & code)
+
+ +

This loads and compiles a shader from a string. An error will be printed to stderr if there are any compilation errors.

+ +
+
+ +

◆ AddVertexShaderFromFile()

+ +
+
+ + + + + + + + +
bool mingfx::ShaderProgram::AddVertexShaderFromFile (const std::string & file)
+
+ +

Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL()). This loads the shader from the file and compiles it. An error will be printed to stderr if there are any compilation errors.

+ +
+
+ +

◆ AddVertexShaderFromSource()

+ +
+
+ + + + + + + + +
bool mingfx::ShaderProgram::AddVertexShaderFromSource (const std::string & code)
+
+ +

This loads and compiles a shader from a string. An error will be printed to stderr if there are any compilation errors.

+ +
+
+ +

◆ BindTexture() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::BindTexture (const std::string & name,
const Texture2Dtex 
)
+
+ +

Binds a Texture2D to a sampler2D in the shader program. This version automatically selects an available texture unit, i.e., one not already used by this shader program.

+ +
+
+ +

◆ BindTexture() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::BindTexture (const std::string & name,
const Texture2Dtex,
int texUnit 
)
+
+ +

Binds a Texture2D to a sampler2D in the shader program. This version allows you to specify the texture unit to use.

+ +
+
+ +

◆ initialized()

+ +
+
+ + + + + + + +
bool mingfx::ShaderProgram::initialized ()
+
+ +

Returns true if the shader program has been successfully compiled and linked.

+ +
+
+ +

◆ LinkProgram()

+ +
+
+ + + + + + + +
bool mingfx::ShaderProgram::LinkProgram ()
+
+ +

Call this after adding vertex and fragment shaders in order to link them together to create the full shader program. An error will be printed to stderr if there are any linking errors.

+ +
+
+ +

◆ SetUniform() [1/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Colorc 
)
+
+ +

Passes the r,g,b,a values of color c to the shader program and stores the result in the shader variable named name, which should be of type vec4.

+ +
+
+ +

◆ SetUniform() [2/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Matrix4m 
)
+
+ +

Passes the column-major 16 float values of matrix m to the shader program and stores the result in the shader variable named name, which should be of type mat4.

+ +
+
+ +

◆ SetUniform() [3/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Point2p 
)
+
+ +

Passes the x,y values of point p to the shader program and stores the result in the shader variable named name, which should be of type vec2.

+ +
+
+ +

◆ SetUniform() [4/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Point3p 
)
+
+ +

Passes the x,y,z,1 values of point p to the shader program and stores the result in the shader variable named name, which should be of type vec4.

+ +
+
+ +

◆ SetUniform() [5/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Vector2v 
)
+
+ +

Passes the x,y values of vector v to the shader program and stores the result in the shader variable named name, which should be of type vec2.

+ +
+
+ +

◆ SetUniform() [6/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
const Vector3v 
)
+
+ +

Passes the x,y,z,0 values of vector v to the shader program and stores the result in the shader variable named name, which should be of type vec4.

+ +
+
+ +

◆ SetUniform() [7/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
float f 
)
+
+ +

Passes the float to the shader program and stores the result in the shader variable named name, which should be of type float.

+ +
+
+ +

◆ SetUniform() [8/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
int i 
)
+
+ +

Passes the int to the shader program and stores the result in the shader variable named name, which should be of type int.

+ +
+
+ +

◆ SetUniform() [9/9]

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniform (const std::string & name,
unsigned int ui 
)
+
+ +

Passes the unsigned int to the shader program and stores the result in the shader variable named name, which should be of type uint.

+ +
+
+ +

◆ SetUniformArray1() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray1 (const std::string & name,
float * f,
int count 
)
+
+ +

Passes an array of count floats to the shader program and stores the result in the shader variable named name, which should be of type float name[count].

+ +
+
+ +

◆ SetUniformArray1() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray1 (const std::string & name,
int * i,
int count 
)
+
+ +

Passes an array of count ints to the shader program and stores the result in the shader variable named name, which should be of type int name[count].

+ +
+
+ +

◆ SetUniformArray1() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray1 (const std::string & name,
unsigned int * ui,
int count 
)
+
+ +

Passes an array of count unsigned ints to the shader program and stores the result in the shader variable named name, which should be of type uint name[count].

+ +
+
+ +

◆ SetUniformArray2() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray2 (const std::string & name,
float * f,
int count 
)
+
+ +

Passes an array of count 2D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec2 name[count].

+ +
+
+ +

◆ SetUniformArray2() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray2 (const std::string & name,
int * i,
int count 
)
+
+ +

Passes an array of count 2D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec2 name[count].

+ +
+
+ +

◆ SetUniformArray2() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray2 (const std::string & name,
unsigned int * ui,
int count 
)
+
+ +

Passes an array of count 2D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec2 name[count].

+ +
+
+ +

◆ SetUniformArray3() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray3 (const std::string & name,
float * f,
int count 
)
+
+ +

Passes an array of count 3D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec3 name[count].

+ +
+
+ +

◆ SetUniformArray3() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray3 (const std::string & name,
int * i,
int count 
)
+
+ +

Passes an array of count 3D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec3 name[count].

+ +
+
+ +

◆ SetUniformArray3() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray3 (const std::string & name,
unsigned int * ui,
int count 
)
+
+ +

Passes an array of count 3D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec3 name[count].

+ +
+
+ +

◆ SetUniformArray4() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray4 (const std::string & name,
float * f,
int count 
)
+
+ +

Passes an array of count 4D float arrays to the shader program and stores the result in the shader variable named name, which should be of type vec4 name[count].

+ +
+
+ +

◆ SetUniformArray4() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray4 (const std::string & name,
int * i,
int count 
)
+
+ +

Passes an array of count 4D int arrays to the shader program and stores the result in the shader variable named name, which should be of type ivec4 name[count].

+ +
+
+ +

◆ SetUniformArray4() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::ShaderProgram::SetUniformArray4 (const std::string & name,
unsigned int * ui,
int count 
)
+
+ +

Passes an array of count 4D unsigned int arrays to the shader program and stores the result in the shader variable named name, which should be of type uivec4 name[count].

+ +
+
+ +

◆ StopProgram()

+ +
+
+ + + + + + + +
void mingfx::ShaderProgram::StopProgram ()
+
+ +

Call this after rendering geometry to deactivate the shader.

+ +
+
+ +

◆ UseProgram()

+ +
+
+ + + + + + + +
void mingfx::ShaderProgram::UseProgram ()
+
+ +

Call this first to make the shader program active, then call SetUniform() to pass data from your C++ program into the shader code via the named uniform variables that appear in the code. Then render whatever geometry you wish with your own glDrawArrays() call(s). Finally, call StopProgram() to turn off the shader program.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_text_shader-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader-members.html new file mode 100644 index 0000000..d8cbc90 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader-members.html @@ -0,0 +1,102 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::TextShader Member List
+
+
+ +

This is the complete list of members for mingfx::TextShader, including all inherited members.

+ + + + + + + + + +
Draw3D(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const std::string &text, TextFormat format, bool cache=false)mingfx::TextShader
HorizAlign enum namemingfx::TextShader
Init(const std::string &font_file, int native_font_size)mingfx::TextShader
native_font_size()mingfx::TextShader
TextExtents(const std::string &text, TextFormat format, bool cache=false)mingfx::TextShader
TextShader()mingfx::TextShader
VertAlign enum namemingfx::TextShader
~TextShader()mingfx::TextShadervirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_text_shader.html b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader.html new file mode 100644 index 0000000..deef67e --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader.html @@ -0,0 +1,377 @@ + + + + + + + +MinGfx Toolkit: mingfx::TextShader Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::TextShader Class Reference
+
+
+

Detailed Description

+
+

Definition at line 36 of file text_shader.h.

+
+

#include <text_shader.h>

+ + + + +

+Classes

class  TextFormat
 
+ + + + + +

+Public Types

enum class  HorizAlign { HORIZ_ALIGN_LEFT +, HORIZ_ALIGN_CENTER +, HORIZ_ALIGN_RIGHT + }
 
enum class  VertAlign { VERT_ALIGN_TOP +, VERT_ALIGN_CENTER +, VERT_ALIGN_BASELINE +, VERT_ALIGN_BOTTOM + }
 
+ + + + + + + + + + + + + + +

+Public Member Functions

 TextShader ()
 
virtual ~TextShader ()
 
bool Init (const std::string &font_file, int native_font_size)
 Call this from within the InitOpenGL() function since it will initialize not just the Font's internal data but also an OpenGL texture to be stored on the graphics card. Internally, this uses the stb_truetype library to load true type fonts (files with a .ttf extension). More...
 
void Draw3D (const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const std::string &text, TextFormat format, bool cache=false)
 
Vector2 TextExtents (const std::string &text, TextFormat format, bool cache=false)
 
float native_font_size ()
 
+

Member Enumeration Documentation

+ +

◆ HorizAlign

+ +
+
+ + + + + +
+ + + + +
enum mingfx::TextShader::HorizAlign
+
+strong
+
+ + + + +
Enumerator
HORIZ_ALIGN_LEFT 
HORIZ_ALIGN_CENTER 
HORIZ_ALIGN_RIGHT 
+ +

Definition at line 47 of file text_shader.h.

+ +
+
+ +

◆ VertAlign

+ +
+
+ + + + + +
+ + + + +
enum mingfx::TextShader::VertAlign
+
+strong
+
+ + + + + +
Enumerator
VERT_ALIGN_TOP 
VERT_ALIGN_CENTER 
VERT_ALIGN_BASELINE 
VERT_ALIGN_BOTTOM 
+ +

Definition at line 53 of file text_shader.h.

+ +
+
+

Constructor & Destructor Documentation

+ +

◆ TextShader()

+ +
+
+ + + + + + + +
mingfx::TextShader::TextShader ()
+
+ +
+
+ +

◆ ~TextShader()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::TextShader::~TextShader ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ Draw3D()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void mingfx::TextShader::Draw3D (const Matrix4model,
const Matrix4view,
const Matrix4projection,
const std::string & text,
TextFormat format,
bool cache = false 
)
+
+ +
+
+ +

◆ Init()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool mingfx::TextShader::Init (const std::string & font_file,
int native_font_size 
)
+
+ +

Call this from within the InitOpenGL() function since it will initialize not just the Font's internal data but also an OpenGL texture to be stored on the graphics card. Internally, this uses the stb_truetype library to load true type fonts (files with a .ttf extension).

+ +
+
+ +

◆ native_font_size()

+ +
+
+ + + + + + + +
float mingfx::TextShader::native_font_size ()
+
+ +
+
+ +

◆ TextExtents()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Vector2 mingfx::TextShader::TextExtents (const std::string & text,
TextFormat format,
bool cache = false 
)
+
+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format-members.html new file mode 100644 index 0000000..83a6563 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format-members.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::TextShader::TextFormat Member List
+
+ + + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format.html b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format.html new file mode 100644 index 0000000..2a238e2 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_text_shader_1_1_text_format.html @@ -0,0 +1,213 @@ + + + + + + + +MinGfx Toolkit: mingfx::TextShader::TextFormat Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::TextShader::TextFormat Class Reference
+
+
+

Detailed Description

+
+

Definition at line 60 of file text_shader.h.

+
+

#include <text_shader.h>

+ + + + +

+Public Member Functions

 TextFormat ()
 
+ + + + + + + + + +

+Public Attributes

float size
 
Color color
 
HorizAlign h_align
 
VertAlign v_align
 
+

Constructor & Destructor Documentation

+ +

◆ TextFormat()

+ +
+
+ + + + + +
+ + + + + + + +
mingfx::TextShader::TextFormat::TextFormat ()
+
+inline
+
+ +

Definition at line 63 of file text_shader.h.

+ +
+
+

Member Data Documentation

+ +

◆ color

+ +
+
+ + + + +
Color mingfx::TextShader::TextFormat::color
+
+ +

Definition at line 70 of file text_shader.h.

+ +
+
+ +

◆ h_align

+ +
+
+ + + + +
HorizAlign mingfx::TextShader::TextFormat::h_align
+
+ +

Definition at line 71 of file text_shader.h.

+ +
+
+ +

◆ size

+ +
+
+ + + + +
float mingfx::TextShader::TextFormat::size
+
+ +

Definition at line 69 of file text_shader.h.

+ +
+
+ +

◆ v_align

+ +
+
+ + + + +
VertAlign mingfx::TextShader::TextFormat::v_align
+
+ +

Definition at line 72 of file text_shader.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d-members.html new file mode 100644 index 0000000..b5e46ec --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d-members.html @@ -0,0 +1,110 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Texture2D Member List
+
+
+ +

This is the complete list of members for mingfx::Texture2D, including all inherited members.

+ + + + + + + + + + + + + + + + + +
filter_mode() constmingfx::Texture2D
height() constmingfx::Texture2D
InitFromBytes(int width, int height, const unsigned char *data)mingfx::Texture2D
InitFromFile(const std::string &filename)mingfx::Texture2D
InitFromFloats(int width, int height, const float *data)mingfx::Texture2D
initialized() constmingfx::Texture2D
opengl_id() constmingfx::Texture2D
Pixel(int x, int y) constmingfx::Texture2D
set_filter_mode(GLenum filterMode)mingfx::Texture2D
set_wrap_mode(GLenum wrapMode)mingfx::Texture2D
Texture2D(GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR)mingfx::Texture2D
UpdateFromBytes(const unsigned char *data)mingfx::Texture2D
UpdateFromFloats(const float *data)mingfx::Texture2D
width() constmingfx::Texture2D
wrap_mode() constmingfx::Texture2D
~Texture2D()mingfx::Texture2Dvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d.html b/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d.html new file mode 100644 index 0000000..a72804d --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_texture2_d.html @@ -0,0 +1,540 @@ + + + + + + + +MinGfx Toolkit: mingfx::Texture2D Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Texture2D Class Reference
+
+
+

Detailed Description

+

A wrapper around a 2D texture that supports loading images from files or setting texture color data directly.

+

Example:

Texture2D tex1;
+
Texture2D tex2(GL_CLAMP_TO_EDGE);
+
+
void MyGraphicsApp::InitOpenGL() {
+
std::vector<std::string> search_path;
+
search_path.push_back(".");
+
search_path.push_back("./data");
+
search_path.push_back("./shaders");
+
tex1.InitFromFile(Platform::FindFile("earth-2k.png", search_path));
+
tex2.InitFromFile(Platform::FindFile("toon-ramp.png", search_path));
+
}
+
static std::string FindFile(const std::string &basename, const std::vector< std::string > &searchpath)
+
Texture2D(GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR)
Creates an empty texture. Optional parameters can be provided to set the texture wrap mode and filter...
+
+

Definition at line 42 of file texture2d.h.

+
+

#include <texture2d.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Texture2D (GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR)
 Creates an empty texture. Optional parameters can be provided to set the texture wrap mode and filter mode. More...
 
virtual ~Texture2D ()
 
bool InitFromFile (const std::string &filename)
 Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. Internally, this uses the stbi library to load images. It supports png, jpg, bmp, and other file formats. More...
 
bool InitFromBytes (int width, int height, const unsigned char *data)
 Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. With this version of Init, you may pass in your own pointer to color data. The data argument must point to an array of 4-channel color data stored as unsigned chars in RGBA format. You are responsible for managing the memory for this array. If you will never call Pixel(), then it is safe to free data as soon as this function returns. Otherwise, you need to make sure data does not change in memory until you destroy the Texture2D object. More...
 
bool InitFromFloats (int width, int height, const float *data)
 Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. With this version of Init, you may pass in your own pointer to color data. The data argument must point to an array of 4-channel color data stored as floats in RGBA format. You are responsible for managing the memory for this array. If you will never call Pixel(), then it is safe to free data as soon as this function returns. Otherwise, you need to make sure data does not change in memory until you destroy the Texture2D object. More...
 
bool UpdateFromBytes (const unsigned char *data)
 This function may be called to re-read the texture data from an array formated the same as in InitFromBytes. The width and height of the texture must remain the same. More...
 
bool UpdateFromFloats (const float *data)
 This function may be called to re-read the texture data from an array formated the same as in InitFromFloats. The width and height of the texture must remain the same. More...
 
bool initialized () const
 Returns true if the texture data has been successfully transferred to OpenGL. More...
 
int width () const
 Returns the width in pixels of the texture. More...
 
int height () const
 Returns the height in pixels of the texture. More...
 
GLuint opengl_id () const
 Returns the unsigned int used as the texture handle by OpenGL. More...
 
GLenum wrap_mode () const
 Returns an enumerated constant for the OpenGL wrap mode used by the texture. More...
 
GLenum filter_mode () const
 Returns an enumerated constant for the OpenGL filter mode used by the texture. More...
 
void set_wrap_mode (GLenum wrapMode)
 Uses the OpenGL texture wrap mode arguments. More...
 
void set_filter_mode (GLenum filterMode)
 Uses the OpenGL texture filter mode arguments. More...
 
Color Pixel (int x, int y) const
 Returns the color at the specified pixel. The top left corner of the image is (0,0) and the bottom right is (width()-1, height()-1). More...
 
+

Constructor & Destructor Documentation

+ +

◆ Texture2D()

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::Texture2D::Texture2D (GLenum wrapMode = GL_REPEAT,
GLenum filterMode = GL_LINEAR 
)
+
+ +

Creates an empty texture. Optional parameters can be provided to set the texture wrap mode and filter mode.

+ +
+
+ +

◆ ~Texture2D()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Texture2D::~Texture2D ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ filter_mode()

+ +
+
+ + + + + + + +
GLenum mingfx::Texture2D::filter_mode () const
+
+ +

Returns an enumerated constant for the OpenGL filter mode used by the texture.

+ +
+
+ +

◆ height()

+ +
+
+ + + + + + + +
int mingfx::Texture2D::height () const
+
+ +

Returns the height in pixels of the texture.

+ +
+
+ +

◆ InitFromBytes()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Texture2D::InitFromBytes (int width,
int height,
const unsigned char * data 
)
+
+ +

Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. With this version of Init, you may pass in your own pointer to color data. The data argument must point to an array of 4-channel color data stored as unsigned chars in RGBA format. You are responsible for managing the memory for this array. If you will never call Pixel(), then it is safe to free data as soon as this function returns. Otherwise, you need to make sure data does not change in memory until you destroy the Texture2D object.

+ +
+
+ +

◆ InitFromFile()

+ +
+
+ + + + + + + + +
bool mingfx::Texture2D::InitFromFile (const std::string & filename)
+
+ +

Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. Internally, this uses the stbi library to load images. It supports png, jpg, bmp, and other file formats.

+ +
+
+ +

◆ InitFromFloats()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool mingfx::Texture2D::InitFromFloats (int width,
int height,
const float * data 
)
+
+ +

Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's internal data but also an OpenGL texture to be stored on the graphics card. With this version of Init, you may pass in your own pointer to color data. The data argument must point to an array of 4-channel color data stored as floats in RGBA format. You are responsible for managing the memory for this array. If you will never call Pixel(), then it is safe to free data as soon as this function returns. Otherwise, you need to make sure data does not change in memory until you destroy the Texture2D object.

+ +
+
+ +

◆ initialized()

+ +
+
+ + + + + + + +
bool mingfx::Texture2D::initialized () const
+
+ +

Returns true if the texture data has been successfully transferred to OpenGL.

+ +
+
+ +

◆ opengl_id()

+ +
+
+ + + + + + + +
GLuint mingfx::Texture2D::opengl_id () const
+
+ +

Returns the unsigned int used as the texture handle by OpenGL.

+ +
+
+ +

◆ Pixel()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Color mingfx::Texture2D::Pixel (int x,
int y 
) const
+
+ +

Returns the color at the specified pixel. The top left corner of the image is (0,0) and the bottom right is (width()-1, height()-1).

+ +
+
+ +

◆ set_filter_mode()

+ +
+
+ + + + + + + + +
void mingfx::Texture2D::set_filter_mode (GLenum filterMode)
+
+ +

Uses the OpenGL texture filter mode arguments.

+ +
+
+ +

◆ set_wrap_mode()

+ +
+
+ + + + + + + + +
void mingfx::Texture2D::set_wrap_mode (GLenum wrapMode)
+
+ +

Uses the OpenGL texture wrap mode arguments.

+ +
+
+ +

◆ UpdateFromBytes()

+ +
+
+ + + + + + + + +
bool mingfx::Texture2D::UpdateFromBytes (const unsigned char * data)
+
+ +

This function may be called to re-read the texture data from an array formated the same as in InitFromBytes. The width and height of the texture must remain the same.

+ +
+
+ +

◆ UpdateFromFloats()

+ +
+
+ + + + + + + + +
bool mingfx::Texture2D::UpdateFromFloats (const float * data)
+
+ +

This function may be called to re-read the texture data from an array formated the same as in InitFromFloats. The width and height of the texture must remain the same.

+ +
+
+ +

◆ width()

+ +
+
+ + + + + + + +
int mingfx::Texture2D::width () const
+
+ +

Returns the width in pixels of the texture.

+ +
+
+ +

◆ wrap_mode()

+ +
+
+ + + + + + + +
GLenum mingfx::Texture2D::wrap_mode () const
+
+ +

Returns an enumerated constant for the OpenGL wrap mode used by the texture.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam-members.html new file mode 100644 index 0000000..152a39d --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam-members.html @@ -0,0 +1,107 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::UniCam Member List
+
+
+ +

This is the complete list of members for mingfx::UniCam, including all inherited members.

+ + + + + + + + + + + + + + +
AdvanceAnimation(double dt)mingfx::UniCam
Draw(const Matrix4 &projectionMatrix)mingfx::UniCam
eye()mingfx::UniCam
look()mingfx::UniCam
OnButtonDown(const Point2 &normalizedMousePos, float mouseZ)mingfx::UniCam
OnButtonUp(const Point2 &normalizedMousePos)mingfx::UniCam
OnDrag(const Point2 &normalizedMousePos)mingfx::UniCam
set_default_depth(float d)mingfx::UniCam
set_view_matrix(Matrix4 viewMatrix)mingfx::UniCam
UniCam()mingfx::UniCam
UniCam(const Matrix4 &initialViewMatrix)mingfx::UniCam
view_matrix()mingfx::UniCam
~UniCam()mingfx::UniCamvirtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam.html b/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam.html new file mode 100644 index 0000000..ad46944 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_uni_cam.html @@ -0,0 +1,482 @@ + + + + + + + +MinGfx Toolkit: mingfx::UniCam Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::UniCam Class Reference
+
+
+

Detailed Description

+

This implements a user interface for controlling the camera with the mouse.

+

It is a special interface inspired by the "Unicam" technique developed by Zeleznik et al.
+

+

The key feature is that this interface makes it possible to control camera pan, dolly, and rotation with only a single mouse button. That is quite useful because it leaves the other mouse buttons free for pointing, sketching, or other interaction techniques.

+

The only downside of this technique is that it can take some time to learn. In order to enjoy it, you will need to read these brief instructions on how to Pan, Dolly, Rotate, and Spin:

+
    +
  • Pan: Click and drag horizontally with the mouse. Once you make an initial horizontal movement you can than pan up and down as well, but the key to entering pan mode is to start with a horizontal movement.
  • +
  • Dolly: Click and drag vertically with the mouse. The initial movement must be vertical. If you click on some object in the scene, then the speed of dollying is set so that the object will come all the up to the camera lens if you drag the mouse to the bottom of the screen.
  • +
  • Rotate: Start with a quick click and release to set the center of rotation.
    + This is most useful if you click on some object in the scene. You will see a black dot appear to mark the center of rotation. If you click on the background then a center of rotation will be selected for you. It will be a point straight ahead and at a depth 4.0 units away. The depth can be adjusted for your application with set_default_depth(). Once your center of rotation is established, move your mouse away a bit and then click and drag to do a trackball rotatation of the scene around this point. Come to a stop before letting go of the mouse button in order to avoid entering the spin state!
  • +
  • Spin: For some fun, try "throwing" the scene so that it continues to rotate even after you let go. To do this, start a rotation and then let go of the mouse button while your mouse is still moving. To stop spinning just click and release the mouse once to "catch" the scene.
  • +
+

Example usage:

// Create a global or member variable in your MyGraphicsApp class:
+
UniCam unicam_;
+
+
+
void MyGraphicsApp::OnLeftMouseDown(const Point2 &pos) {
+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos);
+
float mouse_z = ReadZValueAtPixel(pos);
+
unicam_.OnButtonDown(mouse_xy, mouse_z);
+
}
+
+
void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) {
+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos);
+
unicam_.OnDrag(mouse_xy);
+
}
+
+
void MyGraphicsApp::OnLeftMouseUp(const Point2 &pos) {
+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos);
+
unicam_.OnButtonUp(mouse_xy);
+
}
+
+
void MyGraphicsApp::InitOpenGL() {
+
projMatrix_ = Matrix4::perspective(30, aspect_ratio(), 1, 20);
+
unicam_.set_view_matrix(Matrix4::lookAt(Point3(2.5,1,2.5), Point3(0,0,0), Vector3(0,1,0)););
+
}
+
+
void MyGraphicsApp::DrawOpenGL() {
+
// draw your scene using the view matrix from UniCam
+
Matrix4 proj_matrix = Matrix4::Perspective(60, aspect_ratio(), 0.001, 10);;
+
Matrix4 view_matrix = uniCam.view_matrix();
+
Matrix4 model_matrix = Matrix4::RotateY(to_radians(45.0));
+
quickShapes.DrawCube(model_matrix, view_matirx, proj_matrix, Color(1,1,1));
+
+
// tell unicam to draw itself (i.e., the small sphere that marks the center of
+
// rotation when in rotation mode)
+
unicam_.Draw(proj_matrix);
+
}
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
UniCam()
Creates a UniCam object with an initial view matrix = identity.
+
Matrix4 view_matrix()
Access the camera view matrix created by the UniCam interactions via this method and use it to draw t...
+
+

Definition at line 105 of file unicam.h.

+
+

#include <unicam.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 UniCam ()
 Creates a UniCam object with an initial view matrix = identity. More...
 
 UniCam (const Matrix4 &initialViewMatrix)
 Creates a UniCam object with the supplied initial view matrix. More...
 
virtual ~UniCam ()
 
void OnButtonDown (const Point2 &normalizedMousePos, float mouseZ)
 Attach this to whatever mouse button you wish, for example, call this from within GraphicsApp::OnRightMouseDown(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. The depth buffer value for the pixel under the mouse is also needed. If you are using GraphicsApp, you can access both of these as follows: More...
 
void OnDrag (const Point2 &normalizedMousePos)
 Attach this to the corresponding mouse move event, for example, call this from within GraphicsApp::OnRightMouseDrag(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. Within GraphicsApp, use: More...
 
void OnButtonUp (const Point2 &normalizedMousePos)
 Attach this to the corresponding button up event, for example, call this from within GraphicsApp::OnRightMouseUp(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. Within GraphicsApp, use: More...
 
void AdvanceAnimation (double dt)
 Attach this to a callback that can be used to control animation. Within GraphicsApp::UpdateSimulation(), use: More...
 
void Draw (const Matrix4 &projectionMatrix)
 Finally, attach this to your draw callback routine. Within GraphicsApp::DrawUsingOpenGL(), use: More...
 
Matrix4 view_matrix ()
 Access the camera view matrix created by the UniCam interactions via this method and use it to draw the geometry in your scence. For example, within GraphicsApp::DrawUsingOpenGL(), you might have: More...
 
Point3 eye ()
 Returns the "eye" point (i.e., focal point) of the camera in world space coordinates. More...
 
Vector3 look ()
 Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates. More...
 
void set_view_matrix (Matrix4 viewMatrix)
 This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix. More...
 
void set_default_depth (float d)
 This sets the depth of the center of rotation for the case when the user's click does not intersect any geometry. It defaults to 4 units, but the right value to use depends very much on the current scene. For example, you could set a very good value by calculating the current centroid of your scene and the finding the depth of this point (the distance along the look vector) relative to the camera. More...
 
+

Constructor & Destructor Documentation

+ +

◆ UniCam() [1/2]

+ +
+
+ + + + + + + +
mingfx::UniCam::UniCam ()
+
+ +

Creates a UniCam object with an initial view matrix = identity.

+ +
+
+ +

◆ UniCam() [2/2]

+ +
+
+ + + + + + + + +
mingfx::UniCam::UniCam (const Matrix4initialViewMatrix)
+
+ +

Creates a UniCam object with the supplied initial view matrix.

+ +
+
+ +

◆ ~UniCam()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::UniCam::~UniCam ()
+
+virtual
+
+ +
+
+

Member Function Documentation

+ +

◆ AdvanceAnimation()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::AdvanceAnimation (double dt)
+
+ +

Attach this to a callback that can be used to control animation. Within GraphicsApp::UpdateSimulation(), use:

+
uniCam.AdvanceAnimation(dt);
+
+
+
+ +

◆ Draw()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::Draw (const Matrix4projectionMatrix)
+
+ +

Finally, attach this to your draw callback routine. Within GraphicsApp::DrawUsingOpenGL(), use:

+
uniCam.Draw(projMatrix);
+
+
+
+ +

◆ eye()

+ +
+
+ + + + + + + +
Point3 mingfx::UniCam::eye ()
+
+ +

Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.

+ +
+
+ +

◆ look()

+ +
+
+ + + + + + + +
Vector3 mingfx::UniCam::look ()
+
+ +

Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.

+ +
+
+ +

◆ OnButtonDown()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mingfx::UniCam::OnButtonDown (const Point2normalizedMousePos,
float mouseZ 
)
+
+ +

Attach this to whatever mouse button you wish, for example, call this from within GraphicsApp::OnRightMouseDown(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. The depth buffer value for the pixel under the mouse is also needed. If you are using GraphicsApp, you can access both of these as follows:

+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels);
+
float mouse_z = ReadZValueAtPixel(mouse_in_pixels);
+
uniCam.OnButtonDown(mouse_xy, mouse_z);
+
+
+
+ +

◆ OnButtonUp()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::OnButtonUp (const Point2normalizedMousePos)
+
+ +

Attach this to the corresponding button up event, for example, call this from within GraphicsApp::OnRightMouseUp(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. Within GraphicsApp, use:

+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels);
+
uniCam.OnButtonUp(mouse_xy);
+
+
+
+ +

◆ OnDrag()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::OnDrag (const Point2normalizedMousePos)
+
+ +

Attach this to the corresponding mouse move event, for example, call this from within GraphicsApp::OnRightMouseDrag(). If your mousePos is reported in pixels, you will need to convert it to normalized device coordinates before passing it on to this routine. Within GraphicsApp, use:

+
Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels);
+
uniCam.OnDrag(mouse_xy);
+
+
+
+ +

◆ set_default_depth()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::set_default_depth (float d)
+
+ +

This sets the depth of the center of rotation for the case when the user's click does not intersect any geometry. It defaults to 4 units, but the right value to use depends very much on the current scene. For example, you could set a very good value by calculating the current centroid of your scene and the finding the depth of this point (the distance along the look vector) relative to the camera.

+ +
+
+ +

◆ set_view_matrix()

+ +
+
+ + + + + + + + +
void mingfx::UniCam::set_view_matrix (Matrix4 viewMatrix)
+
+ +

This is not required, but you may use this if you wish to set an initial view matrix or reset the view matrix.

+ +
+
+ +

◆ view_matrix()

+ +
+
+ + + + + + + +
Matrix4 mingfx::UniCam::view_matrix ()
+
+ +

Access the camera view matrix created by the UniCam interactions via this method and use it to draw the geometry in your scence. For example, within GraphicsApp::DrawUsingOpenGL(), you might have:

+
Matrix4 P = Matrix4::Perspective(30, aspect_ratio(), 1, 20);
+
Matrix4 V = unicam.view_matrix();
+
Matrix4 M = Matrix4::RotateY(GfxMath::ToRadians(45.0));
+
quick_shapes.DrawCube(M, V, P, Color(1,1,1));
+
static float ToRadians(float degrees)
+
+
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_vector2-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_vector2-members.html new file mode 100644 index 0000000..8a54e22 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_vector2-members.html @@ -0,0 +1,120 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Vector2 Member List
+
+
+ +

This is the complete list of members for mingfx::Vector2, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Dot(const Vector2 &v) constmingfx::Vector2
Dot(const Vector2 &v1, const Vector2 &v2)mingfx::Vector2static
Length() constmingfx::Vector2
Lerp(const Vector2 &b, float alpha) constmingfx::Vector2
Lerp(const Vector2 &a, const Vector2 &b, float alpha)mingfx::Vector2static
Normalize()mingfx::Vector2
Normalize(const Vector2 &v)mingfx::Vector2static
One()mingfx::Vector2static
operator!=(const Vector2 &v) constmingfx::Vector2
operator=(const Vector2 &v)mingfx::Vector2
operator==(const Vector2 &v) constmingfx::Vector2
operator[](const int i) constmingfx::Vector2
operator[](const int i)mingfx::Vector2
ToUnit() constmingfx::Vector2
UnitX()mingfx::Vector2static
UnitY()mingfx::Vector2static
value_ptr() constmingfx::Vector2
Vector2()mingfx::Vector2
Vector2(float x, float y)mingfx::Vector2
Vector2(float *v)mingfx::Vector2
Vector2(const Vector2 &v)mingfx::Vector2
w() constmingfx::Vector2inline
x() constmingfx::Vector2inline
y() constmingfx::Vector2inline
Zero()mingfx::Vector2static
~Vector2()mingfx::Vector2virtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_vector2.html b/dev/MinGfx/docs/html/classmingfx_1_1_vector2.html new file mode 100644 index 0000000..48f9e60 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_vector2.html @@ -0,0 +1,841 @@ + + + + + + + +MinGfx Toolkit: mingfx::Vector2 Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Vector2 Class Reference
+
+
+

Detailed Description

+

A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements, and screen-space vectors.

+ +

Definition at line 28 of file vector2.h.

+
+

#include <vector2.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Vector2 ()
 Default constructor to create zero vector. More...
 
 Vector2 (float x, float y)
 Constructs a vector (x,y,0), where the 0 comes from the use of homogeneous coordinates in computer graphics. More...
 
 Vector2 (float *v)
 Constructs a vector given a pointer to x,y,z data. More...
 
 Vector2 (const Vector2 &v)
 Copy constructor for vector. More...
 
virtual ~Vector2 ()
 Vector destructor. More...
 
bool operator== (const Vector2 &v) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Vector2 &v) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Vector2operator= (const Vector2 &v)
 Vector assignment operator. More...
 
float operator[] (const int i) const
 Read only access to the ith coordinate of the vector. More...
 
float & operator[] (const int i)
 Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coordinate rather than just request its value. Example: More...
 
float x () const
 Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1.0; form if you need to set the value. More...
 
float y () const
 Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1.0; form if you need to set the value. More...
 
float w () const
 In homogeneous coordinates, the w coordinate for all vectors is 0.0. More...
 
float Dot (const Vector2 &v) const
 Returns "this dot v". More...
 
float Length () const
 Returns the length of the vector. More...
 
void Normalize ()
 Normalizes the vector by making it unit length. More...
 
Vector2 ToUnit () const
 Returns a normalized (i.e., unit length) version of the vector without modifying the original ('this') vector. More...
 
Vector2 Lerp (const Vector2 &b, float alpha) const
 Linear interpolation between this vector and another. Alpha=0.0 returns this vector, and alpha=1.0 returns the other vector, other values blend between the two. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array. More...
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static Vector2 Normalize (const Vector2 &v)
 Returns a new vector that is the unit version of v. More...
 
static float Dot (const Vector2 &v1, const Vector2 &v2)
 Returns v1 dot v2. More...
 
static const Vector2Zero ()
 (0,0) - a shortcut for a special vector that is frequently needed More...
 
static const Vector2One ()
 (1,1) - a shortcut for a special vector that is frequently needed More...
 
static const Vector2UnitX ()
 (1,0) - a shortcut for a special vector that is frequently needed More...
 
static const Vector2UnitY ()
 (0,1) - a shortcut for a special vector that is frequently needed More...
 
static Vector2 Lerp (const Vector2 &a, const Vector2 &b, float alpha)
 Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Vector2() [1/4]

+ +
+
+ + + + + + + +
mingfx::Vector2::Vector2 ()
+
+ +

Default constructor to create zero vector.

+ +
+
+ +

◆ Vector2() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + +
mingfx::Vector2::Vector2 (float x,
float y 
)
+
+ +

Constructs a vector (x,y,0), where the 0 comes from the use of homogeneous coordinates in computer graphics.

+ +
+
+ +

◆ Vector2() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Vector2::Vector2 (float * v)
+
+ +

Constructs a vector given a pointer to x,y,z data.

+ +
+
+ +

◆ Vector2() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Vector2::Vector2 (const Vector2v)
+
+ +

Copy constructor for vector.

+ +
+
+ +

◆ ~Vector2()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Vector2::~Vector2 ()
+
+virtual
+
+ +

Vector destructor.

+ +
+
+

Member Function Documentation

+ +

◆ Dot() [1/2]

+ +
+
+ + + + + + + + +
float mingfx::Vector2::Dot (const Vector2v) const
+
+ +

Returns "this dot v".

+ +
+
+ +

◆ Dot() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static float mingfx::Vector2::Dot (const Vector2v1,
const Vector2v2 
)
+
+static
+
+ +

Returns v1 dot v2.

+ +
+
+ +

◆ Length()

+ +
+
+ + + + + + + +
float mingfx::Vector2::Length () const
+
+ +

Returns the length of the vector.

+ +
+
+ +

◆ Lerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Vector2 mingfx::Vector2::Lerp (const Vector2a,
const Vector2b,
float alpha 
)
+
+static
+
+ +

Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two.

+ +
+
+ +

◆ Lerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Vector2 mingfx::Vector2::Lerp (const Vector2b,
float alpha 
) const
+
+ +

Linear interpolation between this vector and another. Alpha=0.0 returns this vector, and alpha=1.0 returns the other vector, other values blend between the two.

+ +
+
+ +

◆ Normalize() [1/2]

+ +
+
+ + + + + + + +
void mingfx::Vector2::Normalize ()
+
+ +

Normalizes the vector by making it unit length.

+ +
+
+ +

◆ Normalize() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static Vector2 mingfx::Vector2::Normalize (const Vector2v)
+
+static
+
+ +

Returns a new vector that is the unit version of v.

+ +
+
+ +

◆ One()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector2& mingfx::Vector2::One ()
+
+static
+
+ +

(1,1) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Vector2::operator!= (const Vector2v) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Vector2& mingfx::Vector2::operator= (const Vector2v)
+
+ +

Vector assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Vector2::operator== (const Vector2v) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Vector2::operator[] (const int i)
+
+ +

Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coordinate rather than just request its value. Example:

+
+
a[0] = 5.0; // set the x-coordinate of the vector
+
Vector2()
Default constructor to create zero vector.
+
+
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Vector2::operator[] (const int i) const
+
+ +

Read only access to the ith coordinate of the vector.

+ +
+
+ +

◆ ToUnit()

+ +
+
+ + + + + + + +
Vector2 mingfx::Vector2::ToUnit () const
+
+ +

Returns a normalized (i.e., unit length) version of the vector without modifying the original ('this') vector.

+ +
+
+ +

◆ UnitX()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector2& mingfx::Vector2::UnitX ()
+
+static
+
+ +

(1,0) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ UnitY()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector2& mingfx::Vector2::UnitY ()
+
+static
+
+ +

(0,1) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Vector2::value_ptr () const
+
+ +

Returns a const pointer to the raw data array.

+ +
+
+ +

◆ w()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector2::w () const
+
+inline
+
+ +

In homogeneous coordinates, the w coordinate for all vectors is 0.0.

+ +

Definition at line 77 of file vector2.h.

+ +
+
+ +

◆ x()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector2::x () const
+
+inline
+
+ +

Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1.0; form if you need to set the value.

+ +

Definition at line 70 of file vector2.h.

+ +
+
+ +

◆ y()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector2::y () const
+
+inline
+
+ +

Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1.0; form if you need to set the value.

+ +

Definition at line 74 of file vector2.h.

+ +
+
+ +

◆ Zero()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector2& mingfx::Vector2::Zero ()
+
+static
+
+ +

(0,0) - a shortcut for a special vector that is frequently needed

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_vector3-members.html b/dev/MinGfx/docs/html/classmingfx_1_1_vector3-members.html new file mode 100644 index 0000000..bbcf674 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_vector3-members.html @@ -0,0 +1,124 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mingfx::Vector3 Member List
+
+
+ +

This is the complete list of members for mingfx::Vector3, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Cross(const Vector3 &v) constmingfx::Vector3
Cross(const Vector3 &v1, const Vector3 &v2)mingfx::Vector3static
Dot(const Vector3 &v) constmingfx::Vector3
Dot(const Vector3 &v1, const Vector3 &v2)mingfx::Vector3static
Length() constmingfx::Vector3
Lerp(const Vector3 &b, float alpha) constmingfx::Vector3
Lerp(const Vector3 &a, const Vector3 &b, float alpha)mingfx::Vector3static
Normalize()mingfx::Vector3
Normalize(const Vector3 &v)mingfx::Vector3static
One()mingfx::Vector3static
operator!=(const Vector3 &v) constmingfx::Vector3
operator=(const Vector3 &v)mingfx::Vector3
operator==(const Vector3 &v) constmingfx::Vector3
operator[](const int i) constmingfx::Vector3
operator[](const int i)mingfx::Vector3
ToUnit() constmingfx::Vector3
UnitX()mingfx::Vector3static
UnitY()mingfx::Vector3static
UnitZ()mingfx::Vector3static
value_ptr() constmingfx::Vector3
Vector3()mingfx::Vector3
Vector3(float x, float y, float z)mingfx::Vector3
Vector3(float *v)mingfx::Vector3
Vector3(const Vector3 &v)mingfx::Vector3
w() constmingfx::Vector3inline
x() constmingfx::Vector3inline
y() constmingfx::Vector3inline
z() constmingfx::Vector3inline
Zero()mingfx::Vector3static
~Vector3()mingfx::Vector3virtual
+ + + + + diff --git a/dev/MinGfx/docs/html/classmingfx_1_1_vector3.html b/dev/MinGfx/docs/html/classmingfx_1_1_vector3.html new file mode 100644 index 0000000..e46afd3 --- /dev/null +++ b/dev/MinGfx/docs/html/classmingfx_1_1_vector3.html @@ -0,0 +1,1018 @@ + + + + + + + +MinGfx Toolkit: mingfx::Vector3 Class Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
mingfx::Vector3 Class Reference
+
+
+

Detailed Description

+

A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graphics operations.

+

Vector3s can be transformed by a Matrix4, and a Vector3 can be created by subtracting two Point3s. Example:

// subtracting two points creates a vector
+
Point3 a(0,0,0);
+
Point3 b(2,0,0);
+
Vector3 c = b - a;
+
+
// vectors can be transformed by Matrix4s
+
Vector3 dir = c.ToUnit();
+
Matrix4 M = Matrix4::RotateX(GfxMath::ToDegrees(30.0));
+
Vector3 dir_transformed = M * dir;
+
+
// vectors can be added and subtracted
+
Vector3 d(1,0,0);
+
Vector3 e = c + d;
+
+
// and we can do the usual dot products and cross products too
+
float f = d.Dot(e);
+
Vector3 g = b.Cross(d);
+
+
// you can access the individual components of the vector in two ways:
+
Vector3 v(1,2,3);
+
float option1 = v.x();
+
float option2 = v[0];
+
+
// to set an individual component of the vector use the [] operator:
+ +
w[0] = 0.4;
+
w[1] = 1.2;
+
w[2] = 3.1;
+
+
// you can print the vector by sending it to stdout:
+
std::cout << v << std::endl;
+
static float ToDegrees(float radians)
+
float w() const
In homogeneous coordinates, the w coordinate for all vectors is 0.0.
Definition: vector3.h:115
+
Vector3()
Default constructor to create zero vector.
+
+

Definition at line 62 of file vector3.h.

+
+

#include <vector3.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Vector3 ()
 Default constructor to create zero vector. More...
 
 Vector3 (float x, float y, float z)
 Constructs a vector (x,y,z,0), where the 0 comes from the use of homogeneous coordinates in computer graphics. More...
 
 Vector3 (float *v)
 Constructs a vector given a pointer to x,y,z data. More...
 
 Vector3 (const Vector3 &v)
 Copy constructor for vector. More...
 
virtual ~Vector3 ()
 Vector destructor. More...
 
bool operator== (const Vector3 &v) const
 Check for "equality", taking floating point imprecision into account. More...
 
bool operator!= (const Vector3 &v) const
 Check for "inequality", taking floating point imprecision into account. More...
 
Vector3operator= (const Vector3 &v)
 Vector assignment operator. More...
 
float operator[] (const int i) const
 Read only access to the ith coordinate of the vector. More...
 
float & operator[] (const int i)
 Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coordinate rather than just request its value. Example: More...
 
float x () const
 Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1.0; form if you need to set the value. More...
 
float y () const
 Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1.0; form if you need to set the value. More...
 
float z () const
 Read only access to the z coordinate. Can also use my_vector[2]. Use the my_vector[2] = 1.0; form if you need to set the value. More...
 
float w () const
 In homogeneous coordinates, the w coordinate for all vectors is 0.0. More...
 
float Dot (const Vector3 &v) const
 Returns "this dot v", for example: More...
 
Vector3 Cross (const Vector3 &v) const
 Returns "this cross v", for example: More...
 
float Length () const
 Returns the length of the vector. More...
 
void Normalize ()
 Normalizes the vector by making it unit length. More...
 
Vector3 ToUnit () const
 Returns a normalized (i.e., unit length) version of the vector without modifying the original 'this' vector. More...
 
const float * value_ptr () const
 Returns a const pointer to the raw data array. More...
 
Vector3 Lerp (const Vector3 &b, float alpha) const
 Linear interpolation between this vector and another. Alpha=0.0 returns this vector, and alpha=1.0 returns the other vector, other values blend between the two. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Static Public Member Functions

static const Vector3Zero ()
 (0,0,0) - a shortcut for a special vector that is frequently needed More...
 
static const Vector3One ()
 (1,1,1) - a shortcut for a special vector that is frequently needed More...
 
static const Vector3UnitX ()
 (1,0,0) - a shortcut for a special vector that is frequently needed More...
 
static const Vector3UnitY ()
 (0,1,0) - a shortcut for a special vector that is frequently needed More...
 
static const Vector3UnitZ ()
 (0,0,1) - a shortcut for a special vector that is frequently needed More...
 
static Vector3 Normalize (const Vector3 &v)
 Returns a new vector that is the unit version of v. More...
 
static Vector3 Cross (const Vector3 &v1, const Vector3 &v2)
 Returns v1 cross v2. More...
 
static float Dot (const Vector3 &v1, const Vector3 &v2)
 Returns v1 dot v2. More...
 
static Vector3 Lerp (const Vector3 &a, const Vector3 &b, float alpha)
 Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two. More...
 
+

Constructor & Destructor Documentation

+ +

◆ Vector3() [1/4]

+ +
+
+ + + + + + + +
mingfx::Vector3::Vector3 ()
+
+ +

Default constructor to create zero vector.

+ +
+
+ +

◆ Vector3() [2/4]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
mingfx::Vector3::Vector3 (float x,
float y,
float z 
)
+
+ +

Constructs a vector (x,y,z,0), where the 0 comes from the use of homogeneous coordinates in computer graphics.

+ +
+
+ +

◆ Vector3() [3/4]

+ +
+
+ + + + + + + + +
mingfx::Vector3::Vector3 (float * v)
+
+ +

Constructs a vector given a pointer to x,y,z data.

+ +
+
+ +

◆ Vector3() [4/4]

+ +
+
+ + + + + + + + +
mingfx::Vector3::Vector3 (const Vector3v)
+
+ +

Copy constructor for vector.

+ +
+
+ +

◆ ~Vector3()

+ +
+
+ + + + + +
+ + + + + + + +
virtual mingfx::Vector3::~Vector3 ()
+
+virtual
+
+ +

Vector destructor.

+ +
+
+

Member Function Documentation

+ +

◆ Cross() [1/2]

+ +
+
+ + + + + + + + +
Vector3 mingfx::Vector3::Cross (const Vector3v) const
+
+ +

Returns "this cross v", for example:

+
Vector3 x(1,0,0);
+
Vector3 y(0,1,0);
+
Vector3 z = x.Cross(y);
+
float z() const
Read only access to the z coordinate. Can also use my_vector[2]. Use the my_vector[2] = 1....
Definition: vector3.h:112
+
float x() const
Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1....
Definition: vector3.h:104
+
float y() const
Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1....
Definition: vector3.h:108
+
+
+
+ +

◆ Cross() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static Vector3 mingfx::Vector3::Cross (const Vector3v1,
const Vector3v2 
)
+
+static
+
+ +

Returns v1 cross v2.

+

This is just an alternative syntax for Cross(). Example: ~~~ Vector3 x(1,0,0); Vector3 y(0,1,0); Vector3 z1 = Vector3::Cross(x,y); Vector3 z2 = x.Cross(y); z1 and z2 are the same. ~~~

+ +
+
+ +

◆ Dot() [1/2]

+ +
+
+ + + + + + + + +
float mingfx::Vector3::Dot (const Vector3v) const
+
+ +

Returns "this dot v", for example:

+
Vector3 a(1,0,0);
+
Vector3 b(0.5,0,0);
+
float c = a.Dot(b);
+
+
+
+ +

◆ Dot() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static float mingfx::Vector3::Dot (const Vector3v1,
const Vector3v2 
)
+
+static
+
+ +

Returns v1 dot v2.

+

This is just an alternative syntax for Dot(). Example: ~~~ Vector3 a(1,0,0); Vector3 b(0.5,0,0); Vector3 c1 = a.Dot(b); Vector3 c2 = Vector3::Dot(a,b); c1 and c2 are the same. ~~~

+ +
+
+ +

◆ Length()

+ +
+
+ + + + + + + +
float mingfx::Vector3::Length () const
+
+ +

Returns the length of the vector.

+ +
+
+ +

◆ Lerp() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static Vector3 mingfx::Vector3::Lerp (const Vector3a,
const Vector3b,
float alpha 
)
+
+static
+
+ +

Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b', other values blend between the two.

+ +
+
+ +

◆ Lerp() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + +
Vector3 mingfx::Vector3::Lerp (const Vector3b,
float alpha 
) const
+
+ +

Linear interpolation between this vector and another. Alpha=0.0 returns this vector, and alpha=1.0 returns the other vector, other values blend between the two.

+ +
+
+ +

◆ Normalize() [1/2]

+ +
+
+ + + + + + + +
void mingfx::Vector3::Normalize ()
+
+ +

Normalizes the vector by making it unit length.

+ +
+
+ +

◆ Normalize() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
static Vector3 mingfx::Vector3::Normalize (const Vector3v)
+
+static
+
+ +

Returns a new vector that is the unit version of v.

+

This is just an alternative syntax for ToUnit(). Example: ~~~ Vector3 a(100,150,80); Vector3 b = Vector3::Normalize(a); Vector3 c = a.ToUnit(); b and c are the same. ~~~

+ +
+
+ +

◆ One()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector3& mingfx::Vector3::One ()
+
+static
+
+ +

(1,1,1) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mingfx::Vector3::operator!= (const Vector3v) const
+
+ +

Check for "inequality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator=()

+ +
+
+ + + + + + + + +
Vector3& mingfx::Vector3::operator= (const Vector3v)
+
+ +

Vector assignment operator.

+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mingfx::Vector3::operator== (const Vector3v) const
+
+ +

Check for "equality", taking floating point imprecision into account.

+ +
+
+ +

◆ operator[]() [1/2]

+ +
+
+ + + + + + + + +
float& mingfx::Vector3::operator[] (const int i)
+
+ +

Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coordinate rather than just request its value. Example:

+
+
a[0] = 5.0; // set the x-coordinate of the vector
+
+
+
+ +

◆ operator[]() [2/2]

+ +
+
+ + + + + + + + +
float mingfx::Vector3::operator[] (const int i) const
+
+ +

Read only access to the ith coordinate of the vector.

+ +
+
+ +

◆ ToUnit()

+ +
+
+ + + + + + + +
Vector3 mingfx::Vector3::ToUnit () const
+
+ +

Returns a normalized (i.e., unit length) version of the vector without modifying the original 'this' vector.

+ +
+
+ +

◆ UnitX()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector3& mingfx::Vector3::UnitX ()
+
+static
+
+ +

(1,0,0) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ UnitY()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector3& mingfx::Vector3::UnitY ()
+
+static
+
+ +

(0,1,0) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ UnitZ()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector3& mingfx::Vector3::UnitZ ()
+
+static
+
+ +

(0,0,1) - a shortcut for a special vector that is frequently needed

+ +
+
+ +

◆ value_ptr()

+ +
+
+ + + + + + + +
const float* mingfx::Vector3::value_ptr () const
+
+ +

Returns a const pointer to the raw data array.

+ +
+
+ +

◆ w()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector3::w () const
+
+inline
+
+ +

In homogeneous coordinates, the w coordinate for all vectors is 0.0.

+ +

Definition at line 115 of file vector3.h.

+ +
+
+ +

◆ x()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector3::x () const
+
+inline
+
+ +

Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1.0; form if you need to set the value.

+ +

Definition at line 104 of file vector3.h.

+ +
+
+ +

◆ y()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector3::y () const
+
+inline
+
+ +

Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1.0; form if you need to set the value.

+ +

Definition at line 108 of file vector3.h.

+ +
+
+ +

◆ z()

+ +
+
+ + + + + +
+ + + + + + + +
float mingfx::Vector3::z () const
+
+inline
+
+ +

Read only access to the z coordinate. Can also use my_vector[2]. Use the my_vector[2] = 1.0; form if you need to set the value.

+ +

Definition at line 112 of file vector3.h.

+ +
+
+ +

◆ Zero()

+ +
+
+ + + + + +
+ + + + + + + +
static const Vector3& mingfx::Vector3::Zero ()
+
+static
+
+ +

(0,0,0) - a shortcut for a special vector that is frequently needed

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + + diff --git a/dev/MinGfx/docs/html/closed.png b/dev/MinGfx/docs/html/closed.png new file mode 100644 index 0000000..11c68ad Binary files /dev/null and b/dev/MinGfx/docs/html/closed.png differ diff --git a/dev/MinGfx/docs/html/color_8h.html b/dev/MinGfx/docs/html/color_8h.html new file mode 100644 index 0000000..5a00a99 --- /dev/null +++ b/dev/MinGfx/docs/html/color_8h.html @@ -0,0 +1,119 @@ + + + + + + + +MinGfx Toolkit: src/color.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
color.h File Reference
+
+
+
#include <iostream>
+#include <vector>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::Color
 Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with OpenGL. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+ + + + + +

+Functions

std::ostream & mingfx::operator<< (std::ostream &os, const Color &c)
 
std::istream & mingfx::operator>> (std::istream &is, Color &c)
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/color_8h_source.html b/dev/MinGfx/docs/html/color_8h_source.html new file mode 100644 index 0000000..b3c037f --- /dev/null +++ b/dev/MinGfx/docs/html/color_8h_source.html @@ -0,0 +1,177 @@ + + + + + + + +MinGfx Toolkit: src/color.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
color.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2018, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 #ifndef SRC_COLOR_H_
+
15 #define SRC_COLOR_H_
+
16 
+
17 #include <iostream>
+
18 #include <vector>
+
19 
+
20 namespace mingfx {
+
21 
+
22 
+
41 class Color {
+
42 public:
+
44  Color();
+
45 
+
47  Color(float red, float green, float blue, float alpha=1.0);
+
48 
+
50  Color(float *p);
+
51 
+
53  Color(const std::vector<float> &vals);
+
54 
+
56  Color(const Color& p);
+
57 
+
59  virtual ~Color();
+
60 
+
62  bool operator==(const Color& p) const;
+
63 
+
65  bool operator!=(const Color& p) const;
+
66 
+
68  Color& operator=(const Color& p);
+
69 
+
71  float operator[](const int i) const;
+
72 
+
74  float& operator[](const int i);
+
75 
+
77  const float * value_ptr() const;
+
78 
+
79  std::vector<float> ToVector() const;
+
80 
+
84  Color Lerp(const Color &b, float alpha) const;
+
85 
+
89  static Color Lerp(const Color &a, const Color &b, float alpha);
+
90 
+
91 
+
92 private:
+
93  float c[4];
+
94 };
+
95 
+
96 
+
97 std::ostream & operator<< ( std::ostream &os, const Color &c);
+
98 std::istream & operator>> ( std::istream &is, Color &c);
+
99 
+
100 
+
101 } // namespace
+
102 
+
103 #endif
+
Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
Definition: color.h:41
+
float & operator[](const int i)
Accesses the ith coordinate of the color, stored in RGBA order.
+
bool operator==(const Color &p) const
Check for equality.
+
Color(const std::vector< float > &vals)
Constructs a point given a 3 or 4-element vector of floats.
+
Color(float red, float green, float blue, float alpha=1.0)
Constructs a color. Alpha defaults to 1.0 (completely opaque)
+
static Color Lerp(const Color &a, const Color &b, float alpha)
Linear interpolation between two colors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b',...
+
const float * value_ptr() const
Returns a const pointer to the raw data array.
+
float operator[](const int i) const
Accesses the ith component of the color, stored in RGBA order.
+
virtual ~Color()
Color destructor.
+
Color()
Defaults to black.
+
Color(float *p)
Constructs a point given a pointer to float array.
+
Color Lerp(const Color &b, float alpha) const
Linear interpolation between this color and another. Alpha=0.0 returns this color,...
+
Color(const Color &p)
Copy constructor.
+
bool operator!=(const Color &p) const
Check for inequality.
+
Color & operator=(const Color &p)
Assignment operator.
+
std::vector< float > ToVector() const
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+
std::ostream & operator<<(std::ostream &os, const Color &c)
+
std::istream & operator>>(std::istream &is, Color &c)
+
+ + + + + diff --git a/dev/MinGfx/docs/html/craft__cam_8h.html b/dev/MinGfx/docs/html/craft__cam_8h.html new file mode 100644 index 0000000..fd8beaf --- /dev/null +++ b/dev/MinGfx/docs/html/craft__cam_8h.html @@ -0,0 +1,112 @@ + + + + + + + +MinGfx Toolkit: src/craft_cam.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
craft_cam.h File Reference
+
+
+
#include "point2.h"
+#include "matrix4.h"
+#include "vector2.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::CraftCam
 This implements a user interface for controlling the camera with the mouse. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/craft__cam_8h_source.html b/dev/MinGfx/docs/html/craft__cam_8h_source.html new file mode 100644 index 0000000..289eb02 --- /dev/null +++ b/dev/MinGfx/docs/html/craft__cam_8h_source.html @@ -0,0 +1,211 @@ + + + + + + + +MinGfx Toolkit: src/craft_cam.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
craft_cam.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2018, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 #ifndef SRC_CRAFT_CAM_H_
+
15 #define SRC_CRAFT_CAM_H_
+
16 
+
17 #include "point2.h"
+
18 #include "matrix4.h"
+
19 #include "vector2.h"
+
20 
+
21 
+
22 namespace mingfx {
+
23 
+
24 
+
79 class CraftCam {
+
80 public:
+
81 
+ +
84 
+
86  CraftCam(const Matrix4 &initial_view_matrix);
+
87 
+
88  virtual ~CraftCam();
+
89 
+
90 
+
91  // To make the interaction work, the following set of functions need to be
+
92  // called from your GraphicsApp or whatever main application class you use
+
93  // to receive user input events and a draw callback.
+
94 
+
104  void UpdateSimulation(double dt, GLFWwindow *window_ptr);
+
105 
+
106 
+
125  void OnMouseMove(const Vector2 &normalized_mouse_delta);
+
126 
+
127 
+ +
138 
+
139 
+ +
143 
+ +
147 
+
148 
+
153  void UpdateHeight(float new_y_value);
+
154 
+
155 
+
156  // -------------
+
157 
+ +
161 
+
162 
+ +
168 
+
173  void set_translation_scale(float s);
+
174 
+
179  float rotation_scale();
+
180 
+
185  void set_rotation_scale(float s);
+
186 
+
190  float look_scale();
+
191 
+
195  void set_look_scale(float s);
+
196 
+
197 private:
+
198 
+
199  void WalkForward(double dt);
+
200  void WalkBackward(double dt);
+
201  void RotateLeft(double dt);
+
202  void RotateRight(double dt);
+
203  void LookWithMouse(const Vector2 &mouse_delta);
+
204 
+
205  float t_scale_;
+
206  float r_scale_;
+
207  float l_scale_;
+
208  float yaw_;
+
209  float pitch_;
+
210  Matrix4 base_head_;
+
211  Matrix4 added_rot_;
+
212 };
+
213 
+
214 
+
215 } // end namespace
+
216 
+
217 #endif
+
218 
+
219 
+
This implements a user interface for controlling the camera with the mouse.
Definition: craft_cam.h:79
+
void set_look_scale(float s)
This is the scale factor used to speed up / slow down looking around when moving the head with the mo...
+
void set_translation_scale(float s)
This is the scale factor used to speed up / slow down forward/backward translation when walking for t...
+
void UpdateSimulation(double dt, GLFWwindow *window_ptr)
Call this from your app's UpdateSimulation() method. This tells the camera to simulate walking based ...
+
Vector3 look()
Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.
+
void set_rotation_scale(float s)
This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT /...
+
void set_view_matrix(Matrix4 view_matrix)
This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...
+
Point3 eye()
Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.
+
void OnMouseMove(const Vector2 &normalized_mouse_delta)
Call this from your app's OnMouseMove() or On*MouseDrag() method. Use OnMouseMove() if you want to al...
+
virtual ~CraftCam()
+
float translation_scale()
This is the scale factor used to speed up / slow down forward/backward translation when walking for t...
+
float look_scale()
This is the scale factor used to speed up / slow down looking around when moving the head with the mo...
+
float rotation_scale()
This is the scale factor used to speed up / slow down left/right rotation when walking for the LEFT /...
+
CraftCam(const Matrix4 &initial_view_matrix)
Creates a CraftCam object with the supplied initial view matrix.
+
Matrix4 view_matrix()
Access the camera view matrix created by the CraftCam interactions via this method and use it to draw...
+
CraftCam()
Creates a CraftCam object with an initial view matrix = identity.
+
void UpdateHeight(float new_y_value)
Sets the y value of the camera (i.e., the height). If you want to set the entire view matrix,...
+
A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
Definition: matrix4.h:50
+
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Definition: point3.h:52
+
A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
Definition: vector2.h:28
+
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Definition: vector3.h:62
+ +
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+ + +
+ + + + + diff --git a/dev/MinGfx/docs/html/customdoxygen.css b/dev/MinGfx/docs/html/customdoxygen.css new file mode 100644 index 0000000..e1c976b --- /dev/null +++ b/dev/MinGfx/docs/html/customdoxygen.css @@ -0,0 +1,524 @@ +body, table, div, p, dl { + font: 400 14px/22px "Helvetica", "Arial", sans-serif; + text-decoration: none; + font-weight: normal; +} + +tr { + background-image: none; + background-color: #FFFFFF; +} + +h1.groupheader { + font-size: 100%; + text-decoration: none; + font-weight: normal; +} + +#titlearea +{ + padding: 10px; + margin: 0px; + width: 100%; + border-top: 5px solid black; + border-bottom: 5px solid black; +} + + +div.header +{ + background-image: none; + background-color: #FFFFFF; + margin: 0px; + border-bottom: none; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + + + +.title { + font: 400 14px/28px "Helvetica", "Arial", sans-serif; + font-size: 150%; + font-weight: normal; + margin: 10px 2px; + background-image: none; + background-color: white; + text-transform:uppercase; +} + + +h2.groupheader { + border-bottom: 1px solid black; + color: black; + font-size: 110%; + font-weight: normal; + text-transform:uppercase; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1 { + font-size: 150%; + background-color: rgb(26, 93, 117); + color: white; + padding: 4px; + margin-top: 60px; + margin-bottom: 0px; +} + +h2 { + font-size: 125%; + text-transform:uppercase; + margin-top: 50px; +} + +h3 { + font-size: 110%; + margin-top: 40px; +} + +h4 { + font-size: 100%; +} + +h5 { + font-size: 100%; +} + +h6 { + font-size: 100%; +} + + + +h1, h2, h3, h4, h5, h6 { + font-weight: normal; + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: none; +} + +dt { + padding-top: 20px; + font-weight: normal; + text-decoration: underline; +} + + + + +.tabs, .tabs2, .tabs3 { + text-transform:uppercase; + font-weight:normal; + color:rgb(190,190,190); + background-image: none; + background-color: black; + width: 100%; + z-index: 101; + font-size: 14px; + font-family: "Helvetica", "Arial", sans-serif; + text-shadow: none; +} + +.tabs2 { + color: white; + border-top:1px solid rgb(150,150,150); + font-size: 10px; + text-shadow: none; +} +.tabs3 { + color: white; + font-size: 9px; + text-shadow: none; +} + +.tablist { + margin: 0; + padding: 0; + display: table; + background-color: black; + font-weight: normal; + text-shadow: none; +} + +.tablist li { + float: left; + display: table-cell; + background-image: none; + line-height: 30px; + list-style: none; + font-weight: normal; + text-shadow: none; +} + +.tablist a { + display: block; + padding: 0 30px; + font-weight: normal; + background-image: none; + color:rgb(150,150,150); + text-decoration: none; + outline: none; + text-shadow: none; +} + +.tabs3 .tablist a { + padding: 0 10px; + text-shadow: none; +} + +.tablist a:hover { + background-image: none; + background-repeat:repeat-x; + color:white; + text-decoration: none; + font-weight: normal; + text-shadow: none; + text-decoration: underline; +} + +.tablist li.current a { + background-image: none; + color: rgb(42, 153, 193); + text-shadow: none; +} + + +.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:white; + font-size: 12px; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: white; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:white; +} + + + +div.qindex, div.navpath { + width: 100%; + line-height: 100%; + border-top:1px solid rgb(150,150,150); + background-color: black; +} + +.navpath ul { + font-size: 11px; + background-image: none; + height: 20px; + line-height: 20px; + color: rgb(150,150,150); + border: none; + overflow: hidden; + margin: 0px; + padding: 0px; +} + +.navpath li { + padding-left:30px; +} + +.navpath li.navelem a { + height: 20px; + display: block; + text-decoration: none; + outline: none; + color: rgb(150,150,150); + font-family: "Helvetica", "Arial", sans-serif; + text-shadow: none; + text-decoration: none; +} + +.navpath li.navelem a:hover { + background-image: none; + background-repeat:repeat-x; + color: white; + text-decoration: none; + font-weight: normal; + text-shadow: none; + text-decoration: underline; +} + +a.el { + font-weight: normal; + color: rgb(42, 153, 193); +} + +hr { + height: 0px; + border: none; + border-top: 1px solid black; +} + +hr.footer { + border-top: 0px; +} + + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: white; + border: none; + margin: 0px; + padding: 0 0 0 0; +} + +.memItemLeft, .memItemRight { + padding-top: 8px; +} + + + +.memSeparator { + border-bottom: 1px solid #EEEEEE; + line-height: 1px; + padding: 8px 0 0 0; +} + + + + +pre.fragment { + border: none; + border-left: 3px solid rgb(42, 153, 193); + background-color: white; + padding: 4px 6px; + margin: 4px 2px 4px 30px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 100%; +} + +div.fragment { + border: none; + border-left: 3px solid rgb(42, 153, 193); + background-color: white; + padding: 4px 6px; + margin: 4px 2px 4px 30px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 100%; +} + +div.line { + font-family: monospace, fixed; + font-size: 100%; + min-height: 13px; + line-height: 1.0; + 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+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +span.comment { + color: #800000; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #068000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: white; + border: none; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #EEEEEE; + border-left: 1px solid #EEEEEE; + border-right: 1px solid #EEEEEE; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: normal; + text-shadow: none; + background-image: none; + background-repeat:repeat-x; + background-color: white; + /* opera specific markup */ + box-shadow: none; + /* firefox specific markup */ + -moz-box-shadow: none; + /* webkit specific markup */ + -webkit-box-shadow: none; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #EEEEEE; + border-left: 1px solid #EEEEEE; + border-right: 1px solid #EEEEEE; + padding: 6px 10px 2px 10px; + background-color: white; + border-top-width: 0; + background-image: none; + background-repeat:repeat-x; + /* opera specific markup */ + box-shadow: none; + /* firefox specific markup */ + -moz-box-shadow: none; + /* webkit specific markup */ + -webkit-box-shadow: none; +} + +.paramname { + color: #148caf; + white-space: nowrap; +} + + +a { + color: rgb(42, 153, 193); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: rgb(42, 153, 193); +} + + +span.lineno { + width: 0px; + padding-right: 4px; + text-align: right; + border-right: 0px; + background-color: #E8E8E8; + white-space: pre; +} + +#MSearchBox { + margin-top: 2px; +} + + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; + width: 33%; +} + +table.doxtable td, table.doxtable th { + border: 0px solid #373737; + padding: 3px 7px 2px; + font-size: 110%; +} + +table.doxtable th { + background-color: white; + color: black; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + font-weight: normal; + text-transform: uppercase; + text-align: left; +} + +p code { + background-color: #E8E8E8; +} diff --git a/dev/MinGfx/docs/html/default__shader_8h.html b/dev/MinGfx/docs/html/default__shader_8h.html new file mode 100644 index 0000000..ada0c55 --- /dev/null +++ b/dev/MinGfx/docs/html/default__shader_8h.html @@ -0,0 +1,122 @@ + + + + + + + +MinGfx Toolkit: src/default_shader.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
default_shader.h File Reference
+
+
+
#include "color.h"
+#include "point3.h"
+#include "shader_program.h"
+#include "texture2d.h"
+#include "vector3.h"
+#include "matrix4.h"
+#include "mesh.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + +

+Classes

class  mingfx::DefaultShader
 A simple GLSL shader for textured per-fragment Phong shading with multiple light sources. More...
 
class  mingfx::DefaultShader::MaterialProperties
 Small data structure to hold properties of the material to be lit. More...
 
class  mingfx::DefaultShader::LightProperties
 Small data structure to hold per-light properties. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/default__shader_8h_source.html b/dev/MinGfx/docs/html/default__shader_8h_source.html new file mode 100644 index 0000000..374116c --- /dev/null +++ b/dev/MinGfx/docs/html/default__shader_8h_source.html @@ -0,0 +1,240 @@ + + + + + + + +MinGfx Toolkit: src/default_shader.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
default_shader.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2018, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 #ifndef SRC_DEFAULT_SHADER_H_
+
15 #define SRC_DEFAULT_SHADER_H_
+
16 
+
17 #include "color.h"
+
18 #include "point3.h"
+
19 #include "shader_program.h"
+
20 #include "texture2d.h"
+
21 #include "vector3.h"
+
22 #include "matrix4.h"
+
23 #include "mesh.h"
+
24 
+
25 
+
26 
+
27 namespace mingfx {
+
28 
+ +
63 public:
+
64 
+
66  static const unsigned int MAX_LIGHTS = 10;
+
67 
+
68 
+ +
71  public:
+ + + +
75  float shinniness;
+ +
77  // eventually, this might include a normal map, etc.
+
78 
+
79  // defaults
+ +
81  ambient_reflectance(0.25f, 0.25f, 0.25f),
+
82  diffuse_reflectance(0.6f, 0.6f, 0.6f),
+
83  specular_reflectance(0.4f, 0.4f, 0.4f),
+
84  shinniness(20.0f) {}
+
85  };
+
86 
+ +
89  public:
+ + + + +
94 
+
95  // defaults
+ +
97  position(10.0f, 10.0f, 10.0f),
+
98  ambient_intensity(0.25f, 0.25f, 0.25f),
+
99  diffuse_intensity(0.6f, 0.6f, 0.6f),
+
100  specular_intensity(0.6f, 0.6f, 0.6f) {}
+
101  };
+
102 
+
106  DefaultShader(bool add_default_light=true);
+
107 
+
108  virtual ~DefaultShader();
+
109 
+ +
113 
+ +
116 
+
117 
+
124  void Init();
+
125 
+
130  void Draw(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection,
+
131  Mesh *mesh, const MaterialProperties &material);
+
132 
+
133 
+
138  void UseProgram(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection,
+
139  const MaterialProperties &material);
+
140 
+
143  void StopProgram();
+
144 
+
145 
+
146  int num_lights();
+
147 
+ +
149 
+
150 
+
151 private:
+
152 
+
153  std::vector<LightProperties> lights_;
+
154 
+
155  // cached raw float arrays store data to send directly to the gpu
+
156  // GLSL requires fixed size arrays for these
+
157  float lightPositions_[3*MAX_LIGHTS];
+
158  float lightIas_[4*MAX_LIGHTS];
+
159  float lightIds_[4*MAX_LIGHTS];
+
160  float lightIss_[4*MAX_LIGHTS];
+
161  void update_light_arrays();
+
162 
+
163  ShaderProgram phongShader_;
+
164 };
+
165 
+
166 } // end namespace
+
167 
+
168 #endif
+
Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
Definition: color.h:41
+
Small data structure to hold per-light properties.
+ + + + + +
Small data structure to hold properties of the material to be lit.
+ + + + + + +
A simple GLSL shader for textured per-fragment Phong shading with multiple light sources.
+
void UseProgram(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const MaterialProperties &material)
Only needed if you do not want to draw a Mesh. This does all of the same setup for drawing that the D...
+ +
static const unsigned int MAX_LIGHTS
If changed, this needs to also be changed in the glsl shader code.
+
void StopProgram()
Only needed if you do not want to draw a Mesh. Call this after UseProgram() and after drawing your ge...
+
void SetLight(int i, LightProperties light)
Changes the properties for a light that was already added.
+
void Init()
This loads vertex and fragment shaders from files, compiles them, and links them. So,...
+
void Draw(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, Mesh *mesh, const MaterialProperties &material)
This starts the shader and sets its uniform variables based upon the current set of lights,...
+
LightProperties light(int i)
+
DefaultShader(bool add_default_light=true)
The constructor defaults to adding a single white light to the scene at (10,10,10)....
+ +
void AddLight(LightProperties light)
Multiple lights are supported, this adds one to the end of the list. Up to MAX_LIGHTS can be added.
+
A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
Definition: matrix4.h:50
+
A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
Definition: mesh.h:127
+
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Definition: point3.h:52
+
A wrapper around GLSL shader programs.
+
A wrapper around a 2D texture that supports loading images from files or setting texture color data d...
Definition: texture2d.h:42
+ + + +
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+ + + + +
+ + + + + diff --git a/dev/MinGfx/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dev/MinGfx/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 0000000..af0d73f --- /dev/null +++ b/dev/MinGfx/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,146 @@ + + + + + + + +MinGfx Toolkit: src Directory Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  aabb.h [code]
 
file  bvh.h [code]
 
file  color.h [code]
 
file  craft_cam.h [code]
 
file  default_shader.h [code]
 
file  gfxmath.h [code]
 
file  graphics_app.h [code]
 
file  matrix4.h [code]
 
file  mesh.h [code]
 
file  mingfx.h [code]
 Includes the entire MinGfx library and calls using namespace mingfx.
 
file  mingfx_config.h [code]
 
file  opengl_headers.h [code]
 
file  platform.h [code]
 
file  point2.h [code]
 
file  point3.h [code]
 
file  quaternion.h [code]
 
file  quick_shapes.h [code]
 
file  ray.h [code]
 
file  shader_program.h [code]
 
file  stb_rect_pack.h [code]
 
file  text_shader.h [code]
 
file  texture2d.h [code]
 
file  unicam.h [code]
 
file  vector2.h [code]
 
file  vector3.h [code]
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/dir_e68e8157741866f444e17edd764ebbae.html b/dev/MinGfx/docs/html/dir_e68e8157741866f444e17edd764ebbae.html new file mode 100644 index 0000000..d4e5a57 --- /dev/null +++ b/dev/MinGfx/docs/html/dir_e68e8157741866f444e17edd764ebbae.html @@ -0,0 +1,91 @@ + + + + + + + +MinGfx Toolkit: doc Directory Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
doc Directory Reference
+
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/doc.png b/dev/MinGfx/docs/html/doc.png new file mode 100644 index 0000000..7728f70 Binary files /dev/null and b/dev/MinGfx/docs/html/doc.png differ diff --git a/dev/MinGfx/docs/html/doxygen.css b/dev/MinGfx/docs/html/doxygen.css new file mode 100644 index 0000000..a64c4bf --- /dev/null +++ b/dev/MinGfx/docs/html/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #999999; + color: #444444; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #B0B0B0; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F9F9F9; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #505050; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #606060; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #606060; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #606060; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #CCCCCC; + background-color: #FCFCFC; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FCFCFC; + border: 1px solid #CCCCCC; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + 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+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.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 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +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: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EEEEEE; + font-weight: bold; + border: 1px solid #CCCCCC; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EEEEEE; + border: 1px solid #CCCCCC; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #F0F0F0; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + 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 +} + +blockquote { + background-color: #F8F8F8; + border-left: 2px solid #AAAAAA; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #AAAAAA; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @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 #B0B0B0; +} + +th.dirtab { + background: #EEEEEE; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #666666; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #FAFAFA; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #E2E2E2; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #606060; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #B4B4B4; + border-left: 1px solid #B4B4B4; + border-right: 1px solid #B4B4B4; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E6E6E6; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EEEEEE; + border: 1px solid #B0B0B0; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #B4B4B4; + border-left: 1px solid #B4B4B4; + border-right: 1px solid #B4B4B4; + padding: 6px 0px 6px 0px; + color: #2B2B2B; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #E3E3E3; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #B4B4B4; + border-left: 1px solid #B4B4B4; + border-right: 1px solid #B4B4B4; + padding: 6px 10px 2px 10px; + background-color: #FCFCFC; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +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; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #888888; + border-top:1px solid #707070; + border-left:1px solid #707070; + border-right:1px solid #CCCCCC; + border-bottom:1px solid #CCCCCC; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #AAAAAA; + border-bottom: 1px solid #AAAAAA; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F8F8F8; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #505050; +} + +.arrow { + color: #AAAAAA; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #888888; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #333333; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #373737; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #474747; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #B4B4B4; + 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 #B4B4B4; + border-bottom: 1px solid #B4B4B4; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #B4B4B4; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E6E6E6; + font-size: 90%; + color: #2B2B2B; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -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 #B4B4B4; +} + + +.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; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#9B9B9B; + border:solid 1px #CACACA; + 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:#454545; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #303030; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#808080; +} + +.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:#454545; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + 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: #FAFAFA; + margin: 0px; + border-bottom: 1px solid #CCCCCC; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#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 #707070; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #A0A0A0; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#404040; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F6F6F6; + border: 1px solid #DDDDDD; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #606060; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@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; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #373737; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #474747; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/dev/MinGfx/docs/html/doxygen.svg b/dev/MinGfx/docs/html/doxygen.svg new file mode 100644 index 0000000..ec0905b --- /dev/null +++ b/dev/MinGfx/docs/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/MinGfx/docs/html/dynsections.js b/dev/MinGfx/docs/html/dynsections.js new file mode 100644 index 0000000..88f2c27 --- /dev/null +++ b/dev/MinGfx/docs/html/dynsections.js @@ -0,0 +1,128 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + 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 Software. + + THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +MinGfx Toolkit: File List + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 doc
  src
 aabb.h
 bvh.h
 color.h
 craft_cam.h
 default_shader.h
 gfxmath.h
 graphics_app.h
 matrix4.h
 mesh.h
 mingfx.hIncludes the entire MinGfx library and calls using namespace mingfx
 mingfx_config.h
 opengl_headers.h
 platform.h
 point2.h
 point3.h
 quaternion.h
 quick_shapes.h
 ray.h
 shader_program.h
 stb_rect_pack.h
 text_shader.h
 texture2d.h
 unicam.h
 vector2.h
 vector3.h
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/folderclosed.png b/dev/MinGfx/docs/html/folderclosed.png new file mode 100644 index 0000000..44c8755 Binary files /dev/null and b/dev/MinGfx/docs/html/folderclosed.png differ diff --git a/dev/MinGfx/docs/html/folderopen.png b/dev/MinGfx/docs/html/folderopen.png new file mode 100644 index 0000000..ed88e79 Binary files /dev/null and b/dev/MinGfx/docs/html/folderopen.png differ diff --git a/dev/MinGfx/docs/html/functions.html b/dev/MinGfx/docs/html/functions.html new file mode 100644 index 0000000..7f04684 --- /dev/null +++ b/dev/MinGfx/docs/html/functions.html @@ -0,0 +1,129 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_b.html b/dev/MinGfx/docs/html/functions_b.html new file mode 100644 index 0000000..b99bf1c --- /dev/null +++ b/dev/MinGfx/docs/html/functions_b.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- b -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_c.html b/dev/MinGfx/docs/html/functions_c.html new file mode 100644 index 0000000..6d7a3e6 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_c.html @@ -0,0 +1,132 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- c -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_d.html b/dev/MinGfx/docs/html/functions_d.html new file mode 100644 index 0000000..58286eb --- /dev/null +++ b/dev/MinGfx/docs/html/functions_d.html @@ -0,0 +1,163 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- d -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_e.html b/dev/MinGfx/docs/html/functions_e.html new file mode 100644 index 0000000..0125b04 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_e.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- e -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_enum.html b/dev/MinGfx/docs/html/functions_enum.html new file mode 100644 index 0000000..a963b42 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_enum.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: Class Members - Enumerations + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_f.html b/dev/MinGfx/docs/html/functions_f.html new file mode 100644 index 0000000..2b80c54 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_f.html @@ -0,0 +1,126 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- f -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func.html b/dev/MinGfx/docs/html/functions_func.html new file mode 100644 index 0000000..d0ce7f9 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func.html @@ -0,0 +1,117 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_b.html b/dev/MinGfx/docs/html/functions_func_b.html new file mode 100644 index 0000000..cb37680 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_b.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- b -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_c.html b/dev/MinGfx/docs/html/functions_func_c.html new file mode 100644 index 0000000..34df742 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_c.html @@ -0,0 +1,129 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- c -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_d.html b/dev/MinGfx/docs/html/functions_func_d.html new file mode 100644 index 0000000..8192d7f --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_d.html @@ -0,0 +1,157 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- d -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_e.html b/dev/MinGfx/docs/html/functions_func_e.html new file mode 100644 index 0000000..706b50e --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_e.html @@ -0,0 +1,91 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- e -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_f.html b/dev/MinGfx/docs/html/functions_func_f.html new file mode 100644 index 0000000..d7c92ad --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_f.html @@ -0,0 +1,123 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- f -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_g.html b/dev/MinGfx/docs/html/functions_func_g.html new file mode 100644 index 0000000..bc2d2b1 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_g.html @@ -0,0 +1,90 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- g -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_h.html b/dev/MinGfx/docs/html/functions_func_h.html new file mode 100644 index 0000000..ecc0de4 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_h.html @@ -0,0 +1,90 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- h -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_i.html b/dev/MinGfx/docs/html/functions_func_i.html new file mode 100644 index 0000000..0de5c8a --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_i.html @@ -0,0 +1,152 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- i -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_l.html b/dev/MinGfx/docs/html/functions_func_l.html new file mode 100644 index 0000000..bc8c345 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_l.html @@ -0,0 +1,123 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- l -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_m.html b/dev/MinGfx/docs/html/functions_func_m.html new file mode 100644 index 0000000..7a702cd --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_m.html @@ -0,0 +1,105 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- m -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_n.html b/dev/MinGfx/docs/html/functions_func_n.html new file mode 100644 index 0000000..b8ff31f --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_n.html @@ -0,0 +1,107 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- n -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_o.html b/dev/MinGfx/docs/html/functions_func_o.html new file mode 100644 index 0000000..117b733 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_o.html @@ -0,0 +1,208 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- o -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_p.html b/dev/MinGfx/docs/html/functions_func_p.html new file mode 100644 index 0000000..0c5d771 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_p.html @@ -0,0 +1,102 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- p -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_q.html b/dev/MinGfx/docs/html/functions_func_q.html new file mode 100644 index 0000000..bc614d6 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_q.html @@ -0,0 +1,93 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- q -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_r.html b/dev/MinGfx/docs/html/functions_func_r.html new file mode 100644 index 0000000..0d8c4ee --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_r.html @@ -0,0 +1,129 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- r -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_s.html b/dev/MinGfx/docs/html/functions_func_s.html new file mode 100644 index 0000000..aa2955b --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_s.html @@ -0,0 +1,179 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- s -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_t.html b/dev/MinGfx/docs/html/functions_func_t.html new file mode 100644 index 0000000..a2fff4e --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_t.html @@ -0,0 +1,126 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- t -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_u.html b/dev/MinGfx/docs/html/functions_func_u.html new file mode 100644 index 0000000..32ef019 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_u.html @@ -0,0 +1,127 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- u -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_v.html b/dev/MinGfx/docs/html/functions_func_v.html new file mode 100644 index 0000000..e3d1082 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_v.html @@ -0,0 +1,109 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- v -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_w.html b/dev/MinGfx/docs/html/functions_func_w.html new file mode 100644 index 0000000..83d8abd --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_w.html @@ -0,0 +1,109 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- w -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_func_x.html b/dev/MinGfx/docs/html/functions_func_x.html new file mode 100644 index 0000000..222055f --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_x.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ + + + + + + diff --git a/dev/MinGfx/docs/html/functions_func_y.html b/dev/MinGfx/docs/html/functions_func_y.html new file mode 100644 index 0000000..c75e688 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_y.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ + + + + + + diff --git a/dev/MinGfx/docs/html/functions_func_z.html b/dev/MinGfx/docs/html/functions_func_z.html new file mode 100644 index 0000000..da9279e --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_z.html @@ -0,0 +1,98 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ + + + + + + diff --git a/dev/MinGfx/docs/html/functions_func_~.html b/dev/MinGfx/docs/html/functions_func_~.html new file mode 100644 index 0000000..537d422 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_func_~.html @@ -0,0 +1,144 @@ + + + + + + + +MinGfx Toolkit: Class Members - Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- ~ -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_g.html b/dev/MinGfx/docs/html/functions_g.html new file mode 100644 index 0000000..40b9b2d --- /dev/null +++ b/dev/MinGfx/docs/html/functions_g.html @@ -0,0 +1,90 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- g -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_h.html b/dev/MinGfx/docs/html/functions_h.html new file mode 100644 index 0000000..2f010db --- /dev/null +++ b/dev/MinGfx/docs/html/functions_h.html @@ -0,0 +1,106 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- h -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_i.html b/dev/MinGfx/docs/html/functions_i.html new file mode 100644 index 0000000..1504c56 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_i.html @@ -0,0 +1,158 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- i -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_l.html b/dev/MinGfx/docs/html/functions_l.html new file mode 100644 index 0000000..cf3d91b --- /dev/null +++ b/dev/MinGfx/docs/html/functions_l.html @@ -0,0 +1,126 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- l -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_m.html b/dev/MinGfx/docs/html/functions_m.html new file mode 100644 index 0000000..8bb9d7d --- /dev/null +++ b/dev/MinGfx/docs/html/functions_m.html @@ -0,0 +1,108 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- m -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_n.html b/dev/MinGfx/docs/html/functions_n.html new file mode 100644 index 0000000..2b572fb --- /dev/null +++ b/dev/MinGfx/docs/html/functions_n.html @@ -0,0 +1,113 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- n -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_o.html b/dev/MinGfx/docs/html/functions_o.html new file mode 100644 index 0000000..b8fb50c --- /dev/null +++ b/dev/MinGfx/docs/html/functions_o.html @@ -0,0 +1,211 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- o -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_p.html b/dev/MinGfx/docs/html/functions_p.html new file mode 100644 index 0000000..f2c3c17 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_p.html @@ -0,0 +1,108 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- p -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_q.html b/dev/MinGfx/docs/html/functions_q.html new file mode 100644 index 0000000..cc25a2a --- /dev/null +++ b/dev/MinGfx/docs/html/functions_q.html @@ -0,0 +1,93 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- q -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_r.html b/dev/MinGfx/docs/html/functions_r.html new file mode 100644 index 0000000..a0d84bf --- /dev/null +++ b/dev/MinGfx/docs/html/functions_r.html @@ -0,0 +1,129 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- r -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_rela.html b/dev/MinGfx/docs/html/functions_rela.html new file mode 100644 index 0000000..b29d900 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_rela.html @@ -0,0 +1,88 @@ + + + + + + + +MinGfx Toolkit: Class Members - Related Functions + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_s.html b/dev/MinGfx/docs/html/functions_s.html new file mode 100644 index 0000000..6d5c357 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_s.html @@ -0,0 +1,194 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- s -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_t.html b/dev/MinGfx/docs/html/functions_t.html new file mode 100644 index 0000000..5ab26a1 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_t.html @@ -0,0 +1,129 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- t -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_u.html b/dev/MinGfx/docs/html/functions_u.html new file mode 100644 index 0000000..4ffce53 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_u.html @@ -0,0 +1,127 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- u -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_v.html b/dev/MinGfx/docs/html/functions_v.html new file mode 100644 index 0000000..13a6cda --- /dev/null +++ b/dev/MinGfx/docs/html/functions_v.html @@ -0,0 +1,115 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- v -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_vars.html b/dev/MinGfx/docs/html/functions_vars.html new file mode 100644 index 0000000..123e549 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_vars.html @@ -0,0 +1,248 @@ + + + + + + + +MinGfx Toolkit: Class Members - Variables + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- h -

+ + +

- i -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+ + +

- w -

+ + +

- x -

+ + +

- y -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_w.html b/dev/MinGfx/docs/html/functions_w.html new file mode 100644 index 0000000..e1e4f81 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_w.html @@ -0,0 +1,114 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- w -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_x.html b/dev/MinGfx/docs/html/functions_x.html new file mode 100644 index 0000000..b0d8f5e --- /dev/null +++ b/dev/MinGfx/docs/html/functions_x.html @@ -0,0 +1,96 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- x -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_y.html b/dev/MinGfx/docs/html/functions_y.html new file mode 100644 index 0000000..db734ed --- /dev/null +++ b/dev/MinGfx/docs/html/functions_y.html @@ -0,0 +1,96 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- y -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_z.html b/dev/MinGfx/docs/html/functions_z.html new file mode 100644 index 0000000..0349076 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_z.html @@ -0,0 +1,98 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- z -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/functions_~.html b/dev/MinGfx/docs/html/functions_~.html new file mode 100644 index 0000000..bda6078 --- /dev/null +++ b/dev/MinGfx/docs/html/functions_~.html @@ -0,0 +1,144 @@ + + + + + + + +MinGfx Toolkit: Class Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- ~ -

+
+ + + + + diff --git a/dev/MinGfx/docs/html/gfxmath_8h.html b/dev/MinGfx/docs/html/gfxmath_8h.html new file mode 100644 index 0000000..95d2bda --- /dev/null +++ b/dev/MinGfx/docs/html/gfxmath_8h.html @@ -0,0 +1,113 @@ + + + + + + + +MinGfx Toolkit: src/gfxmath.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
gfxmath.h File Reference
+
+
+
#include "point2.h"
+#include "point3.h"
+#include "vector3.h"
+#include "matrix4.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::GfxMath
 This class holds a variety of static math functions that are useful to have defined with creating graphics programs. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/gfxmath_8h_source.html b/dev/MinGfx/docs/html/gfxmath_8h_source.html new file mode 100644 index 0000000..b3150d9 --- /dev/null +++ b/dev/MinGfx/docs/html/gfxmath_8h_source.html @@ -0,0 +1,172 @@ + + + + + + + +MinGfx Toolkit: src/gfxmath.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gfxmath.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2018, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 #ifndef SRC_GFXMATH_H_
+
15 #define SRC_GFXMATH_H_
+
16 
+
17 #include "point2.h"
+
18 #include "point3.h"
+
19 #include "vector3.h"
+
20 #include "matrix4.h"
+
21 
+
22 namespace mingfx {
+
23 
+
24 
+
28 class GfxMath {
+
29 public:
+
30 
+
32  static float Clamp(float x, float a, float b);
+
33 
+
34  static float ToRadians(float degrees);
+
35 
+
36  static float ToDegrees(float radians);
+
37 
+
38  static Vector3 ToRadians(Vector3 degrees);
+
39 
+
40  static Vector3 ToDegrees(Vector3 radians);
+
41 
+
42  static float Lerp(float a, float b, float alpha);
+
43 
+
44  static int iLerp(int a, int b, float alpha);
+
45 
+
55  static Point3 ScreenToNearPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt);
+
56 
+
60  static Point3 ScreenToDepthPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float planeDepth);
+
61 
+
69  static Point3 ScreenToWorld(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float normalizedZ);
+
70 
+
71 
+
72  static const float PI;
+
73  static const float TWO_PI;
+
74  static const float HALF_PI;
+
75 };
+
76 
+
77 
+
78 
+
79 } // end namespace
+
80 
+
81 #endif
+
This class holds a variety of static math functions that are useful to have defined with creating gra...
Definition: gfxmath.h:28
+
static const float TWO_PI
Definition: gfxmath.h:73
+
static float ToRadians(float degrees)
+
static Point3 ScreenToNearPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt)
Converts a 2D point on the filmplane represented in Normalized Device Coorindates,...
+
static Point3 ScreenToWorld(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float normalizedZ)
Converts a 2D point on the filmplane represented in Normalized Device Coorindates,...
+
static Vector3 ToRadians(Vector3 degrees)
+
static float ToDegrees(float radians)
+
static Vector3 ToDegrees(Vector3 radians)
+
static const float PI
Definition: gfxmath.h:72
+
static Point3 ScreenToDepthPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float planeDepth)
Similar to filmplane2D_to_nearplane3D() but here rather than using the nearplane, you specify the dep...
+
static const float HALF_PI
Definition: gfxmath.h:74
+
static float Lerp(float a, float b, float alpha)
+
static float Clamp(float x, float a, float b)
Returns a if x is less than a and b if x is greater than b.
+
static int iLerp(int a, int b, float alpha)
+
A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
Definition: matrix4.h:50
+
A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
Definition: point2.h:28
+
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Definition: point3.h:52
+
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Definition: vector3.h:62
+ +
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+ + + +
+ + + + + diff --git a/dev/MinGfx/docs/html/globals.html b/dev/MinGfx/docs/html/globals.html new file mode 100644 index 0000000..2d170a0 --- /dev/null +++ b/dev/MinGfx/docs/html/globals.html @@ -0,0 +1,140 @@ + + + + + + + +MinGfx Toolkit: File Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all file members with links to the files they belong to:
+
+ + + + + diff --git a/dev/MinGfx/docs/html/globals_defs.html b/dev/MinGfx/docs/html/globals_defs.html new file mode 100644 index 0000000..e15c19b --- /dev/null +++ b/dev/MinGfx/docs/html/globals_defs.html @@ -0,0 +1,107 @@ + + + + + + + +MinGfx Toolkit: File Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/globals_eval.html b/dev/MinGfx/docs/html/globals_eval.html new file mode 100644 index 0000000..58a8beb --- /dev/null +++ b/dev/MinGfx/docs/html/globals_eval.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: File Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/globals_func.html b/dev/MinGfx/docs/html/globals_func.html new file mode 100644 index 0000000..4faf44b --- /dev/null +++ b/dev/MinGfx/docs/html/globals_func.html @@ -0,0 +1,97 @@ + + + + + + + +MinGfx Toolkit: File Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/globals_type.html b/dev/MinGfx/docs/html/globals_type.html new file mode 100644 index 0000000..930e8e7 --- /dev/null +++ b/dev/MinGfx/docs/html/globals_type.html @@ -0,0 +1,97 @@ + + + + + + + +MinGfx Toolkit: File Members + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + + diff --git a/dev/MinGfx/docs/html/graphics__app_8h.html b/dev/MinGfx/docs/html/graphics__app_8h.html new file mode 100644 index 0000000..d790913 --- /dev/null +++ b/dev/MinGfx/docs/html/graphics__app_8h.html @@ -0,0 +1,113 @@ + + + + + + + +MinGfx Toolkit: src/graphics_app.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
graphics_app.h File Reference
+
+
+
#include <nanogui/nanogui.h>
+#include <iostream>
+#include "point2.h"
+#include "vector2.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::GraphicsApp
 This is the main application base class for the MinGfx Toolkit. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/graphics__app_8h_source.html b/dev/MinGfx/docs/html/graphics__app_8h_source.html new file mode 100644 index 0000000..2353eb8 --- /dev/null +++ b/dev/MinGfx/docs/html/graphics__app_8h_source.html @@ -0,0 +1,358 @@ + + + + + + + +MinGfx Toolkit: src/graphics_app.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
graphics_app.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2017, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 
+
15 #ifndef SRC_GRAPHICS_APP_H_
+
16 #define SRC_GRAPHICS_APP_H_
+
17 
+
18 // disable warnings for this 3rd party code
+
19 #pragma warning ( push, 0 )
+
20 #include <nanogui/nanogui.h>
+
21 #pragma warning ( pop )
+
22 
+
23 #include <iostream>
+
24 
+
25 #include "point2.h"
+
26 #include "vector2.h"
+
27 
+
29 namespace mingfx {
+
30 
+
31 
+
135 class GraphicsApp {
+
136 public:
+
137 
+
144  GraphicsApp(int width, int height, const std::string &caption);
+
145 
+
146 
+
148  virtual ~GraphicsApp();
+
149 
+
150 
+
151  // Callback methods -- override these and fill in to respond to user
+
152  // input events.
+
153 
+
165  virtual void OnMouseMove(const Point2 &pos, const Vector2 &delta) {}
+
166 
+
174  virtual void OnLeftMouseDown(const Point2 &pos) {}
+
175 
+
187  virtual void OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) {}
+
188 
+
196  virtual void OnLeftMouseUp(const Point2 &pos) {}
+
197 
+
198 
+
200  virtual void OnMiddleMouseDown(const Point2 &pos) {}
+
201 
+
203  virtual void OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta) {}
+
204 
+
206  virtual void OnMiddleMouseUp(const Point2 &pos) {}
+
207 
+
208 
+
210  virtual void OnRightMouseDown(const Point2 &pos) {}
+
211 
+
213  virtual void OnRightMouseDrag(const Point2 &pos, const Vector2 &delta) {}
+
214 
+
216  virtual void OnRightMouseUp(const Point2 &pos) {}
+
217 
+
218 
+
225  virtual void OnKeyDown(const char *c, int modifiers) {}
+
226 
+
233  virtual void OnKeyRepeat(const char *c, int modifiers) {}
+
234 
+
241  virtual void OnKeyUp(const char *c, int modifiers) {}
+
242 
+
243 
+
244 
+
247  virtual void OnSpecialKeyDown(int key, int scancode, int modifiers) {}
+
248 
+
251  virtual void OnSpecialKeyRepeat(int key, int scancode, int modifiers) {}
+
252 
+
255  virtual void OnSpecialKeyUp(int key, int scancode, int modifiers) {}
+
256 
+
257 
+
261  virtual void OnWindowResize(int new_width, int new_height) {}
+
262 
+
263 
+
271  virtual void Run();
+
272 
+
273 
+
284  virtual void InitNanoGUI() {}
+
285 
+
297  virtual void InitOpenGL() {}
+
298 
+
299 
+
306  virtual void UpdateSimulation(double dt) {}
+
307 
+
308 
+
311  virtual void DrawUsingNanoVG(NVGcontext *ctx) {}
+
312 
+
313 
+
314 
+
317  virtual void DrawUsingOpenGL() {}
+
318 
+
319 
+
322  virtual bool IsKeyDown(int key);
+
323 
+
325  virtual bool IsLeftMouseDown();
+
326 
+
328  virtual bool IsMiddleMouseDown();
+
329 
+
331  virtual bool IsRightMouseDown();
+
332 
+
334  virtual int window_width();
+
335 
+
337  virtual int window_height();
+
338 
+
343  virtual int framebuffer_width();
+
344 
+
349  virtual int framebuffer_height();
+
350 
+
352  virtual float aspect_ratio();
+
353 
+
354 
+
359  virtual Point2 PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels);
+
360 
+
365  virtual Point2 NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC);
+
366 
+
367 
+
372  virtual Vector2 PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels);
+
373 
+
378  virtual Vector2 NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC);
+
379 
+
382  virtual float ReadZValueAtPixel(const Point2 &pointInPixels, unsigned int whichBuffer = GL_BACK);
+
383 
+
385  virtual nanogui::Screen* screen();
+
386 
+
388  virtual GLFWwindow* window();
+
389 
+
390 
+
393  virtual void ResizeWindow(int new_width, int new_height);
+
394 
+
395 
+
403  virtual void InitGraphicsContext();
+
404 
+
405 private:
+
406 
+
407  bool cursor_pos_glfw_cb(double x, double y);
+
408  bool mouse_button_glfw_cb(int button, int action, int modifiers);
+
409  bool key_glfw_cb(int key, int scancode, int action, int mods);
+
410  bool char_glfw_cb(unsigned int codepoint);
+
411  bool drop_glfw_cb(int count, const char **filenames);
+
412  bool scroll_glfw_cb(double x, double y);
+
413  bool resize_glfw_cb(int width, int height);
+
414 
+
415  virtual void mouse_move(const Point2 &pos, const Vector2 &delta) {
+
416  OnMouseMove(pos, delta);
+
417  }
+
418  virtual void left_mouse_down(const Point2 &pos) {
+
419  OnLeftMouseDown(pos);
+
420  }
+
421  virtual void left_mouse_drag(const Point2 &pos, const Vector2 &delta) {
+
422  OnLeftMouseDrag(pos, delta);
+
423  }
+
424  virtual void left_mouse_up(const Point2 &pos) {
+
425  OnLeftMouseUp(pos);
+
426  }
+
427  virtual void middle_mouse_down(const Point2 &pos) {
+
428  OnMiddleMouseDown(pos);
+
429  }
+
430  virtual void middle_mouse_drag(const Point2 &pos, const Vector2 &delta) {
+
431  OnMiddleMouseDrag(pos, delta);
+
432  }
+
433  virtual void middle_mouse_up(const Point2 &pos) {
+
434  OnMiddleMouseUp(pos);
+
435  }
+
436  virtual void right_mouse_down(const Point2 &pos) {
+
437  OnRightMouseDown(pos);
+
438  }
+
439  virtual void right_mouse_drag(const Point2 &pos, const Vector2 &delta) {
+
440  OnRightMouseDrag(pos, delta);
+
441  }
+
442  virtual void right_mouse_up(const Point2 &pos) {
+
443  OnRightMouseUp(pos);
+
444  }
+
445  virtual void key_down(const char *c, int modifiers) {
+
446  OnKeyDown(c, modifiers);
+
447  }
+
448  virtual void key_repeat(const char *c, int modifiers) {
+
449  OnKeyRepeat(c, modifiers);
+
450  }
+
451  virtual void key_up(const char *c, int modifiers) {
+
452  OnKeyUp(c, modifiers);
+
453  }
+
454  virtual void special_key_down(int key, int scancode, int modifiers) {
+
455  OnSpecialKeyDown(key, scancode, modifiers);
+
456  }
+
457  virtual void special_key_repeat(int key, int scancode, int modifiers) {
+
458  OnSpecialKeyRepeat(key, scancode, modifiers);
+
459  }
+
460  virtual void special_key_up(int key, int scancode, int modifiers) {
+
461  OnSpecialKeyUp(key, scancode, modifiers);
+
462  }
+
463 
+
464  bool graphicsInitialized_;
+
465  int width_;
+
466  int height_;
+
467  const std::string caption_;
+
468  nanogui::Screen *screen_;
+
469  GLFWwindow* window_;
+
470  double lastDrawT_;
+
471  Point2 lastMouse_;
+
472  bool leftDown_;
+
473  bool middleDown_;
+
474  bool rightDown_;
+
475 };
+
476 
+
477 
+
478 } // end namespace
+
479 
+
480 #endif
+
481 
+
This is the main application base class for the MinGfx Toolkit.
Definition: graphics_app.h:135
+
virtual void OnKeyDown(const char *c, int modifiers)
Transforms a keyboard down event into the actual character typed.
Definition: graphics_app.h:225
+
virtual void OnRightMouseDrag(const Point2 &pos, const Vector2 &delta)
If the mouse button is held down and the mouse has moved in the past frame then this function will be...
Definition: graphics_app.h:213
+
virtual void InitGraphicsContext()
Users cannot make any graphics calls (e.g., setting the clear color, saving mesh data to the GPU) unt...
+
virtual void ResizeWindow(int new_width, int new_height)
Cause the graphics windows to resize programmatically rather than by dragging on the corner manually.
+
virtual void OnSpecialKeyUp(int key, int scancode, int modifiers)
The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/grou...
Definition: graphics_app.h:255
+
virtual int window_width()
Returns the current width of the client area of the window in pixels.
+
virtual void OnKeyRepeat(const char *c, int modifiers)
Transforms a keyboard repeat event into the actual character typed.
Definition: graphics_app.h:233
+
virtual void OnMouseMove(const Point2 &pos, const Vector2 &delta)
If the mouse has moved in the past frame and no mouse buttons are currently pressed,...
Definition: graphics_app.h:165
+
virtual void OnMiddleMouseUp(const Point2 &pos)
If the mouse button was released since the last frame, then this function will be called to notify yo...
Definition: graphics_app.h:206
+
virtual Vector2 NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC)
Transforms a vector in normalized device coordinates (top left = (-1,1) bottom right (1,...
+
virtual float ReadZValueAtPixel(const Point2 &pointInPixels, unsigned int whichBuffer=GL_BACK)
Returns the z buffer value under the specified pixel. z will be 0 at the near plane and +1 at the far...
+
virtual bool IsRightMouseDown()
True if the right mouse button is currently held down.
+
virtual Vector2 PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels)
Transforms a vector in viewport coordinates (pixels where top left = (0,0) and bottom right = (window...
+
virtual void OnLeftMouseUp(const Point2 &pos)
If the mouse button was released since the last frame, then this function will be called to notify yo...
Definition: graphics_app.h:196
+
virtual void OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta)
If the mouse button is held down and the mouse has moved in the past frame then this function will be...
Definition: graphics_app.h:187
+
virtual void OnMiddleMouseDown(const Point2 &pos)
If the mouse button was pressed down since the last frame, then this function will be called to notif...
Definition: graphics_app.h:200
+
virtual void DrawUsingOpenGL()
Override this to draw graphics using raw OpenGL 2D or 3D graphics calls.
Definition: graphics_app.h:317
+
virtual bool IsLeftMouseDown()
True if the left mouse button is currently held down.
+
virtual void Run()
After creating a new GraphicsApp, call this to start the app's mainloop.
+
virtual bool IsKeyDown(int key)
True if the specified is is currently held down. Uses the GLFW key codes found here: http://www....
+
virtual Point2 NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC)
Transforms a point in normalized device coordinates (top left = (-1,1) bottom right (1,...
+
virtual void DrawUsingNanoVG(NVGcontext *ctx)
Override this to draw graphics using the nanovg vector graphics library, which provides an easy way t...
Definition: graphics_app.h:311
+
virtual void OnSpecialKeyRepeat(int key, int scancode, int modifiers)
The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/grou...
Definition: graphics_app.h:251
+
virtual void OnKeyUp(const char *c, int modifiers)
Transforms a keyboard up event into the actual character typed.
Definition: graphics_app.h:241
+
virtual void OnRightMouseDown(const Point2 &pos)
If the mouse button was pressed down since the last frame, then this function will be called to notif...
Definition: graphics_app.h:210
+
virtual bool IsMiddleMouseDown()
True if the middle mouse button is currently held down.
+
virtual Point2 PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels)
Transforms a point in viewport coordinates (pixels where top left = (0,0) and bottom right = (window_...
+
virtual void InitOpenGL()
Override this to initialize the OpenGL context with textures, vertex buffers, etc.
Definition: graphics_app.h:297
+
virtual void UpdateSimulation(double dt)
Called once per frame.
Definition: graphics_app.h:306
+
virtual ~GraphicsApp()
The destructor will shutdown the graphics system and window.
+
virtual void OnSpecialKeyDown(int key, int scancode, int modifiers)
The values for key, scancode, and modifiers are documented here: http://www.glfw.org/docs/latest/grou...
Definition: graphics_app.h:247
+
virtual GLFWwindow * window()
Access to the underlying GLFWwindow object.
+
GraphicsApp(int width, int height, const std::string &caption)
Constructs a new app but does not yet run it.
+
virtual float aspect_ratio()
Returns width/height for the current shape of the window.
+
virtual void OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta)
If the mouse button is held down and the mouse has moved in the past frame then this function will be...
Definition: graphics_app.h:203
+
virtual int framebuffer_width()
Returns the current width of the framebuffer in pixels.
+
virtual int window_height()
Returns the current height of the client area of the window in pixels.
+
virtual void OnRightMouseUp(const Point2 &pos)
If the mouse button was released since the last frame, then this function will be called to notify yo...
Definition: graphics_app.h:216
+
virtual void OnWindowResize(int new_width, int new_height)
Override this to respond when the graphics window and/or framebuffer are resized, either by the user ...
Definition: graphics_app.h:261
+
virtual nanogui::Screen * screen()
Access to the underlying NanoGUI Screen object.
+
virtual void InitNanoGUI()
Called at the beginning of the Run() method.
Definition: graphics_app.h:284
+
virtual void OnLeftMouseDown(const Point2 &pos)
If the mouse button was pressed down since the last frame, then this function will be called to notif...
Definition: graphics_app.h:174
+
virtual int framebuffer_height()
Returns the current height of the framebuffer in pixels.
+
A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
Definition: point2.h:28
+
A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
Definition: vector2.h:28
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+ + +
+ + + + + diff --git a/dev/MinGfx/docs/html/index.html b/dev/MinGfx/docs/html/index.html new file mode 100644 index 0000000..f2bd267 --- /dev/null +++ b/dev/MinGfx/docs/html/index.html @@ -0,0 +1,120 @@ + + + + + + + +MinGfx Toolkit: MinGfx Toolkit Documentation + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
MinGfx Toolkit Documentation
+
+
+

+

+Getting Started

+
    +
  1. libMinGfx Installation Guide
  2. +
  3. Create Your Own Graphics Program by Copying an Example
  4. +
  5. Bookmark the API - The MinGfx Programming Reference Organized by Topic
  6. +
+

+Programming Guide

+ +

+Overview

+

The MinGfx Toolkit is a minimal library for writing cross-platform (Windows, OSX, linux) graphics programs with modern OpenGL 3.3+ support. Application programmers should subclass from MinGfx::GraphicsApp, which provides callbacks for several styles of rendering and user interfaces. On-screen graphical user interfaces can be created with built-in support for NanoGUI. 2D vector graphics rendering is supported by linking with NanoVG. 3D graphics rendering is supported via MinGfx::Mesh, MinGfx::Shader, MinGfx::Texture2D, and related classes. Additionally, application programmers can do whatever custom 2D or 3D rendering is needed with direct calls to OpenGL.

+

The library is maintained by Prof. Daniel Keefe (dfk@u.nosp@m.mn.e.nosp@m.du) and is used for instructional purposes in UMN computer science courses (CSci-4611, CSci-3081W, ...) as well as some research projects. See LICENSE.txt for additional details.

+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/installation.html b/dev/MinGfx/docs/html/installation.html new file mode 100644 index 0000000..f7660d5 --- /dev/null +++ b/dev/MinGfx/docs/html/installation.html @@ -0,0 +1,206 @@ + + + + + + + +MinGfx Toolkit: Installation Guide + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
Installation Guide
+
+
+

+

+Prereqs

+

MinGfx is built using the cross-platform CMake tool. Before building MinGfx, you will need to install CMake version 3.9 or higher (https://cmake.org/). On Mac, you will need to have Xcode installed as well as the optional Xcode command line tools.

+

If you haven't already, you'll want to clone the MinGfx source code using git, so make sure you have git installed as well.

+

+Background for CMake Beginners

+

If you are new to CMake, this is the minimum background you should have before building MinGfx.

+

CMake is a cross-platform tool for generating native Unix Makefiles and project workspaces (e.g., Xcode projects, Visual Studio solutions) for building projects. Projects use CMakeLists.txt files to describe how they should be built. These files provide input for the cmake application, which uses them to generate project files for a variety of development environments. CMake can generate Makefiles for building MinGfx on linux systems or project files for building MinGfx with popular IDEs (e.g., XCode, Visual Studio, Eclipse, CodeBLocks).
+

+

There are three versions of the cmake application that are provided with the install from Kitware. You can use any of these with MinGfx:

    +
  1. cmake is the command line version where all build options must be specified on the command line.
  2. +
  3. ccmake is a visual interface that runs in a terminal. This is nice because all of the available build options are listed for you to see at once, and you can simply press the SPACEBAR to turn them on/off or type in specific values. The downside for ccmake is that it does not have a separate log window, so status messages flash by so fast that you cannot read them, and input from spin-off cmake processes (like those used in the MinGfx configure step) are not captured correctly. It's possible to still use ccmake with MinGfx, but we do not recommend it.
  4. +
  5. cmake-gui is an OS-specific windowed version. Like ccmake, the GUI provides a useful list all of the available build options. Unlike ccmake, it also includes a nice scrollable log of all of the status messages. So, this is the preferred version for new users and for the first time you build a project.
  6. +
+

With CMake, it's best to do an out-of-source build. That means that when you start CMake you must tell it two paths: 1. the path to the MinGfx source tree, AND 2. the path to the place where you would like all the built files to be created. When running cmake-gui, these can be set interactively with a file selection dialog, but all three versions respond to command line options, and this is generally the easiest way to start up cmake. So, we suggest starting cmake-gui from the command line. First cd to the directory you wish to use for the built files, then pass a single required command line argument for the path to the MinGfx source tree. Usually, you will see this written as a series of 3 steps – the common idiom for cmake builds:

// from within the root of the project's source directory
+
mkdir build
+
cd build
+
cmake-gui ..
+

If you are using cmake you can pass a variety of other options to CMake on the command line with flags such as -D AUTOBUILD_NANOGUI=ON, to tell MinGfx to autobuild the nanogui library that it depends upon. With cmake, you can end up with a long string of arguments in order to setup the build you want. With cmake-gui, you set all of these build options within the user interface instead, and this is how we will proceed in the instructions that follow.

+

+Setup a New Graphics Build Tree

+

Here's a complete annotated list of steps to setup a new build tree for creating graphics programs. In truth, you don't need to create this entire build tree strucutre just to work with MinGfx, but this is good practice, and a good guide for students.

+

+1. Create a Linux-Style Directory Tree

+

Libraries will get installed to a lib/ directory. Include files will go in include/, executables in bin/, and we'll put the source we are developing inside dev/.

+
mkdir -p /Users/keefe/courses/csci4611/sw
+
cd /Users/courses/csci4611/sw
+
mkdir lib
+
mkdir include
+
mkdir bin
+
mkdir dev
+

IMPORTANT: On Windows, you will need to add the bin directory you just created to your PATH environment variable. If you have not done this before, you will find many instructions online. Here is one good description of how to add a directory to the PATH environment variable on Windows.

+

+2. Download the MinGfx Project

+

To download use:

cd dev
+
git clone http://github.com/ivlab/MinGfx
+

+3. Create an Initial CMake Build Configuration

+
cd MinGfx
+
mkdir build
+
cd build
+
cmake-gui ..
+

Press the 'Configure' button. Then, select the Generator you would like to use from the list provided (e.g., Xcode, Visual Studio, Unix Makefiles). Click Done.

+

Wait for CMake to do an initial configuration. This will populate an initial list of CMake and MinGfx build options. Each time you run configure, cmake-gui will display any new configuration options highlighted in red. So, do not be alarmed when the whole options window turns red during this first configure operation – that is normal behavior since at this point, all of the options are new.

+

Do you see an error in the CMake output window? If so, don't worry about this yet, we'll come back to it in a minute.

+

+4. Set the CMAKE_INSTALL_PREFIX Variable to the Root of Your Directory Tree

+

Now, using cmake-gui, scroll through the table of variables until you find the one named CMAKE_INSTALL_PREFIX. Click on it and edit its value to point to the root of the directory tree you created in Step 1. The root for the example tree used in Step 1 would be /Users/keefe/courses/csci4611/sw. In other words, the root is the last directory before you get to lib, include, bin, and dev.

+

Once you make this change, you can press the Configure button again. It doesn't hurt to press Configure multiple times. You need to do it at least once after every change you make. Notice how the variables highlighted in red go away when you do this because they are no longer new options – cmake knows that you have already had a chance to see them once.

+

+5. If Needed, Set AUTOBUILD_NANOGUI to ON and Build Dependencies

+

Now, take a look at the output window at the bottom of cmake-gui. If you see the following error there, then we'll address that next. If not, then nanogui must already be installed on your system, and you can skip to step 6.

Searching for NanoGUI library...
+
Could NOT find NANOGUI (missing: NANOGUI_LIBRARIES)
+
CMake Error at cmake/UseNanoGUI.cmake:96 (message):
+
The NanoGUI library was not found on the system. You can: (1) install
+
NanoGUI yourself, (2) point cmake to an already-installed version of
+
NanoGUI by adding the installation prefix of NanoGUI to the
+
CMAKE_PREFIX_PATH environment variable, or (3) set AUTOBUILD_NANOGUI to ON
+
and run cmake configure again. AUTOBUILD_NANOGUI will: 1. download
+
NanoGUI, 2. build NanoGUI, and 3. install NanoGUI to the
+
CMAKE_INSTALL_PREFIX (currently set to
+
/Users/keefe/courses/tmp/MinGfx/build/install). If you want to use the
+
AUTOBUILD feature, adjust CMAKE_INSTALL_PREFIX as desired now, set
+
AUTOBUILD_NANOGUI to ON, and then run cmake configure again.
+
Call Stack (most recent call first):
+
src/CMakeLists.txt:80 (UseNanoGUI)
+
CMakeLists.txt:186 (include)
+

This error tells us that cmake could not find the nanogui library pre-installed on our system. Luckily, MinGfx includes support for downloading, building, and installing nanogui for you using the AUTOBUILD_NANOGUI feature.

+

Scroll through the list of CMake variables again until you find AUTOBUILD_NANOGUI and click on the checkbox next to it to turn it on. Now, click Configure again. This time the configure step will take a while, perhaps 5 minutes, to run because it will be downloading, building, and installing nanogui and all of its dependencies.
+

+

This step should finish without an error. If you do see an error and you are working with this as part of a UMN course, you may need to stop now and ask for help from a TA or on the class forum – perhaps there is something we haven't planned for in the particular setup of your computer.

+

+6. Generate the Build System / Project Files

+

Finally, you are ready to press the Generate button. This is the step that will actually generate the Unix Makefiles, Visual Studio Solution File, or Xcode Project File needed to build MinGfx.
+

+

+7. Build MinGfx with the Specified Options

+

Click Open Project if you generated project files for an IDE, or if you generated Unix Makefiles return to your shell and the build directory. Now, build the project as you normally would in these enviornments.
+

+

For Xcode: click the Triangle button to build the ALL_BUILD target

+

For Visual Studio: In the Solution Explorer Window right click on ALL_BUILD and select Build

+

For Unix Makefiles: run make all.

+

+8. Install the Library to your Directory Tree

+

For Xcode: click on ALL_BUILD to reveal a dropdown list and select install then click the Triangle button

+

For Visual Studio: In the Solution Explorer Window right click on INSTALL and select Build.

+

For Unix Makefiles: run make install.

+

To see if it worked take a look in the lib, include, and bin directories within the root of the tree you setup in Step 1. You should see the test programs inside bin/ and folders for MinVR-1.0 inside lib/ and include/.

+

+9. Run a Test Program

+

For Xcode: click on ALL_BUILD to reveal a dropdown list and select mingfx-test-gui-plus-opengl then click the Triangle button

+

For Visual Studio: In the Solution Explorer Window right click on mingfx-test-gui-plus-opengl then selece Set as StartUp Project. Now, click the green triangle button to run the program. IMPORTANT NOTE: When the program runs it will need to find some .dlls that were installed to your bin directory in Step 8. So, the bin directory must be in your windows PATH. If you skipped this part of Step 1, go back and add bin to your PATH environment variable now. Then, you may need to restart Visual Studio for it to recognize the new setting.

+

For Unix Makefiles: from within the build directory run: tests/mingfx-gui-plus-opengl

+

+Create Your Own Graphics Program

+

Prereq: Before getting started, make sure you have installed MinGfx, going all the way through the 9th step above.

+

The project in the MinGfx/example folder is an example of a stand-alone project that uses a separate cmake build system. This means we can copy it and move it out of the MinGfx source tree to serve as a starting point for your own project. Let's do that now.

+
cd /Users/courses/csci4611/sw/dev (or wherever you put your dev directory)
+
cp -r MinGfx/example/ mingfx-example
+

Now, before we build the example, we need to make sure it knows where to find MinGfx.
+

cd mingfx-example
+
open up the CMakeLists.txt file in your favorite text editor
+

Near the top of the file, find the following lines

# !!!!!!!!!!!!! EDIT THE FOLLOWING LINE AS NEEDED !!!!!!!!!!!!!
+
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../build/install ../../..)
+

and add a path to the end of the list to point to the ROOT of your directory tree, for example:

# !!!!!!!!!!!!! EDIT THE FOLLOWING LINE AS NEEDED !!!!!!!!!!!!!
+
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../build/install ../../.. /Users/keefe/courses/cs4611/sw)
+

Now, we're ready to build this example using the same cmake idiom as before:

mkdir build
+
cd build
+
cmake-gui ..
+

Then, click Configure. If you want to install this example program, you may now edit the CMAKE_INSTALL_PREFIX as before and rerun Configure. It should not be necessary to change any of the other cmake variables for this example program.

+

Next, click Generate to produce project files for your IDE or makefiles.
+

+

Next, build the example program within your IDE or by running make.

+

Finally, you can run your first example graphics program with the command:

./mingfx-example
+

You can change the name of the executable, add more header and source files to the project and make other changes to the build process by editing the CMakeLists.txt file, but remember that after each change, you must run CMake's Configure and Generate steps again.
+

+

To reiterate the point above, if you are using an IDE, it is important to remember to add new files to your project by editing the CMakeLists.txt file NOT by using File->Add To Project.. or whatever option is provided inside your IDE. Since we using CMake to generate the IDE's project files, and we may want to switch to a different IDE or to Makefiles in the future, the CMakeLists.txt file needs to be treated as the master record of all of the build settings.

+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/installation_8md.html b/dev/MinGfx/docs/html/installation_8md.html new file mode 100644 index 0000000..577aea3 --- /dev/null +++ b/dev/MinGfx/docs/html/installation_8md.html @@ -0,0 +1,87 @@ + + + + + + + +MinGfx Toolkit: doc/installation.md File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
doc/installation.md File Reference
+
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/jquery.js b/dev/MinGfx/docs/html/jquery.js new file mode 100644 index 0000000..103c32d --- /dev/null +++ b/dev/MinGfx/docs/html/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").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("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",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(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,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}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/dev/MinGfx/docs/html/mainpage_8md.html b/dev/MinGfx/docs/html/mainpage_8md.html new file mode 100644 index 0000000..15b0292 --- /dev/null +++ b/dev/MinGfx/docs/html/mainpage_8md.html @@ -0,0 +1,87 @@ + + + + + + + +MinGfx Toolkit: doc/mainpage.md File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
doc/mainpage.md File Reference
+
+
+
+ + + + + diff --git a/dev/MinGfx/docs/html/matrix4_8h.html b/dev/MinGfx/docs/html/matrix4_8h.html new file mode 100644 index 0000000..9c4a1b9 --- /dev/null +++ b/dev/MinGfx/docs/html/matrix4_8h.html @@ -0,0 +1,139 @@ + + + + + + + +MinGfx Toolkit: src/matrix4.h File Reference + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
matrix4.h File Reference
+
+
+
#include <iostream>
+#include "point3.h"
+#include "vector3.h"
+#include "ray.h"
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  mingfx::Matrix4
 A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be compatible with OpenGL. More...
 
+ + + + +

+Namespaces

 mingfx
 Namespace for the MinGfx Toolkit.
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Functions

Matrix4 mingfx::operator* (const Matrix4 &m, const float &s)
 Multiply matrix and scalar, returns the new matrix. More...
 
Matrix4 mingfx::operator* (const float &s, const Matrix4 &m)
 Multiply matrix and scalar, returns the new matrix. More...
 
Point3 mingfx::operator* (const Matrix4 &m, const Point3 &p)
 Multiply matrix and point, returns the new point. More...
 
Vector3 mingfx::operator* (const Matrix4 &m, const Vector3 &v)
 Multiply matrix and vector, returns the new vector. More...
 
Matrix4 mingfx::operator* (const Matrix4 &m1, const Matrix4 &m2)
 Multiply two matrices, returns the result. More...
 
Ray mingfx::operator* (const Matrix4 &m, const Ray &r)
 Multiply matrix and the point and vector portions of the ray, returns the new ray. More...
 
std::ostream & mingfx::operator<< (std::ostream &os, const Matrix4 &m)
 
std::istream & mingfx::operator>> (std::istream &is, Matrix4 &m)
 
+
+ + + + + diff --git a/dev/MinGfx/docs/html/matrix4_8h_source.html b/dev/MinGfx/docs/html/matrix4_8h_source.html new file mode 100644 index 0000000..2976e51 --- /dev/null +++ b/dev/MinGfx/docs/html/matrix4_8h_source.html @@ -0,0 +1,286 @@ + + + + + + + +MinGfx Toolkit: src/matrix4.h Source File + + + + + + + + + + + + +
+
+ + + + + + +
+
MinGfx Toolkit +  1.0 +
+
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matrix4.h
+
+
+Go to the documentation of this file.
1 /*
+
2  This file is part of the MinGfx Project.
+
3 
+
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
+
5  All Rights Reserved.
+
6 
+
7  Original Author(s) of this File:
+
8  Dan Keefe, 2017, University of Minnesota
+
9 
+
10  Author(s) of Significant Updates/Modifications to the File:
+
11  ...
+
12  */
+
13 
+
14 #ifndef SRC_MATRIX4_H_
+
15 #define SRC_MATRIX4_H_
+
16 
+
17 #include <iostream>
+
18 
+
19 #include "point3.h"
+
20 #include "vector3.h"
+
21 #include "ray.h"
+
22 
+
23 
+
24 namespace mingfx {
+
25 
+
26 
+
50 class Matrix4 {
+
51 public:
+
52 
+ +
55 
+
58  Matrix4(const float* a);
+
59 
+
62  Matrix4(const std::vector<float> &a);
+
63 
+
65  Matrix4(const Matrix4& m2);
+
66 
+
68  virtual ~Matrix4();
+
69 
+
71  bool operator==(const Matrix4& m2) const;
+
72 
+
74  bool operator!=(const Matrix4& m2) const;
+
75 
+
77  Matrix4& operator=(const Matrix4& m2);
+
78 
+
79 
+
82  const float * value_ptr() const;
+
83 
+
86  float operator[](const int i) const;
+
87 
+
90  float& operator[](const int i);
+
91 
+
94  float operator()(const int row, const int col) const;
+
95 
+
98  float& operator()(const int row, const int col);
+
99 
+
100 
+
105  Vector3 ColumnToVector3(int c) const;
+
106 
+
109  Point3 ColumnToPoint3(int c) const;
+
110 
+
111  std::vector<float> ToVector() const;
+
112 
+
113 
+
114  // --- Static Constructors for Special Matrices ---
+
115 
+ +
123  const float r1c1, const float r1c2, const float r1c3, const float r1c4,
+
124  const float r2c1, const float r2c2, const float r2c3, const float r2c4,
+
125  const float r3c1, const float r3c2, const float r3c3, const float r3c4,
+
126  const float r4c1, const float r4c2, const float r4c3, const float r4c4
+
127  );
+
128 
+
129  // --- Model Transformations ---
+
130 
+
132  static Matrix4 Scale(const Vector3 &v);
+
133 
+
135  static Matrix4 Translation(const Vector3 &v);
+
136 
+
138  static Matrix4 RotationX(const float radians);
+
139 
+
141  static Matrix4 RotationY(const float radians);
+
142 
+
144  static Matrix4 RotationZ(const float radians);
+
145 
+
147  static Matrix4 Rotation(const Point3 &p, const Vector3 &v, const float a);
+
148 
+
173  static Matrix4 Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2,
+
174  const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2);
+
175 
+
176 
+
177  // --- View Matrices ---
+
178 
+
183  static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up);
+
184 
+
185  // --- Projection Matrices ---
+
186 
+
189  static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist);
+
190 
+
192  static Matrix4 Frustum(float left, float right, float bottom, float top, float near_plane_dist, float far_plane_dist);
+
193 
+
194  // --- Inverse, Transposeand Other General Matrix Functions ---
+
195 
+
198  Matrix4 Inverse() const;
+
199 
+ +
205 
+ +
208 
+
211  float SubDeterminant(int exclude_row, int exclude_col) const;
+
212 
+
214  Matrix4 Cofactor() const;
+
215 
+
217  float Determinant() const;
+
218 
+
219 
+
220 
+
221 private:
+
222  float m[16];
+
223 };
+
224 
+
225 
+
226 
+
227 // ---------- Operator Overloads for Working with Points, Vectors, & Matrices ----------
+
228 
+
229 
+
230 // --- Matrix multiplication for Points, Vectors, & Matrices ---
+
231 
+
233 Matrix4 operator*(const Matrix4& m, const float& s);
+
234 
+
236 Matrix4 operator*(const float& s, const Matrix4& m);
+
237 
+
239 Point3 operator*(const Matrix4& m, const Point3& p);
+
240 
+
242 Vector3 operator*(const Matrix4& m, const Vector3& v);
+
243 
+
245 Matrix4 operator*(const Matrix4& m1, const Matrix4& m2);
+
246 
+
247 
+
248 
+
250 Ray operator*(const Matrix4& m, const Ray& r);
+
251 
+
252 // --- Stream operators ---
+
253 
+
254 std::ostream & operator<< ( std::ostream &os, const Matrix4 &m);
+
255 std::istream & operator>> ( std::istream &is, Matrix4 &m);
+
256 
+
257 
+
258 } // end namespace
+
259 
+
260 #endif
+
A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
Definition: matrix4.h:50
+
float Determinant() const
Returns the determinant of the 4x4 matrix.
+
static Matrix4 Scale(const Vector3 &v)
Returns the scale matrix described by the vector.
+
Matrix4(const float *a)
Constructs a matrix given from an array of 16 floats in OpenGL matrix format (i.e....
+
Matrix4(const std::vector< float > &a)
Constructs a matrix given from a vector of 16 floats in OpenGL matrix format (i.e....
+
Matrix4 Cofactor() const
Returns the cofactor matrix.
+
static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist)
Returns a perspective projection matrix equivalent to the one gluPerspective creates.
+
const float * value_ptr() const
Returns a pointer to the raw data array used to store the matrix. This is a 1D array of 16-elements s...
+
float SubDeterminant(int exclude_row, int exclude_col) const
Returns the determinant of the 3x3 matrix formed by excluding the specified row and column from the 4...
+
static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up)
Returns a view matrix that centers the camera at the 'eye' position and orients it to look at the des...
+
float & operator()(const int row, const int col)
Access an individual element of the array using the syntax: Matrix4 mat; mat(1,2) = 1....
+
static Matrix4 RotationX(const float radians)
Returns the rotation matrix about the x axis by the specified angle.
+
Matrix4(const Matrix4 &m2)
Copy constructor.
+
static Matrix4 RotationZ(const float radians)
Returns the rotation matrix about the z axis by the specified angle.
+
std::vector< float > ToVector() const
+
Matrix4()
The default constructor creates an identity matrix:
+
Vector3 ColumnToVector3(int c) const
Returns the c-th column of the matrix as a Vector type, e.g.,: Vector3 xAxis = mat....
+
virtual ~Matrix4()
Destructor.
+
static Matrix4 Frustum(float left, float right, float bottom, float top, float near_plane_dist, float far_plane_dist)
Returns a projection matrix equivalent the one glFrustum creates.
+
Matrix4 Orthonormal() const
Returns an orthonormal version of the matrix, i.e., guarantees that the rotational component of the m...
+
Matrix4 & operator=(const Matrix4 &m2)
Matrix assignment operator.
+
bool operator==(const Matrix4 &m2) const
Check for "equality", taking floating point imprecision into account.
+
float operator()(const int row, const int col) const
Access an individual element of the array using the syntax: Matrix4 mat; float row1col2 = mat(1,...
+
bool operator!=(const Matrix4 &m2) const
Check for "inequality", taking floating point imprecision into account.
+
Matrix4 Inverse() const
Returns the inverse of the 4x4 matrix if it is nonsingular. If it is singular, then returns the ident...
+
float operator[](const int i) const
Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-ele...
+
static Matrix4 Rotation(const Point3 &p, const Vector3 &v, const float a)
Returns the rotation matrix around the vector v placed at point p, rotate by angle a.
+
static Matrix4 FromRowMajorElements(const float r1c1, const float r1c2, const float r1c3, const float r1c4, const float r2c1, const float r2c2, const float r2c3, const float r2c4, const float r3c1, const float r3c2, const float r3c3, const float r3c4, const float r4c1, const float r4c2, const float r4c3, const float r4c4)
Returns a matrix constructed from individual elements passed in row major order so that the matrix lo...
+
static Matrix4 Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2)
Creates a transformation matrix that maps a coordinate space, a, defined one point,...
+
static Matrix4 Translation(const Vector3 &v)
Returns the translation matrix described by the vector.
+
Point3 ColumnToPoint3(int c) const
Returns the c-th column of the matrix as a Vector type, e.g.,: Point3 pos = mat.getColumnAsPoint3(3);...
+
static Matrix4 RotationY(const float radians)
Returns the rotation matrix about the y axis by the specified angle.
+
float & operator[](const int i)
Accesses the ith element of the raw data array used to store the matrix. This is a 1D array of 16-ele...
+
Matrix4 Transpose() const
Returns the transpose of the matrix.
+
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
Definition: point3.h:52
+
Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a directi...
Definition: ray.h:54
+
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Definition: vector3.h:62
+
Namespace for the MinGfx Toolkit.
Definition: aabb.h:21
+
std::ostream & operator<<(std::ostream &os, const Color &c)
+
std::istream & operator>>(std::istream &is, Color &c)
+
Matrix4 operator*(const Matrix4 &m, const float &s)
Multiply matrix and scalar, returns the new matrix.
+ + + +
+ + + + + diff --git a/dev/MinGfx/docs/html/menu.js b/dev/MinGfx/docs/html/menu.js new file mode 100644 index 0000000..2fe2214 --- /dev/null +++ b/dev/MinGfx/docs/html/menu.js @@ -0,0 +1,51 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + 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 Software. + + THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/dev/MinGfx/docs/html/menudata.js b/dev/MinGfx/docs/html/menudata.js new file mode 100644 index 0000000..295196a --- /dev/null +++ b/dev/MinGfx/docs/html/menudata.js @@ -0,0 +1,110 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + 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 Software. + + THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions_b.html#index_b"}, +{text:"c",url:"functions_c.html#index_c"}, +{text:"d",url:"functions_d.html#index_d"}, +{text:"e",url:"functions_e.html#index_e"}, +{text:"f",url:"functions_f.html#index_f"}, +{text:"g",url:"functions_g.html#index_g"}, +{text:"h",url:"functions_h.html#index_h"}, +{text:"i",url:"functions_i.html#index_i"}, +{text:"l",url:"functions_l.html#index_l"}, +{text:"m",url:"functions_m.html#index_m"}, +{text:"n",url:"functions_n.html#index_n"}, +{text:"o",url:"functions_o.html#index_o"}, +{text:"p",url:"functions_p.html#index_p"}, +{text:"q",url:"functions_q.html#index_q"}, +{text:"r",url:"functions_r.html#index_r"}, +{text:"s",url:"functions_s.html#index_s"}, +{text:"t",url:"functions_t.html#index_t"}, +{text:"u",url:"functions_u.html#index_u"}, +{text:"v",url:"functions_v.html#index_v"}, +{text:"w",url:"functions_w.html#index_w"}, +{text:"x",url:"functions_x.html#index_x"}, +{text:"y",url:"functions_y.html#index_y"}, +{text:"z",url:"functions_z.html#index_z"}, +{text:"~",url:"functions_~.html#index__7E"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"a",url:"functions_func.html#index_a"}, +{text:"b",url:"functions_func_b.html#index_b"}, +{text:"c",url:"functions_func_c.html#index_c"}, +{text:"d",url:"functions_func_d.html#index_d"}, +{text:"e",url:"functions_func_e.html#index_e"}, +{text:"f",url:"functions_func_f.html#index_f"}, +{text:"g",url:"functions_func_g.html#index_g"}, +{text:"h",url:"functions_func_h.html#index_h"}, +{text:"i",url:"functions_func_i.html#index_i"}, +{text:"l",url:"functions_func_l.html#index_l"}, +{text:"m",url:"functions_func_m.html#index_m"}, +{text:"n",url:"functions_func_n.html#index_n"}, +{text:"o",url:"functions_func_o.html#index_o"}, +{text:"p",url:"functions_func_p.html#index_p"}, +{text:"q",url:"functions_func_q.html#index_q"}, +{text:"r",url:"functions_func_r.html#index_r"}, +{text:"s",url:"functions_func_s.html#index_s"}, +{text:"t",url:"functions_func_t.html#index_t"}, +{text:"u",url:"functions_func_u.html#index_u"}, +{text:"v",url:"functions_func_v.html#index_v"}, +{text:"w",url:"functions_func_w.html#index_w"}, +{text:"x",url:"functions_func_x.html#index_x"}, +{text:"y",url:"functions_func_y.html#index_y"}, +{text:"z",url:"functions_func_z.html#index_z"}, +{text:"~",url:"functions_func_~.html#index__7E"}]}, +{text:"Variables",url:"functions_vars.html",children:[ +{text:"a",url:"functions_vars.html#index_a"}, +{text:"c",url:"functions_vars.html#index_c"}, +{text:"d",url:"functions_vars.html#index_d"}, +{text:"e",url:"functions_vars.html#index_e"}, +{text:"f",url:"functions_vars.html#index_f"}, +{text:"h",url:"functions_vars.html#index_h"}, +{text:"i",url:"functions_vars.html#index_i"}, +{text:"m",url:"functions_vars.html#index_m"}, +{text:"n",url:"functions_vars.html#index_n"}, +{text:"p",url:"functions_vars.html#index_p"}, +{text:"s",url:"functions_vars.html#index_s"}, +{text:"t",url:"functions_vars.html#index_t"}, +{text:"v",url:"functions_vars.html#index_v"}, +{text:"w",url:"functions_vars.html#index_w"}, +{text:"x",url:"functions_vars.html#index_x"}, +{text:"y",url:"functions_vars.html#index_y"}]}, +{text:"Enumerations",url:"functions_enum.html"}, +{text:"Related Functions",url:"functions_rela.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"File Members",url:"globals.html",children:[ +{text:"All",url:"globals.html"}, +{text:"Functions",url:"globals_func.html"}, +{text:"Typedefs",url:"globals_type.html"}, +{text:"Enumerator",url:"globals_eval.html"}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/dev/MinGfx/docs/html/mesh_8h.html b/dev/MinGfx/docs/html/mesh_8h.html new file mode 100644 index 0000000..25e621a --- /dev/null +++ b/dev/MinGfx/docs/html/mesh_8h.html @@ -0,0 +1,116 @@ + + + + + + + +MinGfx Toolkit: src/mesh.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    mesh.h File Reference
    +
    +
    +
    #include "bvh.h"
    +#include "color.h"
    +#include "opengl_headers.h"
    +#include "point2.h"
    +#include "point3.h"
    +#include "vector3.h"
    +#include <vector>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Mesh
     A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/mesh_8h_source.html b/dev/MinGfx/docs/html/mesh_8h_source.html new file mode 100644 index 0000000..fee9a22 --- /dev/null +++ b/dev/MinGfx/docs/html/mesh_8h_source.html @@ -0,0 +1,293 @@ + + + + + + + +MinGfx Toolkit: src/mesh.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    mesh.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_MESH_H_
    +
    15 #define SRC_MESH_H_
    +
    16 
    +
    17 
    +
    18 
    +
    19 #include "bvh.h"
    +
    20 #include "color.h"
    +
    21 #include "opengl_headers.h"
    +
    22 #include "point2.h"
    +
    23 #include "point3.h"
    +
    24 #include "vector3.h"
    +
    25 
    +
    26 #include <vector>
    +
    27 
    +
    28 
    +
    29 namespace mingfx {
    +
    30 
    +
    31 class Matrix4;
    +
    32 
    +
    127 class Mesh {
    +
    128 public:
    +
    130  Mesh();
    +
    131 
    +
    133  Mesh(const Mesh &other);
    +
    134 
    +
    135  virtual ~Mesh();
    +
    136 
    +
    137 
    +
    142  void LoadFromOBJ(const std::string &filename);
    +
    143 
    +
    144 
    +
    145 
    +
    146  // ---- TRIANGLE LIST MODE ----
    +
    147  // No indices are stored, each set of 3 vertices forms a triangle, and if the
    +
    148  // triangles share vertices, those vertices need to be repeated.
    +
    149 
    +
    155  int AddTriangle(Point3 v1, Point3 v2, Point3 v3);
    +
    156 
    +
    159  void UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3);
    +
    160 
    +
    163  void SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3);
    +
    164 
    +
    167  void SetColors(int triangle_id, Color c1, Color c2, Color c3);
    +
    168 
    +
    172  void SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3);
    +
    173 
    +
    174 
    +
    175 
    +
    176  // ---- INDEXED TRIANGLES MODE ----
    +
    177  // Vertices are stored in an array and indices are stored in a separate array
    +
    178  // each set of 3 indices into the vertex array defines one triangle. Here,
    +
    179  // you cannot add one triangle at a time to the mesh. Instead you must set
    +
    180  // the arrays of indices, vertices, and other attributes for the mesh at
    +
    181  // once.
    +
    182 
    +
    184  void SetVertices(const std::vector<Point3> &verts);
    +
    185 
    +
    187  void SetNormals(const std::vector<Vector3> &norms);
    +
    188 
    +
    190  void SetColors(const std::vector<Color> &colors);
    +
    191 
    +
    193  void SetTexCoords(int texture_unit, const std::vector<Point2> &tex_coords);
    +
    194 
    +
    198  void SetIndices(const std::vector<unsigned int> index_array);
    +
    199 
    +
    200 
    +
    201  void SetInstanceTransforms(const std::vector<Matrix4> &xforms);
    +
    202 
    +
    203 
    +
    204  // ---- These functions can be used instead of the above if you are working with
    +
    205  // regular C-style arrays and floats rather than the higher level types like
    +
    206  // Point3 and Vector3. ----
    +
    207 
    +
    211  void SetVertices(float *verts_array, int num_verts);
    +
    212 
    +
    217  void SetNormals(float *norms_array, int num_norms);
    +
    218 
    +
    223  void SetColors(float *colors_array, int num_colors);
    +
    224 
    +
    229  void SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords);
    +
    230 
    +
    235  void SetIndices(unsigned int *index_array, int num_indices);
    +
    236 
    +
    237 
    +
    238 
    + +
    247 
    +
    252  void Draw();
    +
    253 
    +
    254 
    +
    255 
    + +
    263 
    + +
    271 
    +
    272 
    +
    276  void BuildBVH();
    +
    277 
    + +
    283 
    +
    284  // Access to properties indexed by vertex number
    +
    285 
    +
    287  int num_vertices() const;
    +
    288 
    +
    291  Point3 read_vertex_data(int vertex_id) const;
    +
    292 
    +
    295  Vector3 read_normal_data(int vertex_id) const;
    +
    296 
    +
    299  Color read_color_data(int vertex_id) const;
    +
    300 
    +
    303  Point2 read_tex_coords_data(int texture_unit, int vertex_id) const;
    +
    304 
    +
    305 
    +
    306  // Access to triangles
    +
    307 
    +
    309  int num_triangles() const;
    +
    310 
    +
    312  // of unsigned ints. Use the SetIndices() function to set (or edit) the indices for the mesh.
    +
    313  std::vector<unsigned int> read_triangle_indices_data(int triangle_id) const;
    +
    314 
    +
    315 
    +
    316 private:
    +
    317  std::vector<float> verts_;
    +
    318  std::vector<float> norms_;
    +
    319  std::vector<float> colors_;
    +
    320  std::vector< std::vector<float> > tex_coords_;
    +
    321  std::vector<unsigned int> indices_;
    +
    322  std::vector<float> instance_xforms_;
    +
    323 
    +
    324  bool gpu_dirty_;
    +
    325  GLuint vertex_buffer_;
    +
    326  GLuint vertex_array_;
    +
    327  GLuint element_buffer_;
    +
    328 
    +
    329  bool bvh_dirty_;
    +
    330  BVH bvh_;
    +
    331 };
    +
    332 
    +
    333 
    +
    334 } // end namespace
    +
    335 
    +
    336 
    +
    337 #endif
    + +
    A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersecti...
    Definition: bvh.h:40
    +
    Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
    Definition: color.h:41
    +
    A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
    Definition: mesh.h:127
    +
    void SetVertices(float *verts_array, int num_verts)
    Sets the vertex array for the mesh directly. Vertices are stored as (x,y,z), (x,y,...
    +
    void SetColors(int triangle_id, Color c1, Color c2, Color c3)
    Sets per-vertex colors for the three vertices of a triangle that has already been added to the mesh.
    +
    std::vector< unsigned int > read_triangle_indices_data(int triangle_id) const
    Read only access to the indices that make up a particular triangle. Data are returned as a 3-element ...
    +
    void SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)
    Sets the texture coordinates for the three vertices of a triangle that has already been added to the ...
    +
    void CalcPerFaceNormals()
    This (re)calculates the normals for the mesh and stores them with the mesh data structure.
    +
    void SetVertices(const std::vector< Point3 > &verts)
    Sets the vertex array for the mesh directly.
    +
    void SetIndices(const std::vector< unsigned int > index_array)
    Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...
    +
    int AddTriangle(Point3 v1, Point3 v2, Point3 v3)
    Adds a triangle to the mesh datastructure and returns a triangle ID.
    +
    void UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3)
    Updates the vertex positions for a triangle that has already been added to the mesh.
    +
    Vector3 read_normal_data(int vertex_id) const
    Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number....
    +
    void SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)
    Sets the normals for the three vertices of a triangle that has already been added to the mesh.
    +
    Point2 read_tex_coords_data(int texture_unit, int vertex_id) const
    Read only access to per-vertex texture coordinates data. Data are returned as a Point2....
    +
    Mesh()
    Creates an empty mesh.
    +
    void SetNormals(float *norms_array, int num_norms)
    Sets the normal array for the mesh directly. Normals are stored as (x,y,z), (x,y,z),...
    +
    void SetInstanceTransforms(const std::vector< Matrix4 > &xforms)
    +
    void Draw()
    This sends the mesh vertices and attributes down the graphics pipe using glDrawArrays() for the non-i...
    +
    Mesh(const Mesh &other)
    Copies all data and sets GPU dirty bit for the new mesh.
    +
    void SetIndices(unsigned int *index_array, int num_indices)
    Sets the indices into the vertex array to use to create the triangles. Each consecutive set of 3 indi...
    +
    void LoadFromOBJ(const std::string &filename)
    This reads a mesh stored in the common Wavefront Obj file format.
    +
    void BuildBVH()
    This (re)calculates a Bounding Volume Hierarchy for the mesh, which can be used together with Ray::Fa...
    +
    BVH * bvh_ptr()
    Returns a pointer to the underlying BVH data structure.
    +
    int num_triangles() const
    The total number of triangles in the mesh.
    +
    int num_vertices() const
    The total number of vertices in the mesh.
    +
    void SetColors(const std::vector< Color > &colors)
    Sets the per-vertex colors array for the mesh directly.
    +
    void SetTexCoords(int texture_unit, const std::vector< Point2 > &tex_coords)
    Sets a texture coordinates array for the mesh directly.
    +
    Color read_color_data(int vertex_id) const
    Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number....
    +
    void UpdateGPUMemory()
    This copies the entire mesh data structure to a vertex array in GPU memory, which must happen before ...
    +
    void SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)
    Sets a texture coordinates array for the mesh directly. Tex coords are stored as (u,...
    +
    void CalcPerVertexNormals()
    This (re)calculates the normals for the mesh and stores them with the mesh data structure.
    +
    virtual ~Mesh()
    +
    void SetNormals(const std::vector< Vector3 > &norms)
    Sets the normal array for the mesh directly.
    +
    Point3 read_vertex_data(int vertex_id) const
    Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number...
    +
    void SetColors(float *colors_array, int num_colors)
    Sets the per-vertex colors array for the mesh directly. Colors are stored as (r,g,...
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + + + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/mingfx_8h.html b/dev/MinGfx/docs/html/mingfx_8h.html new file mode 100644 index 0000000..828b1a0 --- /dev/null +++ b/dev/MinGfx/docs/html/mingfx_8h.html @@ -0,0 +1,120 @@ + + + + + + + +MinGfx Toolkit: src/mingfx.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    mingfx.h File Reference
    +
    +
    +

    Detailed Description

    +

    Includes the entire MinGfx library and calls using namespace mingfx.

    + +

    Definition in file mingfx.h.

    +
    #include "aabb.h"
    +#include "bvh.h"
    +#include "color.h"
    +#include "craft_cam.h"
    +#include "default_shader.h"
    +#include "gfxmath.h"
    +#include "graphics_app.h"
    +#include "matrix4.h"
    +#include "mesh.h"
    +#include "mingfx_config.h"
    +#include "opengl_headers.h"
    +#include "platform.h"
    +#include "point2.h"
    +#include "point3.h"
    +#include "quaternion.h"
    +#include "quick_shapes.h"
    +#include "ray.h"
    +#include "shader_program.h"
    +#include "text_shader.h"
    +#include "texture2d.h"
    +#include "unicam.h"
    +#include "vector2.h"
    +#include "vector3.h"
    +
    +

    Go to the source code of this file.

    +
    + + + + + diff --git a/dev/MinGfx/docs/html/mingfx_8h_source.html b/dev/MinGfx/docs/html/mingfx_8h_source.html new file mode 100644 index 0000000..747aa97 --- /dev/null +++ b/dev/MinGfx/docs/html/mingfx_8h_source.html @@ -0,0 +1,159 @@ + + + + + + + +MinGfx Toolkit: src/mingfx.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    mingfx.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 
    +
    16 
    +
    17 #ifndef SRC_MINGFX_H_
    +
    18 #define SRC_MINGFX_H_
    +
    19 
    +
    20 #include "aabb.h"
    +
    21 #include "bvh.h"
    +
    22 #include "color.h"
    +
    23 #include "craft_cam.h"
    +
    24 #include "default_shader.h"
    +
    25 #include "gfxmath.h"
    +
    26 #include "graphics_app.h"
    +
    27 #include "matrix4.h"
    +
    28 #include "mesh.h"
    +
    29 #include "mingfx_config.h"
    +
    30 #include "opengl_headers.h"
    +
    31 #include "platform.h"
    +
    32 #include "point2.h"
    +
    33 #include "point3.h"
    +
    34 #include "quaternion.h"
    +
    35 #include "quick_shapes.h"
    +
    36 #include "ray.h"
    +
    37 #include "shader_program.h"
    +
    38 #include "text_shader.h"
    +
    39 #include "texture2d.h"
    +
    40 #include "unicam.h"
    +
    41 #include "vector2.h"
    +
    42 #include "vector3.h"
    +
    43 
    +
    44 //using namespace mingfx;
    +
    45 
    +
    46 #endif
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/mingfx__config_8h.html b/dev/MinGfx/docs/html/mingfx__config_8h.html new file mode 100644 index 0000000..e2c9f24 --- /dev/null +++ b/dev/MinGfx/docs/html/mingfx__config_8h.html @@ -0,0 +1,172 @@ + + + + + + + +MinGfx Toolkit: src/mingfx_config.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    mingfx_config.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + + + +

    +Macros

    #define MINGFX_DATA_DIR_BUILD   "Y:/courses/4611/instructor-repo/dev/MinGfx/data"
     
    #define MINGFX_DATA_DIR_INSTALL   "C:/csci-4611/share/MinGfx-1.0/data"
     
    #define MINGFX_SHADERS_DIR_BUILD   "Y:/courses/4611/instructor-repo/dev/MinGfx/src/shaders"
     
    #define MINGFX_SHADERS_DIR_INSTALL   "C:/csci-4611/share/MinGfx-1.0/shaders"
     
    +

    Macro Definition Documentation

    + +

    ◆ MINGFX_DATA_DIR_BUILD

    + +
    +
    + + + + +
    #define MINGFX_DATA_DIR_BUILD   "Y:/courses/4611/instructor-repo/dev/MinGfx/data"
    +
    + +

    Definition at line 20 of file mingfx_config.h.

    + +
    +
    + +

    ◆ MINGFX_DATA_DIR_INSTALL

    + +
    +
    + + + + +
    #define MINGFX_DATA_DIR_INSTALL   "C:/csci-4611/share/MinGfx-1.0/data"
    +
    + +

    Definition at line 21 of file mingfx_config.h.

    + +
    +
    + +

    ◆ MINGFX_SHADERS_DIR_BUILD

    + +
    +
    + + + + +
    #define MINGFX_SHADERS_DIR_BUILD   "Y:/courses/4611/instructor-repo/dev/MinGfx/src/shaders"
    +
    + +

    Definition at line 23 of file mingfx_config.h.

    + +
    +
    + +

    ◆ MINGFX_SHADERS_DIR_INSTALL

    + +
    +
    + + + + +
    #define MINGFX_SHADERS_DIR_INSTALL   "C:/csci-4611/share/MinGfx-1.0/shaders"
    +
    + +

    Definition at line 24 of file mingfx_config.h.

    + +
    +
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/mingfx__config_8h_source.html b/dev/MinGfx/docs/html/mingfx__config_8h_source.html new file mode 100644 index 0000000..89c0719 --- /dev/null +++ b/dev/MinGfx/docs/html/mingfx__config_8h_source.html @@ -0,0 +1,116 @@ + + + + + + + +MinGfx Toolkit: src/mingfx_config.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    mingfx_config.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 // The file config.h.in is processed by cmake to produce config.h. This
    +
    15 // replaces strings of the form "at"CMAKE_VARIABLE_NAME"at" with the value
    +
    16 // of the corresponding cmake variable, allowing us to pass directory paths
    +
    17 // and other information configured with cmake into our C++ code.
    +
    18 
    +
    19 
    +
    20 #define MINGFX_DATA_DIR_BUILD "Y:/courses/4611/instructor-repo/dev/MinGfx/data"
    +
    21 #define MINGFX_DATA_DIR_INSTALL "C:/csci-4611/share/MinGfx-1.0/data"
    +
    22 
    +
    23 #define MINGFX_SHADERS_DIR_BUILD "Y:/courses/4611/instructor-repo/dev/MinGfx/src/shaders"
    +
    24 #define MINGFX_SHADERS_DIR_INSTALL "C:/csci-4611/share/MinGfx-1.0/shaders"
    +
    25 
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/namespacemembers.html b/dev/MinGfx/docs/html/namespacemembers.html new file mode 100644 index 0000000..41b6ce2 --- /dev/null +++ b/dev/MinGfx/docs/html/namespacemembers.html @@ -0,0 +1,105 @@ + + + + + + + +MinGfx Toolkit: Namespace Members + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    Here is a list of all namespace members with links to the namespace documentation for each member:
    + +

    - o -

    +
    + + + + + diff --git a/dev/MinGfx/docs/html/namespacemembers_func.html b/dev/MinGfx/docs/html/namespacemembers_func.html new file mode 100644 index 0000000..bca38e1 --- /dev/null +++ b/dev/MinGfx/docs/html/namespacemembers_func.html @@ -0,0 +1,105 @@ + + + + + + + +MinGfx Toolkit: Namespace Members + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +  + +

    - o -

    +
    + + + + + diff --git a/dev/MinGfx/docs/html/namespacemingfx.html b/dev/MinGfx/docs/html/namespacemingfx.html new file mode 100644 index 0000000..2861601 --- /dev/null +++ b/dev/MinGfx/docs/html/namespacemingfx.html @@ -0,0 +1,1710 @@ + + + + + + + +MinGfx Toolkit: mingfx Namespace Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    mingfx Namespace Reference
    +
    +
    +

    Detailed Description

    +

    Namespace for the MinGfx Toolkit.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Classes

    class  AABB
     A 3D axis-aligned bounding box defined by two corners (min and max). More...
     
    class  BVH
     A Bounding Volume Hierarchy (BVH) data structure that can be used to accelerate ray-object intersection tests by carving up space into a hierarchy of partitions represented in a tree. More...
     
    class  Color
     Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with OpenGL. More...
     
    class  CraftCam
     This implements a user interface for controlling the camera with the mouse. More...
     
    class  DefaultShader
     A simple GLSL shader for textured per-fragment Phong shading with multiple light sources. More...
     
    class  GfxMath
     This class holds a variety of static math functions that are useful to have defined with creating graphics programs. More...
     
    class  GraphicsApp
     This is the main application base class for the MinGfx Toolkit. More...
     
    class  Matrix4
     A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be compatible with OpenGL. More...
     
    class  Mesh
     A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader. More...
     
    class  Platform
     Provides access to the underlying file system and other platform-specific routines. More...
     
    class  Point2
     A 2D Point with floating point coordinates, used for storing 2D texture coordinates, screen-space graphics, and mouse input. More...
     
    class  Point3
     A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graphics operations. More...
     
    class  Quaternion
     A quaternion to represent rotations in 3D space. More...
     
    class  QuickShapes
     This class provides a quick way to draw shapes for use in debugging or simple scenes. More...
     
    class  Ray
     Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a direction (a unit 3D vector). More...
     
    class  ShaderProgram
     A wrapper around GLSL shader programs. More...
     
    class  TextShader
     
    class  Texture2D
     A wrapper around a 2D texture that supports loading images from files or setting texture color data directly. More...
     
    class  UniCam
     This implements a user interface for controlling the camera with the mouse. More...
     
    class  Vector2
     A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements, and screen-space vectors. More...
     
    class  Vector3
     A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graphics operations. More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    AABB operator+ (const AABB &A, const AABB &B)
     
    std::ostream & operator<< (std::ostream &os, const Color &c)
     
    std::istream & operator>> (std::istream &is, Color &c)
     
    Matrix4 operator* (const Matrix4 &m, const float &s)
     Multiply matrix and scalar, returns the new matrix. More...
     
    Matrix4 operator* (const float &s, const Matrix4 &m)
     Multiply matrix and scalar, returns the new matrix. More...
     
    Point3 operator* (const Matrix4 &m, const Point3 &p)
     Multiply matrix and point, returns the new point. More...
     
    Vector3 operator* (const Matrix4 &m, const Vector3 &v)
     Multiply matrix and vector, returns the new vector. More...
     
    Matrix4 operator* (const Matrix4 &m1, const Matrix4 &m2)
     Multiply two matrices, returns the result. More...
     
    Ray operator* (const Matrix4 &m, const Ray &r)
     Multiply matrix and the point and vector portions of the ray, returns the new ray. More...
     
    std::ostream & operator<< (std::ostream &os, const Matrix4 &m)
     
    std::istream & operator>> (std::istream &is, Matrix4 &m)
     
    std::ostream & operator<< (std::ostream &os, const Point2 &p)
     
    std::istream & operator>> (std::istream &is, Point2 &p)
     
    std::ostream & operator<< (std::ostream &os, const Point3 &p)
     
    std::istream & operator>> (std::istream &is, Point3 &p)
     
    Quaternion operator* (const Quaternion &q1, const Quaternion &q2)
     
    Quaternion operator/ (const Quaternion &q, const float s)
     
    Quaternion operator* (const float s, const Quaternion &q)
     
    Quaternion operator* (const Quaternion &q, const float s)
     
    Quaternion operator- (const Quaternion &q)
     
    Quaternion operator+ (const Quaternion &q1, const Quaternion &q2)
     
    Quaternion operator- (const Quaternion &q1, const Quaternion &q2)
     
    std::ostream & operator<< (std::ostream &os, const Quaternion &q)
     
    std::istream & operator>> (std::istream &is, Quaternion &q)
     
    std::ostream & operator<< (std::ostream &os, const Ray &r)
     
    std::istream & operator>> (std::istream &is, Ray &r)
     
    Vector2 operator/ (const Vector2 &v, const float s)
     Divide the vector by the scalar s. More...
     
    Vector2 operator* (const float s, const Vector2 &v)
     Multiply the vector by the scalar s. More...
     
    Vector2 operator* (const Vector2 &v, const float s)
     Multiply the vector by the scalar s. More...
     
    Vector2 operator- (const Vector2 &v)
     Negate the vector. More...
     
    Point2 operator+ (const Vector2 &v, const Point2 &p)
     Adds a vector and a point, returns a point. More...
     
    Point2 operator+ (const Point2 &p, const Vector2 &v)
     Adds a point and a vector, returns a point. More...
     
    Vector2 operator+ (const Vector2 &v1, const Vector2 &v2)
     Adds a vector and a vector, returns a vector. More...
     
    Point2 operator- (const Point2 &p, const Vector2 &v)
     Subtracts a vector from a point, returns a point. More...
     
    Vector2 operator- (const Vector2 &v1, const Vector2 &v2)
     Subtracts v2 from v1, returns a vector. More...
     
    Vector2 operator- (const Point2 &p1, const Point2 &p2)
     Returns the vector spanning p1 and p2. More...
     
    std::ostream & operator<< (std::ostream &os, const Vector2 &v)
     
    std::istream & operator>> (std::istream &is, Vector2 &v)
     
    Vector3 operator/ (const Vector3 &v, const float s)
     Divide the vector by the scalar s. More...
     
    Vector3 operator* (const float s, const Vector3 &v)
     Multiply the vector by the scalar s. More...
     
    Vector3 operator* (const Vector3 &v, const float s)
     Multiply the vector by the scalar s. More...
     
    Vector3 operator- (const Vector3 &v)
     Negate the vector. More...
     
    Point3 operator+ (const Vector3 &v, const Point3 &p)
     Adds a vector and a point, returns a point. More...
     
    Point3 operator+ (const Point3 &p, const Vector3 &v)
     Adds a point and a vector, returns a point. More...
     
    Vector3 operator+ (const Vector3 &v1, const Vector3 &v2)
     Adds a vector and a vector, returns a vector. More...
     
    Point3 operator- (const Point3 &p, const Vector3 &v)
     Subtracts a vector from a point, returns a point. More...
     
    Vector3 operator- (const Vector3 &v1, const Vector3 &v2)
     Subtracts v2 from v1, returns a vector. More...
     
    Vector3 operator- (const Point3 &p1, const Point3 &p2)
     Returns the vector spanning p1 and p2. More...
     
    std::ostream & operator<< (std::ostream &os, const Vector3 &v)
     
    std::istream & operator>> (std::istream &is, Vector3 &v)
     
    +

    Function Documentation

    + +

    ◆ operator*() [1/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Matrix4 mingfx::operator* (const float & s,
    const Matrix4m 
    )
    +
    + +

    Multiply matrix and scalar, returns the new matrix.

    + +
    +
    + +

    ◆ operator*() [2/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator* (const float s,
    const Quaternionq 
    )
    +
    + +
    +
    + +

    ◆ operator*() [3/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator* (const float s,
    const Vector2v 
    )
    +
    + +

    Multiply the vector by the scalar s.

    + +
    +
    + +

    ◆ operator*() [4/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator* (const float s,
    const Vector3v 
    )
    +
    + +

    Multiply the vector by the scalar s.

    + +
    +
    + +

    ◆ operator*() [5/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Matrix4 mingfx::operator* (const Matrix4m,
    const float & s 
    )
    +
    + +

    Multiply matrix and scalar, returns the new matrix.

    + +
    +
    + +

    ◆ operator*() [6/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point3 mingfx::operator* (const Matrix4m,
    const Point3p 
    )
    +
    + +

    Multiply matrix and point, returns the new point.

    + +
    +
    + +

    ◆ operator*() [7/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Ray mingfx::operator* (const Matrix4m,
    const Rayr 
    )
    +
    + +

    Multiply matrix and the point and vector portions of the ray, returns the new ray.

    + +
    +
    + +

    ◆ operator*() [8/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator* (const Matrix4m,
    const Vector3v 
    )
    +
    + +

    Multiply matrix and vector, returns the new vector.

    + +
    +
    + +

    ◆ operator*() [9/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Matrix4 mingfx::operator* (const Matrix4m1,
    const Matrix4m2 
    )
    +
    + +

    Multiply two matrices, returns the result.

    + +
    +
    + +

    ◆ operator*() [10/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator* (const Quaternionq,
    const float s 
    )
    +
    + +
    +
    + +

    ◆ operator*() [11/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator* (const Quaternionq1,
    const Quaternionq2 
    )
    +
    + +
    +
    + +

    ◆ operator*() [12/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator* (const Vector2v,
    const float s 
    )
    +
    + +

    Multiply the vector by the scalar s.

    + +
    +
    + +

    ◆ operator*() [13/13]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator* (const Vector3v,
    const float s 
    )
    +
    + +

    Multiply the vector by the scalar s.

    + +
    +
    + +

    ◆ operator+() [1/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    AABB mingfx::operator+ (const AABBA,
    const AABBB 
    )
    +
    + +
    +
    + +

    ◆ operator+() [2/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point2 mingfx::operator+ (const Point2p,
    const Vector2v 
    )
    +
    + +

    Adds a point and a vector, returns a point.

    + +
    +
    + +

    ◆ operator+() [3/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point3 mingfx::operator+ (const Point3p,
    const Vector3v 
    )
    +
    + +

    Adds a point and a vector, returns a point.

    + +
    +
    + +

    ◆ operator+() [4/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator+ (const Quaternionq1,
    const Quaternionq2 
    )
    +
    + +
    +
    + +

    ◆ operator+() [5/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point2 mingfx::operator+ (const Vector2v,
    const Point2p 
    )
    +
    + +

    Adds a vector and a point, returns a point.

    + +
    +
    + +

    ◆ operator+() [6/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator+ (const Vector2v1,
    const Vector2v2 
    )
    +
    + +

    Adds a vector and a vector, returns a vector.

    + +
    +
    + +

    ◆ operator+() [7/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point3 mingfx::operator+ (const Vector3v,
    const Point3p 
    )
    +
    + +

    Adds a vector and a point, returns a point.

    + +
    +
    + +

    ◆ operator+() [8/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator+ (const Vector3v1,
    const Vector3v2 
    )
    +
    + +

    Adds a vector and a vector, returns a vector.

    + +
    +
    + +

    ◆ operator-() [1/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point2 mingfx::operator- (const Point2p,
    const Vector2v 
    )
    +
    + +

    Subtracts a vector from a point, returns a point.

    + +
    +
    + +

    ◆ operator-() [2/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator- (const Point2p1,
    const Point2p2 
    )
    +
    + +

    Returns the vector spanning p1 and p2.

    + +
    +
    + +

    ◆ operator-() [3/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Point3 mingfx::operator- (const Point3p,
    const Vector3v 
    )
    +
    + +

    Subtracts a vector from a point, returns a point.

    + +
    +
    + +

    ◆ operator-() [4/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator- (const Point3p1,
    const Point3p2 
    )
    +
    + +

    Returns the vector spanning p1 and p2.

    + +
    +
    + +

    ◆ operator-() [5/10]

    + +
    +
    + + + + + + + + +
    Quaternion mingfx::operator- (const Quaternionq)
    +
    + +
    +
    + +

    ◆ operator-() [6/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator- (const Quaternionq1,
    const Quaternionq2 
    )
    +
    + +
    +
    + +

    ◆ operator-() [7/10]

    + +
    +
    + + + + + + + + +
    Vector2 mingfx::operator- (const Vector2v)
    +
    + +

    Negate the vector.

    + +
    +
    + +

    ◆ operator-() [8/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator- (const Vector2v1,
    const Vector2v2 
    )
    +
    + +

    Subtracts v2 from v1, returns a vector.

    + +
    +
    + +

    ◆ operator-() [9/10]

    + +
    +
    + + + + + + + + +
    Vector3 mingfx::operator- (const Vector3v)
    +
    + +

    Negate the vector.

    + +
    +
    + +

    ◆ operator-() [10/10]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator- (const Vector3v1,
    const Vector3v2 
    )
    +
    + +

    Subtracts v2 from v1, returns a vector.

    + +
    +
    + +

    ◆ operator/() [1/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Quaternion mingfx::operator/ (const Quaternionq,
    const float s 
    )
    +
    + +
    +
    + +

    ◆ operator/() [2/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector2 mingfx::operator/ (const Vector2v,
    const float s 
    )
    +
    + +

    Divide the vector by the scalar s.

    + +
    +
    + +

    ◆ operator/() [3/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Vector3 mingfx::operator/ (const Vector3v,
    const float s 
    )
    +
    + +

    Divide the vector by the scalar s.

    + +
    +
    + +

    ◆ operator<<() [1/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Colorc 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [2/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Matrix4m 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [3/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Point2p 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [4/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Point3p 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [5/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Quaternionq 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [6/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Rayr 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [7/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Vector2v 
    )
    +
    + +
    +
    + +

    ◆ operator<<() [8/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::ostream& mingfx::operator<< (std::ostream & os,
    const Vector3v 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [1/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Colorc 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [2/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Matrix4m 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [3/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Point2p 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [4/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Point3p 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [5/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Quaternionq 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [6/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Rayr 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [7/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Vector2v 
    )
    +
    + +
    +
    + +

    ◆ operator>>() [8/8]

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    std::istream& mingfx::operator>> (std::istream & is,
    Vector3v 
    )
    +
    + +
    +
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/nav_f.png b/dev/MinGfx/docs/html/nav_f.png new file mode 100644 index 0000000..5a578e8 Binary files /dev/null and b/dev/MinGfx/docs/html/nav_f.png differ diff --git a/dev/MinGfx/docs/html/nav_g.png b/dev/MinGfx/docs/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/dev/MinGfx/docs/html/nav_g.png differ diff --git a/dev/MinGfx/docs/html/nav_h.png b/dev/MinGfx/docs/html/nav_h.png new file mode 100644 index 0000000..818e77a Binary files /dev/null and b/dev/MinGfx/docs/html/nav_h.png differ diff --git a/dev/MinGfx/docs/html/open.png b/dev/MinGfx/docs/html/open.png new file mode 100644 index 0000000..fd4dbc6 Binary files /dev/null and b/dev/MinGfx/docs/html/open.png differ diff --git a/dev/MinGfx/docs/html/opengl__headers_8h.html b/dev/MinGfx/docs/html/opengl__headers_8h.html new file mode 100644 index 0000000..2b685da --- /dev/null +++ b/dev/MinGfx/docs/html/opengl__headers_8h.html @@ -0,0 +1,94 @@ + + + + + + + +MinGfx Toolkit: src/opengl_headers.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    opengl_headers.h File Reference
    +
    +
    +
    #include <nanogui/opengl.h>
    +
    +

    Go to the source code of this file.

    +
    + + + + + diff --git a/dev/MinGfx/docs/html/opengl__headers_8h_source.html b/dev/MinGfx/docs/html/opengl__headers_8h_source.html new file mode 100644 index 0000000..2a3ce01 --- /dev/null +++ b/dev/MinGfx/docs/html/opengl__headers_8h_source.html @@ -0,0 +1,139 @@ + + + + + + + +MinGfx Toolkit: src/opengl_headers.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    opengl_headers.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 // We often use the code that is commented out below to load opengl headers in a cross-platform way,
    +
    15 // but since nanogui uses glad internally, we will just use their approach to load opengl headers
    +
    16 // so that everything is consistent.
    +
    17 
    +
    18 // disable warnings for this 3rd party code
    +
    19 #pragma warning ( push, 0 )
    +
    20 #include <nanogui/opengl.h>
    +
    21 #pragma warning ( pop )
    +
    22 
    +
    23 
    +
    24 /*** Our typical (non-nanogui) appraoch:
    +
    25 
    +
    26 // GLEW is needed on Windows and Linux
    +
    27 #ifdef _WIN32
    +
    28 #include "GL/glew.h"
    +
    29 #include "GL/wglew.h"
    +
    30 #elif (!defined(__APPLE__))
    +
    31 #include "GL/glxew.h"
    +
    32 #endif
    +
    33 
    +
    34 // OpenGL Headers
    +
    35 #if defined(WIN32)
    +
    36 #define NOMINMAX
    +
    37 #include <windows.h>
    +
    38 #include <GL/gl.h>
    +
    39 #elif defined(__APPLE__)
    +
    40 #define GL_GLEXT_PROTOTYPES
    +
    41 #include <OpenGL/gl3.h>
    +
    42 #include <OpenGL/glext.h>
    +
    43 #else
    +
    44 #define GL_GLEXT_PROTOTYPES
    +
    45 #include <GL/gl.h>
    +
    46 #endif
    +
    47 
    +
    48 ***/
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/pages.html b/dev/MinGfx/docs/html/pages.html new file mode 100644 index 0000000..3605d7e --- /dev/null +++ b/dev/MinGfx/docs/html/pages.html @@ -0,0 +1,93 @@ + + + + + + + +MinGfx Toolkit: Related Pages + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Related Pages
    +
    +
    +
    Here is a list of all related documentation pages:
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/platform_8h.html b/dev/MinGfx/docs/html/platform_8h.html new file mode 100644 index 0000000..558b399 --- /dev/null +++ b/dev/MinGfx/docs/html/platform_8h.html @@ -0,0 +1,111 @@ + + + + + + + +MinGfx Toolkit: src/platform.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    platform.h File Reference
    +
    +
    +
    #include <string>
    +#include <vector>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Platform
     Provides access to the underlying file system and other platform-specific routines. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/platform_8h_source.html b/dev/MinGfx/docs/html/platform_8h_source.html new file mode 100644 index 0000000..ec35140 --- /dev/null +++ b/dev/MinGfx/docs/html/platform_8h_source.html @@ -0,0 +1,161 @@ + + + + + + + +MinGfx Toolkit: src/platform.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    platform.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_PLATFORM_H_
    +
    15 #define SRC_PLATFORM_H_
    +
    16 
    +
    17 #include <string>
    +
    18 #include <vector>
    +
    19 
    +
    20 namespace mingfx {
    +
    21 
    +
    22 
    +
    26 class Platform {
    +
    27 public:
    +
    28 
    +
    30  static bool FileExists(const std::string &filename);
    +
    31 
    +
    32  /* Looks for a file named basename in each of the paths specified. If found,
    +
    33  the full path to the file is returned. If not found, then basename is returned.
    +
    34  Example:
    +
    35  ~~~
    +
    36  std::vector<std::string> search_path;
    +
    37  search_path.push_back(".");
    +
    38  search_path.push_back("./data");
    +
    39  search_path.push_back("./shaders");
    +
    40  search_path.push_back("/usr/local/share/blah/blah/data");
    +
    41 
    +
    42  std::string file = Platform::findFile("mydata.csv", search_path);
    +
    43  ~~~
    +
    44  */
    +
    45  static std::string FindFile(const std::string &basename, const std::vector<std::string> &searchpath);
    +
    46 
    +
    47  /* Looks for a file named basename in each of the paths specified in a semi-colon
    +
    48  separated list. If found, the full path to the file is returned. If not found,
    +
    49  then basename is returned. Example:
    +
    50  ~~~
    +
    51  std::string search_path = ".;./data;./shaders;/usr/local/share/blah/blah/data";
    +
    52  std::string file = Platform::findFile("mydata.csv", search_path);
    +
    53  ~~~
    +
    54  */
    +
    55  static std::string FindFile(const std::string &basename, const std::string &searchpath);
    +
    56 
    +
    65  static std::string FindMinGfxDataFile(const std::string &basename);
    +
    66 
    +
    75  static std::string FindMinGfxShaderFile(const std::string &basename);
    +
    76 
    +
    77 private:
    +
    78 };
    +
    79 
    +
    80 
    +
    81 } // end namespace
    +
    82 
    +
    83 #endif
    +
    Provides access to the underlying file system and other platform-specific routines.
    Definition: platform.h:26
    +
    static std::string FindFile(const std::string &basename, const std::string &searchpath)
    +
    static bool FileExists(const std::string &filename)
    True if filename is found and can be opened for reading on the system.
    +
    static std::string FindMinGfxDataFile(const std::string &basename)
    Searches for a data file that ships with MinGfx.
    +
    static std::string FindFile(const std::string &basename, const std::vector< std::string > &searchpath)
    +
    static std::string FindMinGfxShaderFile(const std::string &basename)
    Searches for a shader file that ships with MinGfx.
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/point2_8h.html b/dev/MinGfx/docs/html/point2_8h.html new file mode 100644 index 0000000..3b2bedf --- /dev/null +++ b/dev/MinGfx/docs/html/point2_8h.html @@ -0,0 +1,144 @@ + + + + + + + +MinGfx Toolkit: src/point2.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    point2.h File Reference
    +
    +
    +
    #include <iostream>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Point2
     A 2D Point with floating point coordinates, used for storing 2D texture coordinates, screen-space graphics, and mouse input. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + +

    +Macros

    #define MINGFX_MATH_EPSILON   1e-8
     Epsilon value used for == and != comparisons within MinGfx. More...
     
    + + + + + +

    +Functions

    std::ostream & mingfx::operator<< (std::ostream &os, const Point2 &p)
     
    std::istream & mingfx::operator>> (std::istream &is, Point2 &p)
     
    +

    Macro Definition Documentation

    + +

    ◆ MINGFX_MATH_EPSILON

    + +
    +
    + + + + +
    #define MINGFX_MATH_EPSILON   1e-8
    +
    + +

    Epsilon value used for == and != comparisons within MinGfx.

    + +

    Definition at line 22 of file point2.h.

    + +
    +
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/point2_8h_source.html b/dev/MinGfx/docs/html/point2_8h_source.html new file mode 100644 index 0000000..c2b55b1 --- /dev/null +++ b/dev/MinGfx/docs/html/point2_8h_source.html @@ -0,0 +1,191 @@ + + + + + + + +MinGfx Toolkit: src/point2.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    point2.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_POINT2_H_
    +
    15 #define SRC_POINT2_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 
    +
    19 namespace mingfx {
    +
    20 
    +
    22 #define MINGFX_MATH_EPSILON 1e-8
    +
    23 
    +
    24 
    +
    28 class Point2 {
    +
    29 public:
    +
    31  Point2();
    +
    32 
    +
    35  Point2(float x, float y);
    +
    36 
    +
    38  Point2(float *p);
    +
    39 
    +
    41  Point2(const Point2& p);
    +
    42 
    +
    44  virtual ~Point2();
    +
    45 
    +
    47  bool operator==(const Point2& p) const;
    +
    48 
    +
    50  bool operator!=(const Point2& p) const;
    +
    51 
    +
    53  Point2& operator=(const Point2& p);
    +
    54 
    +
    56  float operator[](const int i) const;
    +
    57 
    +
    65  float& operator[](const int i);
    +
    66 
    +
    69  float x() const { return p[0]; }
    +
    70 
    +
    73  float y() const { return p[1]; }
    +
    74 
    +
    76  float w() const { return 1.0; }
    +
    77 
    +
    78 
    +
    80  const float * value_ptr() const;
    +
    81 
    +
    85  Point2 Lerp(const Point2 &b, float alpha) const;
    +
    86 
    +
    87 
    +
    89  static const Point2& Origin();
    +
    90 
    +
    92  static const Point2& Zero();
    +
    93 
    +
    95  static const Point2& One();
    +
    96 
    +
    99  static Point2 Lerp(const Point2 &a, const Point2 &b, float alpha);
    +
    100 
    +
    101 private:
    +
    102  float p[2];
    +
    103 };
    +
    104 
    +
    105 
    +
    106 std::ostream & operator<< ( std::ostream &os, const Point2 &p);
    +
    107 std::istream & operator>> ( std::istream &is, Point2 &p);
    +
    108 
    +
    109 
    +
    110 } // namespace
    +
    111 
    +
    112 #endif
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    const float * value_ptr() const
    Returns a const pointer to the raw data array.
    +
    static const Point2 & Origin()
    (0,0) - a shortcut for a special point that is frequently needed
    +
    Point2()
    Default point at the origin.
    +
    static const Point2 & One()
    (1,1) - a shortcut for a special point that is frequently needed
    +
    Point2(float *p)
    Constructs a point given a pointer to x,y data.
    +
    float y() const
    Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1....
    Definition: point2.h:73
    +
    float & operator[](const int i)
    Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coor...
    +
    bool operator!=(const Point2 &p) const
    Check for "inequality", taking floating point imprecision into account.
    +
    static const Point2 & Zero()
    (0,0) - a shortcut for a special point that is frequently needed
    +
    static Point2 Lerp(const Point2 &a, const Point2 &b, float alpha)
    Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b',...
    +
    Point2(float x, float y)
    Constructs a point given (x,y,1), where the 1 comes from the use of homogeneous coordinates in comput...
    +
    virtual ~Point2()
    Point destructor.
    +
    Point2 Lerp(const Point2 &b, float alpha) const
    Linear interpolation between this point and another. Alpha=0.0 returns this point,...
    +
    float x() const
    Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1....
    Definition: point2.h:69
    +
    Point2(const Point2 &p)
    Copy constructor for point.
    +
    float w() const
    In homogeneous coordinates, the w coordinate for all points is 1.0.
    Definition: point2.h:76
    +
    bool operator==(const Point2 &p) const
    Check for "equality", taking floating point imprecision into account.
    +
    float operator[](const int i) const
    Read only access to the ith coordinate of the point.
    +
    Point2 & operator=(const Point2 &p)
    Assignment operator.
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/point3_8h.html b/dev/MinGfx/docs/html/point3_8h.html new file mode 100644 index 0000000..07f7dc7 --- /dev/null +++ b/dev/MinGfx/docs/html/point3_8h.html @@ -0,0 +1,145 @@ + + + + + + + +MinGfx Toolkit: src/point3.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    point3.h File Reference
    +
    +
    +
    #include <iostream>
    +#include <vector>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Point3
     A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graphics operations. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + +

    +Macros

    #define MINGFX_MATH_EPSILON   1e-8
     Epsilon value used for == and != comparisons within MinGfx. More...
     
    + + + + + +

    +Functions

    std::ostream & mingfx::operator<< (std::ostream &os, const Point3 &p)
     
    std::istream & mingfx::operator>> (std::istream &is, Point3 &p)
     
    +

    Macro Definition Documentation

    + +

    ◆ MINGFX_MATH_EPSILON

    + +
    +
    + + + + +
    #define MINGFX_MATH_EPSILON   1e-8
    +
    + +

    Epsilon value used for == and != comparisons within MinGfx.

    + +

    Definition at line 23 of file point3.h.

    + +
    +
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/point3_8h_source.html b/dev/MinGfx/docs/html/point3_8h_source.html new file mode 100644 index 0000000..8c1ad76 --- /dev/null +++ b/dev/MinGfx/docs/html/point3_8h_source.html @@ -0,0 +1,211 @@ + + + + + + + +MinGfx Toolkit: src/point3.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    point3.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_POINT3_H_
    +
    15 #define SRC_POINT3_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 #include <vector>
    +
    19 
    +
    20 namespace mingfx {
    +
    21 
    +
    23 #define MINGFX_MATH_EPSILON 1e-8
    +
    24 
    +
    25 // forward declaration
    +
    26 class Vector3;
    +
    27 
    +
    28 
    +
    52 class Point3 {
    +
    53 public:
    +
    55  Point3();
    +
    56 
    +
    59  Point3(float x, float y, float z);
    +
    60 
    +
    62  Point3(float *p);
    +
    63 
    +
    65  Point3(const Point3& p);
    +
    66 
    +
    68  virtual ~Point3();
    +
    69 
    +
    71  bool operator==(const Point3& p) const;
    +
    72 
    +
    74  bool operator!=(const Point3& p) const;
    +
    75 
    +
    77  Point3& operator=(const Point3& p);
    +
    78 
    +
    80  float operator[](const int i) const;
    +
    81 
    +
    89  float& operator[](const int i);
    +
    90 
    +
    93  float x() const { return p[0]; }
    +
    94 
    +
    97  float y() const { return p[1]; }
    +
    98 
    +
    101  float z() const { return p[2]; }
    +
    102 
    +
    104  float w() const { return 1.0; }
    +
    105 
    +
    107  const float * value_ptr() const;
    +
    108 
    +
    109 
    +
    113  Point3 Lerp(const Point3 &b, float alpha) const;
    +
    114 
    +
    117  float DistanceToPlane(const Point3 &plane_origin, const Vector3 &plane_normal);
    +
    118 
    +
    121  Point3 ClosestPointOnPlane(const Point3 &plane_origin, const Vector3 &plane_normal);
    +
    122 
    +
    124  Point3 ClosestPoint(const std::vector<Point3> &point_list);
    +
    125 
    +
    126 
    +
    127 
    +
    129  static const Point3& Origin();
    +
    130 
    +
    132  static const Point3& Zero();
    +
    133 
    +
    135  static const Point3& One();
    +
    136 
    +
    139  static Point3 Lerp(const Point3 &a, const Point3 &b, float alpha);
    +
    140 
    +
    141 
    +
    142 
    +
    143 private:
    +
    144  float p[3];
    +
    145 };
    +
    146 
    +
    147 
    +
    148 std::ostream & operator<< ( std::ostream &os, const Point3 &p);
    +
    149 std::istream & operator>> ( std::istream &is, Point3 &p);
    +
    150 
    +
    151 
    +
    152 } // namespace
    +
    153 
    +
    154 #endif
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    Point3(float *p)
    Constructs a point given a pointer to x,y,z data.
    +
    float y() const
    Read only access to the y coordinate. Can also use my_point[1]. Use the my_point[1] = 1....
    Definition: point3.h:97
    +
    static Point3 Lerp(const Point3 &a, const Point3 &b, float alpha)
    Linear interpolation between two points. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b',...
    +
    Point3 Lerp(const Point3 &b, float alpha) const
    Linear interpolation between this point and another. Alpha=0.0 returns this point,...
    +
    Point3(const Point3 &p)
    Copy constructor for point.
    +
    Point3(float x, float y, float z)
    Constructs a point given (x,y,z,1), where the 1 comes from the use of homogeneous coordinates in comp...
    +
    static const Point3 & One()
    (1,1,1) - a shortcut for a special point that is frequently needed
    +
    float operator[](const int i) const
    Read only access to the ith coordinate of the point.
    +
    float & operator[](const int i)
    Returns a reference to the ith coordinate of the point. Use this accessor if you wish to set the coor...
    +
    Point3 & operator=(const Point3 &p)
    Assignment operator.
    +
    static const Point3 & Zero()
    (0,0,0) - a shortcut for a special point that is frequently needed
    +
    Point3 ClosestPoint(const std::vector< Point3 > &point_list)
    Given a list of points, returns the closest in the last to the current point.
    +
    virtual ~Point3()
    Point destructor.
    +
    bool operator==(const Point3 &p) const
    Check for "equality", taking floating point imprecision into account.
    +
    float w() const
    In homogeneous coordinates, the w coordinate for all points is 1.0.
    Definition: point3.h:104
    +
    float x() const
    Read only access to the x coordinate. Can also use my_point[0]. Use the my_point[0] = 1....
    Definition: point3.h:93
    +
    float z() const
    Read only access to the z coordinate. Can also use my_point[2]. Use the my_point[2] = 1....
    Definition: point3.h:101
    +
    bool operator!=(const Point3 &p) const
    Check for "inequality", taking floating point imprecision into account.
    +
    Point3 ClosestPointOnPlane(const Point3 &plane_origin, const Vector3 &plane_normal)
    Returns the perpendicular projection of this point onto a plane defined by a point and a normal.
    +
    Point3()
    Default point at the origin.
    +
    static const Point3 & Origin()
    (0,0,0) - a shortcut for a special point that is frequently needed
    +
    const float * value_ptr() const
    Returns a const pointer to the raw data array.
    +
    float DistanceToPlane(const Point3 &plane_origin, const Vector3 &plane_normal)
    Returns the shortest (i.e., perpendicular) distance from this point to a plane defined by a point and...
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/quaternion_8h.html b/dev/MinGfx/docs/html/quaternion_8h.html new file mode 100644 index 0000000..eb5fc9f --- /dev/null +++ b/dev/MinGfx/docs/html/quaternion_8h.html @@ -0,0 +1,133 @@ + + + + + + + +MinGfx Toolkit: src/quaternion.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    quaternion.h File Reference
    +
    +
    +
    #include <iostream>
    +#include "vector3.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Quaternion
     A quaternion to represent rotations in 3D space. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + + + + + + + + + + + + + + + + +

    +Functions

    Quaternion mingfx::operator* (const Quaternion &q1, const Quaternion &q2)
     
    Quaternion mingfx::operator/ (const Quaternion &q, const float s)
     
    Quaternion mingfx::operator* (const float s, const Quaternion &q)
     
    Quaternion mingfx::operator* (const Quaternion &q, const float s)
     
    Quaternion mingfx::operator- (const Quaternion &q)
     
    Quaternion mingfx::operator+ (const Quaternion &q1, const Quaternion &q2)
     
    Quaternion mingfx::operator- (const Quaternion &q1, const Quaternion &q2)
     
    std::ostream & mingfx::operator<< (std::ostream &os, const Quaternion &q)
     
    std::istream & mingfx::operator>> (std::istream &is, Quaternion &q)
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/quaternion_8h_source.html b/dev/MinGfx/docs/html/quaternion_8h_source.html new file mode 100644 index 0000000..78bd632 --- /dev/null +++ b/dev/MinGfx/docs/html/quaternion_8h_source.html @@ -0,0 +1,222 @@ + + + + + + + +MinGfx Toolkit: src/quaternion.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    quaternion.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_QUATERNION_H_
    +
    15 #define SRC_QUATERNION_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 
    +
    19 #include "vector3.h"
    +
    20 
    +
    21 namespace mingfx {
    +
    22 
    +
    41 class Quaternion {
    +
    42 public:
    + +
    45 
    +
    47  Quaternion(float qx, float qy, float qz, float qw);
    +
    48 
    +
    51  Quaternion(float *ptr);
    +
    52 
    +
    54  Quaternion(const Quaternion& other);
    +
    55 
    +
    56  virtual ~Quaternion();
    +
    57 
    +
    59  bool operator==(const Quaternion& q) const;
    +
    60 
    +
    62  bool operator!=(const Quaternion& q) const;
    +
    63 
    + +
    66 
    +
    68  float operator[](const int i) const;
    +
    69 
    +
    71  float& operator[](const int i);
    +
    72 
    +
    74  float x() const { return q[0]; }
    +
    75 
    +
    77  float y() const { return q[1]; }
    +
    78 
    +
    80  float z() const { return q[2]; }
    +
    81 
    +
    83  float w() const { return q[3]; }
    +
    84 
    +
    86  const float * value_ptr() const;
    +
    87 
    +
    89  float Dot(const Quaternion& q) const;
    +
    90 
    +
    92  float Length() const;
    +
    93 
    +
    95  void Normalize();
    +
    96 
    +
    99  Quaternion ToUnit() const;
    +
    100 
    + +
    103 
    + +
    106 
    +
    109  Quaternion Slerp(const Quaternion &other, float alpha) const;
    +
    110 
    +
    112  // the specified axis.
    +
    113  static Quaternion FromAxisAngle(const Vector3 &axis, float angle);
    +
    114 
    +
    116  static Quaternion FromEulerAnglesZYX(const Vector3 &angles);
    +
    117 
    +
    120  static Quaternion Slerp(const Quaternion &a, const Quaternion &b, float alpha);
    +
    121 
    +
    122 private:
    +
    123  float q[4];
    +
    124 };
    +
    125 
    +
    126 
    + +
    128 Quaternion operator/(const Quaternion& q, const float s);
    +
    129 Quaternion operator*(const float s, const Quaternion& q);
    +
    130 Quaternion operator*(const Quaternion& q, const float s);
    + + + +
    134 
    +
    135 std::ostream & operator<< ( std::ostream &os, const Quaternion &q);
    +
    136 std::istream & operator>> ( std::istream &is, Quaternion &q);
    +
    137 
    +
    138 
    +
    139 } // end namespace
    +
    140 
    +
    141 
    +
    142 #endif
    +
    A quaternion to represent rotations in 3D space.
    Definition: quaternion.h:41
    +
    Quaternion Slerp(const Quaternion &other, float alpha) const
    Uses spherical interpolation to interpoloate between the rotation stored in this quaternion and the r...
    +
    Vector3 ToEulerAnglesZYX() const
    Converts the rotation specified by the quaternion into Euler angles.
    +
    void Normalize()
    Normalizes the quat by making it unit length.
    +
    Quaternion(float *ptr)
    Creates a quate from a pointer to 4 floating point numbers in the order qx, qy, qz,...
    +
    Quaternion(const Quaternion &other)
    Copy constructor.
    +
    virtual ~Quaternion()
    +
    static Quaternion Slerp(const Quaternion &a, const Quaternion &b, float alpha)
    Uses spherical interpolation to interpoloate between the rotations specified by two quaternions.
    +
    Quaternion ToUnit() const
    Returns a normalized (i.e., unit length) version of the quaternion without modifying the original.
    +
    float & operator[](const int i)
    Writable access the ith coordinate of the quaternion (qx, qy, qz, qw).
    +
    float operator[](const int i) const
    Read only access to the ith coordinate of the quaternion (qx, qy, qz, qw).
    +
    static Quaternion FromAxisAngle(const Vector3 &axis, float angle)
    Creates a new quaternion that describes a rotation by angle radians about.
    +
    Quaternion(float qx, float qy, float qz, float qw)
    Creates a quat from the 4 parameters.
    +
    float z() const
    Read only access to the z coordinate of the imaginary part of the quaternion.
    Definition: quaternion.h:80
    +
    float x() const
    Read only access to the x coordinate of the imaginary part of the quaternion.
    Definition: quaternion.h:74
    +
    float w() const
    Read only access to the w, real part, of the quaternion.
    Definition: quaternion.h:83
    +
    float Dot(const Quaternion &q) const
    Returns the dot product of this quaternion with another.
    +
    static Quaternion FromEulerAnglesZYX(const Vector3 &angles)
    Creates a new quaternion from a rotation defined in Euler angles.
    +
    bool operator==(const Quaternion &q) const
    Check for "equality", taking floating point imprecision into account.
    +
    Quaternion Conjugate() const
    Returns the conjugate of the quaternion.
    +
    const float * value_ptr() const
    Returns a const pointer to the raw data array, stored in the order qx, qy, qz, qw.
    +
    Quaternion & operator=(const Quaternion &q)
    Assignment operator.
    +
    Quaternion()
    Creates a quat with the identity rotation.
    +
    bool operator!=(const Quaternion &q) const
    Check for "inequality", taking floating point imprecision into account.
    +
    float y() const
    Read only access to the y coordinate of the imaginary part of the quaternion.
    Definition: quaternion.h:77
    +
    float Length() const
    Returns the length of the quaternion.
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    Quaternion operator-(const Quaternion &q)
    +
    AABB operator+(const AABB &A, const AABB &B)
    +
    Quaternion operator/(const Quaternion &q, const float s)
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    +
    Matrix4 operator*(const Matrix4 &m, const float &s)
    Multiply matrix and scalar, returns the new matrix.
    + +
    + + + + + diff --git a/dev/MinGfx/docs/html/quick__shapes_8h.html b/dev/MinGfx/docs/html/quick__shapes_8h.html new file mode 100644 index 0000000..b6e0870 --- /dev/null +++ b/dev/MinGfx/docs/html/quick__shapes_8h.html @@ -0,0 +1,118 @@ + + + + + + + +MinGfx Toolkit: src/quick_shapes.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    quick_shapes.h File Reference
    +
    +
    +
    #include "color.h"
    +#include "default_shader.h"
    +#include "mesh.h"
    +#include "point3.h"
    +#include "shader_program.h"
    +#include "texture2d.h"
    +#include "vector3.h"
    +#include "matrix4.h"
    +#include <vector>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::QuickShapes
     This class provides a quick way to draw shapes for use in debugging or simple scenes. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/quick__shapes_8h_source.html b/dev/MinGfx/docs/html/quick__shapes_8h_source.html new file mode 100644 index 0000000..1a82221 --- /dev/null +++ b/dev/MinGfx/docs/html/quick__shapes_8h_source.html @@ -0,0 +1,283 @@ + + + + + + + +MinGfx Toolkit: src/quick_shapes.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    quick_shapes.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2017, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_QUICK_SHAPES_H_
    +
    15 #define SRC_QUICK_SHAPES_H_
    +
    16 
    +
    17 #include "color.h"
    +
    18 #include "default_shader.h"
    +
    19 #include "mesh.h"
    +
    20 #include "point3.h"
    +
    21 #include "shader_program.h"
    +
    22 #include "texture2d.h"
    +
    23 #include "vector3.h"
    +
    24 #include "matrix4.h"
    +
    25 
    +
    26 #include <vector>
    +
    27 
    +
    28 
    +
    29 
    +
    30 namespace mingfx {
    +
    31 
    +
    69 class QuickShapes {
    +
    70 public:
    +
    71 
    + +
    73  virtual ~QuickShapes();
    +
    74 
    +
    75 
    +
    76  // -------- 3D PRIMITIVES --------
    +
    77 
    +
    81  void DrawCube(const Matrix4 &modelMatrix,
    +
    82  const Matrix4 &viewMatrix,
    +
    83  const Matrix4 &projectionMatrix,
    +
    84  const Color &color);
    +
    85 
    +
    90  void DrawCylinder(const Matrix4 &modelMatrix,
    +
    91  const Matrix4 &viewMatrix,
    +
    92  const Matrix4 &projectionMatrix,
    +
    93  const Color &color);
    +
    94 
    +
    99  void DrawCone(const Matrix4 &modelMatrix,
    +
    100  const Matrix4 &viewMatrix,
    +
    101  const Matrix4 &projectionMatrix,
    +
    102  const Color &color);
    +
    103 
    +
    107  void DrawSphere(const Matrix4 &modelMatrix,
    +
    108  const Matrix4 &viewMatrix,
    +
    109  const Matrix4 &projectionMatrix,
    +
    110  const Color &color);
    +
    111 
    +
    116  void DrawBrush(const Matrix4 &modelMatrix,
    +
    117  const Matrix4 &viewMatrix,
    +
    118  const Matrix4 &projectionMatrix,
    +
    119  const Color &color);
    +
    120 
    +
    121 
    +
    122  // -------- 3D COMPOSITE SHAPES --------
    +
    123 
    +
    126  void DrawLineSegment(const Matrix4 &modelMatrix,
    +
    127  const Matrix4 &viewMatrix,
    +
    128  const Matrix4 &projectionMatrix,
    +
    129  const Color &color,
    +
    130  const Point3 &p1,
    +
    131  const Point3 &p2,
    +
    132  float radius);
    +
    133 
    +
    134  enum class LinesType {
    +
    135  LINES,
    +
    136  LINE_STRIP,
    +
    137  LINE_LOOP
    +
    138  };
    +
    139 
    +
    156  void DrawLines(const Matrix4 &modelMatrix,
    +
    157  const Matrix4 &viewMatrix,
    +
    158  const Matrix4 &projectionMatrix,
    +
    159  const Color &color,
    +
    160  const std::vector<Point3> &points,
    +
    161  LinesType linesType,
    +
    162  float radius);
    +
    163 
    +
    168  void DrawArrow(const Matrix4 &modelMatrix,
    +
    169  const Matrix4 &viewMatrix,
    +
    170  const Matrix4 &projectionMatrix,
    +
    171  const Color &color,
    +
    172  Point3 p, Vector3 dir, float radius);
    +
    173 
    +
    178  void DrawAxes(const Matrix4 &modelMatrix,
    +
    179  const Matrix4 &viewMatrix,
    +
    180  const Matrix4 &projectionMatrix);
    +
    181 
    +
    182 
    +
    183  // -------- 2D PRIMITIVES --------
    +
    184 
    +
    189  void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix,
    +
    190  const Matrix4 &projectionMatrix, const Color &color);
    +
    191 
    +
    198  void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix,
    +
    199  const Matrix4 &projectionMatrix, const Color &color,
    +
    200  const Texture2D &texture);
    +
    201 
    +
    205  void DrawFullscreenTexture(const Color &color, const Texture2D &texture);
    +
    206 
    +
    207 
    + +
    212 
    + +
    218 
    +
    219 
    +
    220 private:
    +
    221 
    +
    222  void DrawWithFullscreen(const Color &color, Mesh *mesh, const Texture2D &tex);
    +
    223 
    +
    224  Mesh cubeMesh_;
    +
    225  void initCube();
    +
    226 
    +
    227  Mesh squareMesh_;
    +
    228  void initSquare();
    +
    229 
    +
    230  Mesh fullMesh_;
    +
    231  void initFull();
    +
    232 
    +
    233  Mesh cylMesh_;
    +
    234  void initCyl();
    +
    235 
    +
    236  Mesh coneMesh_;
    +
    237  void initCone();
    +
    238 
    +
    239  Mesh sphereMesh_;
    +
    240  void initSph();
    +
    241 
    +
    242  Mesh brushMesh_;
    +
    243  void initBrush();
    +
    244 
    +
    245  DefaultShader defaultShader_;
    +
    246  DefaultShader::MaterialProperties defaultMaterial_;
    +
    247  Texture2D emptyTex_;
    +
    248 
    +
    249  ShaderProgram fullscreenShader_;
    +
    250 };
    +
    251 
    +
    252 } // end namespace
    +
    253 
    +
    254 #endif
    +
    Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
    Definition: color.h:41
    +
    Small data structure to hold properties of the material to be lit.
    +
    A simple GLSL shader for textured per-fragment Phong shading with multiple light sources.
    +
    A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
    Definition: matrix4.h:50
    +
    A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
    Definition: mesh.h:127
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    This class provides a quick way to draw shapes for use in debugging or simple scenes.
    Definition: quick_shapes.h:69
    +
    void DrawLineSegment(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Point3 &p1, const Point3 &p2, float radius)
    Draws a cylinder between the two points.
    +
    void DrawCone(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws a cone with radius 1 and height y=-1 to 1 given the model, view, and projection matrices provid...
    +
    virtual ~QuickShapes()
    +
    void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws a square in the X-Y plane with extents -1 to 1 and normal in the +Y direction.
    + +
    void DrawAxes(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix)
    Draws a right handed set of axes at the coordinate frame specified by the modelMatrix.
    +
    void DrawCylinder(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws a cylinder with radius 1 and height y=-1 to 1 given the model, view, and projection matrices pr...
    +
    void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Texture2D &texture)
    Draws a square, which you can deform into some other shape by adjusting the model matrix,...
    +
    void DrawSphere(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws a sphere with radius 1 given the model, view, and projection matrices provided and using the su...
    +
    DefaultShader * default_shader()
    Returns a pointer to the default shader used internally by the Draw class so that you may change the ...
    + + + + +
    void DrawBrush(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws the classic 3D paintbrush cursor from the 2001 Keefe et al.
    +
    void DrawFullscreenTexture(const Color &color, const Texture2D &texture)
    Draws a background texture across the whole screen.
    +
    DefaultShader::MaterialProperties * material()
    Returns a pointer to the default material properties for the shapes so that you may adjust the reflec...
    +
    void DrawCube(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)
    Draws a cube with extents -1 to 1 given the model, view, and projection matrices provided and using t...
    +
    void DrawArrow(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, Point3 p, Vector3 dir, float radius)
    Draws an arrow originating at point p and extending in the direction and length specified by dir.
    +
    void DrawLines(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const std::vector< Point3 > &points, LinesType linesType, float radius)
    Draws a series of line segments.
    +
    A wrapper around GLSL shader programs.
    +
    A wrapper around a 2D texture that supports loading images from files or setting texture color data d...
    Definition: texture2d.h:42
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    + + + + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + + + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/ray_8h.html b/dev/MinGfx/docs/html/ray_8h.html new file mode 100644 index 0000000..2078015 --- /dev/null +++ b/dev/MinGfx/docs/html/ray_8h.html @@ -0,0 +1,122 @@ + + + + + + + +MinGfx Toolkit: src/ray.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    ray.h File Reference
    +
    +
    +
    #include <iostream>
    +#include "aabb.h"
    +#include "point3.h"
    +#include "vector3.h"
    +#include "mesh.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Ray
     Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a direction (a unit 3D vector). More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + + +

    +Functions

    std::ostream & mingfx::operator<< (std::ostream &os, const Ray &r)
     
    std::istream & mingfx::operator>> (std::istream &is, Ray &r)
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/ray_8h_source.html b/dev/MinGfx/docs/html/ray_8h_source.html new file mode 100644 index 0000000..cf44f40 --- /dev/null +++ b/dev/MinGfx/docs/html/ray_8h_source.html @@ -0,0 +1,202 @@ + + + + + + + +MinGfx Toolkit: src/ray.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    ray.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_RAY_H_
    +
    15 #define SRC_RAY_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 
    +
    19 #include "aabb.h"
    +
    20 #include "point3.h"
    +
    21 #include "vector3.h"
    +
    22 #include "mesh.h"
    +
    23 
    +
    24 
    +
    25 namespace mingfx {
    +
    26 
    +
    27 
    +
    54 class Ray {
    +
    55 public:
    +
    56 
    +
    58  Ray();
    +
    59 
    +
    61  Ray(const Point3 &origin, const Vector3 &direction);
    +
    62 
    +
    64  virtual ~Ray();
    +
    65 
    +
    67  bool operator==(const Ray& other) const;
    +
    68 
    +
    70  bool operator!=(const Ray& other) const;
    +
    71 
    +
    73  float Length() const;
    +
    74 
    +
    81  bool IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal,
    +
    82  float *iTime, Point3 *iPoint) const;
    +
    83 
    +
    90  bool IntersectTriangle(const Point3 &v1, const Point3 &v2, const Point3 &v3,
    +
    91  float *iTime, Point3 *iPoint) const;
    +
    92 
    +
    99  bool IntersectQuad(const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4,
    +
    100  float *iTime, Point3 *iPoint) const;
    +
    101 
    +
    106  bool IntersectSphere(const Point3 &center, float radius,
    +
    107  float *iTime, Point3 *iPoint) const;
    +
    108 
    +
    114  bool IntersectMesh(const Mesh &mesh, float *iTime,
    +
    115  Point3 *iPoint, int *iTriangleID) const;
    +
    116 
    +
    126  bool FastIntersectMesh(Mesh *mesh, float *iTime,
    +
    127  Point3 *iPoint, int *iTriangleID) const;
    +
    128 
    +
    142  bool IntersectAABB(const AABB &box, float *iTime) const;
    +
    143 
    +
    145  Point3 origin() const;
    +
    146 
    + +
    149 
    +
    151  void set(Point3 newOrigin, Vector3 newDir);
    +
    152 
    +
    153 private:
    +
    154  Point3 p_;
    +
    155  Vector3 d_;
    +
    156 };
    +
    157 
    +
    158 
    +
    159 // --- Stream operators ---
    +
    160 
    +
    161 std::ostream & operator<< ( std::ostream &os, const Ray &r);
    +
    162 std::istream & operator>> ( std::istream &is, Ray &r);
    +
    163 
    +
    164 
    +
    165 } // end namespace
    +
    166 
    +
    167 #endif
    + +
    A 3D axis-aligned bounding box defined by two corners (min and max).
    Definition: aabb.h:31
    +
    A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
    Definition: mesh.h:127
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    Stores the mathematical object of a ray that begins at an origin (a 3D point) and points in a directi...
    Definition: ray.h:54
    +
    bool IntersectTriangle(const Point3 &v1, const Point3 &v2, const Point3 &v3, float *iTime, Point3 *iPoint) const
    Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3.
    +
    Point3 origin() const
    Returns the origin.
    +
    bool IntersectQuad(const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4, float *iTime, Point3 *iPoint) const
    Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4.
    +
    float Length() const
    Returns the length of the direction vector.
    +
    bool IntersectAABB(const AABB &box, float *iTime) const
    Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box).
    +
    void set(Point3 newOrigin, Vector3 newDir)
    Sets a new origin and direction.
    +
    bool IntersectMesh(const Mesh &mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
    Checks to see if the ray intersects a triangle mesh.
    +
    Vector3 direction() const
    Returns the direction.
    +
    bool IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal, float *iTime, Point3 *iPoint) const
    Checks to see if the ray intersects a plane defined by a point and a normal.
    +
    bool operator==(const Ray &other) const
    Check for "equality", taking floating point imprecision into account.
    +
    bool IntersectSphere(const Point3 &center, float radius, float *iTime, Point3 *iPoint) const
    Checks to see if the ray intersects a sphere defined by a center point and a radius.
    +
    Ray(const Point3 &origin, const Vector3 &direction)
    Creates a ray from a 3D origin and direction.
    +
    bool operator!=(const Ray &other) const
    Check for "inequality", taking floating point imprecision into account.
    +
    virtual ~Ray()
    Ray destructor.
    +
    bool FastIntersectMesh(Mesh *mesh, float *iTime, Point3 *iPoint, int *iTriangleID) const
    Checks to see if the ray intersects a triangle mesh.
    +
    Ray()
    Defaults to a ray at the origin and pointing in the -Z direction.
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/search/all_0.html b/dev/MinGfx/docs/html/search/all_0.html new file mode 100644 index 0000000..1ec5b2d --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_0.js b/dev/MinGfx/docs/html/search/all_0.js new file mode 100644 index 0000000..fd5078e --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_0.js @@ -0,0 +1,20 @@ +var searchData= +[ + ['aabb_0',['AABB',['../classmingfx_1_1_a_a_b_b.html#af7acb376dbda50fa1d8c30d1b5eb85fb',1,'mingfx::AABB::AABB()'],['../classmingfx_1_1_a_a_b_b.html#a5bf74f4e7f64adae9ea66f213a4012d1',1,'mingfx::AABB::AABB(const Point3 &a)'],['../classmingfx_1_1_a_a_b_b.html#aaa44f815006b66f67da76fd89c02a0cf',1,'mingfx::AABB::AABB(const Point3 &a, const Point3 &b, const Point3 &c)'],['../classmingfx_1_1_a_a_b_b.html#a0f3e7d3b4012e25018ad4c51edafd4f8',1,'mingfx::AABB::AABB(const Vector3 &extents)'],['../classmingfx_1_1_a_a_b_b.html#a7c47fca94d56a2845ca7729d580ee7d1',1,'mingfx::AABB::AABB(const Point3 &center, const Vector3 &extents)'],['../classmingfx_1_1_a_a_b_b.html#a95e244e6e0774c815de6b9434218ee09',1,'mingfx::AABB::AABB(const Mesh &mesh)'],['../classmingfx_1_1_a_a_b_b.html#a2bf325127a89d7dbd5bb082ae69fb5e9',1,'mingfx::AABB::AABB(const Mesh &mesh, unsigned int tri_id)'],['../classmingfx_1_1_a_a_b_b.html',1,'mingfx::AABB']]], + ['aabb_2eh_1',['aabb.h',['../aabb_8h.html',1,'']]], + ['active_5fhead_2',['active_head',['../structstbrp__context.html#a13277239636803aff28f00b0a0376120',1,'stbrp_context']]], + ['addfragmentshaderfromfile_3',['AddFragmentShaderFromFile',['../classmingfx_1_1_shader_program.html#acd94fc12beb85fe57aa80d3b825018b0',1,'mingfx::ShaderProgram']]], + ['addfragmentshaderfromsource_4',['AddFragmentShaderFromSource',['../classmingfx_1_1_shader_program.html#a7a3063ec42798c076e1ab0c0e6411e9c',1,'mingfx::ShaderProgram']]], + ['addlight_5',['AddLight',['../classmingfx_1_1_default_shader.html#af54a8e489d9fb34cfceb1c07562c6e2c',1,'mingfx::DefaultShader']]], + ['addtriangle_6',['AddTriangle',['../classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a',1,'mingfx::Mesh']]], + ['addvertexshaderfromfile_7',['AddVertexShaderFromFile',['../classmingfx_1_1_shader_program.html#a63ac061271fad9338e922389d4a179e5',1,'mingfx::ShaderProgram']]], + ['addvertexshaderfromsource_8',['AddVertexShaderFromSource',['../classmingfx_1_1_shader_program.html#ab5fed4904a59c6e83ebb43aebf4c043d',1,'mingfx::ShaderProgram']]], + ['advanceanimation_9',['AdvanceAnimation',['../classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c',1,'mingfx::UniCam']]], + ['align_10',['Align',['../classmingfx_1_1_matrix4.html#ae61cdabb318a03cd4dae8a1c8ecafa4d',1,'mingfx::Matrix4']]], + ['align_11',['align',['../structstbrp__context.html#ae36053e2001a725aec2b5756dc990481',1,'stbrp_context']]], + ['ambient_5fintensity_12',['ambient_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a226c173b193459af291687dd45280fbb',1,'mingfx::DefaultShader::LightProperties']]], + ['ambient_5freflectance_13',['ambient_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ad4db9a1b0636db84f57f022c51ce7657',1,'mingfx::DefaultShader::MaterialProperties']]], + ['api_20_2d_20mingfx_20programming_20reference_20organized_20by_20topic_14',['API - MinGfx Programming Reference Organized by Topic',['../api.html',1,'']]], + ['api_2emd_15',['api.md',['../api_8md.html',1,'']]], + ['aspect_5fratio_16',['aspect_ratio',['../classmingfx_1_1_graphics_app.html#ac682691ee96ea32037abafd74d144a23',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_1.html b/dev/MinGfx/docs/html/search/all_1.html new file mode 100644 index 0000000..9f80e90 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_1.js b/dev/MinGfx/docs/html/search/all_1.js new file mode 100644 index 0000000..057894e --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['bindtexture_17',['BindTexture',['../classmingfx_1_1_shader_program.html#a4e5a2659f66f29433b15748f36c61ea2',1,'mingfx::ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex)'],['../classmingfx_1_1_shader_program.html#af81d97c2843278eb40cdcdf8e5d54a96',1,'mingfx::ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex, int texUnit)']]], + ['buildbvh_18',['BuildBVH',['../classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1',1,'mingfx::Mesh']]], + ['bvh_19',['BVH',['../classmingfx_1_1_b_v_h.html#af812656193d247be31dd038a8e2fff75',1,'mingfx::BVH::BVH()'],['../classmingfx_1_1_b_v_h.html',1,'mingfx::BVH']]], + ['bvh_2eh_20',['bvh.h',['../bvh_8h.html',1,'']]], + ['bvh_5fptr_21',['bvh_ptr',['../classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4',1,'mingfx::Mesh']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_10.html b/dev/MinGfx/docs/html/search/all_10.html new file mode 100644 index 0000000..3bf1196 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_10.js b/dev/MinGfx/docs/html/search/all_10.js new file mode 100644 index 0000000..4c6a3f0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_10.js @@ -0,0 +1,53 @@ +var searchData= +[ + ['scale_225',['Scale',['../classmingfx_1_1_matrix4.html#a0232a58d20b1da5374cf8c72fb113a4e',1,'mingfx::Matrix4']]], + ['screen_226',['screen',['../classmingfx_1_1_graphics_app.html#adc68196c3f03bd0608c41f6e4d7dad16',1,'mingfx::GraphicsApp']]], + ['screentodepthplane_227',['ScreenToDepthPlane',['../classmingfx_1_1_gfx_math.html#aaa6af7c0de01fdad46d48d43efb6aa67',1,'mingfx::GfxMath']]], + ['screentonearplane_228',['ScreenToNearPlane',['../classmingfx_1_1_gfx_math.html#a2086a2f885f887fb53da8a5adb5860f0',1,'mingfx::GfxMath']]], + ['screentoworld_229',['ScreenToWorld',['../classmingfx_1_1_gfx_math.html#a24048d7b688ae46317c3e8de8a701273',1,'mingfx::GfxMath']]], + ['set_230',['set',['../classmingfx_1_1_ray.html#a75593293307b4eead15a876bf3597071',1,'mingfx::Ray']]], + ['set_5fdefault_5fdepth_231',['set_default_depth',['../classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068',1,'mingfx::UniCam']]], + ['set_5ffilter_5fmode_232',['set_filter_mode',['../classmingfx_1_1_texture2_d.html#a4a3b2b550fefdf79f0fb392b04e7b013',1,'mingfx::Texture2D']]], + ['set_5flook_5fscale_233',['set_look_scale',['../classmingfx_1_1_craft_cam.html#a15092ae5de6920546e3ce79aeb196f44',1,'mingfx::CraftCam']]], + ['set_5frotation_5fscale_234',['set_rotation_scale',['../classmingfx_1_1_craft_cam.html#a352f5a42f6e88d2e599bd5acb42e5831',1,'mingfx::CraftCam']]], + ['set_5ftranslation_5fscale_235',['set_translation_scale',['../classmingfx_1_1_craft_cam.html#a151fde09d08001ee2a615f25ec1acea7',1,'mingfx::CraftCam']]], + ['set_5fuser_5fdata_236',['set_user_data',['../classmingfx_1_1_a_a_b_b.html#ade89d21e799a97e7d82be5d593ee2e4b',1,'mingfx::AABB']]], + ['set_5fview_5fmatrix_237',['set_view_matrix',['../classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8',1,'mingfx::CraftCam::set_view_matrix()'],['../classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b',1,'mingfx::UniCam::set_view_matrix()']]], + ['set_5fwrap_5fmode_238',['set_wrap_mode',['../classmingfx_1_1_texture2_d.html#aa5cbe3396e4560ec0746e91dbc55bc9f',1,'mingfx::Texture2D']]], + ['setcolors_239',['SetColors',['../classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f',1,'mingfx::Mesh::SetColors(int triangle_id, Color c1, Color c2, Color c3)'],['../classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae',1,'mingfx::Mesh::SetColors(const std::vector< Color > &colors)'],['../classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae',1,'mingfx::Mesh::SetColors(float *colors_array, int num_colors)']]], + ['setindices_240',['SetIndices',['../classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581',1,'mingfx::Mesh::SetIndices(const std::vector< unsigned int > index_array)'],['../classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c',1,'mingfx::Mesh::SetIndices(unsigned int *index_array, int num_indices)']]], + ['setinstancetransforms_241',['SetInstanceTransforms',['../classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87',1,'mingfx::Mesh']]], + ['setlight_242',['SetLight',['../classmingfx_1_1_default_shader.html#a41e74fb8af72a6b22c72b0916726b6d6',1,'mingfx::DefaultShader']]], + ['setnormals_243',['SetNormals',['../classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903',1,'mingfx::Mesh::SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)'],['../classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d',1,'mingfx::Mesh::SetNormals(const std::vector< Vector3 > &norms)'],['../classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6',1,'mingfx::Mesh::SetNormals(float *norms_array, int num_norms)']]], + ['settexcoords_244',['SetTexCoords',['../classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3',1,'mingfx::Mesh::SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)'],['../classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1',1,'mingfx::Mesh::SetTexCoords(int texture_unit, const std::vector< Point2 > &tex_coords)'],['../classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9',1,'mingfx::Mesh::SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)']]], + ['setuniform_245',['SetUniform',['../classmingfx_1_1_shader_program.html#a0b3e6285354e007bf79a9ac1587f86f5',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Vector3 &v)'],['../classmingfx_1_1_shader_program.html#a766988eac957e9d810fdf2cbd2eafae0',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Matrix4 &m)'],['../classmingfx_1_1_shader_program.html#a9ec2b53ba4bea7e48ef459530b8c6d60',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Color &c)'],['../classmingfx_1_1_shader_program.html#ab547dadc25582bec157b39de29d1419e',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, int i)'],['../classmingfx_1_1_shader_program.html#a707d2cb51a54151959c6570d6bfc7840',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, unsigned int ui)'],['../classmingfx_1_1_shader_program.html#a680fa87cb30343bb56abc48a090e823c',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, float f)'],['../classmingfx_1_1_shader_program.html#a461ba9368ad89fe1e9749b14b099027a',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Point2 &p)'],['../classmingfx_1_1_shader_program.html#aef58537d81bdb9d88a5f1c56a2b98b25',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Vector2 &v)'],['../classmingfx_1_1_shader_program.html#ac59b3d0542ce45631876615eabf66487',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Point3 &p)']]], + ['setuniformarray1_246',['SetUniformArray1',['../classmingfx_1_1_shader_program.html#a51cd1c1d194b2f5c07e81d4f579f2f2b',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#abba87d2b0baca89232dbd1d6331875de',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a5c7891252d6b6c40982b56543820cd19',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, float *f, int count)']]], + ['setuniformarray2_247',['SetUniformArray2',['../classmingfx_1_1_shader_program.html#a6fdca4b0ccaa8a0b2c8c68fd7645727c',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a9bab504c74a1c4258258b91afe9a9623',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a93914cad6d8e751218c88010c51cf657',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, float *f, int count)']]], + ['setuniformarray3_248',['SetUniformArray3',['../classmingfx_1_1_shader_program.html#ac582a2aa74a83095e0b8e359ce432511',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a8c31de93b17f050baecb5323a69bdbfa',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#afc84377716296a57299ebbc01884b65d',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, float *f, int count)']]], + ['setuniformarray4_249',['SetUniformArray4',['../classmingfx_1_1_shader_program.html#ab06ef4682f801fca080a8f67dc6345ba',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a2854ad947f74432edc0b730462b7f695',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a9710cf4c72a7321b9a1ff1b86ae42da1',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, float *f, int count)']]], + ['setvertices_250',['SetVertices',['../classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6',1,'mingfx::Mesh::SetVertices(const std::vector< Point3 > &verts)'],['../classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49',1,'mingfx::Mesh::SetVertices(float *verts_array, int num_verts)']]], + ['shader_5fprogram_2eh_251',['shader_program.h',['../shader__program_8h.html',1,'']]], + ['shaderprogram_252',['ShaderProgram',['../classmingfx_1_1_shader_program.html',1,'mingfx::ShaderProgram'],['../classmingfx_1_1_shader_program.html#a0c3d86656c464223dc615cbec0943700',1,'mingfx::ShaderProgram::ShaderProgram()']]], + ['shinniness_253',['shinniness',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ad77e4c78a2bf60776c673b91bc4c8a13',1,'mingfx::DefaultShader::MaterialProperties']]], + ['size_254',['size',['../classmingfx_1_1_text_shader_1_1_text_format.html#aeecda817624276f0cfb812ddcdbbc2f0',1,'mingfx::TextShader::TextFormat']]], + ['slerp_255',['Slerp',['../classmingfx_1_1_quaternion.html#a0290914928a2618f7faaa40989113d22',1,'mingfx::Quaternion::Slerp(const Quaternion &other, float alpha) const'],['../classmingfx_1_1_quaternion.html#a31d37561099fab3d75a74455c5f43133',1,'mingfx::Quaternion::Slerp(const Quaternion &a, const Quaternion &b, float alpha)']]], + ['specular_5fintensity_256',['specular_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#abef7666629dbb9da661b163e0584c9a4',1,'mingfx::DefaultShader::LightProperties']]], + ['specular_5freflectance_257',['specular_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#acfd78796e08f527a24cce3c1e206148c',1,'mingfx::DefaultShader::MaterialProperties']]], + ['stb_5frect_5fpack_2eh_258',['stb_rect_pack.h',['../stb__rect__pack_8h.html',1,'']]], + ['stb_5frect_5fpack_5fversion_259',['STB_RECT_PACK_VERSION',['../stb__rect__pack_8h.html#af2f15dfcc6ad60b1df4f5902e2cc25ce',1,'stb_rect_pack.h']]], + ['stbrp_5fcontext_260',['stbrp_context',['../structstbrp__context.html',1,'stbrp_context'],['../stb__rect__pack_8h.html#a0455046a8d5457bbc4f3f3ec995c338f',1,'stbrp_context(): stb_rect_pack.h']]], + ['stbrp_5fcoord_261',['stbrp_coord',['../stb__rect__pack_8h.html#ac2c2491b95dea6a298b7423dc762dfd9',1,'stb_rect_pack.h']]], + ['stbrp_5fdef_262',['STBRP_DEF',['../stb__rect__pack_8h.html#a0b73f2d2521fb81afc056a823e3ca753',1,'stb_rect_pack.h']]], + ['stbrp_5fheuristic_5fskyline_5fbf_5fsortheight_263',['STBRP_HEURISTIC_Skyline_BF_sortHeight',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba11d62749c4405a231a6fd1dd9d46615c',1,'stb_rect_pack.h']]], + ['stbrp_5fheuristic_5fskyline_5fbl_5fsortheight_264',['STBRP_HEURISTIC_Skyline_BL_sortHeight',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba13530b067fb1f9707dc0f9d51f8b074a',1,'stb_rect_pack.h']]], + ['stbrp_5fheuristic_5fskyline_5fdefault_265',['STBRP_HEURISTIC_Skyline_default',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba5e4dd0b1cbee654bbfeebc5311f03525',1,'stb_rect_pack.h']]], + ['stbrp_5finit_5ftarget_266',['stbrp_init_target',['../stb__rect__pack_8h.html#a8b32f5ad458f614f5d419ef26cef5b3c',1,'stb_rect_pack.h']]], + ['stbrp_5fnode_267',['stbrp_node',['../structstbrp__node.html',1,'stbrp_node'],['../stb__rect__pack_8h.html#ae8f871c209d2e6218baf9c0e2a209ea1',1,'stbrp_node(): stb_rect_pack.h']]], + ['stbrp_5fpack_5frects_268',['stbrp_pack_rects',['../stb__rect__pack_8h.html#af038ae1b98573f24736c9a3eed0478ba',1,'stb_rect_pack.h']]], + ['stbrp_5frect_269',['stbrp_rect',['../structstbrp__rect.html',1,'stbrp_rect'],['../stb__rect__pack_8h.html#a7c4a99b31ea2207a0b2bbcbdab8f3840',1,'stbrp_rect(): stb_rect_pack.h']]], + ['stbrp_5fsetup_5fallow_5fout_5fof_5fmem_270',['stbrp_setup_allow_out_of_mem',['../stb__rect__pack_8h.html#a1babd70b223e571305fd9753a83a4fda',1,'stb_rect_pack.h']]], + ['stbrp_5fsetup_5fheuristic_271',['stbrp_setup_heuristic',['../stb__rect__pack_8h.html#a5a8223866c146933da3e152066bf61a1',1,'stb_rect_pack.h']]], + ['stopprogram_272',['StopProgram',['../classmingfx_1_1_default_shader.html#a2c188bc0fc5f7fc7405f04b036bd4d67',1,'mingfx::DefaultShader::StopProgram()'],['../classmingfx_1_1_shader_program.html#a2e4d6db720bf22038270cf8c51cdf7da',1,'mingfx::ShaderProgram::StopProgram()']]], + ['subdeterminant_273',['SubDeterminant',['../classmingfx_1_1_matrix4.html#a3d9898bfac2510a695df6b033054e481',1,'mingfx::Matrix4']]], + ['surface_5ftexture_274',['surface_texture',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ae26eed46a279c73e947880858763514e',1,'mingfx::DefaultShader::MaterialProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_11.html b/dev/MinGfx/docs/html/search/all_11.html new file mode 100644 index 0000000..c9f79d2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_11.js b/dev/MinGfx/docs/html/search/all_11.js new file mode 100644 index 0000000..7e7fecc --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_11.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['text_5fshader_2eh_275',['text_shader.h',['../text__shader_8h.html',1,'']]], + ['textextents_276',['TextExtents',['../classmingfx_1_1_text_shader.html#ac4e9a150311fe6d74e9f6214ebeb6b28',1,'mingfx::TextShader']]], + ['textformat_277',['TextFormat',['../classmingfx_1_1_text_shader_1_1_text_format.html',1,'mingfx::TextShader::TextFormat'],['../classmingfx_1_1_text_shader_1_1_text_format.html#a2b7d7e2e540c881952b97b8948b49fcb',1,'mingfx::TextShader::TextFormat::TextFormat()']]], + ['textshader_278',['TextShader',['../classmingfx_1_1_text_shader.html',1,'mingfx::TextShader'],['../classmingfx_1_1_text_shader.html#a0ec5a6ba22abb3f86c611107925fca67',1,'mingfx::TextShader::TextShader()']]], + ['texture2d_279',['Texture2D',['../classmingfx_1_1_texture2_d.html',1,'mingfx::Texture2D'],['../classmingfx_1_1_texture2_d.html#aa15b86ec3b7312842c220b081c39980d',1,'mingfx::Texture2D::Texture2D()']]], + ['texture2d_2eh_280',['texture2d.h',['../texture2d_8h.html',1,'']]], + ['todegrees_281',['ToDegrees',['../classmingfx_1_1_gfx_math.html#a39a2b5973249fb3aefc210b18b0fdff3',1,'mingfx::GfxMath::ToDegrees(float radians)'],['../classmingfx_1_1_gfx_math.html#aa5411a7d8bfc8e47d596362a328dbde8',1,'mingfx::GfxMath::ToDegrees(Vector3 radians)']]], + ['toeulerangleszyx_282',['ToEulerAnglesZYX',['../classmingfx_1_1_quaternion.html#a033f05ed7e7215a5c3c4cd26548c8007',1,'mingfx::Quaternion']]], + ['toradians_283',['ToRadians',['../classmingfx_1_1_gfx_math.html#a1336de2695bc3bb750b23fb0ea211637',1,'mingfx::GfxMath::ToRadians(float degrees)'],['../classmingfx_1_1_gfx_math.html#a38927f1f8ea4625d909e64efa93c5190',1,'mingfx::GfxMath::ToRadians(Vector3 degrees)']]], + ['tounit_284',['ToUnit',['../classmingfx_1_1_quaternion.html#a3572b35419c51332204adb5bf35f0b03',1,'mingfx::Quaternion::ToUnit()'],['../classmingfx_1_1_vector2.html#a70f9f612a99017bf051e40ebd7fa7f83',1,'mingfx::Vector2::ToUnit()'],['../classmingfx_1_1_vector3.html#a3caef3c6f24b90730ef70c84ce0e0d71',1,'mingfx::Vector3::ToUnit()']]], + ['tovector_285',['ToVector',['../classmingfx_1_1_color.html#ae7371e464c4af7ac93d9edd4c0772c2b',1,'mingfx::Color::ToVector()'],['../classmingfx_1_1_matrix4.html#a4e9433f0482b5e9688c12398900608db',1,'mingfx::Matrix4::ToVector() const']]], + ['translation_286',['Translation',['../classmingfx_1_1_matrix4.html#ae82bab81df82dc03f5eb11e74ba1dd84',1,'mingfx::Matrix4']]], + ['translation_5fscale_287',['translation_scale',['../classmingfx_1_1_craft_cam.html#a93567af7acbae2939d57cfd8a72bcef2',1,'mingfx::CraftCam']]], + ['transpose_288',['Transpose',['../classmingfx_1_1_matrix4.html#afd1030205567d23d4a2d1240d8214850',1,'mingfx::Matrix4']]], + ['two_5fpi_289',['TWO_PI',['../classmingfx_1_1_gfx_math.html#a0e5c7562116babf11c61f4c7f20f8b69',1,'mingfx::GfxMath']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_12.html b/dev/MinGfx/docs/html/search/all_12.html new file mode 100644 index 0000000..ab93472 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_12.js b/dev/MinGfx/docs/html/search/all_12.js new file mode 100644 index 0000000..98f79d0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_12.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['unicam_290',['UniCam',['../classmingfx_1_1_uni_cam.html',1,'mingfx::UniCam'],['../classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e',1,'mingfx::UniCam::UniCam()'],['../classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07',1,'mingfx::UniCam::UniCam(const Matrix4 &initialViewMatrix)']]], + ['unicam_2eh_291',['unicam.h',['../unicam_8h.html',1,'']]], + ['unitx_292',['UnitX',['../classmingfx_1_1_vector2.html#a8ef6e0525ec34aaee9cf35bab098ecdb',1,'mingfx::Vector2::UnitX()'],['../classmingfx_1_1_vector3.html#ae8d822fdea67f63580b4e1f78f5b8922',1,'mingfx::Vector3::UnitX()']]], + ['unity_293',['UnitY',['../classmingfx_1_1_vector2.html#ab7b3ba42a5a63c512bd7b32fd4cc0db0',1,'mingfx::Vector2::UnitY()'],['../classmingfx_1_1_vector3.html#a8d31e433d1ac04aaceea1b1dcd1643df',1,'mingfx::Vector3::UnitY()']]], + ['unitz_294',['UnitZ',['../classmingfx_1_1_vector3.html#a4b696b0d1143d6e30a34a2f889d2ca61',1,'mingfx::Vector3']]], + ['updatefrombytes_295',['UpdateFromBytes',['../classmingfx_1_1_texture2_d.html#a0783ad70829ef353aa92344d320b107c',1,'mingfx::Texture2D']]], + ['updatefromfloats_296',['UpdateFromFloats',['../classmingfx_1_1_texture2_d.html#ad7640f0cbda6398a6bb80202b80dd693',1,'mingfx::Texture2D']]], + ['updategpumemory_297',['UpdateGPUMemory',['../classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e',1,'mingfx::Mesh']]], + ['updateheight_298',['UpdateHeight',['../classmingfx_1_1_craft_cam.html#ae3d9c7ea9307dbbadaa4b6e2f9933a7b',1,'mingfx::CraftCam']]], + ['updatesimulation_299',['UpdateSimulation',['../classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7',1,'mingfx::CraftCam::UpdateSimulation()'],['../classmingfx_1_1_graphics_app.html#a9e2b4cd7eeabe1ace9d5e9220349fbaa',1,'mingfx::GraphicsApp::UpdateSimulation()']]], + ['updatetriangle_300',['UpdateTriangle',['../classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044',1,'mingfx::Mesh']]], + ['useprogram_301',['UseProgram',['../classmingfx_1_1_default_shader.html#a053599d8c7acd9920461aab8ce945ab0',1,'mingfx::DefaultShader::UseProgram()'],['../classmingfx_1_1_shader_program.html#af1c968f1c79f70e183c9d1239d3d205e',1,'mingfx::ShaderProgram::UseProgram()']]], + ['user_5fdata_302',['user_data',['../classmingfx_1_1_a_a_b_b.html#a35def5a4ee2ecd287f5c71436b2c5843',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_13.html b/dev/MinGfx/docs/html/search/all_13.html new file mode 100644 index 0000000..51172c2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_13.js b/dev/MinGfx/docs/html/search/all_13.js new file mode 100644 index 0000000..867131d --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_13.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['v_5falign_303',['v_align',['../classmingfx_1_1_text_shader_1_1_text_format.html#a8455382a6829022020eb307ae9168bd7',1,'mingfx::TextShader::TextFormat']]], + ['value_5fptr_304',['value_ptr',['../classmingfx_1_1_color.html#aa3a93033db8e00aff817a125eb5b54a0',1,'mingfx::Color::value_ptr()'],['../classmingfx_1_1_matrix4.html#a2b7b30f23f08d70e83c7b7e01945dd3c',1,'mingfx::Matrix4::value_ptr()'],['../classmingfx_1_1_point2.html#a027b2412f1c36242ccb06cf37c7e29bc',1,'mingfx::Point2::value_ptr()'],['../classmingfx_1_1_point3.html#af0557bdc07452cf335e2b7e04fc0aa3c',1,'mingfx::Point3::value_ptr()'],['../classmingfx_1_1_quaternion.html#abca597e756f257dc33838734ae19baf9',1,'mingfx::Quaternion::value_ptr()'],['../classmingfx_1_1_vector2.html#a80ef53519d50a6a6f158f66755c040d1',1,'mingfx::Vector2::value_ptr()'],['../classmingfx_1_1_vector3.html#aa7ddfd662e866c019a772ba66eae7331',1,'mingfx::Vector3::value_ptr()']]], + ['vector2_305',['Vector2',['../classmingfx_1_1_vector2.html',1,'mingfx::Vector2'],['../classmingfx_1_1_vector2.html#a962433a7e3158cf6b224604a0463852f',1,'mingfx::Vector2::Vector2()'],['../classmingfx_1_1_vector2.html#acc16337b6b06ebea2fde4c4bd1be7abd',1,'mingfx::Vector2::Vector2(float x, float y)'],['../classmingfx_1_1_vector2.html#a6e3d063a7080bfe199acc70cd5afded2',1,'mingfx::Vector2::Vector2(float *v)'],['../classmingfx_1_1_vector2.html#a40f53939581f5d06a1b757b0398525f8',1,'mingfx::Vector2::Vector2(const Vector2 &v)']]], + ['vector2_2eh_306',['vector2.h',['../vector2_8h.html',1,'']]], + ['vector3_307',['Vector3',['../classmingfx_1_1_vector3.html',1,'mingfx::Vector3'],['../classmingfx_1_1_vector3.html#a7f57af8bbecbc793fa17def4521de4dd',1,'mingfx::Vector3::Vector3()'],['../classmingfx_1_1_vector3.html#a256018f34e230d542027d07d14fd6e65',1,'mingfx::Vector3::Vector3(float x, float y, float z)'],['../classmingfx_1_1_vector3.html#a95b274c7a5ff118af20bc71682c6b1f1',1,'mingfx::Vector3::Vector3(float *v)'],['../classmingfx_1_1_vector3.html#af6100965af7770f833dbf0c9f30f4fdd',1,'mingfx::Vector3::Vector3(const Vector3 &v)']]], + ['vector3_2eh_308',['vector3.h',['../vector3_8h.html',1,'']]], + ['vert_5falign_5fbaseline_309',['VERT_ALIGN_BASELINE',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa0400d0d77ea6770b313eedaf36fe71bb',1,'mingfx::TextShader']]], + ['vert_5falign_5fbottom_310',['VERT_ALIGN_BOTTOM',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa080e12cacc0f01b361c8b93c73dd2e28',1,'mingfx::TextShader']]], + ['vert_5falign_5fcenter_311',['VERT_ALIGN_CENTER',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aac49ae9c9553284e44f90228b9ce647af',1,'mingfx::TextShader']]], + ['vert_5falign_5ftop_312',['VERT_ALIGN_TOP',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa970e4fcd7c426e6cd49709119fba6e04',1,'mingfx::TextShader']]], + ['vertalign_313',['VertAlign',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2a',1,'mingfx::TextShader']]], + ['view_5fmatrix_314',['view_matrix',['../classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36',1,'mingfx::CraftCam::view_matrix()'],['../classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3',1,'mingfx::UniCam::view_matrix()']]], + ['volume_315',['Volume',['../classmingfx_1_1_a_a_b_b.html#a1ea0cf1c4051185b3f4296d20dd330c9',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_14.html b/dev/MinGfx/docs/html/search/all_14.html new file mode 100644 index 0000000..afecf56 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_14.js b/dev/MinGfx/docs/html/search/all_14.js new file mode 100644 index 0000000..f9e92e4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_14.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['w_316',['w',['../structstbrp__rect.html#a248d43f1eb979c1e7b92ba6df431dec5',1,'stbrp_rect::w()'],['../classmingfx_1_1_point2.html#ab00e35eccdc4b7deae8172f5954a86e8',1,'mingfx::Point2::w()'],['../classmingfx_1_1_point3.html#abbf85b5749b37869f4c1b98443ebbd9e',1,'mingfx::Point3::w()'],['../classmingfx_1_1_quaternion.html#a8aa53f71892f02c981d98d100a8b57c7',1,'mingfx::Quaternion::w()'],['../classmingfx_1_1_vector2.html#a267e6749091f23263d1620f801f0a831',1,'mingfx::Vector2::w()'],['../classmingfx_1_1_vector3.html#a2556298f536ba115019982222ce6e0c5',1,'mingfx::Vector3::w()']]], + ['was_5fpacked_317',['was_packed',['../structstbrp__rect.html#a74ba347755ce17f2f8a2ea66c612af49',1,'stbrp_rect']]], + ['width_318',['width',['../structstbrp__context.html#a70cfcb2044ce8397cc440d28b30c09b2',1,'stbrp_context::width()'],['../classmingfx_1_1_texture2_d.html#a401629d948aa144be81b94fe21938869',1,'mingfx::Texture2D::width()']]], + ['window_319',['window',['../classmingfx_1_1_graphics_app.html#abd0ee14f7e12146000cdb3532d54ba94',1,'mingfx::GraphicsApp']]], + ['window_5fheight_320',['window_height',['../classmingfx_1_1_graphics_app.html#ad7a641f7ccf174cd0a059347b623e016',1,'mingfx::GraphicsApp']]], + ['window_5fwidth_321',['window_width',['../classmingfx_1_1_graphics_app.html#a1c682fa2dd0bce855e1e32ffeac532b0',1,'mingfx::GraphicsApp']]], + ['wrap_5fmode_322',['wrap_mode',['../classmingfx_1_1_texture2_d.html#a1c8827426f43343c0ad171e181a741ea',1,'mingfx::Texture2D']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_15.html b/dev/MinGfx/docs/html/search/all_15.html new file mode 100644 index 0000000..69f382b --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_15.js b/dev/MinGfx/docs/html/search/all_15.js new file mode 100644 index 0000000..103250f --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_15.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_323',['x',['../structstbrp__rect.html#a4cc623a3e29f0bc0d3375f6645c84d18',1,'stbrp_rect::x()'],['../structstbrp__node.html#a45ab31a88025db27d08040d715b129ea',1,'stbrp_node::x()'],['../classmingfx_1_1_point2.html#a92447f64ca82f67e855da0c42db12ffa',1,'mingfx::Point2::x()'],['../classmingfx_1_1_point3.html#ac409e3213620b80c868245c1f6a6eea5',1,'mingfx::Point3::x()'],['../classmingfx_1_1_quaternion.html#a85464500e1d3c8ba10f1968426dc24ae',1,'mingfx::Quaternion::x()'],['../classmingfx_1_1_vector2.html#ae84b079eb21494bc7c9a93d32a63712a',1,'mingfx::Vector2::x()'],['../classmingfx_1_1_vector3.html#ac380342bfa614c9a3babe1efd14d2cf4',1,'mingfx::Vector3::x()']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_16.html b/dev/MinGfx/docs/html/search/all_16.html new file mode 100644 index 0000000..b19867a --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_16.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_16.js b/dev/MinGfx/docs/html/search/all_16.js new file mode 100644 index 0000000..5eded29 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_16.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['y_324',['y',['../structstbrp__rect.html#ae3034c1fbf86043b568f5a4dddf946fa',1,'stbrp_rect::y()'],['../structstbrp__node.html#ad0415cb102a4f37aa45073653307e67e',1,'stbrp_node::y()'],['../classmingfx_1_1_point2.html#a4f97a7a75276a147ac06fc4dec810ec8',1,'mingfx::Point2::y()'],['../classmingfx_1_1_point3.html#a0757315cd84f91879021d7afe18e0545',1,'mingfx::Point3::y()'],['../classmingfx_1_1_quaternion.html#adb294449db2a80bd11426148592d9e0b',1,'mingfx::Quaternion::y()'],['../classmingfx_1_1_vector2.html#ac427d5c06474777e851bed05ec5d134b',1,'mingfx::Vector2::y()'],['../classmingfx_1_1_vector3.html#aeb74fbc0a970b40abb0db8f8e490ee17',1,'mingfx::Vector3::y()']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_17.html b/dev/MinGfx/docs/html/search/all_17.html new file mode 100644 index 0000000..1ad5d34 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_17.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_17.js b/dev/MinGfx/docs/html/search/all_17.js new file mode 100644 index 0000000..8934ca2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_17.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['z_325',['z',['../classmingfx_1_1_point3.html#ac463e3a3ec3edd02c86505ea6400d8e6',1,'mingfx::Point3::z()'],['../classmingfx_1_1_quaternion.html#a75ec001cbbf08cf5c4e1f8978082a55f',1,'mingfx::Quaternion::z()'],['../classmingfx_1_1_vector3.html#a78d1dba881575517f0427d55cc418df6',1,'mingfx::Vector3::z()']]], + ['zero_326',['Zero',['../classmingfx_1_1_point2.html#a60a2b348deab631b51caca3eb715461f',1,'mingfx::Point2::Zero()'],['../classmingfx_1_1_point3.html#a9983b62979f9ac5a11efea08d9d283ed',1,'mingfx::Point3::Zero()'],['../classmingfx_1_1_vector2.html#a7cb11f9fe8962ff9092fc1e5736faacf',1,'mingfx::Vector2::Zero()'],['../classmingfx_1_1_vector3.html#a52bf8582baa71e7d6f80c412687d9714',1,'mingfx::Vector3::Zero()']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_18.html b/dev/MinGfx/docs/html/search/all_18.html new file mode 100644 index 0000000..507d0f8 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_18.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_18.js b/dev/MinGfx/docs/html/search/all_18.js new file mode 100644 index 0000000..e80a560 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_18.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['_7eaabb_327',['~AABB',['../classmingfx_1_1_a_a_b_b.html#aeb63c176a2f2408e803d9a2f6848eee5',1,'mingfx::AABB']]], + ['_7ebvh_328',['~BVH',['../classmingfx_1_1_b_v_h.html#af81906830adcf4648cc8cf4e214b4269',1,'mingfx::BVH']]], + ['_7ecolor_329',['~Color',['../classmingfx_1_1_color.html#ab1a90432dd7fd7b2adf41d747be85378',1,'mingfx::Color']]], + ['_7ecraftcam_330',['~CraftCam',['../classmingfx_1_1_craft_cam.html#a85ef9bebdd1595be1288bc104245f4ff',1,'mingfx::CraftCam']]], + ['_7edefaultshader_331',['~DefaultShader',['../classmingfx_1_1_default_shader.html#a0fe7d605d039ecdbf17837bc5bbe0aba',1,'mingfx::DefaultShader']]], + ['_7egraphicsapp_332',['~GraphicsApp',['../classmingfx_1_1_graphics_app.html#aab7925c6b844e6bef428feacf4aa9afb',1,'mingfx::GraphicsApp']]], + ['_7ematrix4_333',['~Matrix4',['../classmingfx_1_1_matrix4.html#a8853a6b3fd0d08f1def5c9921bd47933',1,'mingfx::Matrix4']]], + ['_7emesh_334',['~Mesh',['../classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327',1,'mingfx::Mesh']]], + ['_7epoint2_335',['~Point2',['../classmingfx_1_1_point2.html#a7e5b2dcd7e079bdd00354e7ccf9c5c2a',1,'mingfx::Point2']]], + ['_7epoint3_336',['~Point3',['../classmingfx_1_1_point3.html#aa55aef76986cc7424c2a535d6fd1ab7a',1,'mingfx::Point3']]], + ['_7equaternion_337',['~Quaternion',['../classmingfx_1_1_quaternion.html#a1f9ddd82678ccf51a462e4e03a02c7cc',1,'mingfx::Quaternion']]], + ['_7equickshapes_338',['~QuickShapes',['../classmingfx_1_1_quick_shapes.html#a3a75dde188ec076ea46a6319ed1ca046',1,'mingfx::QuickShapes']]], + ['_7eray_339',['~Ray',['../classmingfx_1_1_ray.html#ac20909f30c07d5375598876c6d294625',1,'mingfx::Ray']]], + ['_7eshaderprogram_340',['~ShaderProgram',['../classmingfx_1_1_shader_program.html#a96da0dede354f2511084eeb25428edb4',1,'mingfx::ShaderProgram']]], + ['_7etextshader_341',['~TextShader',['../classmingfx_1_1_text_shader.html#a457f7a42eceb957cdb103664dd864feb',1,'mingfx::TextShader']]], + ['_7etexture2d_342',['~Texture2D',['../classmingfx_1_1_texture2_d.html#aab734dbbcf6211507ab65d5bb94a4ef9',1,'mingfx::Texture2D']]], + ['_7eunicam_343',['~UniCam',['../classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e',1,'mingfx::UniCam']]], + ['_7evector2_344',['~Vector2',['../classmingfx_1_1_vector2.html#ac49b009c4b6052ebe71d5cf4ce241b1f',1,'mingfx::Vector2']]], + ['_7evector3_345',['~Vector3',['../classmingfx_1_1_vector3.html#a6e0d09d774615bcfde5645c22a645969',1,'mingfx::Vector3']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_2.html b/dev/MinGfx/docs/html/search/all_2.html new file mode 100644 index 0000000..02cfffc --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_2.js b/dev/MinGfx/docs/html/search/all_2.js new file mode 100644 index 0000000..e558fe7 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_2.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['calcperfacenormals_22',['CalcPerFaceNormals',['../classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7',1,'mingfx::Mesh']]], + ['calcpervertexnormals_23',['CalcPerVertexNormals',['../classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c',1,'mingfx::Mesh']]], + ['clamp_24',['Clamp',['../classmingfx_1_1_gfx_math.html#af227209ec043b375497556ee2dcdf850',1,'mingfx::GfxMath']]], + ['closestpoint_25',['ClosestPoint',['../classmingfx_1_1_point3.html#a9dd5396f53b7006ec4cb63abffd90a7c',1,'mingfx::Point3']]], + ['closestpointonplane_26',['ClosestPointOnPlane',['../classmingfx_1_1_point3.html#ae31d5f91a03fabdf72b2fa54e177b743',1,'mingfx::Point3']]], + ['cofactor_27',['Cofactor',['../classmingfx_1_1_matrix4.html#a0d88ba8e15325d135157d115f2412e91',1,'mingfx::Matrix4']]], + ['color_28',['Color',['../classmingfx_1_1_color.html#ab4d264b5a1189b73443948c01eab088d',1,'mingfx::Color::Color()'],['../classmingfx_1_1_color.html#a81b442b8afcd157c260487081f25dcc3',1,'mingfx::Color::Color(float red, float green, float blue, float alpha=1.0)'],['../classmingfx_1_1_color.html#ab4d6c067128e779add5390d83ea3410e',1,'mingfx::Color::Color(float *p)'],['../classmingfx_1_1_color.html#a7e0ca85141895a108c852f59f7ca00b9',1,'mingfx::Color::Color(const std::vector< float > &vals)'],['../classmingfx_1_1_color.html#accb83cd759b7290ce2817724d57e246a',1,'mingfx::Color::Color(const Color &p)']]], + ['color_29',['color',['../classmingfx_1_1_text_shader_1_1_text_format.html#af0483874ac3fcea58b6ff99ef6644ff7',1,'mingfx::TextShader::TextFormat']]], + ['color_30',['Color',['../classmingfx_1_1_color.html',1,'mingfx']]], + ['color_2eh_31',['color.h',['../color_8h.html',1,'']]], + ['columntopoint3_32',['ColumnToPoint3',['../classmingfx_1_1_matrix4.html#ae991be2b3bca290b44e676a9f8dc13bd',1,'mingfx::Matrix4']]], + ['columntovector3_33',['ColumnToVector3',['../classmingfx_1_1_matrix4.html#a7396dbff36cb732e1bd878020f52bbc3',1,'mingfx::Matrix4']]], + ['conjugate_34',['Conjugate',['../classmingfx_1_1_quaternion.html#ab0e3e20f78e537de0187def78d808584',1,'mingfx::Quaternion']]], + ['craft_5fcam_2eh_35',['craft_cam.h',['../craft__cam_8h.html',1,'']]], + ['craftcam_36',['CraftCam',['../classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171',1,'mingfx::CraftCam::CraftCam()'],['../classmingfx_1_1_craft_cam.html#ab9e1864b5859c22d27ba809b1ba7a51f',1,'mingfx::CraftCam::CraftCam(const Matrix4 &initial_view_matrix)'],['../classmingfx_1_1_craft_cam.html',1,'mingfx::CraftCam']]], + ['createfromlistofboxes_37',['CreateFromListOfBoxes',['../classmingfx_1_1_b_v_h.html#a964420ca931fa93c420f0820e1b95942',1,'mingfx::BVH']]], + ['createfrommesh_38',['CreateFromMesh',['../classmingfx_1_1_b_v_h.html#a8ed3e91ecd2a0585a0dbac605d6f2c71',1,'mingfx::BVH']]], + ['cross_39',['Cross',['../classmingfx_1_1_vector3.html#a38cd4deed7d342464619b34b0ef95bec',1,'mingfx::Vector3::Cross(const Vector3 &v) const'],['../classmingfx_1_1_vector3.html#a45d7d211135edd97ca21b047439db485',1,'mingfx::Vector3::Cross(const Vector3 &v1, const Vector3 &v2)']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_3.html b/dev/MinGfx/docs/html/search/all_3.html new file mode 100644 index 0000000..39767b8 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_3.js b/dev/MinGfx/docs/html/search/all_3.js new file mode 100644 index 0000000..21881e2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_3.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['default_5fshader_40',['default_shader',['../classmingfx_1_1_quick_shapes.html#aa7564a49dc2ff8efd93dec13186cb75b',1,'mingfx::QuickShapes']]], + ['default_5fshader_2eh_41',['default_shader.h',['../default__shader_8h.html',1,'']]], + ['defaultshader_42',['DefaultShader',['../classmingfx_1_1_default_shader.html#ac030575fd76a6076262bdd09bbb93428',1,'mingfx::DefaultShader::DefaultShader()'],['../classmingfx_1_1_default_shader.html',1,'mingfx::DefaultShader']]], + ['determinant_43',['Determinant',['../classmingfx_1_1_matrix4.html#a0127ebae92b50e4f10ebee8565b0248c',1,'mingfx::Matrix4']]], + ['diffuse_5fintensity_44',['diffuse_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a9a010057c15e3db5661b07a03d5176d7',1,'mingfx::DefaultShader::LightProperties']]], + ['diffuse_5freflectance_45',['diffuse_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#aa7b75f95a45d7a1030c297192b14014f',1,'mingfx::DefaultShader::MaterialProperties']]], + ['dimensions_46',['Dimensions',['../classmingfx_1_1_a_a_b_b.html#a3bf7d5ffa3ccccf7111e98d88a3ffeec',1,'mingfx::AABB']]], + ['direction_47',['direction',['../classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe',1,'mingfx::Ray']]], + ['distancetoplane_48',['DistanceToPlane',['../classmingfx_1_1_point3.html#af554773b2d7f4492a0727e8e42efe002',1,'mingfx::Point3']]], + ['dot_49',['Dot',['../classmingfx_1_1_quaternion.html#a90a9b715d06c75ba60eb1164dc6e9c6f',1,'mingfx::Quaternion::Dot()'],['../classmingfx_1_1_vector2.html#ae2208539c6b29712c22f557dcfdd55d9',1,'mingfx::Vector2::Dot(const Vector2 &v) const'],['../classmingfx_1_1_vector2.html#a9e81c518908ca06c98ba099b075fe1cd',1,'mingfx::Vector2::Dot(const Vector2 &v1, const Vector2 &v2)'],['../classmingfx_1_1_vector3.html#a31692a459a8056fe220d115eb5addc88',1,'mingfx::Vector3::Dot(const Vector3 &v) const'],['../classmingfx_1_1_vector3.html#a235fb20d4075960d2ce6198dc95ac507',1,'mingfx::Vector3::Dot(const Vector3 &v1, const Vector3 &v2)']]], + ['draw_50',['Draw',['../classmingfx_1_1_default_shader.html#a652b3d00bb6ae2a806b1ca3e3d42242b',1,'mingfx::DefaultShader::Draw()'],['../classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c',1,'mingfx::Mesh::Draw()'],['../classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d',1,'mingfx::UniCam::Draw()']]], + ['draw3d_51',['Draw3D',['../classmingfx_1_1_text_shader.html#a2caaaf2decfac523b476951474e9a359',1,'mingfx::TextShader']]], + ['drawarrow_52',['DrawArrow',['../classmingfx_1_1_quick_shapes.html#aebe27814a826558ac0475fef3d4481eb',1,'mingfx::QuickShapes']]], + ['drawaxes_53',['DrawAxes',['../classmingfx_1_1_quick_shapes.html#a637876fdc13e84282922350b53dab5f8',1,'mingfx::QuickShapes']]], + ['drawbrush_54',['DrawBrush',['../classmingfx_1_1_quick_shapes.html#ab24811cfd980b3f2ec4ebccf6c0e8b30',1,'mingfx::QuickShapes']]], + ['drawcone_55',['DrawCone',['../classmingfx_1_1_quick_shapes.html#a1880f6dd3e794cd9f6e5d9138f93a424',1,'mingfx::QuickShapes']]], + ['drawcube_56',['DrawCube',['../classmingfx_1_1_quick_shapes.html#adad98f87a40650ff7c605a94b6d937af',1,'mingfx::QuickShapes']]], + ['drawcylinder_57',['DrawCylinder',['../classmingfx_1_1_quick_shapes.html#a69c442154f800c6bb3f6ffa8395e2844',1,'mingfx::QuickShapes']]], + ['drawfullscreentexture_58',['DrawFullscreenTexture',['../classmingfx_1_1_quick_shapes.html#abec2513648c1238f36c41cf3c85dd868',1,'mingfx::QuickShapes']]], + ['drawlines_59',['DrawLines',['../classmingfx_1_1_quick_shapes.html#af59ae8d8c5bd0447f3bb7f56112400bf',1,'mingfx::QuickShapes']]], + ['drawlinesegment_60',['DrawLineSegment',['../classmingfx_1_1_quick_shapes.html#a0feae19a04d9f315a39e2bdbf659bd7e',1,'mingfx::QuickShapes']]], + ['drawsphere_61',['DrawSphere',['../classmingfx_1_1_quick_shapes.html#aa5f4f64e3708630a6d58f6b4ca7d2744',1,'mingfx::QuickShapes']]], + ['drawsquare_62',['DrawSquare',['../classmingfx_1_1_quick_shapes.html#a4350ea23b8b9e0e8119310423d641ab3',1,'mingfx::QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)'],['../classmingfx_1_1_quick_shapes.html#a7187f72fa8e12b38dcd0ce424fc85fbc',1,'mingfx::QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Texture2D &texture)']]], + ['drawusingnanovg_63',['DrawUsingNanoVG',['../classmingfx_1_1_graphics_app.html#a688f12675da58210e8ec2ffcda4923d0',1,'mingfx::GraphicsApp']]], + ['drawusingopengl_64',['DrawUsingOpenGL',['../classmingfx_1_1_graphics_app.html#a5a858fd10651f7617491f37b49dbf8ca',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_4.html b/dev/MinGfx/docs/html/search/all_4.html new file mode 100644 index 0000000..fc40463 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_4.js b/dev/MinGfx/docs/html/search/all_4.js new file mode 100644 index 0000000..bebfed9 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['extra_65',['extra',['../structstbrp__context.html#a0b80e1fbdac125427526f3500d4e7624',1,'stbrp_context']]], + ['eye_66',['eye',['../classmingfx_1_1_craft_cam.html#a82a8e20596247e2986e5929c1ef7f150',1,'mingfx::CraftCam::eye()'],['../classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2',1,'mingfx::UniCam::eye()']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_5.html b/dev/MinGfx/docs/html/search/all_5.html new file mode 100644 index 0000000..9dd9344 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_5.js b/dev/MinGfx/docs/html/search/all_5.js new file mode 100644 index 0000000..37d0ac9 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_5.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['fastintersectmesh_67',['FastIntersectMesh',['../classmingfx_1_1_ray.html#ac90097090f0f8f49db13f6f232712afc',1,'mingfx::Ray']]], + ['fileexists_68',['FileExists',['../classmingfx_1_1_platform.html#a045007efda73123a7f4019837d83bc92',1,'mingfx::Platform']]], + ['filter_5fmode_69',['filter_mode',['../classmingfx_1_1_texture2_d.html#af0052203fcfd9bbb903a40d14700b13b',1,'mingfx::Texture2D']]], + ['findfile_70',['FindFile',['../classmingfx_1_1_platform.html#a32a392f4bac832c95fabc2d10bd03ad1',1,'mingfx::Platform::FindFile(const std::string &basename, const std::vector< std::string > &searchpath)'],['../classmingfx_1_1_platform.html#a03ade910313dd9580c9e37a7b63f87b2',1,'mingfx::Platform::FindFile(const std::string &basename, const std::string &searchpath)']]], + ['findmingfxdatafile_71',['FindMinGfxDataFile',['../classmingfx_1_1_platform.html#a2c36ca57a246efa218a49a942c8c4a3b',1,'mingfx::Platform']]], + ['findmingfxshaderfile_72',['FindMinGfxShaderFile',['../classmingfx_1_1_platform.html#af12cd63e1ede33529d8c282d7d916169',1,'mingfx::Platform']]], + ['framebuffer_5fheight_73',['framebuffer_height',['../classmingfx_1_1_graphics_app.html#af58153eb104f53216a3e67de2a472f32',1,'mingfx::GraphicsApp']]], + ['framebuffer_5fwidth_74',['framebuffer_width',['../classmingfx_1_1_graphics_app.html#ad596e69d030e7689ad91eaaec6975696',1,'mingfx::GraphicsApp']]], + ['free_5fhead_75',['free_head',['../structstbrp__context.html#a1336ae32373663847866cc65904c2839',1,'stbrp_context']]], + ['fromaxisangle_76',['FromAxisAngle',['../classmingfx_1_1_quaternion.html#a5bacec2f9a3cbbcf24572f9c8eeb480c',1,'mingfx::Quaternion']]], + ['fromeulerangleszyx_77',['FromEulerAnglesZYX',['../classmingfx_1_1_quaternion.html#a9548599ea5c527f9f67d2ea6710e3d18',1,'mingfx::Quaternion']]], + ['fromrowmajorelements_78',['FromRowMajorElements',['../classmingfx_1_1_matrix4.html#add98bfa1cf6a10dbae0e8ae8defe728b',1,'mingfx::Matrix4']]], + ['frustum_79',['Frustum',['../classmingfx_1_1_matrix4.html#a8e2f7b50cd2c8853e007829df9863722',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_6.html b/dev/MinGfx/docs/html/search/all_6.html new file mode 100644 index 0000000..f1e516d --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_6.js b/dev/MinGfx/docs/html/search/all_6.js new file mode 100644 index 0000000..cdf66e4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['gfxmath_80',['GfxMath',['../classmingfx_1_1_gfx_math.html',1,'mingfx']]], + ['gfxmath_2eh_81',['gfxmath.h',['../gfxmath_8h.html',1,'']]], + ['graphics_5fapp_2eh_82',['graphics_app.h',['../graphics__app_8h.html',1,'']]], + ['graphicsapp_83',['GraphicsApp',['../classmingfx_1_1_graphics_app.html#abf0b48c7d8e5325ab038fddbe1c38b5b',1,'mingfx::GraphicsApp::GraphicsApp()'],['../classmingfx_1_1_graphics_app.html',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_7.html b/dev/MinGfx/docs/html/search/all_7.html new file mode 100644 index 0000000..8ddbf6c --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_7.js b/dev/MinGfx/docs/html/search/all_7.js new file mode 100644 index 0000000..90ad431 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_7.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['h_84',['h',['../structstbrp__rect.html#af68de2dadc7972b7c089d5e0c0558398',1,'stbrp_rect']]], + ['h_5falign_85',['h_align',['../classmingfx_1_1_text_shader_1_1_text_format.html#acde55d28b0446e788e6c68b85df83066',1,'mingfx::TextShader::TextFormat']]], + ['half_5fpi_86',['HALF_PI',['../classmingfx_1_1_gfx_math.html#ab5ba8ba54257d86dcf95bd2bbeb534c0',1,'mingfx::GfxMath']]], + ['height_87',['height',['../structstbrp__context.html#af3715a6f3faecfb4fac8f6ccbb71f9c7',1,'stbrp_context::height()'],['../classmingfx_1_1_texture2_d.html#a3c396193b466053f23803894039d8d88',1,'mingfx::Texture2D::height()']]], + ['heuristic_88',['heuristic',['../structstbrp__context.html#a4b61a7f94e50a54c075e2a8f99f6503a',1,'stbrp_context']]], + ['horiz_5falign_5fcenter_89',['HORIZ_ALIGN_CENTER',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca5089ab07b80a999b45667e5711cae1f4',1,'mingfx::TextShader']]], + ['horiz_5falign_5fleft_90',['HORIZ_ALIGN_LEFT',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca8e6d89d62375493a3cc1fb5dba289f92',1,'mingfx::TextShader']]], + ['horiz_5falign_5fright_91',['HORIZ_ALIGN_RIGHT',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca6999f9ad8384a34813e7535baf44f78b',1,'mingfx::TextShader']]], + ['horizalign_92',['HorizAlign',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63c',1,'mingfx::TextShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_8.html b/dev/MinGfx/docs/html/search/all_8.html new file mode 100644 index 0000000..83c55ae --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_8.js b/dev/MinGfx/docs/html/search/all_8.js new file mode 100644 index 0000000..c3a9bd6 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_8.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['id_93',['id',['../structstbrp__rect.html#a92da8626bc99df041c0c3bfd01c25f7a',1,'stbrp_rect']]], + ['ilerp_94',['iLerp',['../classmingfx_1_1_gfx_math.html#af255bde64498e9b55be466abeea97f4d',1,'mingfx::GfxMath']]], + ['init_95',['Init',['../classmingfx_1_1_default_shader.html#a5cb9f0a1709452268858ec338448a4c3',1,'mingfx::DefaultShader::Init()'],['../classmingfx_1_1_text_shader.html#ad60a8b572adc30dad47e2d163dc603a3',1,'mingfx::TextShader::Init()']]], + ['init_5fmode_96',['init_mode',['../structstbrp__context.html#a007509feee322404083034e4c2d3dc5d',1,'stbrp_context']]], + ['initfrombytes_97',['InitFromBytes',['../classmingfx_1_1_texture2_d.html#aba57b01065096fe9f6483e8f68622944',1,'mingfx::Texture2D']]], + ['initfromfile_98',['InitFromFile',['../classmingfx_1_1_texture2_d.html#a8eded044ccdf9bd3e1e5bcfe74526bdc',1,'mingfx::Texture2D']]], + ['initfromfloats_99',['InitFromFloats',['../classmingfx_1_1_texture2_d.html#aee8a0aad1795680cb840ffcf544ed7b8',1,'mingfx::Texture2D']]], + ['initgraphicscontext_100',['InitGraphicsContext',['../classmingfx_1_1_graphics_app.html#a04beb462aa04371dc86d807838f999e1',1,'mingfx::GraphicsApp']]], + ['initialized_101',['initialized',['../classmingfx_1_1_shader_program.html#a2eddd93e446ad2079d1c57676655ffbe',1,'mingfx::ShaderProgram::initialized()'],['../classmingfx_1_1_texture2_d.html#a15d5c319cf7e012e703668f4d4e7be87',1,'mingfx::Texture2D::initialized()']]], + ['initnanogui_102',['InitNanoGUI',['../classmingfx_1_1_graphics_app.html#adfe77d841f43961b299ea6159477968a',1,'mingfx::GraphicsApp']]], + ['initopengl_103',['InitOpenGL',['../classmingfx_1_1_graphics_app.html#a96196b37f8b488b64072ec74b5d2b0b3',1,'mingfx::GraphicsApp']]], + ['installation_20guide_104',['Installation Guide',['../installation.html',1,'']]], + ['installation_2emd_105',['installation.md',['../installation_8md.html',1,'']]], + ['intersectaabb_106',['IntersectAABB',['../classmingfx_1_1_ray.html#a57d3ee10518ed361ae02d9cbdef842b7',1,'mingfx::Ray']]], + ['intersectandreturnuserdata_107',['IntersectAndReturnUserData',['../classmingfx_1_1_b_v_h.html#afad54f50a29e8b3aace6cdec5c792c56',1,'mingfx::BVH']]], + ['intersectmesh_108',['IntersectMesh',['../classmingfx_1_1_ray.html#a79caa1df0839d13339575d3d5527ae6f',1,'mingfx::Ray']]], + ['intersectplane_109',['IntersectPlane',['../classmingfx_1_1_ray.html#a8707604031eb9437c449345d85d69d24',1,'mingfx::Ray']]], + ['intersectquad_110',['IntersectQuad',['../classmingfx_1_1_ray.html#a37689523a0b73d3d3288ce60bdcb7ae3',1,'mingfx::Ray']]], + ['intersectsphere_111',['IntersectSphere',['../classmingfx_1_1_ray.html#a970c7dbc19167be625967fabfb39b4ff',1,'mingfx::Ray']]], + ['intersecttriangle_112',['IntersectTriangle',['../classmingfx_1_1_ray.html#a1a6130616c4e4eebe9d09181b0f8b734',1,'mingfx::Ray']]], + ['inverse_113',['Inverse',['../classmingfx_1_1_matrix4.html#ab3f360906e15730eee621826b5f0bbc5',1,'mingfx::Matrix4']]], + ['iskeydown_114',['IsKeyDown',['../classmingfx_1_1_graphics_app.html#a60688614e5dfeaabf57f8825cdaa08ac',1,'mingfx::GraphicsApp']]], + ['isleftmousedown_115',['IsLeftMouseDown',['../classmingfx_1_1_graphics_app.html#a5b78d79192180a6ef5271d2a2b2d1cc7',1,'mingfx::GraphicsApp']]], + ['ismiddlemousedown_116',['IsMiddleMouseDown',['../classmingfx_1_1_graphics_app.html#a941f7598400073bfa93aa194a3773434',1,'mingfx::GraphicsApp']]], + ['isrightmousedown_117',['IsRightMouseDown',['../classmingfx_1_1_graphics_app.html#a4aa30e3d33731178a9162454a81be08d',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_9.html b/dev/MinGfx/docs/html/search/all_9.html new file mode 100644 index 0000000..1e263c1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_9.js b/dev/MinGfx/docs/html/search/all_9.js new file mode 100644 index 0000000..5ca1017 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_9.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['length_118',['Length',['../classmingfx_1_1_quaternion.html#af6527ae19f31be2b265b8b8c4b34b77a',1,'mingfx::Quaternion::Length()'],['../classmingfx_1_1_ray.html#a3c926e2da6dfd1b0a435577617eae984',1,'mingfx::Ray::Length()'],['../classmingfx_1_1_vector2.html#a71b90903d00cdc318ea42f593db6dbb9',1,'mingfx::Vector2::Length()'],['../classmingfx_1_1_vector3.html#a7633dc1625b1f2e6b381438e896b45a3',1,'mingfx::Vector3::Length()']]], + ['lerp_119',['Lerp',['../classmingfx_1_1_color.html#abdec9bbfdd82ed75afc45b103c8bbcf4',1,'mingfx::Color::Lerp(const Color &b, float alpha) const'],['../classmingfx_1_1_color.html#a883787431fef36c06c724c3b9ed25363',1,'mingfx::Color::Lerp(const Color &a, const Color &b, float alpha)'],['../classmingfx_1_1_gfx_math.html#ace452fb6b86eb638897b474e9dd51647',1,'mingfx::GfxMath::Lerp()'],['../classmingfx_1_1_point2.html#a900567ad5e3c0e6de217b52167c49fd6',1,'mingfx::Point2::Lerp(const Point2 &b, float alpha) const'],['../classmingfx_1_1_point2.html#a680648ae01c549c48f7a3d5d75d8791e',1,'mingfx::Point2::Lerp(const Point2 &a, const Point2 &b, float alpha)'],['../classmingfx_1_1_point3.html#a228a1f3754b8ee82b9bb148ce183fc5b',1,'mingfx::Point3::Lerp(const Point3 &b, float alpha) const'],['../classmingfx_1_1_point3.html#a206691c31872e537eefbf897603dba74',1,'mingfx::Point3::Lerp(const Point3 &a, const Point3 &b, float alpha)'],['../classmingfx_1_1_vector2.html#a5813ffa3c185551eec1927e1daa4cb17',1,'mingfx::Vector2::Lerp(const Vector2 &b, float alpha) const'],['../classmingfx_1_1_vector2.html#ac332b5f01b3357b85e6d279fb059d561',1,'mingfx::Vector2::Lerp(const Vector2 &a, const Vector2 &b, float alpha)'],['../classmingfx_1_1_vector3.html#a8dafc21c64a4964bac27519972d909b6',1,'mingfx::Vector3::Lerp(const Vector3 &b, float alpha) const'],['../classmingfx_1_1_vector3.html#a489b042bedf8fa329ac05fe905ca1c6f',1,'mingfx::Vector3::Lerp(const Vector3 &a, const Vector3 &b, float alpha)']]], + ['light_120',['light',['../classmingfx_1_1_default_shader.html#aa2ed33efad35aefbb400be45250cd316',1,'mingfx::DefaultShader']]], + ['lightproperties_121',['LightProperties',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a582ceee332260b06cbf2ec607257aba3',1,'mingfx::DefaultShader::LightProperties::LightProperties()'],['../classmingfx_1_1_default_shader_1_1_light_properties.html',1,'mingfx::DefaultShader::LightProperties']]], + ['line_5floop_122',['LINE_LOOP',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603a8e0df0247f66bd2cac06f16abb562134',1,'mingfx::QuickShapes']]], + ['line_5fstrip_123',['LINE_STRIP',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603ae64a4d2159ed46d077e21a505575c814',1,'mingfx::QuickShapes']]], + ['lines_124',['LINES',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603ae585142391f356c60bcfe68279ec2727',1,'mingfx::QuickShapes']]], + ['linestype_125',['LinesType',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603',1,'mingfx::QuickShapes']]], + ['linkprogram_126',['LinkProgram',['../classmingfx_1_1_shader_program.html#ad14c3a9a4ee1eef39f933bc46260c794',1,'mingfx::ShaderProgram']]], + ['loadfromobj_127',['LoadFromOBJ',['../classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f',1,'mingfx::Mesh']]], + ['look_128',['look',['../classmingfx_1_1_craft_cam.html#a2c7546bccfbf986eb9cd0a2784f74859',1,'mingfx::CraftCam::look()'],['../classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40',1,'mingfx::UniCam::look()']]], + ['look_5fscale_129',['look_scale',['../classmingfx_1_1_craft_cam.html#a96ba4a36029ca8234576cbf2791c5ccb',1,'mingfx::CraftCam']]], + ['lookat_130',['LookAt',['../classmingfx_1_1_matrix4.html#a4543695a6dfc996d0312b70c2eaa00de',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_a.html b/dev/MinGfx/docs/html/search/all_a.html new file mode 100644 index 0000000..3a6cac1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_a.js b/dev/MinGfx/docs/html/search/all_a.js new file mode 100644 index 0000000..fad4911 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_a.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['mainpage_2emd_131',['mainpage.md',['../mainpage_8md.html',1,'']]], + ['material_132',['material',['../classmingfx_1_1_quick_shapes.html#ac8b702a25296cfea15eef1e185333272',1,'mingfx::QuickShapes']]], + ['materialproperties_133',['MaterialProperties',['../classmingfx_1_1_default_shader_1_1_material_properties.html#aa24361a9c6eb0a87355d0ad00e47dd96',1,'mingfx::DefaultShader::MaterialProperties::MaterialProperties()'],['../classmingfx_1_1_default_shader_1_1_material_properties.html',1,'mingfx::DefaultShader::MaterialProperties']]], + ['matrix4_134',['Matrix4',['../classmingfx_1_1_matrix4.html#a50990f00b756d640670a0b02129afd22',1,'mingfx::Matrix4::Matrix4()'],['../classmingfx_1_1_matrix4.html#a09a366a3ef940ff355f8d5c521baa57d',1,'mingfx::Matrix4::Matrix4(const float *a)'],['../classmingfx_1_1_matrix4.html#a0abaeb690794c4a55e74c9b5fd82d138',1,'mingfx::Matrix4::Matrix4(const std::vector< float > &a)'],['../classmingfx_1_1_matrix4.html#a4bcf311614006c551f57d2b0dcd32d87',1,'mingfx::Matrix4::Matrix4(const Matrix4 &m2)'],['../classmingfx_1_1_matrix4.html',1,'mingfx::Matrix4']]], + ['matrix4_2eh_135',['matrix4.h',['../matrix4_8h.html',1,'']]], + ['max_136',['max',['../classmingfx_1_1_a_a_b_b.html#abac247fedc82467c6b058ed4fe77d2a4',1,'mingfx::AABB']]], + ['max_5flights_137',['MAX_LIGHTS',['../classmingfx_1_1_default_shader.html#a21c1fd93273eaf643e7ac9b05ba0fb24',1,'mingfx::DefaultShader']]], + ['mesh_138',['Mesh',['../classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9',1,'mingfx::Mesh::Mesh()'],['../classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1',1,'mingfx::Mesh::Mesh(const Mesh &other)'],['../classmingfx_1_1_mesh.html',1,'mingfx::Mesh']]], + ['mesh_2eh_139',['mesh.h',['../mesh_8h.html',1,'']]], + ['min_140',['min',['../classmingfx_1_1_a_a_b_b.html#a3b46cdd39ffed26b7982d641b53158e6',1,'mingfx::AABB']]], + ['mingfx_141',['mingfx',['../namespacemingfx.html',1,'']]], + ['mingfx_20toolkit_20documentation_142',['MinGfx Toolkit Documentation',['../index.html',1,'']]], + ['mingfx_2eh_143',['mingfx.h',['../mingfx_8h.html',1,'']]], + ['mingfx_5fconfig_2eh_144',['mingfx_config.h',['../mingfx__config_8h.html',1,'']]], + ['mingfx_5fdata_5fdir_5fbuild_145',['MINGFX_DATA_DIR_BUILD',['../mingfx__config_8h.html#a9ab97d1e09bf7a864495329de5dc7e03',1,'mingfx_config.h']]], + ['mingfx_5fdata_5fdir_5finstall_146',['MINGFX_DATA_DIR_INSTALL',['../mingfx__config_8h.html#a1e44357d7f17eb50f842d9e39e55e398',1,'mingfx_config.h']]], + ['mingfx_5fmath_5fepsilon_147',['MINGFX_MATH_EPSILON',['../point2_8h.html#a432350d21fbc10d5e65eeeb6859511ea',1,'MINGFX_MATH_EPSILON(): point2.h'],['../point3_8h.html#a432350d21fbc10d5e65eeeb6859511ea',1,'MINGFX_MATH_EPSILON(): point3.h']]], + ['mingfx_5fshaders_5fdir_5fbuild_148',['MINGFX_SHADERS_DIR_BUILD',['../mingfx__config_8h.html#a1908456b5481e0dbbe2b8252fa71d23f',1,'mingfx_config.h']]], + ['mingfx_5fshaders_5fdir_5finstall_149',['MINGFX_SHADERS_DIR_INSTALL',['../mingfx__config_8h.html#ab431df904057e50ac94550595473f5f4',1,'mingfx_config.h']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_b.html b/dev/MinGfx/docs/html/search/all_b.html new file mode 100644 index 0000000..130deb4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_b.js b/dev/MinGfx/docs/html/search/all_b.js new file mode 100644 index 0000000..9dd041b --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_b.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['native_5ffont_5fsize_150',['native_font_size',['../classmingfx_1_1_text_shader.html#a707b2b36547db78d19139575003c8a0d',1,'mingfx::TextShader']]], + ['next_151',['next',['../structstbrp__node.html#a933cb2dd6cddc4fcaf10e3b40634bed4',1,'stbrp_node']]], + ['normalize_152',['Normalize',['../classmingfx_1_1_quaternion.html#a05def5c8eb729037b3d9522711a5c2a2',1,'mingfx::Quaternion::Normalize()'],['../classmingfx_1_1_vector2.html#a632ddd5b06c48fa0f6f39550e91082c0',1,'mingfx::Vector2::Normalize()'],['../classmingfx_1_1_vector2.html#a06d6c283aba957bddc2b9849698838b2',1,'mingfx::Vector2::Normalize(const Vector2 &v)'],['../classmingfx_1_1_vector3.html#a9b8e9ecbe10477adec527842f62d0dca',1,'mingfx::Vector3::Normalize()'],['../classmingfx_1_1_vector3.html#aeff0177e2111139469b60733248fad8d',1,'mingfx::Vector3::Normalize(const Vector3 &v)']]], + ['normalizeddevicecoordstopixels_153',['NormalizedDeviceCoordsToPixels',['../classmingfx_1_1_graphics_app.html#a6141ec6adc29572ee99ca26cf90e6248',1,'mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC)'],['../classmingfx_1_1_graphics_app.html#a45596da36aa3905e7c752826a7fd9f93',1,'mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC)']]], + ['num_5flights_154',['num_lights',['../classmingfx_1_1_default_shader.html#ac5b779672a983df8aa67c9cbe026e0c2',1,'mingfx::DefaultShader']]], + ['num_5fnodes_155',['num_nodes',['../structstbrp__context.html#afa8105d4ef6d3e0ae5aaf8e1ed4b2c58',1,'stbrp_context']]], + ['num_5ftriangles_156',['num_triangles',['../classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f',1,'mingfx::Mesh']]], + ['num_5fvertices_157',['num_vertices',['../classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d',1,'mingfx::Mesh']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_c.html b/dev/MinGfx/docs/html/search/all_c.html new file mode 100644 index 0000000..3dd5af0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_c.js b/dev/MinGfx/docs/html/search/all_c.js new file mode 100644 index 0000000..807da6b --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_c.js @@ -0,0 +1,40 @@ +var searchData= +[ + ['onbuttondown_158',['OnButtonDown',['../classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f',1,'mingfx::UniCam']]], + ['onbuttonup_159',['OnButtonUp',['../classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a',1,'mingfx::UniCam']]], + ['ondrag_160',['OnDrag',['../classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe',1,'mingfx::UniCam']]], + ['one_161',['One',['../classmingfx_1_1_point2.html#a38149d8797bf7406fc34cab0ea5a3ac8',1,'mingfx::Point2::One()'],['../classmingfx_1_1_point3.html#a2cfcbefe652720779e0d7beff1c86ece',1,'mingfx::Point3::One()'],['../classmingfx_1_1_vector2.html#a5b51e62f03e95d6be1262f037aecf0fd',1,'mingfx::Vector2::One()'],['../classmingfx_1_1_vector3.html#af71b12760516a9cc4837ba9e1dee28db',1,'mingfx::Vector3::One()']]], + ['onkeydown_162',['OnKeyDown',['../classmingfx_1_1_graphics_app.html#a002560456139e537877d079978db4b01',1,'mingfx::GraphicsApp']]], + ['onkeyrepeat_163',['OnKeyRepeat',['../classmingfx_1_1_graphics_app.html#a1d5831953b37fae615fbd1bf527214b0',1,'mingfx::GraphicsApp']]], + ['onkeyup_164',['OnKeyUp',['../classmingfx_1_1_graphics_app.html#a8376ef8eb0840b229a2301f995db3f6c',1,'mingfx::GraphicsApp']]], + ['onleftmousedown_165',['OnLeftMouseDown',['../classmingfx_1_1_graphics_app.html#ae12d9b192a2167a71e0c103405addb17',1,'mingfx::GraphicsApp']]], + ['onleftmousedrag_166',['OnLeftMouseDrag',['../classmingfx_1_1_graphics_app.html#a56d350a8b030998709a51630753d509b',1,'mingfx::GraphicsApp']]], + ['onleftmouseup_167',['OnLeftMouseUp',['../classmingfx_1_1_graphics_app.html#a536dbadf0b8a11ef59d7e855ca43f613',1,'mingfx::GraphicsApp']]], + ['onmiddlemousedown_168',['OnMiddleMouseDown',['../classmingfx_1_1_graphics_app.html#a588315d5c45490b440a764af2bc5bd48',1,'mingfx::GraphicsApp']]], + ['onmiddlemousedrag_169',['OnMiddleMouseDrag',['../classmingfx_1_1_graphics_app.html#ac7628fece754c0ac4875791e19712dc6',1,'mingfx::GraphicsApp']]], + ['onmiddlemouseup_170',['OnMiddleMouseUp',['../classmingfx_1_1_graphics_app.html#a378b8a102775eeb01a6da9dd68482d08',1,'mingfx::GraphicsApp']]], + ['onmousemove_171',['OnMouseMove',['../classmingfx_1_1_graphics_app.html#a23a780feda9b52eea7319a53b204ce8f',1,'mingfx::GraphicsApp::OnMouseMove()'],['../classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311',1,'mingfx::CraftCam::OnMouseMove()']]], + ['onrightmousedown_172',['OnRightMouseDown',['../classmingfx_1_1_graphics_app.html#a903f94b82cc10f32039ff3f2ba368a9c',1,'mingfx::GraphicsApp']]], + ['onrightmousedrag_173',['OnRightMouseDrag',['../classmingfx_1_1_graphics_app.html#a00ad5039af2f428a08fe45751a9731c7',1,'mingfx::GraphicsApp']]], + ['onrightmouseup_174',['OnRightMouseUp',['../classmingfx_1_1_graphics_app.html#ad7c33791c44afc87ce789874f3002ca3',1,'mingfx::GraphicsApp']]], + ['onspecialkeydown_175',['OnSpecialKeyDown',['../classmingfx_1_1_graphics_app.html#abcf1935e92550bcda311cac62f312952',1,'mingfx::GraphicsApp']]], + ['onspecialkeyrepeat_176',['OnSpecialKeyRepeat',['../classmingfx_1_1_graphics_app.html#a8362762489e287edfa59617a6602db22',1,'mingfx::GraphicsApp']]], + ['onspecialkeyup_177',['OnSpecialKeyUp',['../classmingfx_1_1_graphics_app.html#a0deb6da45fc0d3980e44556a861c7a14',1,'mingfx::GraphicsApp']]], + ['onwindowresize_178',['OnWindowResize',['../classmingfx_1_1_graphics_app.html#adafdc4631db256fefce3c4ffdfd5086a',1,'mingfx::GraphicsApp']]], + ['opengl_5fheaders_2eh_179',['opengl_headers.h',['../opengl__headers_8h.html',1,'']]], + ['opengl_5fid_180',['opengl_id',['../classmingfx_1_1_texture2_d.html#ad4e0faadfe016e6ee501e66fc0244504',1,'mingfx::Texture2D']]], + ['operator_21_3d_181',['operator!=',['../classmingfx_1_1_color.html#acf92f9f413cf11639b73dc0d7d431244',1,'mingfx::Color::operator!=()'],['../classmingfx_1_1_matrix4.html#ab186b0ae1ae669346c0718c2489cd71b',1,'mingfx::Matrix4::operator!=()'],['../classmingfx_1_1_point2.html#a5b99fcf93a0c6d2b247290f5564f8a84',1,'mingfx::Point2::operator!=()'],['../classmingfx_1_1_point3.html#acccf9d3fca27174c18ada3b33209c71e',1,'mingfx::Point3::operator!=()'],['../classmingfx_1_1_quaternion.html#ad72c021d2d1fa543c96ac4a8b360dd2e',1,'mingfx::Quaternion::operator!=()'],['../classmingfx_1_1_ray.html#ab62fa6ea1c20870f67c58401aefe3eff',1,'mingfx::Ray::operator!=()'],['../classmingfx_1_1_vector2.html#a1cf3488f1f14a9bf7f6e1278c1c63cdb',1,'mingfx::Vector2::operator!=()'],['../classmingfx_1_1_vector3.html#ab93acb916c310920b9c011159eaaa016',1,'mingfx::Vector3::operator!=()']]], + ['operator_28_29_182',['operator()',['../classmingfx_1_1_matrix4.html#aa324d0cec02c452fb938af28725d5df9',1,'mingfx::Matrix4::operator()(const int row, const int col) const'],['../classmingfx_1_1_matrix4.html#a470bba77b8e3c47de7adaa18046e6096',1,'mingfx::Matrix4::operator()(const int row, const int col)']]], + ['operator_2a_183',['operator*',['../namespacemingfx.html#a0a456bccfb238b9644cf21669cf35b8c',1,'mingfx::operator*(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a1af1c07624961984759120b7af7f9ce4',1,'mingfx::operator*(const Matrix4 &m, const Ray &r)'],['../namespacemingfx.html#adb96b0188d1ceda03ed8d297817502c9',1,'mingfx::operator*(const Quaternion &q, const float s)'],['../namespacemingfx.html#a55f694123e83d1649c112e806359d4b6',1,'mingfx::operator*(const float s, const Quaternion &q)'],['../namespacemingfx.html#aa8a18cb8506dee589eaf6883a32e6fb5',1,'mingfx::operator*(const Vector3 &v, const float s)'],['../namespacemingfx.html#a7e3941689c65388690916d00e0d423d4',1,'mingfx::operator*(const float s, const Vector3 &v)'],['../namespacemingfx.html#a8358de6421374fb037e8c51e8f2d5878',1,'mingfx::operator*(const Vector2 &v, const float s)'],['../namespacemingfx.html#a8bc25e621d21323fdd96f2c4a4141432',1,'mingfx::operator*(const float s, const Vector2 &v)'],['../namespacemingfx.html#aadc0e86a31d54469e730669067b102c2',1,'mingfx::operator*(const Matrix4 &m1, const Matrix4 &m2)'],['../namespacemingfx.html#abb2cfd42e696494e4797d8f7e11f6d77',1,'mingfx::operator*(const Matrix4 &m, const Vector3 &v)'],['../namespacemingfx.html#a5b8dabff5d6c9ddcef5e15b0ef807c80',1,'mingfx::operator*(const Matrix4 &m, const Point3 &p)'],['../namespacemingfx.html#a061ff38340cf1aad4612790b0a600aeb',1,'mingfx::operator*(const float &s, const Matrix4 &m)'],['../namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57',1,'mingfx::operator*(const Matrix4 &m, const float &s)']]], + ['operator_2b_184',['operator+',['../namespacemingfx.html#ab2083f9992ba509a275db11522f16a2e',1,'mingfx::operator+(const Point2 &p, const Vector2 &v)'],['../namespacemingfx.html#ac71c01d7c300671cb343a24b68a875bf',1,'mingfx::operator+(const Vector2 &v, const Point2 &p)'],['../namespacemingfx.html#ad49375487853a642b3f372c95cff1a96',1,'mingfx::operator+(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a3c3b45ed6edf3fe76f98a7fd165dca03',1,'mingfx::operator+(const AABB &A, const AABB &B)'],['../classmingfx_1_1_a_a_b_b.html#a60e301aa632dd49eccdc27bab7c6d231',1,'mingfx::AABB::operator+()'],['../namespacemingfx.html#aeeeb04b70f8e8becbcda7a3dc7024c1b',1,'mingfx::operator+(const Vector3 &v1, const Vector3 &v2)'],['../namespacemingfx.html#aadea317107a50ec6847ce01927b61c82',1,'mingfx::operator+(const Point3 &p, const Vector3 &v)'],['../namespacemingfx.html#a4b4428d2cf65ba5226ef4036352d311e',1,'mingfx::operator+(const Vector3 &v, const Point3 &p)'],['../namespacemingfx.html#acdffada748181cc17ec93784f858ff9f',1,'mingfx::operator+(const Vector2 &v1, const Vector2 &v2)']]], + ['operator_2d_185',['operator-',['../namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6',1,'mingfx::operator-(const Quaternion &q)'],['../namespacemingfx.html#a61f2d974c78e8884bb64c2759e455101',1,'mingfx::operator-(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a5daeaa383c40eed6f41b2c1b7930499f',1,'mingfx::operator-(const Vector2 &v)'],['../namespacemingfx.html#ae81fac825c0f6eca59cc1a1cc06d63f2',1,'mingfx::operator-(const Point2 &p, const Vector2 &v)'],['../namespacemingfx.html#a128585c0b87e03beda4a660d4e58789b',1,'mingfx::operator-(const Vector2 &v1, const Vector2 &v2)'],['../namespacemingfx.html#ad370bce0bb5b88beb974aad1d44890e8',1,'mingfx::operator-(const Point2 &p1, const Point2 &p2)'],['../namespacemingfx.html#afd07add6169773bae12d40201f8af7db',1,'mingfx::operator-(const Vector3 &v)'],['../namespacemingfx.html#a579b90d99a1d6f794ca44017ded3a8db',1,'mingfx::operator-(const Point3 &p, const Vector3 &v)'],['../namespacemingfx.html#aecdf7f36c4feb04034f1d07c49d5c0e3',1,'mingfx::operator-(const Vector3 &v1, const Vector3 &v2)'],['../namespacemingfx.html#a77d92da8f1a866306518422cd9d2f0af',1,'mingfx::operator-(const Point3 &p1, const Point3 &p2)']]], + ['operator_2f_186',['operator/',['../namespacemingfx.html#a444ae88d836b913ac8307fbf4357f7ed',1,'mingfx::operator/(const Quaternion &q, const float s)'],['../namespacemingfx.html#a79ffb6c38c6c0b68ce1fdb7ae76ea6bd',1,'mingfx::operator/(const Vector2 &v, const float s)'],['../namespacemingfx.html#aa19b1dea0b7aa468950e56044fda328a',1,'mingfx::operator/(const Vector3 &v, const float s)']]], + ['operator_3c_3c_187',['operator<<',['../namespacemingfx.html#a6bc967741341f4f318a505d884192906',1,'mingfx::operator<<(std::ostream &os, const Color &c)'],['../namespacemingfx.html#a1584104dea1f0a5636c868b67ddf6b10',1,'mingfx::operator<<(std::ostream &os, const Matrix4 &m)'],['../namespacemingfx.html#a58ddc500b8c3e12f8af4515f258540cb',1,'mingfx::operator<<(std::ostream &os, const Point2 &p)'],['../namespacemingfx.html#a53ce6bc4f4abdd3797d7af47adecbaf6',1,'mingfx::operator<<(std::ostream &os, const Point3 &p)'],['../namespacemingfx.html#ac4b78a682ff8d1ec298e0df7f742658d',1,'mingfx::operator<<(std::ostream &os, const Quaternion &q)'],['../namespacemingfx.html#ad7c839e598b7be6c1b407330dfacc980',1,'mingfx::operator<<(std::ostream &os, const Ray &r)'],['../namespacemingfx.html#acbe43aa24ecedf663c65becf2be282c7',1,'mingfx::operator<<(std::ostream &os, const Vector2 &v)'],['../namespacemingfx.html#a3425c24faf923364cd3a764d50601c52',1,'mingfx::operator<<(std::ostream &os, const Vector3 &v)']]], + ['operator_3d_188',['operator=',['../classmingfx_1_1_vector3.html#aa5b1c05c285fad7f2709f6f351a63608',1,'mingfx::Vector3::operator=()'],['../classmingfx_1_1_vector2.html#a28c44a323e5bd1a251dee9e00e2e1769',1,'mingfx::Vector2::operator=()'],['../classmingfx_1_1_quaternion.html#ac5f82b7ed1d620c3c15f57aca028fcdd',1,'mingfx::Quaternion::operator=()'],['../classmingfx_1_1_point3.html#a8e54b18bfaa39f4b7048b85c9ca43c3d',1,'mingfx::Point3::operator=()'],['../classmingfx_1_1_point2.html#afc68153cce7dc528e95cf5ad81c63902',1,'mingfx::Point2::operator=()'],['../classmingfx_1_1_matrix4.html#a9ad8a8bc180ce213956d6d7d3fa19770',1,'mingfx::Matrix4::operator=()'],['../classmingfx_1_1_color.html#ae51a066a9bb018e4f050d9b8cc7f330e',1,'mingfx::Color::operator=()']]], + ['operator_3d_3d_189',['operator==',['../classmingfx_1_1_vector2.html#ad7acc2cf4dcd2eca210899c846bb7dfe',1,'mingfx::Vector2::operator==()'],['../classmingfx_1_1_ray.html#a87b07c4f7c9f33189efade7e519b5d9d',1,'mingfx::Ray::operator==()'],['../classmingfx_1_1_quaternion.html#aa89165641485cf9337cd6279df40a403',1,'mingfx::Quaternion::operator==()'],['../classmingfx_1_1_point3.html#ab22d5cc4631f26274ada550c90d39699',1,'mingfx::Point3::operator==()'],['../classmingfx_1_1_point2.html#ae8729260293b993bbf3cb31c0a33edfa',1,'mingfx::Point2::operator==()'],['../classmingfx_1_1_matrix4.html#a9ec2ee167a450cd7b992384e4cc5bb73',1,'mingfx::Matrix4::operator==()'],['../classmingfx_1_1_color.html#a5411077527ff2a12d18ce1ae52688cf0',1,'mingfx::Color::operator==()'],['../classmingfx_1_1_vector3.html#a85486d0a355417fe4b41fa64146c9e98',1,'mingfx::Vector3::operator==()']]], + ['operator_3e_3e_190',['operator>>',['../namespacemingfx.html#a256924759a6718882a2b40e17d3e523d',1,'mingfx::operator>>(std::istream &is, Point2 &p)'],['../namespacemingfx.html#ad95e9b494b9761895d57e2b698b69afd',1,'mingfx::operator>>(std::istream &is, Point3 &p)'],['../namespacemingfx.html#a59fb7a99df5c572849e31065884b2235',1,'mingfx::operator>>(std::istream &is, Quaternion &q)'],['../namespacemingfx.html#a0412270963460363fa015b9b4785cc59',1,'mingfx::operator>>(std::istream &is, Ray &r)'],['../namespacemingfx.html#ab3f12496d7a5028b71882373d6fa7203',1,'mingfx::operator>>(std::istream &is, Vector2 &v)'],['../namespacemingfx.html#a8cc2f52569661416cb2ca67c516b7c93',1,'mingfx::operator>>(std::istream &is, Vector3 &v)'],['../namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d',1,'mingfx::operator>>(std::istream &is, Color &c)'],['../namespacemingfx.html#a05fc1c0b2b6011283c019242d6a2de74',1,'mingfx::operator>>(std::istream &is, Matrix4 &m)']]], + ['operator_5b_5d_191',['operator[]',['../classmingfx_1_1_quaternion.html#a548d09ecd25788241d734240c0dd7ea8',1,'mingfx::Quaternion::operator[](const int i) const'],['../classmingfx_1_1_quaternion.html#a40e6587cc0511572297c5507634db7e1',1,'mingfx::Quaternion::operator[](const int i)'],['../classmingfx_1_1_vector2.html#ae1fc0ce3ca1af3d0546af32742e13000',1,'mingfx::Vector2::operator[](const int i) const'],['../classmingfx_1_1_vector2.html#a93acf7f4f150cfe53859e31d90eddd1e',1,'mingfx::Vector2::operator[](const int i)'],['../classmingfx_1_1_vector3.html#aa37b1fc4b1df9f72726d981c08cd0d1b',1,'mingfx::Vector3::operator[]()'],['../classmingfx_1_1_point3.html#a790468d68b6d957b22959f9078f85c3e',1,'mingfx::Point3::operator[]()'],['../classmingfx_1_1_matrix4.html#acd64f0db45e255d61dde4f6fa10a4127',1,'mingfx::Matrix4::operator[]()'],['../classmingfx_1_1_color.html#a474ed028db8b31e359d8bfec50147bcc',1,'mingfx::Color::operator[](const int i)'],['../classmingfx_1_1_color.html#aa879c4f6e90c419a2c121e323ce31500',1,'mingfx::Color::operator[](const int i) const'],['../classmingfx_1_1_vector3.html#abcdda4627b24af879aba38d4fc0e6f71',1,'mingfx::Vector3::operator[]()'],['../classmingfx_1_1_point3.html#a3a586db5b58d5f1fdaddb1e33e84d566',1,'mingfx::Point3::operator[]()'],['../classmingfx_1_1_point2.html#a50f09df619fd226e6dc3ccff452abab3',1,'mingfx::Point2::operator[](const int i)'],['../classmingfx_1_1_point2.html#af4c0cc334dfbfe8e8068156e6da16542',1,'mingfx::Point2::operator[](const int i) const'],['../classmingfx_1_1_matrix4.html#af9b02807d81eac55d66238f246c53656',1,'mingfx::Matrix4::operator[]()']]], + ['origin_192',['origin',['../classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe',1,'mingfx::Ray']]], + ['origin_193',['Origin',['../classmingfx_1_1_point2.html#a24d7a5121fceba01b46f3ba0f6525630',1,'mingfx::Point2::Origin()'],['../classmingfx_1_1_point3.html#aecb7c3137356cd4470851c54a47c7930',1,'mingfx::Point3::Origin()']]], + ['orthonormal_194',['Orthonormal',['../classmingfx_1_1_matrix4.html#a9ad5c85784e84fa0a941361eaaae0250',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_d.html b/dev/MinGfx/docs/html/search/all_d.html new file mode 100644 index 0000000..af7f2f0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_d.js b/dev/MinGfx/docs/html/search/all_d.js new file mode 100644 index 0000000..06660c9 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_d.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['perspective_195',['Perspective',['../classmingfx_1_1_matrix4.html#a0e34aee86758a0397074590b87712c5e',1,'mingfx::Matrix4']]], + ['pi_196',['PI',['../classmingfx_1_1_gfx_math.html#aaa14e60a5f7c158db443f8b6d87958b4',1,'mingfx::GfxMath']]], + ['pixel_197',['Pixel',['../classmingfx_1_1_texture2_d.html#a1e843f3d8904f9c7a99f7614f87de73b',1,'mingfx::Texture2D']]], + ['pixelstonormalizeddevicecoords_198',['PixelsToNormalizedDeviceCoords',['../classmingfx_1_1_graphics_app.html#a94b19404e61411ef64c0ddde8ad6c07a',1,'mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels)'],['../classmingfx_1_1_graphics_app.html#a4e8ac965474de9046448b8811bf25dd1',1,'mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels)']]], + ['platform_199',['Platform',['../classmingfx_1_1_platform.html',1,'mingfx']]], + ['platform_2eh_200',['platform.h',['../platform_8h.html',1,'']]], + ['point2_201',['Point2',['../classmingfx_1_1_point2.html',1,'mingfx::Point2'],['../classmingfx_1_1_point2.html#a2e5869d810b52be4ba43c8a4f4e117a1',1,'mingfx::Point2::Point2()'],['../classmingfx_1_1_point2.html#a716fcff21456f29561ec27118a646483',1,'mingfx::Point2::Point2(float x, float y)'],['../classmingfx_1_1_point2.html#a4ba487a2038ebc78b461b66f1987053f',1,'mingfx::Point2::Point2(float *p)'],['../classmingfx_1_1_point2.html#a97464af92444984e275dca38a3f4eef0',1,'mingfx::Point2::Point2(const Point2 &p)']]], + ['point2_2eh_202',['point2.h',['../point2_8h.html',1,'']]], + ['point3_203',['Point3',['../classmingfx_1_1_point3.html',1,'mingfx::Point3'],['../classmingfx_1_1_point3.html#ae8ab322852c24c6e03bed03cac443664',1,'mingfx::Point3::Point3()'],['../classmingfx_1_1_point3.html#a29d113f0fa37fa04a642817c680fe953',1,'mingfx::Point3::Point3(float x, float y, float z)'],['../classmingfx_1_1_point3.html#a062caf579ef643b25129cc35b3dbe756',1,'mingfx::Point3::Point3(float *p)'],['../classmingfx_1_1_point3.html#a23534a1ce3d4466c303b9205bd21cd97',1,'mingfx::Point3::Point3(const Point3 &p)']]], + ['point3_2eh_204',['point3.h',['../point3_8h.html',1,'']]], + ['position_205',['position',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a160b58a0e70294008b9dac8eb6291d3e',1,'mingfx::DefaultShader::LightProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_e.html b/dev/MinGfx/docs/html/search/all_e.html new file mode 100644 index 0000000..e25df42 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_e.js b/dev/MinGfx/docs/html/search/all_e.js new file mode 100644 index 0000000..9afb687 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_e.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['quaternion_206',['Quaternion',['../classmingfx_1_1_quaternion.html',1,'mingfx::Quaternion'],['../classmingfx_1_1_quaternion.html#ad58ac80804ec63af354912a71361f165',1,'mingfx::Quaternion::Quaternion()'],['../classmingfx_1_1_quaternion.html#a5c6cbe4fc70e8e4ec23142d0a5a2ba97',1,'mingfx::Quaternion::Quaternion(float qx, float qy, float qz, float qw)'],['../classmingfx_1_1_quaternion.html#a07bb09eb7d0b368ef5e8d9da02fbdad6',1,'mingfx::Quaternion::Quaternion(float *ptr)'],['../classmingfx_1_1_quaternion.html#a0be885a1b3f2d54675c6866ec3578243',1,'mingfx::Quaternion::Quaternion(const Quaternion &other)']]], + ['quaternion_2eh_207',['quaternion.h',['../quaternion_8h.html',1,'']]], + ['quick_5fshapes_2eh_208',['quick_shapes.h',['../quick__shapes_8h.html',1,'']]], + ['quickshapes_209',['QuickShapes',['../classmingfx_1_1_quick_shapes.html',1,'mingfx::QuickShapes'],['../classmingfx_1_1_quick_shapes.html#a5764a0953013ece013bf3e2a72e4afa2',1,'mingfx::QuickShapes::QuickShapes()']]] +]; diff --git a/dev/MinGfx/docs/html/search/all_f.html b/dev/MinGfx/docs/html/search/all_f.html new file mode 100644 index 0000000..b23da6c --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/all_f.js b/dev/MinGfx/docs/html/search/all_f.js new file mode 100644 index 0000000..2954e71 --- /dev/null +++ b/dev/MinGfx/docs/html/search/all_f.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['ray_210',['Ray',['../classmingfx_1_1_ray.html',1,'mingfx::Ray'],['../classmingfx_1_1_ray.html#aee3fe586869e00ae657a74bb4bbbbfda',1,'mingfx::Ray::Ray()'],['../classmingfx_1_1_ray.html#ab38cdd0793b3acfe55fa9ebca5ddebf6',1,'mingfx::Ray::Ray(const Point3 &origin, const Vector3 &direction)']]], + ['ray_2eh_211',['ray.h',['../ray_8h.html',1,'']]], + ['read_5fcolor_5fdata_212',['read_color_data',['../classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3',1,'mingfx::Mesh']]], + ['read_5fnormal_5fdata_213',['read_normal_data',['../classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65',1,'mingfx::Mesh']]], + ['read_5ftex_5fcoords_5fdata_214',['read_tex_coords_data',['../classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31',1,'mingfx::Mesh']]], + ['read_5ftriangle_5findices_5fdata_215',['read_triangle_indices_data',['../classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a',1,'mingfx::Mesh']]], + ['read_5fvertex_5fdata_216',['read_vertex_data',['../classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863',1,'mingfx::Mesh']]], + ['readzvalueatpixel_217',['ReadZValueAtPixel',['../classmingfx_1_1_graphics_app.html#a471951dbf45ffa88027cb92707443646',1,'mingfx::GraphicsApp']]], + ['resizewindow_218',['ResizeWindow',['../classmingfx_1_1_graphics_app.html#a0db71b2465e12a8aef4eefbe8b9fcee5',1,'mingfx::GraphicsApp']]], + ['rotation_219',['Rotation',['../classmingfx_1_1_matrix4.html#acf4abaf4a45826f14b435edf80a8d0e0',1,'mingfx::Matrix4']]], + ['rotation_5fscale_220',['rotation_scale',['../classmingfx_1_1_craft_cam.html#a9fe22cc3b933b12674a5b8f1b5c834ac',1,'mingfx::CraftCam']]], + ['rotationx_221',['RotationX',['../classmingfx_1_1_matrix4.html#a48615deb30590055c0aa9f207eee7f08',1,'mingfx::Matrix4']]], + ['rotationy_222',['RotationY',['../classmingfx_1_1_matrix4.html#aef94f0e9d298a7ba57e0119ef09b71b6',1,'mingfx::Matrix4']]], + ['rotationz_223',['RotationZ',['../classmingfx_1_1_matrix4.html#a4bf1dced8875fdc5827b5b8869e9de93',1,'mingfx::Matrix4']]], + ['run_224',['Run',['../classmingfx_1_1_graphics_app.html#a5ee9ae3d14e76c949979a8008687d6c9',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_0.html b/dev/MinGfx/docs/html/search/classes_0.html new file mode 100644 index 0000000..af8159e --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_0.js b/dev/MinGfx/docs/html/search/classes_0.js new file mode 100644 index 0000000..330629d --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['aabb_346',['AABB',['../classmingfx_1_1_a_a_b_b.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_1.html b/dev/MinGfx/docs/html/search/classes_1.html new file mode 100644 index 0000000..576e916 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_1.js b/dev/MinGfx/docs/html/search/classes_1.js new file mode 100644 index 0000000..f319bae --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bvh_347',['BVH',['../classmingfx_1_1_b_v_h.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_2.html b/dev/MinGfx/docs/html/search/classes_2.html new file mode 100644 index 0000000..956405e --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_2.js b/dev/MinGfx/docs/html/search/classes_2.js new file mode 100644 index 0000000..df49d92 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['color_348',['Color',['../classmingfx_1_1_color.html',1,'mingfx']]], + ['craftcam_349',['CraftCam',['../classmingfx_1_1_craft_cam.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_3.html b/dev/MinGfx/docs/html/search/classes_3.html new file mode 100644 index 0000000..d33343b --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_3.js b/dev/MinGfx/docs/html/search/classes_3.js new file mode 100644 index 0000000..7bdfefb --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['defaultshader_350',['DefaultShader',['../classmingfx_1_1_default_shader.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_4.html b/dev/MinGfx/docs/html/search/classes_4.html new file mode 100644 index 0000000..8430b07 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_4.js b/dev/MinGfx/docs/html/search/classes_4.js new file mode 100644 index 0000000..11c5783 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['gfxmath_351',['GfxMath',['../classmingfx_1_1_gfx_math.html',1,'mingfx']]], + ['graphicsapp_352',['GraphicsApp',['../classmingfx_1_1_graphics_app.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_5.html b/dev/MinGfx/docs/html/search/classes_5.html new file mode 100644 index 0000000..c2f1b76 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_5.js b/dev/MinGfx/docs/html/search/classes_5.js new file mode 100644 index 0000000..eac06bc --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lightproperties_353',['LightProperties',['../classmingfx_1_1_default_shader_1_1_light_properties.html',1,'mingfx::DefaultShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_6.html b/dev/MinGfx/docs/html/search/classes_6.html new file mode 100644 index 0000000..e39847c --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_6.js b/dev/MinGfx/docs/html/search/classes_6.js new file mode 100644 index 0000000..48928b8 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['materialproperties_354',['MaterialProperties',['../classmingfx_1_1_default_shader_1_1_material_properties.html',1,'mingfx::DefaultShader']]], + ['matrix4_355',['Matrix4',['../classmingfx_1_1_matrix4.html',1,'mingfx']]], + ['mesh_356',['Mesh',['../classmingfx_1_1_mesh.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_7.html b/dev/MinGfx/docs/html/search/classes_7.html new file mode 100644 index 0000000..a2c4d1a --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_7.js b/dev/MinGfx/docs/html/search/classes_7.js new file mode 100644 index 0000000..89c36aa --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['platform_357',['Platform',['../classmingfx_1_1_platform.html',1,'mingfx']]], + ['point2_358',['Point2',['../classmingfx_1_1_point2.html',1,'mingfx']]], + ['point3_359',['Point3',['../classmingfx_1_1_point3.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_8.html b/dev/MinGfx/docs/html/search/classes_8.html new file mode 100644 index 0000000..17003e4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_8.js b/dev/MinGfx/docs/html/search/classes_8.js new file mode 100644 index 0000000..fe32295 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['quaternion_360',['Quaternion',['../classmingfx_1_1_quaternion.html',1,'mingfx']]], + ['quickshapes_361',['QuickShapes',['../classmingfx_1_1_quick_shapes.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_9.html b/dev/MinGfx/docs/html/search/classes_9.html new file mode 100644 index 0000000..b8afa8c --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_9.js b/dev/MinGfx/docs/html/search/classes_9.js new file mode 100644 index 0000000..0676d34 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ray_362',['Ray',['../classmingfx_1_1_ray.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_a.html b/dev/MinGfx/docs/html/search/classes_a.html new file mode 100644 index 0000000..6788af2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_a.js b/dev/MinGfx/docs/html/search/classes_a.js new file mode 100644 index 0000000..4afb3be --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['shaderprogram_363',['ShaderProgram',['../classmingfx_1_1_shader_program.html',1,'mingfx']]], + ['stbrp_5fcontext_364',['stbrp_context',['../structstbrp__context.html',1,'']]], + ['stbrp_5fnode_365',['stbrp_node',['../structstbrp__node.html',1,'']]], + ['stbrp_5frect_366',['stbrp_rect',['../structstbrp__rect.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_b.html b/dev/MinGfx/docs/html/search/classes_b.html new file mode 100644 index 0000000..3fcb498 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_b.js b/dev/MinGfx/docs/html/search/classes_b.js new file mode 100644 index 0000000..ca7a3e8 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['textformat_367',['TextFormat',['../classmingfx_1_1_text_shader_1_1_text_format.html',1,'mingfx::TextShader']]], + ['textshader_368',['TextShader',['../classmingfx_1_1_text_shader.html',1,'mingfx']]], + ['texture2d_369',['Texture2D',['../classmingfx_1_1_texture2_d.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_c.html b/dev/MinGfx/docs/html/search/classes_c.html new file mode 100644 index 0000000..2f7b1f3 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_c.js b/dev/MinGfx/docs/html/search/classes_c.js new file mode 100644 index 0000000..dda4c58 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unicam_370',['UniCam',['../classmingfx_1_1_uni_cam.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/classes_d.html b/dev/MinGfx/docs/html/search/classes_d.html new file mode 100644 index 0000000..f9011e7 --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/classes_d.js b/dev/MinGfx/docs/html/search/classes_d.js new file mode 100644 index 0000000..85c37ae --- /dev/null +++ b/dev/MinGfx/docs/html/search/classes_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['vector2_371',['Vector2',['../classmingfx_1_1_vector2.html',1,'mingfx']]], + ['vector3_372',['Vector3',['../classmingfx_1_1_vector3.html',1,'mingfx']]] +]; diff --git a/dev/MinGfx/docs/html/search/close.svg b/dev/MinGfx/docs/html/search/close.svg new file mode 100644 index 0000000..a933eea --- /dev/null +++ b/dev/MinGfx/docs/html/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/dev/MinGfx/docs/html/search/defines_0.html b/dev/MinGfx/docs/html/search/defines_0.html new file mode 100644 index 0000000..15cc3de --- /dev/null +++ b/dev/MinGfx/docs/html/search/defines_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/defines_0.js b/dev/MinGfx/docs/html/search/defines_0.js new file mode 100644 index 0000000..9072bee --- /dev/null +++ b/dev/MinGfx/docs/html/search/defines_0.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mingfx_5fdata_5fdir_5fbuild_712',['MINGFX_DATA_DIR_BUILD',['../mingfx__config_8h.html#a9ab97d1e09bf7a864495329de5dc7e03',1,'mingfx_config.h']]], + ['mingfx_5fdata_5fdir_5finstall_713',['MINGFX_DATA_DIR_INSTALL',['../mingfx__config_8h.html#a1e44357d7f17eb50f842d9e39e55e398',1,'mingfx_config.h']]], + ['mingfx_5fmath_5fepsilon_714',['MINGFX_MATH_EPSILON',['../point2_8h.html#a432350d21fbc10d5e65eeeb6859511ea',1,'MINGFX_MATH_EPSILON(): point2.h'],['../point3_8h.html#a432350d21fbc10d5e65eeeb6859511ea',1,'MINGFX_MATH_EPSILON(): point3.h']]], + ['mingfx_5fshaders_5fdir_5fbuild_715',['MINGFX_SHADERS_DIR_BUILD',['../mingfx__config_8h.html#a1908456b5481e0dbbe2b8252fa71d23f',1,'mingfx_config.h']]], + ['mingfx_5fshaders_5fdir_5finstall_716',['MINGFX_SHADERS_DIR_INSTALL',['../mingfx__config_8h.html#ab431df904057e50ac94550595473f5f4',1,'mingfx_config.h']]] +]; diff --git a/dev/MinGfx/docs/html/search/defines_1.html b/dev/MinGfx/docs/html/search/defines_1.html new file mode 100644 index 0000000..c49009c --- /dev/null +++ b/dev/MinGfx/docs/html/search/defines_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/defines_1.js b/dev/MinGfx/docs/html/search/defines_1.js new file mode 100644 index 0000000..44f55f6 --- /dev/null +++ b/dev/MinGfx/docs/html/search/defines_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['stb_5frect_5fpack_5fversion_717',['STB_RECT_PACK_VERSION',['../stb__rect__pack_8h.html#af2f15dfcc6ad60b1df4f5902e2cc25ce',1,'stb_rect_pack.h']]], + ['stbrp_5fdef_718',['STBRP_DEF',['../stb__rect__pack_8h.html#a0b73f2d2521fb81afc056a823e3ca753',1,'stb_rect_pack.h']]] +]; diff --git a/dev/MinGfx/docs/html/search/enums_0.html b/dev/MinGfx/docs/html/search/enums_0.html new file mode 100644 index 0000000..141fff5 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enums_0.js b/dev/MinGfx/docs/html/search/enums_0.js new file mode 100644 index 0000000..f6e19fe --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['horizalign_695',['HorizAlign',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63c',1,'mingfx::TextShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/enums_1.html b/dev/MinGfx/docs/html/search/enums_1.html new file mode 100644 index 0000000..d29f3b1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enums_1.js b/dev/MinGfx/docs/html/search/enums_1.js new file mode 100644 index 0000000..875d520 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['linestype_696',['LinesType',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603',1,'mingfx::QuickShapes']]] +]; diff --git a/dev/MinGfx/docs/html/search/enums_2.html b/dev/MinGfx/docs/html/search/enums_2.html new file mode 100644 index 0000000..59aadf2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enums_2.js b/dev/MinGfx/docs/html/search/enums_2.js new file mode 100644 index 0000000..5007801 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enums_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vertalign_697',['VertAlign',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2a',1,'mingfx::TextShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/enumvalues_0.html b/dev/MinGfx/docs/html/search/enumvalues_0.html new file mode 100644 index 0000000..0d131d9 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enumvalues_0.js b/dev/MinGfx/docs/html/search/enumvalues_0.js new file mode 100644 index 0000000..4b0ef18 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['horiz_5falign_5fcenter_698',['HORIZ_ALIGN_CENTER',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca5089ab07b80a999b45667e5711cae1f4',1,'mingfx::TextShader']]], + ['horiz_5falign_5fleft_699',['HORIZ_ALIGN_LEFT',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca8e6d89d62375493a3cc1fb5dba289f92',1,'mingfx::TextShader']]], + ['horiz_5falign_5fright_700',['HORIZ_ALIGN_RIGHT',['../classmingfx_1_1_text_shader.html#af464d970e6475a2176f21c3f4b24c63ca6999f9ad8384a34813e7535baf44f78b',1,'mingfx::TextShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/enumvalues_1.html b/dev/MinGfx/docs/html/search/enumvalues_1.html new file mode 100644 index 0000000..cd9187a --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enumvalues_1.js b/dev/MinGfx/docs/html/search/enumvalues_1.js new file mode 100644 index 0000000..9c7ccc3 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['line_5floop_701',['LINE_LOOP',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603a8e0df0247f66bd2cac06f16abb562134',1,'mingfx::QuickShapes']]], + ['line_5fstrip_702',['LINE_STRIP',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603ae64a4d2159ed46d077e21a505575c814',1,'mingfx::QuickShapes']]], + ['lines_703',['LINES',['../classmingfx_1_1_quick_shapes.html#aaea35a34a9495a9ab25cd9aa32a91603ae585142391f356c60bcfe68279ec2727',1,'mingfx::QuickShapes']]] +]; diff --git a/dev/MinGfx/docs/html/search/enumvalues_2.html b/dev/MinGfx/docs/html/search/enumvalues_2.html new file mode 100644 index 0000000..2b95d92 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enumvalues_2.js b/dev/MinGfx/docs/html/search/enumvalues_2.js new file mode 100644 index 0000000..467d394 --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['stbrp_5fheuristic_5fskyline_5fbf_5fsortheight_704',['STBRP_HEURISTIC_Skyline_BF_sortHeight',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba11d62749c4405a231a6fd1dd9d46615c',1,'stb_rect_pack.h']]], + ['stbrp_5fheuristic_5fskyline_5fbl_5fsortheight_705',['STBRP_HEURISTIC_Skyline_BL_sortHeight',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba13530b067fb1f9707dc0f9d51f8b074a',1,'stb_rect_pack.h']]], + ['stbrp_5fheuristic_5fskyline_5fdefault_706',['STBRP_HEURISTIC_Skyline_default',['../stb__rect__pack_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba5e4dd0b1cbee654bbfeebc5311f03525',1,'stb_rect_pack.h']]] +]; diff --git a/dev/MinGfx/docs/html/search/enumvalues_3.html b/dev/MinGfx/docs/html/search/enumvalues_3.html new file mode 100644 index 0000000..bc0ac8a --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/enumvalues_3.js b/dev/MinGfx/docs/html/search/enumvalues_3.js new file mode 100644 index 0000000..b59c94c --- /dev/null +++ b/dev/MinGfx/docs/html/search/enumvalues_3.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['vert_5falign_5fbaseline_707',['VERT_ALIGN_BASELINE',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa0400d0d77ea6770b313eedaf36fe71bb',1,'mingfx::TextShader']]], + ['vert_5falign_5fbottom_708',['VERT_ALIGN_BOTTOM',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa080e12cacc0f01b361c8b93c73dd2e28',1,'mingfx::TextShader']]], + ['vert_5falign_5fcenter_709',['VERT_ALIGN_CENTER',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aac49ae9c9553284e44f90228b9ce647af',1,'mingfx::TextShader']]], + ['vert_5falign_5ftop_710',['VERT_ALIGN_TOP',['../classmingfx_1_1_text_shader.html#a7624918a2d157cf2880fc8858c00db2aa970e4fcd7c426e6cd49709119fba6e04',1,'mingfx::TextShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_0.html b/dev/MinGfx/docs/html/search/files_0.html new file mode 100644 index 0000000..9498842 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_0.js b/dev/MinGfx/docs/html/search/files_0.js new file mode 100644 index 0000000..aaf51ac --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['aabb_2eh_374',['aabb.h',['../aabb_8h.html',1,'']]], + ['api_2emd_375',['api.md',['../api_8md.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_1.html b/dev/MinGfx/docs/html/search/files_1.html new file mode 100644 index 0000000..7050ef4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_1.js b/dev/MinGfx/docs/html/search/files_1.js new file mode 100644 index 0000000..8409ba0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bvh_2eh_376',['bvh.h',['../bvh_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_2.html b/dev/MinGfx/docs/html/search/files_2.html new file mode 100644 index 0000000..497cdf5 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_2.js b/dev/MinGfx/docs/html/search/files_2.js new file mode 100644 index 0000000..bd7e345 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['color_2eh_377',['color.h',['../color_8h.html',1,'']]], + ['craft_5fcam_2eh_378',['craft_cam.h',['../craft__cam_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_3.html b/dev/MinGfx/docs/html/search/files_3.html new file mode 100644 index 0000000..1ba106b --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_3.js b/dev/MinGfx/docs/html/search/files_3.js new file mode 100644 index 0000000..aa9d1d0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['default_5fshader_2eh_379',['default_shader.h',['../default__shader_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_4.html b/dev/MinGfx/docs/html/search/files_4.html new file mode 100644 index 0000000..753b7b1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_4.js b/dev/MinGfx/docs/html/search/files_4.js new file mode 100644 index 0000000..b3b80f3 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['gfxmath_2eh_380',['gfxmath.h',['../gfxmath_8h.html',1,'']]], + ['graphics_5fapp_2eh_381',['graphics_app.h',['../graphics__app_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_5.html b/dev/MinGfx/docs/html/search/files_5.html new file mode 100644 index 0000000..7b6affd --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_5.js b/dev/MinGfx/docs/html/search/files_5.js new file mode 100644 index 0000000..54b7dd2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['installation_2emd_382',['installation.md',['../installation_8md.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_6.html b/dev/MinGfx/docs/html/search/files_6.html new file mode 100644 index 0000000..802ebf7 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_6.js b/dev/MinGfx/docs/html/search/files_6.js new file mode 100644 index 0000000..5763269 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_6.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['mainpage_2emd_383',['mainpage.md',['../mainpage_8md.html',1,'']]], + ['matrix4_2eh_384',['matrix4.h',['../matrix4_8h.html',1,'']]], + ['mesh_2eh_385',['mesh.h',['../mesh_8h.html',1,'']]], + ['mingfx_2eh_386',['mingfx.h',['../mingfx_8h.html',1,'']]], + ['mingfx_5fconfig_2eh_387',['mingfx_config.h',['../mingfx__config_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_7.html b/dev/MinGfx/docs/html/search/files_7.html new file mode 100644 index 0000000..365e648 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_7.js b/dev/MinGfx/docs/html/search/files_7.js new file mode 100644 index 0000000..eb72b51 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['opengl_5fheaders_2eh_388',['opengl_headers.h',['../opengl__headers_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_8.html b/dev/MinGfx/docs/html/search/files_8.html new file mode 100644 index 0000000..3df0f2f --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_8.js b/dev/MinGfx/docs/html/search/files_8.js new file mode 100644 index 0000000..86d1516 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['platform_2eh_389',['platform.h',['../platform_8h.html',1,'']]], + ['point2_2eh_390',['point2.h',['../point2_8h.html',1,'']]], + ['point3_2eh_391',['point3.h',['../point3_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_9.html b/dev/MinGfx/docs/html/search/files_9.html new file mode 100644 index 0000000..52f8b6c --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_9.js b/dev/MinGfx/docs/html/search/files_9.js new file mode 100644 index 0000000..2b14d84 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['quaternion_2eh_392',['quaternion.h',['../quaternion_8h.html',1,'']]], + ['quick_5fshapes_2eh_393',['quick_shapes.h',['../quick__shapes_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_a.html b/dev/MinGfx/docs/html/search/files_a.html new file mode 100644 index 0000000..11d4c11 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_a.js b/dev/MinGfx/docs/html/search/files_a.js new file mode 100644 index 0000000..036951b --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ray_2eh_394',['ray.h',['../ray_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_b.html b/dev/MinGfx/docs/html/search/files_b.html new file mode 100644 index 0000000..9fc8343 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_b.js b/dev/MinGfx/docs/html/search/files_b.js new file mode 100644 index 0000000..a20ab03 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['shader_5fprogram_2eh_395',['shader_program.h',['../shader__program_8h.html',1,'']]], + ['stb_5frect_5fpack_2eh_396',['stb_rect_pack.h',['../stb__rect__pack_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_c.html b/dev/MinGfx/docs/html/search/files_c.html new file mode 100644 index 0000000..c266b4c --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_c.js b/dev/MinGfx/docs/html/search/files_c.js new file mode 100644 index 0000000..949202b --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['text_5fshader_2eh_397',['text_shader.h',['../text__shader_8h.html',1,'']]], + ['texture2d_2eh_398',['texture2d.h',['../texture2d_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_d.html b/dev/MinGfx/docs/html/search/files_d.html new file mode 100644 index 0000000..d2ca3c1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_d.js b/dev/MinGfx/docs/html/search/files_d.js new file mode 100644 index 0000000..7d42d13 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['unicam_2eh_399',['unicam.h',['../unicam_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/files_e.html b/dev/MinGfx/docs/html/search/files_e.html new file mode 100644 index 0000000..9df4116 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/files_e.js b/dev/MinGfx/docs/html/search/files_e.js new file mode 100644 index 0000000..1bfafe1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/files_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['vector2_2eh_400',['vector2.h',['../vector2_8h.html',1,'']]], + ['vector3_2eh_401',['vector3.h',['../vector3_8h.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_0.html b/dev/MinGfx/docs/html/search/functions_0.html new file mode 100644 index 0000000..eb4c501 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_0.js b/dev/MinGfx/docs/html/search/functions_0.js new file mode 100644 index 0000000..16cad36 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['aabb_402',['AABB',['../classmingfx_1_1_a_a_b_b.html#af7acb376dbda50fa1d8c30d1b5eb85fb',1,'mingfx::AABB::AABB()'],['../classmingfx_1_1_a_a_b_b.html#a5bf74f4e7f64adae9ea66f213a4012d1',1,'mingfx::AABB::AABB(const Point3 &a)'],['../classmingfx_1_1_a_a_b_b.html#aaa44f815006b66f67da76fd89c02a0cf',1,'mingfx::AABB::AABB(const Point3 &a, const Point3 &b, const Point3 &c)'],['../classmingfx_1_1_a_a_b_b.html#a0f3e7d3b4012e25018ad4c51edafd4f8',1,'mingfx::AABB::AABB(const Vector3 &extents)'],['../classmingfx_1_1_a_a_b_b.html#a7c47fca94d56a2845ca7729d580ee7d1',1,'mingfx::AABB::AABB(const Point3 &center, const Vector3 &extents)'],['../classmingfx_1_1_a_a_b_b.html#a95e244e6e0774c815de6b9434218ee09',1,'mingfx::AABB::AABB(const Mesh &mesh)'],['../classmingfx_1_1_a_a_b_b.html#a2bf325127a89d7dbd5bb082ae69fb5e9',1,'mingfx::AABB::AABB(const Mesh &mesh, unsigned int tri_id)']]], + ['addfragmentshaderfromfile_403',['AddFragmentShaderFromFile',['../classmingfx_1_1_shader_program.html#acd94fc12beb85fe57aa80d3b825018b0',1,'mingfx::ShaderProgram']]], + ['addfragmentshaderfromsource_404',['AddFragmentShaderFromSource',['../classmingfx_1_1_shader_program.html#a7a3063ec42798c076e1ab0c0e6411e9c',1,'mingfx::ShaderProgram']]], + ['addlight_405',['AddLight',['../classmingfx_1_1_default_shader.html#af54a8e489d9fb34cfceb1c07562c6e2c',1,'mingfx::DefaultShader']]], + ['addtriangle_406',['AddTriangle',['../classmingfx_1_1_mesh.html#a29eeb2e778704350789033ec4940d55a',1,'mingfx::Mesh']]], + ['addvertexshaderfromfile_407',['AddVertexShaderFromFile',['../classmingfx_1_1_shader_program.html#a63ac061271fad9338e922389d4a179e5',1,'mingfx::ShaderProgram']]], + ['addvertexshaderfromsource_408',['AddVertexShaderFromSource',['../classmingfx_1_1_shader_program.html#ab5fed4904a59c6e83ebb43aebf4c043d',1,'mingfx::ShaderProgram']]], + ['advanceanimation_409',['AdvanceAnimation',['../classmingfx_1_1_uni_cam.html#aab253d966af52ac277ac51194745085c',1,'mingfx::UniCam']]], + ['align_410',['Align',['../classmingfx_1_1_matrix4.html#ae61cdabb318a03cd4dae8a1c8ecafa4d',1,'mingfx::Matrix4']]], + ['aspect_5fratio_411',['aspect_ratio',['../classmingfx_1_1_graphics_app.html#ac682691ee96ea32037abafd74d144a23',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_1.html b/dev/MinGfx/docs/html/search/functions_1.html new file mode 100644 index 0000000..ef4088b --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_1.js b/dev/MinGfx/docs/html/search/functions_1.js new file mode 100644 index 0000000..49f66cb --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['bindtexture_412',['BindTexture',['../classmingfx_1_1_shader_program.html#a4e5a2659f66f29433b15748f36c61ea2',1,'mingfx::ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex)'],['../classmingfx_1_1_shader_program.html#af81d97c2843278eb40cdcdf8e5d54a96',1,'mingfx::ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex, int texUnit)']]], + ['buildbvh_413',['BuildBVH',['../classmingfx_1_1_mesh.html#a8d96c1b5985cd836f2aa2b2994af64c1',1,'mingfx::Mesh']]], + ['bvh_414',['BVH',['../classmingfx_1_1_b_v_h.html#af812656193d247be31dd038a8e2fff75',1,'mingfx::BVH']]], + ['bvh_5fptr_415',['bvh_ptr',['../classmingfx_1_1_mesh.html#a978b1341d5613d399a68e40c61c57ba4',1,'mingfx::Mesh']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_10.html b/dev/MinGfx/docs/html/search/functions_10.html new file mode 100644 index 0000000..1bdc125 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_10.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_10.js b/dev/MinGfx/docs/html/search/functions_10.js new file mode 100644 index 0000000..f6a91bb --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_10.js @@ -0,0 +1,37 @@ +var searchData= +[ + ['scale_566',['Scale',['../classmingfx_1_1_matrix4.html#a0232a58d20b1da5374cf8c72fb113a4e',1,'mingfx::Matrix4']]], + ['screen_567',['screen',['../classmingfx_1_1_graphics_app.html#adc68196c3f03bd0608c41f6e4d7dad16',1,'mingfx::GraphicsApp']]], + ['screentodepthplane_568',['ScreenToDepthPlane',['../classmingfx_1_1_gfx_math.html#aaa6af7c0de01fdad46d48d43efb6aa67',1,'mingfx::GfxMath']]], + ['screentonearplane_569',['ScreenToNearPlane',['../classmingfx_1_1_gfx_math.html#a2086a2f885f887fb53da8a5adb5860f0',1,'mingfx::GfxMath']]], + ['screentoworld_570',['ScreenToWorld',['../classmingfx_1_1_gfx_math.html#a24048d7b688ae46317c3e8de8a701273',1,'mingfx::GfxMath']]], + ['set_571',['set',['../classmingfx_1_1_ray.html#a75593293307b4eead15a876bf3597071',1,'mingfx::Ray']]], + ['set_5fdefault_5fdepth_572',['set_default_depth',['../classmingfx_1_1_uni_cam.html#a71e0351ac19a18b9c02215a60dc51068',1,'mingfx::UniCam']]], + ['set_5ffilter_5fmode_573',['set_filter_mode',['../classmingfx_1_1_texture2_d.html#a4a3b2b550fefdf79f0fb392b04e7b013',1,'mingfx::Texture2D']]], + ['set_5flook_5fscale_574',['set_look_scale',['../classmingfx_1_1_craft_cam.html#a15092ae5de6920546e3ce79aeb196f44',1,'mingfx::CraftCam']]], + ['set_5frotation_5fscale_575',['set_rotation_scale',['../classmingfx_1_1_craft_cam.html#a352f5a42f6e88d2e599bd5acb42e5831',1,'mingfx::CraftCam']]], + ['set_5ftranslation_5fscale_576',['set_translation_scale',['../classmingfx_1_1_craft_cam.html#a151fde09d08001ee2a615f25ec1acea7',1,'mingfx::CraftCam']]], + ['set_5fuser_5fdata_577',['set_user_data',['../classmingfx_1_1_a_a_b_b.html#ade89d21e799a97e7d82be5d593ee2e4b',1,'mingfx::AABB']]], + ['set_5fview_5fmatrix_578',['set_view_matrix',['../classmingfx_1_1_craft_cam.html#a79a194be8675a0a968f14fe3dcd79da8',1,'mingfx::CraftCam::set_view_matrix()'],['../classmingfx_1_1_uni_cam.html#a6b17bab82595ca468a3c638512011e5b',1,'mingfx::UniCam::set_view_matrix()']]], + ['set_5fwrap_5fmode_579',['set_wrap_mode',['../classmingfx_1_1_texture2_d.html#aa5cbe3396e4560ec0746e91dbc55bc9f',1,'mingfx::Texture2D']]], + ['setcolors_580',['SetColors',['../classmingfx_1_1_mesh.html#a0f59e19b74f4f9dc2ad580756f8b319f',1,'mingfx::Mesh::SetColors(int triangle_id, Color c1, Color c2, Color c3)'],['../classmingfx_1_1_mesh.html#ab9b05a77591a9adad12032d513256dae',1,'mingfx::Mesh::SetColors(const std::vector< Color > &colors)'],['../classmingfx_1_1_mesh.html#aed172bdd77858f3b59978cb8527e19ae',1,'mingfx::Mesh::SetColors(float *colors_array, int num_colors)']]], + ['setindices_581',['SetIndices',['../classmingfx_1_1_mesh.html#a1f94c9ca7867b65e04f7e02813a06581',1,'mingfx::Mesh::SetIndices(const std::vector< unsigned int > index_array)'],['../classmingfx_1_1_mesh.html#a84711746b8d37c8d9b12ae748a4c5b8c',1,'mingfx::Mesh::SetIndices(unsigned int *index_array, int num_indices)']]], + ['setinstancetransforms_582',['SetInstanceTransforms',['../classmingfx_1_1_mesh.html#a7175238f5874929e2258458b98421d87',1,'mingfx::Mesh']]], + ['setlight_583',['SetLight',['../classmingfx_1_1_default_shader.html#a41e74fb8af72a6b22c72b0916726b6d6',1,'mingfx::DefaultShader']]], + ['setnormals_584',['SetNormals',['../classmingfx_1_1_mesh.html#a43d5a5cc3ef742a8c2b5e3f1b4da0903',1,'mingfx::Mesh::SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3)'],['../classmingfx_1_1_mesh.html#ad28dbd5b0ab77bec28f30f618dd9e57d',1,'mingfx::Mesh::SetNormals(const std::vector< Vector3 > &norms)'],['../classmingfx_1_1_mesh.html#a6ab1128fab6f969564d3a1329baeade6',1,'mingfx::Mesh::SetNormals(float *norms_array, int num_norms)']]], + ['settexcoords_585',['SetTexCoords',['../classmingfx_1_1_mesh.html#a17cb896939007357014c74a1ece6f1f3',1,'mingfx::Mesh::SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3)'],['../classmingfx_1_1_mesh.html#aba2dfd0ade2d8a728897d411ef3fdaf1',1,'mingfx::Mesh::SetTexCoords(int texture_unit, const std::vector< Point2 > &tex_coords)'],['../classmingfx_1_1_mesh.html#ac9cd4e8d67bb70295a48fcbc72ae32f9',1,'mingfx::Mesh::SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords)']]], + ['setuniform_586',['SetUniform',['../classmingfx_1_1_shader_program.html#a461ba9368ad89fe1e9749b14b099027a',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Point2 &p)'],['../classmingfx_1_1_shader_program.html#aef58537d81bdb9d88a5f1c56a2b98b25',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Vector2 &v)'],['../classmingfx_1_1_shader_program.html#ac59b3d0542ce45631876615eabf66487',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Point3 &p)'],['../classmingfx_1_1_shader_program.html#a0b3e6285354e007bf79a9ac1587f86f5',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Vector3 &v)'],['../classmingfx_1_1_shader_program.html#a766988eac957e9d810fdf2cbd2eafae0',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Matrix4 &m)'],['../classmingfx_1_1_shader_program.html#a9ec2b53ba4bea7e48ef459530b8c6d60',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, const Color &c)'],['../classmingfx_1_1_shader_program.html#ab547dadc25582bec157b39de29d1419e',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, int i)'],['../classmingfx_1_1_shader_program.html#a707d2cb51a54151959c6570d6bfc7840',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, unsigned int ui)'],['../classmingfx_1_1_shader_program.html#a680fa87cb30343bb56abc48a090e823c',1,'mingfx::ShaderProgram::SetUniform(const std::string &name, float f)']]], + ['setuniformarray1_587',['SetUniformArray1',['../classmingfx_1_1_shader_program.html#a51cd1c1d194b2f5c07e81d4f579f2f2b',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#abba87d2b0baca89232dbd1d6331875de',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a5c7891252d6b6c40982b56543820cd19',1,'mingfx::ShaderProgram::SetUniformArray1(const std::string &name, float *f, int count)']]], + ['setuniformarray2_588',['SetUniformArray2',['../classmingfx_1_1_shader_program.html#a9bab504c74a1c4258258b91afe9a9623',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a6fdca4b0ccaa8a0b2c8c68fd7645727c',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a93914cad6d8e751218c88010c51cf657',1,'mingfx::ShaderProgram::SetUniformArray2(const std::string &name, float *f, int count)']]], + ['setuniformarray3_589',['SetUniformArray3',['../classmingfx_1_1_shader_program.html#ac582a2aa74a83095e0b8e359ce432511',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a8c31de93b17f050baecb5323a69bdbfa',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#afc84377716296a57299ebbc01884b65d',1,'mingfx::ShaderProgram::SetUniformArray3(const std::string &name, float *f, int count)']]], + ['setuniformarray4_590',['SetUniformArray4',['../classmingfx_1_1_shader_program.html#ab06ef4682f801fca080a8f67dc6345ba',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, int *i, int count)'],['../classmingfx_1_1_shader_program.html#a2854ad947f74432edc0b730462b7f695',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, unsigned int *ui, int count)'],['../classmingfx_1_1_shader_program.html#a9710cf4c72a7321b9a1ff1b86ae42da1',1,'mingfx::ShaderProgram::SetUniformArray4(const std::string &name, float *f, int count)']]], + ['setvertices_591',['SetVertices',['../classmingfx_1_1_mesh.html#a1dd243b53826765ba468f505645102a6',1,'mingfx::Mesh::SetVertices(const std::vector< Point3 > &verts)'],['../classmingfx_1_1_mesh.html#a033076b9bf1714c9b9e0eeef11ebcd49',1,'mingfx::Mesh::SetVertices(float *verts_array, int num_verts)']]], + ['shaderprogram_592',['ShaderProgram',['../classmingfx_1_1_shader_program.html#a0c3d86656c464223dc615cbec0943700',1,'mingfx::ShaderProgram']]], + ['slerp_593',['Slerp',['../classmingfx_1_1_quaternion.html#a0290914928a2618f7faaa40989113d22',1,'mingfx::Quaternion::Slerp(const Quaternion &other, float alpha) const'],['../classmingfx_1_1_quaternion.html#a31d37561099fab3d75a74455c5f43133',1,'mingfx::Quaternion::Slerp(const Quaternion &a, const Quaternion &b, float alpha)']]], + ['stbrp_5finit_5ftarget_594',['stbrp_init_target',['../stb__rect__pack_8h.html#a8b32f5ad458f614f5d419ef26cef5b3c',1,'stb_rect_pack.h']]], + ['stbrp_5fpack_5frects_595',['stbrp_pack_rects',['../stb__rect__pack_8h.html#af038ae1b98573f24736c9a3eed0478ba',1,'stb_rect_pack.h']]], + ['stbrp_5fsetup_5fallow_5fout_5fof_5fmem_596',['stbrp_setup_allow_out_of_mem',['../stb__rect__pack_8h.html#a1babd70b223e571305fd9753a83a4fda',1,'stb_rect_pack.h']]], + ['stbrp_5fsetup_5fheuristic_597',['stbrp_setup_heuristic',['../stb__rect__pack_8h.html#a5a8223866c146933da3e152066bf61a1',1,'stb_rect_pack.h']]], + ['stopprogram_598',['StopProgram',['../classmingfx_1_1_default_shader.html#a2c188bc0fc5f7fc7405f04b036bd4d67',1,'mingfx::DefaultShader::StopProgram()'],['../classmingfx_1_1_shader_program.html#a2e4d6db720bf22038270cf8c51cdf7da',1,'mingfx::ShaderProgram::StopProgram()']]], + ['subdeterminant_599',['SubDeterminant',['../classmingfx_1_1_matrix4.html#a3d9898bfac2510a695df6b033054e481',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_11.html b/dev/MinGfx/docs/html/search/functions_11.html new file mode 100644 index 0000000..188076e --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_11.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_11.js b/dev/MinGfx/docs/html/search/functions_11.js new file mode 100644 index 0000000..00f445a --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_11.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['textextents_600',['TextExtents',['../classmingfx_1_1_text_shader.html#ac4e9a150311fe6d74e9f6214ebeb6b28',1,'mingfx::TextShader']]], + ['textformat_601',['TextFormat',['../classmingfx_1_1_text_shader_1_1_text_format.html#a2b7d7e2e540c881952b97b8948b49fcb',1,'mingfx::TextShader::TextFormat']]], + ['textshader_602',['TextShader',['../classmingfx_1_1_text_shader.html#a0ec5a6ba22abb3f86c611107925fca67',1,'mingfx::TextShader']]], + ['texture2d_603',['Texture2D',['../classmingfx_1_1_texture2_d.html#aa15b86ec3b7312842c220b081c39980d',1,'mingfx::Texture2D']]], + ['todegrees_604',['ToDegrees',['../classmingfx_1_1_gfx_math.html#a39a2b5973249fb3aefc210b18b0fdff3',1,'mingfx::GfxMath::ToDegrees(float radians)'],['../classmingfx_1_1_gfx_math.html#aa5411a7d8bfc8e47d596362a328dbde8',1,'mingfx::GfxMath::ToDegrees(Vector3 radians)']]], + ['toeulerangleszyx_605',['ToEulerAnglesZYX',['../classmingfx_1_1_quaternion.html#a033f05ed7e7215a5c3c4cd26548c8007',1,'mingfx::Quaternion']]], + ['toradians_606',['ToRadians',['../classmingfx_1_1_gfx_math.html#a1336de2695bc3bb750b23fb0ea211637',1,'mingfx::GfxMath::ToRadians(float degrees)'],['../classmingfx_1_1_gfx_math.html#a38927f1f8ea4625d909e64efa93c5190',1,'mingfx::GfxMath::ToRadians(Vector3 degrees)']]], + ['tounit_607',['ToUnit',['../classmingfx_1_1_quaternion.html#a3572b35419c51332204adb5bf35f0b03',1,'mingfx::Quaternion::ToUnit()'],['../classmingfx_1_1_vector2.html#a70f9f612a99017bf051e40ebd7fa7f83',1,'mingfx::Vector2::ToUnit()'],['../classmingfx_1_1_vector3.html#a3caef3c6f24b90730ef70c84ce0e0d71',1,'mingfx::Vector3::ToUnit()']]], + ['tovector_608',['ToVector',['../classmingfx_1_1_color.html#ae7371e464c4af7ac93d9edd4c0772c2b',1,'mingfx::Color::ToVector()'],['../classmingfx_1_1_matrix4.html#a4e9433f0482b5e9688c12398900608db',1,'mingfx::Matrix4::ToVector() const']]], + ['translation_609',['Translation',['../classmingfx_1_1_matrix4.html#ae82bab81df82dc03f5eb11e74ba1dd84',1,'mingfx::Matrix4']]], + ['translation_5fscale_610',['translation_scale',['../classmingfx_1_1_craft_cam.html#a93567af7acbae2939d57cfd8a72bcef2',1,'mingfx::CraftCam']]], + ['transpose_611',['Transpose',['../classmingfx_1_1_matrix4.html#afd1030205567d23d4a2d1240d8214850',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_12.html b/dev/MinGfx/docs/html/search/functions_12.html new file mode 100644 index 0000000..eb29d8f --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_12.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_12.js b/dev/MinGfx/docs/html/search/functions_12.js new file mode 100644 index 0000000..f0951ec --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_12.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['unicam_612',['UniCam',['../classmingfx_1_1_uni_cam.html#a6e7771961011f573b2e2249f602b2d2e',1,'mingfx::UniCam::UniCam()'],['../classmingfx_1_1_uni_cam.html#af507e639c4bceb4c79e21a6f80c48d07',1,'mingfx::UniCam::UniCam(const Matrix4 &initialViewMatrix)']]], + ['unitx_613',['UnitX',['../classmingfx_1_1_vector2.html#a8ef6e0525ec34aaee9cf35bab098ecdb',1,'mingfx::Vector2::UnitX()'],['../classmingfx_1_1_vector3.html#ae8d822fdea67f63580b4e1f78f5b8922',1,'mingfx::Vector3::UnitX()']]], + ['unity_614',['UnitY',['../classmingfx_1_1_vector2.html#ab7b3ba42a5a63c512bd7b32fd4cc0db0',1,'mingfx::Vector2::UnitY()'],['../classmingfx_1_1_vector3.html#a8d31e433d1ac04aaceea1b1dcd1643df',1,'mingfx::Vector3::UnitY()']]], + ['unitz_615',['UnitZ',['../classmingfx_1_1_vector3.html#a4b696b0d1143d6e30a34a2f889d2ca61',1,'mingfx::Vector3']]], + ['updatefrombytes_616',['UpdateFromBytes',['../classmingfx_1_1_texture2_d.html#a0783ad70829ef353aa92344d320b107c',1,'mingfx::Texture2D']]], + ['updatefromfloats_617',['UpdateFromFloats',['../classmingfx_1_1_texture2_d.html#ad7640f0cbda6398a6bb80202b80dd693',1,'mingfx::Texture2D']]], + ['updategpumemory_618',['UpdateGPUMemory',['../classmingfx_1_1_mesh.html#ac74345bf4b2994de4ee1c509bcc6840e',1,'mingfx::Mesh']]], + ['updateheight_619',['UpdateHeight',['../classmingfx_1_1_craft_cam.html#ae3d9c7ea9307dbbadaa4b6e2f9933a7b',1,'mingfx::CraftCam']]], + ['updatesimulation_620',['UpdateSimulation',['../classmingfx_1_1_craft_cam.html#a2b7808e489933b117583cf709fa46bc7',1,'mingfx::CraftCam::UpdateSimulation()'],['../classmingfx_1_1_graphics_app.html#a9e2b4cd7eeabe1ace9d5e9220349fbaa',1,'mingfx::GraphicsApp::UpdateSimulation()']]], + ['updatetriangle_621',['UpdateTriangle',['../classmingfx_1_1_mesh.html#a3e0ac86714f6b7c3f62761ef3952a044',1,'mingfx::Mesh']]], + ['useprogram_622',['UseProgram',['../classmingfx_1_1_default_shader.html#a053599d8c7acd9920461aab8ce945ab0',1,'mingfx::DefaultShader::UseProgram()'],['../classmingfx_1_1_shader_program.html#af1c968f1c79f70e183c9d1239d3d205e',1,'mingfx::ShaderProgram::UseProgram()']]], + ['user_5fdata_623',['user_data',['../classmingfx_1_1_a_a_b_b.html#a35def5a4ee2ecd287f5c71436b2c5843',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_13.html b/dev/MinGfx/docs/html/search/functions_13.html new file mode 100644 index 0000000..3da2ea6 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_13.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_13.js b/dev/MinGfx/docs/html/search/functions_13.js new file mode 100644 index 0000000..f2298c0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_13.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['value_5fptr_624',['value_ptr',['../classmingfx_1_1_color.html#aa3a93033db8e00aff817a125eb5b54a0',1,'mingfx::Color::value_ptr()'],['../classmingfx_1_1_matrix4.html#a2b7b30f23f08d70e83c7b7e01945dd3c',1,'mingfx::Matrix4::value_ptr()'],['../classmingfx_1_1_point2.html#a027b2412f1c36242ccb06cf37c7e29bc',1,'mingfx::Point2::value_ptr()'],['../classmingfx_1_1_point3.html#af0557bdc07452cf335e2b7e04fc0aa3c',1,'mingfx::Point3::value_ptr()'],['../classmingfx_1_1_quaternion.html#abca597e756f257dc33838734ae19baf9',1,'mingfx::Quaternion::value_ptr()'],['../classmingfx_1_1_vector2.html#a80ef53519d50a6a6f158f66755c040d1',1,'mingfx::Vector2::value_ptr()'],['../classmingfx_1_1_vector3.html#aa7ddfd662e866c019a772ba66eae7331',1,'mingfx::Vector3::value_ptr()']]], + ['vector2_625',['Vector2',['../classmingfx_1_1_vector2.html#a962433a7e3158cf6b224604a0463852f',1,'mingfx::Vector2::Vector2()'],['../classmingfx_1_1_vector2.html#acc16337b6b06ebea2fde4c4bd1be7abd',1,'mingfx::Vector2::Vector2(float x, float y)'],['../classmingfx_1_1_vector2.html#a6e3d063a7080bfe199acc70cd5afded2',1,'mingfx::Vector2::Vector2(float *v)'],['../classmingfx_1_1_vector2.html#a40f53939581f5d06a1b757b0398525f8',1,'mingfx::Vector2::Vector2(const Vector2 &v)']]], + ['vector3_626',['Vector3',['../classmingfx_1_1_vector3.html#a7f57af8bbecbc793fa17def4521de4dd',1,'mingfx::Vector3::Vector3()'],['../classmingfx_1_1_vector3.html#a256018f34e230d542027d07d14fd6e65',1,'mingfx::Vector3::Vector3(float x, float y, float z)'],['../classmingfx_1_1_vector3.html#a95b274c7a5ff118af20bc71682c6b1f1',1,'mingfx::Vector3::Vector3(float *v)'],['../classmingfx_1_1_vector3.html#af6100965af7770f833dbf0c9f30f4fdd',1,'mingfx::Vector3::Vector3(const Vector3 &v)']]], + ['view_5fmatrix_627',['view_matrix',['../classmingfx_1_1_craft_cam.html#acccdadc08d8d8a0b7b9426f18209ff36',1,'mingfx::CraftCam::view_matrix()'],['../classmingfx_1_1_uni_cam.html#af7e7276f9390ec57ca577092c99d6ca3',1,'mingfx::UniCam::view_matrix()']]], + ['volume_628',['Volume',['../classmingfx_1_1_a_a_b_b.html#a1ea0cf1c4051185b3f4296d20dd330c9',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_14.html b/dev/MinGfx/docs/html/search/functions_14.html new file mode 100644 index 0000000..29237b4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_14.js b/dev/MinGfx/docs/html/search/functions_14.js new file mode 100644 index 0000000..28b70bc --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_14.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['w_629',['w',['../classmingfx_1_1_point2.html#ab00e35eccdc4b7deae8172f5954a86e8',1,'mingfx::Point2::w()'],['../classmingfx_1_1_point3.html#abbf85b5749b37869f4c1b98443ebbd9e',1,'mingfx::Point3::w()'],['../classmingfx_1_1_quaternion.html#a8aa53f71892f02c981d98d100a8b57c7',1,'mingfx::Quaternion::w()'],['../classmingfx_1_1_vector2.html#a267e6749091f23263d1620f801f0a831',1,'mingfx::Vector2::w()'],['../classmingfx_1_1_vector3.html#a2556298f536ba115019982222ce6e0c5',1,'mingfx::Vector3::w()']]], + ['width_630',['width',['../classmingfx_1_1_texture2_d.html#a401629d948aa144be81b94fe21938869',1,'mingfx::Texture2D']]], + ['window_631',['window',['../classmingfx_1_1_graphics_app.html#abd0ee14f7e12146000cdb3532d54ba94',1,'mingfx::GraphicsApp']]], + ['window_5fheight_632',['window_height',['../classmingfx_1_1_graphics_app.html#ad7a641f7ccf174cd0a059347b623e016',1,'mingfx::GraphicsApp']]], + ['window_5fwidth_633',['window_width',['../classmingfx_1_1_graphics_app.html#a1c682fa2dd0bce855e1e32ffeac532b0',1,'mingfx::GraphicsApp']]], + ['wrap_5fmode_634',['wrap_mode',['../classmingfx_1_1_texture2_d.html#a1c8827426f43343c0ad171e181a741ea',1,'mingfx::Texture2D']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_15.html b/dev/MinGfx/docs/html/search/functions_15.html new file mode 100644 index 0000000..6d5decd --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_15.js b/dev/MinGfx/docs/html/search/functions_15.js new file mode 100644 index 0000000..19d8f67 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_15.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_635',['x',['../classmingfx_1_1_point2.html#a92447f64ca82f67e855da0c42db12ffa',1,'mingfx::Point2::x()'],['../classmingfx_1_1_point3.html#ac409e3213620b80c868245c1f6a6eea5',1,'mingfx::Point3::x()'],['../classmingfx_1_1_quaternion.html#a85464500e1d3c8ba10f1968426dc24ae',1,'mingfx::Quaternion::x()'],['../classmingfx_1_1_vector2.html#ae84b079eb21494bc7c9a93d32a63712a',1,'mingfx::Vector2::x()'],['../classmingfx_1_1_vector3.html#ac380342bfa614c9a3babe1efd14d2cf4',1,'mingfx::Vector3::x()']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_16.html b/dev/MinGfx/docs/html/search/functions_16.html new file mode 100644 index 0000000..5aed7d0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_16.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_16.js b/dev/MinGfx/docs/html/search/functions_16.js new file mode 100644 index 0000000..bc67585 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_16.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['y_636',['y',['../classmingfx_1_1_point2.html#a4f97a7a75276a147ac06fc4dec810ec8',1,'mingfx::Point2::y()'],['../classmingfx_1_1_point3.html#a0757315cd84f91879021d7afe18e0545',1,'mingfx::Point3::y()'],['../classmingfx_1_1_quaternion.html#adb294449db2a80bd11426148592d9e0b',1,'mingfx::Quaternion::y()'],['../classmingfx_1_1_vector2.html#ac427d5c06474777e851bed05ec5d134b',1,'mingfx::Vector2::y()'],['../classmingfx_1_1_vector3.html#aeb74fbc0a970b40abb0db8f8e490ee17',1,'mingfx::Vector3::y()']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_17.html b/dev/MinGfx/docs/html/search/functions_17.html new file mode 100644 index 0000000..ad6d5a7 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_17.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_17.js b/dev/MinGfx/docs/html/search/functions_17.js new file mode 100644 index 0000000..9dfee6b --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_17.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['z_637',['z',['../classmingfx_1_1_point3.html#ac463e3a3ec3edd02c86505ea6400d8e6',1,'mingfx::Point3::z()'],['../classmingfx_1_1_quaternion.html#a75ec001cbbf08cf5c4e1f8978082a55f',1,'mingfx::Quaternion::z()'],['../classmingfx_1_1_vector3.html#a78d1dba881575517f0427d55cc418df6',1,'mingfx::Vector3::z()']]], + ['zero_638',['Zero',['../classmingfx_1_1_point2.html#a60a2b348deab631b51caca3eb715461f',1,'mingfx::Point2::Zero()'],['../classmingfx_1_1_point3.html#a9983b62979f9ac5a11efea08d9d283ed',1,'mingfx::Point3::Zero()'],['../classmingfx_1_1_vector2.html#a7cb11f9fe8962ff9092fc1e5736faacf',1,'mingfx::Vector2::Zero()'],['../classmingfx_1_1_vector3.html#a52bf8582baa71e7d6f80c412687d9714',1,'mingfx::Vector3::Zero()']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_18.html b/dev/MinGfx/docs/html/search/functions_18.html new file mode 100644 index 0000000..b5c5c06 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_18.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_18.js b/dev/MinGfx/docs/html/search/functions_18.js new file mode 100644 index 0000000..e7e9b22 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_18.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['_7eaabb_639',['~AABB',['../classmingfx_1_1_a_a_b_b.html#aeb63c176a2f2408e803d9a2f6848eee5',1,'mingfx::AABB']]], + ['_7ebvh_640',['~BVH',['../classmingfx_1_1_b_v_h.html#af81906830adcf4648cc8cf4e214b4269',1,'mingfx::BVH']]], + ['_7ecolor_641',['~Color',['../classmingfx_1_1_color.html#ab1a90432dd7fd7b2adf41d747be85378',1,'mingfx::Color']]], + ['_7ecraftcam_642',['~CraftCam',['../classmingfx_1_1_craft_cam.html#a85ef9bebdd1595be1288bc104245f4ff',1,'mingfx::CraftCam']]], + ['_7edefaultshader_643',['~DefaultShader',['../classmingfx_1_1_default_shader.html#a0fe7d605d039ecdbf17837bc5bbe0aba',1,'mingfx::DefaultShader']]], + ['_7egraphicsapp_644',['~GraphicsApp',['../classmingfx_1_1_graphics_app.html#aab7925c6b844e6bef428feacf4aa9afb',1,'mingfx::GraphicsApp']]], + ['_7ematrix4_645',['~Matrix4',['../classmingfx_1_1_matrix4.html#a8853a6b3fd0d08f1def5c9921bd47933',1,'mingfx::Matrix4']]], + ['_7emesh_646',['~Mesh',['../classmingfx_1_1_mesh.html#ace7b23730dbcb581c4886cf2b9998327',1,'mingfx::Mesh']]], + ['_7epoint2_647',['~Point2',['../classmingfx_1_1_point2.html#a7e5b2dcd7e079bdd00354e7ccf9c5c2a',1,'mingfx::Point2']]], + ['_7epoint3_648',['~Point3',['../classmingfx_1_1_point3.html#aa55aef76986cc7424c2a535d6fd1ab7a',1,'mingfx::Point3']]], + ['_7equaternion_649',['~Quaternion',['../classmingfx_1_1_quaternion.html#a1f9ddd82678ccf51a462e4e03a02c7cc',1,'mingfx::Quaternion']]], + ['_7equickshapes_650',['~QuickShapes',['../classmingfx_1_1_quick_shapes.html#a3a75dde188ec076ea46a6319ed1ca046',1,'mingfx::QuickShapes']]], + ['_7eray_651',['~Ray',['../classmingfx_1_1_ray.html#ac20909f30c07d5375598876c6d294625',1,'mingfx::Ray']]], + ['_7eshaderprogram_652',['~ShaderProgram',['../classmingfx_1_1_shader_program.html#a96da0dede354f2511084eeb25428edb4',1,'mingfx::ShaderProgram']]], + ['_7etextshader_653',['~TextShader',['../classmingfx_1_1_text_shader.html#a457f7a42eceb957cdb103664dd864feb',1,'mingfx::TextShader']]], + ['_7etexture2d_654',['~Texture2D',['../classmingfx_1_1_texture2_d.html#aab734dbbcf6211507ab65d5bb94a4ef9',1,'mingfx::Texture2D']]], + ['_7eunicam_655',['~UniCam',['../classmingfx_1_1_uni_cam.html#af98022627bcb52dbf54779cfaeb6ff7e',1,'mingfx::UniCam']]], + ['_7evector2_656',['~Vector2',['../classmingfx_1_1_vector2.html#ac49b009c4b6052ebe71d5cf4ce241b1f',1,'mingfx::Vector2']]], + ['_7evector3_657',['~Vector3',['../classmingfx_1_1_vector3.html#a6e0d09d774615bcfde5645c22a645969',1,'mingfx::Vector3']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_2.html b/dev/MinGfx/docs/html/search/functions_2.html new file mode 100644 index 0000000..ca5aa10 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_2.js b/dev/MinGfx/docs/html/search/functions_2.js new file mode 100644 index 0000000..607a674 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_2.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['calcperfacenormals_416',['CalcPerFaceNormals',['../classmingfx_1_1_mesh.html#a1a5cea9cfdf4c672ba0c781ee54718f7',1,'mingfx::Mesh']]], + ['calcpervertexnormals_417',['CalcPerVertexNormals',['../classmingfx_1_1_mesh.html#acc7df547b0a2175287cc9f509c04e93c',1,'mingfx::Mesh']]], + ['clamp_418',['Clamp',['../classmingfx_1_1_gfx_math.html#af227209ec043b375497556ee2dcdf850',1,'mingfx::GfxMath']]], + ['closestpoint_419',['ClosestPoint',['../classmingfx_1_1_point3.html#a9dd5396f53b7006ec4cb63abffd90a7c',1,'mingfx::Point3']]], + ['closestpointonplane_420',['ClosestPointOnPlane',['../classmingfx_1_1_point3.html#ae31d5f91a03fabdf72b2fa54e177b743',1,'mingfx::Point3']]], + ['cofactor_421',['Cofactor',['../classmingfx_1_1_matrix4.html#a0d88ba8e15325d135157d115f2412e91',1,'mingfx::Matrix4']]], + ['color_422',['Color',['../classmingfx_1_1_color.html#ab4d264b5a1189b73443948c01eab088d',1,'mingfx::Color::Color()'],['../classmingfx_1_1_color.html#a81b442b8afcd157c260487081f25dcc3',1,'mingfx::Color::Color(float red, float green, float blue, float alpha=1.0)'],['../classmingfx_1_1_color.html#ab4d6c067128e779add5390d83ea3410e',1,'mingfx::Color::Color(float *p)'],['../classmingfx_1_1_color.html#a7e0ca85141895a108c852f59f7ca00b9',1,'mingfx::Color::Color(const std::vector< float > &vals)'],['../classmingfx_1_1_color.html#accb83cd759b7290ce2817724d57e246a',1,'mingfx::Color::Color(const Color &p)']]], + ['columntopoint3_423',['ColumnToPoint3',['../classmingfx_1_1_matrix4.html#ae991be2b3bca290b44e676a9f8dc13bd',1,'mingfx::Matrix4']]], + ['columntovector3_424',['ColumnToVector3',['../classmingfx_1_1_matrix4.html#a7396dbff36cb732e1bd878020f52bbc3',1,'mingfx::Matrix4']]], + ['conjugate_425',['Conjugate',['../classmingfx_1_1_quaternion.html#ab0e3e20f78e537de0187def78d808584',1,'mingfx::Quaternion']]], + ['craftcam_426',['CraftCam',['../classmingfx_1_1_craft_cam.html#ae0b0e8d75ffc69c6373a13f1f9c2f171',1,'mingfx::CraftCam::CraftCam()'],['../classmingfx_1_1_craft_cam.html#ab9e1864b5859c22d27ba809b1ba7a51f',1,'mingfx::CraftCam::CraftCam(const Matrix4 &initial_view_matrix)']]], + ['createfromlistofboxes_427',['CreateFromListOfBoxes',['../classmingfx_1_1_b_v_h.html#a964420ca931fa93c420f0820e1b95942',1,'mingfx::BVH']]], + ['createfrommesh_428',['CreateFromMesh',['../classmingfx_1_1_b_v_h.html#a8ed3e91ecd2a0585a0dbac605d6f2c71',1,'mingfx::BVH']]], + ['cross_429',['Cross',['../classmingfx_1_1_vector3.html#a38cd4deed7d342464619b34b0ef95bec',1,'mingfx::Vector3::Cross(const Vector3 &v) const'],['../classmingfx_1_1_vector3.html#a45d7d211135edd97ca21b047439db485',1,'mingfx::Vector3::Cross(const Vector3 &v1, const Vector3 &v2)']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_3.html b/dev/MinGfx/docs/html/search/functions_3.html new file mode 100644 index 0000000..d79f55b --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_3.js b/dev/MinGfx/docs/html/search/functions_3.js new file mode 100644 index 0000000..3658160 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_3.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['default_5fshader_430',['default_shader',['../classmingfx_1_1_quick_shapes.html#aa7564a49dc2ff8efd93dec13186cb75b',1,'mingfx::QuickShapes']]], + ['defaultshader_431',['DefaultShader',['../classmingfx_1_1_default_shader.html#ac030575fd76a6076262bdd09bbb93428',1,'mingfx::DefaultShader']]], + ['determinant_432',['Determinant',['../classmingfx_1_1_matrix4.html#a0127ebae92b50e4f10ebee8565b0248c',1,'mingfx::Matrix4']]], + ['dimensions_433',['Dimensions',['../classmingfx_1_1_a_a_b_b.html#a3bf7d5ffa3ccccf7111e98d88a3ffeec',1,'mingfx::AABB']]], + ['direction_434',['direction',['../classmingfx_1_1_ray.html#a7b7826730a410c10be00122c99fe6dbe',1,'mingfx::Ray']]], + ['distancetoplane_435',['DistanceToPlane',['../classmingfx_1_1_point3.html#af554773b2d7f4492a0727e8e42efe002',1,'mingfx::Point3']]], + ['dot_436',['Dot',['../classmingfx_1_1_quaternion.html#a90a9b715d06c75ba60eb1164dc6e9c6f',1,'mingfx::Quaternion::Dot()'],['../classmingfx_1_1_vector2.html#ae2208539c6b29712c22f557dcfdd55d9',1,'mingfx::Vector2::Dot(const Vector2 &v) const'],['../classmingfx_1_1_vector2.html#a9e81c518908ca06c98ba099b075fe1cd',1,'mingfx::Vector2::Dot(const Vector2 &v1, const Vector2 &v2)'],['../classmingfx_1_1_vector3.html#a31692a459a8056fe220d115eb5addc88',1,'mingfx::Vector3::Dot(const Vector3 &v) const'],['../classmingfx_1_1_vector3.html#a235fb20d4075960d2ce6198dc95ac507',1,'mingfx::Vector3::Dot(const Vector3 &v1, const Vector3 &v2)']]], + ['draw_437',['Draw',['../classmingfx_1_1_default_shader.html#a652b3d00bb6ae2a806b1ca3e3d42242b',1,'mingfx::DefaultShader::Draw()'],['../classmingfx_1_1_mesh.html#a75075d472938fd760477be42585aff5c',1,'mingfx::Mesh::Draw()'],['../classmingfx_1_1_uni_cam.html#ae45f3c80c205a539baeb4f1b8787777d',1,'mingfx::UniCam::Draw()']]], + ['draw3d_438',['Draw3D',['../classmingfx_1_1_text_shader.html#a2caaaf2decfac523b476951474e9a359',1,'mingfx::TextShader']]], + ['drawarrow_439',['DrawArrow',['../classmingfx_1_1_quick_shapes.html#aebe27814a826558ac0475fef3d4481eb',1,'mingfx::QuickShapes']]], + ['drawaxes_440',['DrawAxes',['../classmingfx_1_1_quick_shapes.html#a637876fdc13e84282922350b53dab5f8',1,'mingfx::QuickShapes']]], + ['drawbrush_441',['DrawBrush',['../classmingfx_1_1_quick_shapes.html#ab24811cfd980b3f2ec4ebccf6c0e8b30',1,'mingfx::QuickShapes']]], + ['drawcone_442',['DrawCone',['../classmingfx_1_1_quick_shapes.html#a1880f6dd3e794cd9f6e5d9138f93a424',1,'mingfx::QuickShapes']]], + ['drawcube_443',['DrawCube',['../classmingfx_1_1_quick_shapes.html#adad98f87a40650ff7c605a94b6d937af',1,'mingfx::QuickShapes']]], + ['drawcylinder_444',['DrawCylinder',['../classmingfx_1_1_quick_shapes.html#a69c442154f800c6bb3f6ffa8395e2844',1,'mingfx::QuickShapes']]], + ['drawfullscreentexture_445',['DrawFullscreenTexture',['../classmingfx_1_1_quick_shapes.html#abec2513648c1238f36c41cf3c85dd868',1,'mingfx::QuickShapes']]], + ['drawlines_446',['DrawLines',['../classmingfx_1_1_quick_shapes.html#af59ae8d8c5bd0447f3bb7f56112400bf',1,'mingfx::QuickShapes']]], + ['drawlinesegment_447',['DrawLineSegment',['../classmingfx_1_1_quick_shapes.html#a0feae19a04d9f315a39e2bdbf659bd7e',1,'mingfx::QuickShapes']]], + ['drawsphere_448',['DrawSphere',['../classmingfx_1_1_quick_shapes.html#aa5f4f64e3708630a6d58f6b4ca7d2744',1,'mingfx::QuickShapes']]], + ['drawsquare_449',['DrawSquare',['../classmingfx_1_1_quick_shapes.html#a4350ea23b8b9e0e8119310423d641ab3',1,'mingfx::QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color)'],['../classmingfx_1_1_quick_shapes.html#a7187f72fa8e12b38dcd0ce424fc85fbc',1,'mingfx::QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, const Matrix4 &projectionMatrix, const Color &color, const Texture2D &texture)']]], + ['drawusingnanovg_450',['DrawUsingNanoVG',['../classmingfx_1_1_graphics_app.html#a688f12675da58210e8ec2ffcda4923d0',1,'mingfx::GraphicsApp']]], + ['drawusingopengl_451',['DrawUsingOpenGL',['../classmingfx_1_1_graphics_app.html#a5a858fd10651f7617491f37b49dbf8ca',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_4.html b/dev/MinGfx/docs/html/search/functions_4.html new file mode 100644 index 0000000..1657cad --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_4.js b/dev/MinGfx/docs/html/search/functions_4.js new file mode 100644 index 0000000..9c8ea91 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['eye_452',['eye',['../classmingfx_1_1_craft_cam.html#a82a8e20596247e2986e5929c1ef7f150',1,'mingfx::CraftCam::eye()'],['../classmingfx_1_1_uni_cam.html#a65d5735b4b3a8e38f2b30df4133cadd2',1,'mingfx::UniCam::eye()']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_5.html b/dev/MinGfx/docs/html/search/functions_5.html new file mode 100644 index 0000000..9301d6b --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_5.js b/dev/MinGfx/docs/html/search/functions_5.js new file mode 100644 index 0000000..797ad04 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_5.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['fastintersectmesh_453',['FastIntersectMesh',['../classmingfx_1_1_ray.html#ac90097090f0f8f49db13f6f232712afc',1,'mingfx::Ray']]], + ['fileexists_454',['FileExists',['../classmingfx_1_1_platform.html#a045007efda73123a7f4019837d83bc92',1,'mingfx::Platform']]], + ['filter_5fmode_455',['filter_mode',['../classmingfx_1_1_texture2_d.html#af0052203fcfd9bbb903a40d14700b13b',1,'mingfx::Texture2D']]], + ['findfile_456',['FindFile',['../classmingfx_1_1_platform.html#a32a392f4bac832c95fabc2d10bd03ad1',1,'mingfx::Platform::FindFile(const std::string &basename, const std::vector< std::string > &searchpath)'],['../classmingfx_1_1_platform.html#a03ade910313dd9580c9e37a7b63f87b2',1,'mingfx::Platform::FindFile(const std::string &basename, const std::string &searchpath)']]], + ['findmingfxdatafile_457',['FindMinGfxDataFile',['../classmingfx_1_1_platform.html#a2c36ca57a246efa218a49a942c8c4a3b',1,'mingfx::Platform']]], + ['findmingfxshaderfile_458',['FindMinGfxShaderFile',['../classmingfx_1_1_platform.html#af12cd63e1ede33529d8c282d7d916169',1,'mingfx::Platform']]], + ['framebuffer_5fheight_459',['framebuffer_height',['../classmingfx_1_1_graphics_app.html#af58153eb104f53216a3e67de2a472f32',1,'mingfx::GraphicsApp']]], + ['framebuffer_5fwidth_460',['framebuffer_width',['../classmingfx_1_1_graphics_app.html#ad596e69d030e7689ad91eaaec6975696',1,'mingfx::GraphicsApp']]], + ['fromaxisangle_461',['FromAxisAngle',['../classmingfx_1_1_quaternion.html#a5bacec2f9a3cbbcf24572f9c8eeb480c',1,'mingfx::Quaternion']]], + ['fromeulerangleszyx_462',['FromEulerAnglesZYX',['../classmingfx_1_1_quaternion.html#a9548599ea5c527f9f67d2ea6710e3d18',1,'mingfx::Quaternion']]], + ['fromrowmajorelements_463',['FromRowMajorElements',['../classmingfx_1_1_matrix4.html#add98bfa1cf6a10dbae0e8ae8defe728b',1,'mingfx::Matrix4']]], + ['frustum_464',['Frustum',['../classmingfx_1_1_matrix4.html#a8e2f7b50cd2c8853e007829df9863722',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_6.html b/dev/MinGfx/docs/html/search/functions_6.html new file mode 100644 index 0000000..9c4f5fc --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_6.js b/dev/MinGfx/docs/html/search/functions_6.js new file mode 100644 index 0000000..6f54b78 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['graphicsapp_465',['GraphicsApp',['../classmingfx_1_1_graphics_app.html#abf0b48c7d8e5325ab038fddbe1c38b5b',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_7.html b/dev/MinGfx/docs/html/search/functions_7.html new file mode 100644 index 0000000..46b5c0f --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_7.js b/dev/MinGfx/docs/html/search/functions_7.js new file mode 100644 index 0000000..9efaf3f --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['height_466',['height',['../classmingfx_1_1_texture2_d.html#a3c396193b466053f23803894039d8d88',1,'mingfx::Texture2D']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_8.html b/dev/MinGfx/docs/html/search/functions_8.html new file mode 100644 index 0000000..31a1d95 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_8.js b/dev/MinGfx/docs/html/search/functions_8.js new file mode 100644 index 0000000..ab69095 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_8.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['ilerp_467',['iLerp',['../classmingfx_1_1_gfx_math.html#af255bde64498e9b55be466abeea97f4d',1,'mingfx::GfxMath']]], + ['init_468',['Init',['../classmingfx_1_1_default_shader.html#a5cb9f0a1709452268858ec338448a4c3',1,'mingfx::DefaultShader::Init()'],['../classmingfx_1_1_text_shader.html#ad60a8b572adc30dad47e2d163dc603a3',1,'mingfx::TextShader::Init()']]], + ['initfrombytes_469',['InitFromBytes',['../classmingfx_1_1_texture2_d.html#aba57b01065096fe9f6483e8f68622944',1,'mingfx::Texture2D']]], + ['initfromfile_470',['InitFromFile',['../classmingfx_1_1_texture2_d.html#a8eded044ccdf9bd3e1e5bcfe74526bdc',1,'mingfx::Texture2D']]], + ['initfromfloats_471',['InitFromFloats',['../classmingfx_1_1_texture2_d.html#aee8a0aad1795680cb840ffcf544ed7b8',1,'mingfx::Texture2D']]], + ['initgraphicscontext_472',['InitGraphicsContext',['../classmingfx_1_1_graphics_app.html#a04beb462aa04371dc86d807838f999e1',1,'mingfx::GraphicsApp']]], + ['initialized_473',['initialized',['../classmingfx_1_1_shader_program.html#a2eddd93e446ad2079d1c57676655ffbe',1,'mingfx::ShaderProgram::initialized()'],['../classmingfx_1_1_texture2_d.html#a15d5c319cf7e012e703668f4d4e7be87',1,'mingfx::Texture2D::initialized()']]], + ['initnanogui_474',['InitNanoGUI',['../classmingfx_1_1_graphics_app.html#adfe77d841f43961b299ea6159477968a',1,'mingfx::GraphicsApp']]], + ['initopengl_475',['InitOpenGL',['../classmingfx_1_1_graphics_app.html#a96196b37f8b488b64072ec74b5d2b0b3',1,'mingfx::GraphicsApp']]], + ['intersectaabb_476',['IntersectAABB',['../classmingfx_1_1_ray.html#a57d3ee10518ed361ae02d9cbdef842b7',1,'mingfx::Ray']]], + ['intersectandreturnuserdata_477',['IntersectAndReturnUserData',['../classmingfx_1_1_b_v_h.html#afad54f50a29e8b3aace6cdec5c792c56',1,'mingfx::BVH']]], + ['intersectmesh_478',['IntersectMesh',['../classmingfx_1_1_ray.html#a79caa1df0839d13339575d3d5527ae6f',1,'mingfx::Ray']]], + ['intersectplane_479',['IntersectPlane',['../classmingfx_1_1_ray.html#a8707604031eb9437c449345d85d69d24',1,'mingfx::Ray']]], + ['intersectquad_480',['IntersectQuad',['../classmingfx_1_1_ray.html#a37689523a0b73d3d3288ce60bdcb7ae3',1,'mingfx::Ray']]], + ['intersectsphere_481',['IntersectSphere',['../classmingfx_1_1_ray.html#a970c7dbc19167be625967fabfb39b4ff',1,'mingfx::Ray']]], + ['intersecttriangle_482',['IntersectTriangle',['../classmingfx_1_1_ray.html#a1a6130616c4e4eebe9d09181b0f8b734',1,'mingfx::Ray']]], + ['inverse_483',['Inverse',['../classmingfx_1_1_matrix4.html#ab3f360906e15730eee621826b5f0bbc5',1,'mingfx::Matrix4']]], + ['iskeydown_484',['IsKeyDown',['../classmingfx_1_1_graphics_app.html#a60688614e5dfeaabf57f8825cdaa08ac',1,'mingfx::GraphicsApp']]], + ['isleftmousedown_485',['IsLeftMouseDown',['../classmingfx_1_1_graphics_app.html#a5b78d79192180a6ef5271d2a2b2d1cc7',1,'mingfx::GraphicsApp']]], + ['ismiddlemousedown_486',['IsMiddleMouseDown',['../classmingfx_1_1_graphics_app.html#a941f7598400073bfa93aa194a3773434',1,'mingfx::GraphicsApp']]], + ['isrightmousedown_487',['IsRightMouseDown',['../classmingfx_1_1_graphics_app.html#a4aa30e3d33731178a9162454a81be08d',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_9.html b/dev/MinGfx/docs/html/search/functions_9.html new file mode 100644 index 0000000..9a8e429 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_9.js b/dev/MinGfx/docs/html/search/functions_9.js new file mode 100644 index 0000000..d8cc9e6 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_9.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['length_488',['Length',['../classmingfx_1_1_quaternion.html#af6527ae19f31be2b265b8b8c4b34b77a',1,'mingfx::Quaternion::Length()'],['../classmingfx_1_1_ray.html#a3c926e2da6dfd1b0a435577617eae984',1,'mingfx::Ray::Length()'],['../classmingfx_1_1_vector2.html#a71b90903d00cdc318ea42f593db6dbb9',1,'mingfx::Vector2::Length()'],['../classmingfx_1_1_vector3.html#a7633dc1625b1f2e6b381438e896b45a3',1,'mingfx::Vector3::Length()']]], + ['lerp_489',['Lerp',['../classmingfx_1_1_color.html#abdec9bbfdd82ed75afc45b103c8bbcf4',1,'mingfx::Color::Lerp(const Color &b, float alpha) const'],['../classmingfx_1_1_color.html#a883787431fef36c06c724c3b9ed25363',1,'mingfx::Color::Lerp(const Color &a, const Color &b, float alpha)'],['../classmingfx_1_1_gfx_math.html#ace452fb6b86eb638897b474e9dd51647',1,'mingfx::GfxMath::Lerp()'],['../classmingfx_1_1_point2.html#a900567ad5e3c0e6de217b52167c49fd6',1,'mingfx::Point2::Lerp(const Point2 &b, float alpha) const'],['../classmingfx_1_1_point2.html#a680648ae01c549c48f7a3d5d75d8791e',1,'mingfx::Point2::Lerp(const Point2 &a, const Point2 &b, float alpha)'],['../classmingfx_1_1_point3.html#a228a1f3754b8ee82b9bb148ce183fc5b',1,'mingfx::Point3::Lerp(const Point3 &b, float alpha) const'],['../classmingfx_1_1_point3.html#a206691c31872e537eefbf897603dba74',1,'mingfx::Point3::Lerp(const Point3 &a, const Point3 &b, float alpha)'],['../classmingfx_1_1_vector2.html#a5813ffa3c185551eec1927e1daa4cb17',1,'mingfx::Vector2::Lerp(const Vector2 &b, float alpha) const'],['../classmingfx_1_1_vector2.html#ac332b5f01b3357b85e6d279fb059d561',1,'mingfx::Vector2::Lerp(const Vector2 &a, const Vector2 &b, float alpha)'],['../classmingfx_1_1_vector3.html#a8dafc21c64a4964bac27519972d909b6',1,'mingfx::Vector3::Lerp(const Vector3 &b, float alpha) const'],['../classmingfx_1_1_vector3.html#a489b042bedf8fa329ac05fe905ca1c6f',1,'mingfx::Vector3::Lerp(const Vector3 &a, const Vector3 &b, float alpha)']]], + ['light_490',['light',['../classmingfx_1_1_default_shader.html#aa2ed33efad35aefbb400be45250cd316',1,'mingfx::DefaultShader']]], + ['lightproperties_491',['LightProperties',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a582ceee332260b06cbf2ec607257aba3',1,'mingfx::DefaultShader::LightProperties']]], + ['linkprogram_492',['LinkProgram',['../classmingfx_1_1_shader_program.html#ad14c3a9a4ee1eef39f933bc46260c794',1,'mingfx::ShaderProgram']]], + ['loadfromobj_493',['LoadFromOBJ',['../classmingfx_1_1_mesh.html#a8d05faf18ef8d170fc3c2a343075823f',1,'mingfx::Mesh']]], + ['look_494',['look',['../classmingfx_1_1_craft_cam.html#a2c7546bccfbf986eb9cd0a2784f74859',1,'mingfx::CraftCam::look()'],['../classmingfx_1_1_uni_cam.html#a8363576bf0f85c74d80ced697bd73d40',1,'mingfx::UniCam::look()']]], + ['look_5fscale_495',['look_scale',['../classmingfx_1_1_craft_cam.html#a96ba4a36029ca8234576cbf2791c5ccb',1,'mingfx::CraftCam']]], + ['lookat_496',['LookAt',['../classmingfx_1_1_matrix4.html#a4543695a6dfc996d0312b70c2eaa00de',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_a.html b/dev/MinGfx/docs/html/search/functions_a.html new file mode 100644 index 0000000..5ecc152 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_a.js b/dev/MinGfx/docs/html/search/functions_a.js new file mode 100644 index 0000000..5437ddf --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_a.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['material_497',['material',['../classmingfx_1_1_quick_shapes.html#ac8b702a25296cfea15eef1e185333272',1,'mingfx::QuickShapes']]], + ['materialproperties_498',['MaterialProperties',['../classmingfx_1_1_default_shader_1_1_material_properties.html#aa24361a9c6eb0a87355d0ad00e47dd96',1,'mingfx::DefaultShader::MaterialProperties']]], + ['matrix4_499',['Matrix4',['../classmingfx_1_1_matrix4.html#a50990f00b756d640670a0b02129afd22',1,'mingfx::Matrix4::Matrix4()'],['../classmingfx_1_1_matrix4.html#a09a366a3ef940ff355f8d5c521baa57d',1,'mingfx::Matrix4::Matrix4(const float *a)'],['../classmingfx_1_1_matrix4.html#a0abaeb690794c4a55e74c9b5fd82d138',1,'mingfx::Matrix4::Matrix4(const std::vector< float > &a)'],['../classmingfx_1_1_matrix4.html#a4bcf311614006c551f57d2b0dcd32d87',1,'mingfx::Matrix4::Matrix4(const Matrix4 &m2)']]], + ['max_500',['max',['../classmingfx_1_1_a_a_b_b.html#abac247fedc82467c6b058ed4fe77d2a4',1,'mingfx::AABB']]], + ['mesh_501',['Mesh',['../classmingfx_1_1_mesh.html#a69613870d54989f4226e50caf4ca9fb9',1,'mingfx::Mesh::Mesh()'],['../classmingfx_1_1_mesh.html#a76b4977f0a7f156aa8a0027f10dcbdc1',1,'mingfx::Mesh::Mesh(const Mesh &other)']]], + ['min_502',['min',['../classmingfx_1_1_a_a_b_b.html#a3b46cdd39ffed26b7982d641b53158e6',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_b.html b/dev/MinGfx/docs/html/search/functions_b.html new file mode 100644 index 0000000..e301fed --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_b.js b/dev/MinGfx/docs/html/search/functions_b.js new file mode 100644 index 0000000..0442033 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['native_5ffont_5fsize_503',['native_font_size',['../classmingfx_1_1_text_shader.html#a707b2b36547db78d19139575003c8a0d',1,'mingfx::TextShader']]], + ['normalize_504',['Normalize',['../classmingfx_1_1_quaternion.html#a05def5c8eb729037b3d9522711a5c2a2',1,'mingfx::Quaternion::Normalize()'],['../classmingfx_1_1_vector2.html#a632ddd5b06c48fa0f6f39550e91082c0',1,'mingfx::Vector2::Normalize()'],['../classmingfx_1_1_vector2.html#a06d6c283aba957bddc2b9849698838b2',1,'mingfx::Vector2::Normalize(const Vector2 &v)'],['../classmingfx_1_1_vector3.html#a9b8e9ecbe10477adec527842f62d0dca',1,'mingfx::Vector3::Normalize()'],['../classmingfx_1_1_vector3.html#aeff0177e2111139469b60733248fad8d',1,'mingfx::Vector3::Normalize(const Vector3 &v)']]], + ['normalizeddevicecoordstopixels_505',['NormalizedDeviceCoordsToPixels',['../classmingfx_1_1_graphics_app.html#a6141ec6adc29572ee99ca26cf90e6248',1,'mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC)'],['../classmingfx_1_1_graphics_app.html#a45596da36aa3905e7c752826a7fd9f93',1,'mingfx::GraphicsApp::NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC)']]], + ['num_5flights_506',['num_lights',['../classmingfx_1_1_default_shader.html#ac5b779672a983df8aa67c9cbe026e0c2',1,'mingfx::DefaultShader']]], + ['num_5ftriangles_507',['num_triangles',['../classmingfx_1_1_mesh.html#ab3f3779506e15e3888ccbb8b9b572b8f',1,'mingfx::Mesh']]], + ['num_5fvertices_508',['num_vertices',['../classmingfx_1_1_mesh.html#ab8f6856429466f1b4600a6ec27b84d0d',1,'mingfx::Mesh']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_c.html b/dev/MinGfx/docs/html/search/functions_c.html new file mode 100644 index 0000000..c4f3268 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_c.js b/dev/MinGfx/docs/html/search/functions_c.js new file mode 100644 index 0000000..9ae5851 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_c.js @@ -0,0 +1,39 @@ +var searchData= +[ + ['onbuttondown_509',['OnButtonDown',['../classmingfx_1_1_uni_cam.html#a85afba6e8792636f3c6ba2433db1c52f',1,'mingfx::UniCam']]], + ['onbuttonup_510',['OnButtonUp',['../classmingfx_1_1_uni_cam.html#a2a9431dc3943c8dc485994d88ce2a58a',1,'mingfx::UniCam']]], + ['ondrag_511',['OnDrag',['../classmingfx_1_1_uni_cam.html#a33f1b41fcf53ea78ca2b3640902c5bbe',1,'mingfx::UniCam']]], + ['one_512',['One',['../classmingfx_1_1_point2.html#a38149d8797bf7406fc34cab0ea5a3ac8',1,'mingfx::Point2::One()'],['../classmingfx_1_1_point3.html#a2cfcbefe652720779e0d7beff1c86ece',1,'mingfx::Point3::One()'],['../classmingfx_1_1_vector2.html#a5b51e62f03e95d6be1262f037aecf0fd',1,'mingfx::Vector2::One()'],['../classmingfx_1_1_vector3.html#af71b12760516a9cc4837ba9e1dee28db',1,'mingfx::Vector3::One()']]], + ['onkeydown_513',['OnKeyDown',['../classmingfx_1_1_graphics_app.html#a002560456139e537877d079978db4b01',1,'mingfx::GraphicsApp']]], + ['onkeyrepeat_514',['OnKeyRepeat',['../classmingfx_1_1_graphics_app.html#a1d5831953b37fae615fbd1bf527214b0',1,'mingfx::GraphicsApp']]], + ['onkeyup_515',['OnKeyUp',['../classmingfx_1_1_graphics_app.html#a8376ef8eb0840b229a2301f995db3f6c',1,'mingfx::GraphicsApp']]], + ['onleftmousedown_516',['OnLeftMouseDown',['../classmingfx_1_1_graphics_app.html#ae12d9b192a2167a71e0c103405addb17',1,'mingfx::GraphicsApp']]], + ['onleftmousedrag_517',['OnLeftMouseDrag',['../classmingfx_1_1_graphics_app.html#a56d350a8b030998709a51630753d509b',1,'mingfx::GraphicsApp']]], + ['onleftmouseup_518',['OnLeftMouseUp',['../classmingfx_1_1_graphics_app.html#a536dbadf0b8a11ef59d7e855ca43f613',1,'mingfx::GraphicsApp']]], + ['onmiddlemousedown_519',['OnMiddleMouseDown',['../classmingfx_1_1_graphics_app.html#a588315d5c45490b440a764af2bc5bd48',1,'mingfx::GraphicsApp']]], + ['onmiddlemousedrag_520',['OnMiddleMouseDrag',['../classmingfx_1_1_graphics_app.html#ac7628fece754c0ac4875791e19712dc6',1,'mingfx::GraphicsApp']]], + ['onmiddlemouseup_521',['OnMiddleMouseUp',['../classmingfx_1_1_graphics_app.html#a378b8a102775eeb01a6da9dd68482d08',1,'mingfx::GraphicsApp']]], + ['onmousemove_522',['OnMouseMove',['../classmingfx_1_1_craft_cam.html#a8366e9d8e9bb3b048d1dd14af2f76311',1,'mingfx::CraftCam::OnMouseMove()'],['../classmingfx_1_1_graphics_app.html#a23a780feda9b52eea7319a53b204ce8f',1,'mingfx::GraphicsApp::OnMouseMove(const Point2 &pos, const Vector2 &delta)']]], + ['onrightmousedown_523',['OnRightMouseDown',['../classmingfx_1_1_graphics_app.html#a903f94b82cc10f32039ff3f2ba368a9c',1,'mingfx::GraphicsApp']]], + ['onrightmousedrag_524',['OnRightMouseDrag',['../classmingfx_1_1_graphics_app.html#a00ad5039af2f428a08fe45751a9731c7',1,'mingfx::GraphicsApp']]], + ['onrightmouseup_525',['OnRightMouseUp',['../classmingfx_1_1_graphics_app.html#ad7c33791c44afc87ce789874f3002ca3',1,'mingfx::GraphicsApp']]], + ['onspecialkeydown_526',['OnSpecialKeyDown',['../classmingfx_1_1_graphics_app.html#abcf1935e92550bcda311cac62f312952',1,'mingfx::GraphicsApp']]], + ['onspecialkeyrepeat_527',['OnSpecialKeyRepeat',['../classmingfx_1_1_graphics_app.html#a8362762489e287edfa59617a6602db22',1,'mingfx::GraphicsApp']]], + ['onspecialkeyup_528',['OnSpecialKeyUp',['../classmingfx_1_1_graphics_app.html#a0deb6da45fc0d3980e44556a861c7a14',1,'mingfx::GraphicsApp']]], + ['onwindowresize_529',['OnWindowResize',['../classmingfx_1_1_graphics_app.html#adafdc4631db256fefce3c4ffdfd5086a',1,'mingfx::GraphicsApp']]], + ['opengl_5fid_530',['opengl_id',['../classmingfx_1_1_texture2_d.html#ad4e0faadfe016e6ee501e66fc0244504',1,'mingfx::Texture2D']]], + ['operator_21_3d_531',['operator!=',['../classmingfx_1_1_color.html#acf92f9f413cf11639b73dc0d7d431244',1,'mingfx::Color::operator!=()'],['../classmingfx_1_1_matrix4.html#ab186b0ae1ae669346c0718c2489cd71b',1,'mingfx::Matrix4::operator!=()'],['../classmingfx_1_1_point2.html#a5b99fcf93a0c6d2b247290f5564f8a84',1,'mingfx::Point2::operator!=()'],['../classmingfx_1_1_point3.html#acccf9d3fca27174c18ada3b33209c71e',1,'mingfx::Point3::operator!=()'],['../classmingfx_1_1_quaternion.html#ad72c021d2d1fa543c96ac4a8b360dd2e',1,'mingfx::Quaternion::operator!=()'],['../classmingfx_1_1_ray.html#ab62fa6ea1c20870f67c58401aefe3eff',1,'mingfx::Ray::operator!=()'],['../classmingfx_1_1_vector2.html#a1cf3488f1f14a9bf7f6e1278c1c63cdb',1,'mingfx::Vector2::operator!=()'],['../classmingfx_1_1_vector3.html#ab93acb916c310920b9c011159eaaa016',1,'mingfx::Vector3::operator!=()']]], + ['operator_28_29_532',['operator()',['../classmingfx_1_1_matrix4.html#aa324d0cec02c452fb938af28725d5df9',1,'mingfx::Matrix4::operator()(const int row, const int col) const'],['../classmingfx_1_1_matrix4.html#a470bba77b8e3c47de7adaa18046e6096',1,'mingfx::Matrix4::operator()(const int row, const int col)']]], + ['operator_2a_533',['operator*',['../namespacemingfx.html#a0a456bccfb238b9644cf21669cf35b8c',1,'mingfx::operator*(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a55f694123e83d1649c112e806359d4b6',1,'mingfx::operator*(const float s, const Quaternion &q)'],['../namespacemingfx.html#aadc0e86a31d54469e730669067b102c2',1,'mingfx::operator*(const Matrix4 &m1, const Matrix4 &m2)'],['../namespacemingfx.html#aa8a18cb8506dee589eaf6883a32e6fb5',1,'mingfx::operator*(const Vector3 &v, const float s)'],['../namespacemingfx.html#a7e3941689c65388690916d00e0d423d4',1,'mingfx::operator*(const float s, const Vector3 &v)'],['../namespacemingfx.html#a8358de6421374fb037e8c51e8f2d5878',1,'mingfx::operator*(const Vector2 &v, const float s)'],['../namespacemingfx.html#a8bc25e621d21323fdd96f2c4a4141432',1,'mingfx::operator*(const float s, const Vector2 &v)'],['../namespacemingfx.html#adb96b0188d1ceda03ed8d297817502c9',1,'mingfx::operator*(const Quaternion &q, const float s)'],['../namespacemingfx.html#a1af1c07624961984759120b7af7f9ce4',1,'mingfx::operator*(const Matrix4 &m, const Ray &r)'],['../namespacemingfx.html#abb2cfd42e696494e4797d8f7e11f6d77',1,'mingfx::operator*(const Matrix4 &m, const Vector3 &v)'],['../namespacemingfx.html#a5b8dabff5d6c9ddcef5e15b0ef807c80',1,'mingfx::operator*(const Matrix4 &m, const Point3 &p)'],['../namespacemingfx.html#a061ff38340cf1aad4612790b0a600aeb',1,'mingfx::operator*(const float &s, const Matrix4 &m)'],['../namespacemingfx.html#ae5708e414f585dde2a5418ddae259a57',1,'mingfx::operator*(const Matrix4 &m, const float &s)']]], + ['operator_2b_534',['operator+',['../namespacemingfx.html#aeeeb04b70f8e8becbcda7a3dc7024c1b',1,'mingfx::operator+(const Vector3 &v1, const Vector3 &v2)'],['../namespacemingfx.html#aadea317107a50ec6847ce01927b61c82',1,'mingfx::operator+(const Point3 &p, const Vector3 &v)'],['../namespacemingfx.html#a4b4428d2cf65ba5226ef4036352d311e',1,'mingfx::operator+(const Vector3 &v, const Point3 &p)'],['../namespacemingfx.html#acdffada748181cc17ec93784f858ff9f',1,'mingfx::operator+(const Vector2 &v1, const Vector2 &v2)'],['../namespacemingfx.html#ab2083f9992ba509a275db11522f16a2e',1,'mingfx::operator+(const Point2 &p, const Vector2 &v)'],['../namespacemingfx.html#ac71c01d7c300671cb343a24b68a875bf',1,'mingfx::operator+(const Vector2 &v, const Point2 &p)'],['../namespacemingfx.html#ad49375487853a642b3f372c95cff1a96',1,'mingfx::operator+(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a3c3b45ed6edf3fe76f98a7fd165dca03',1,'mingfx::operator+(const AABB &A, const AABB &B)']]], + ['operator_2d_535',['operator-',['../namespacemingfx.html#a61f2d974c78e8884bb64c2759e455101',1,'mingfx::operator-(const Quaternion &q1, const Quaternion &q2)'],['../namespacemingfx.html#a2f5a225a54f07164d5172a3721a3aee6',1,'mingfx::operator-(const Quaternion &q)'],['../namespacemingfx.html#a5daeaa383c40eed6f41b2c1b7930499f',1,'mingfx::operator-(const Vector2 &v)'],['../namespacemingfx.html#ae81fac825c0f6eca59cc1a1cc06d63f2',1,'mingfx::operator-(const Point2 &p, const Vector2 &v)'],['../namespacemingfx.html#a128585c0b87e03beda4a660d4e58789b',1,'mingfx::operator-(const Vector2 &v1, const Vector2 &v2)'],['../namespacemingfx.html#ad370bce0bb5b88beb974aad1d44890e8',1,'mingfx::operator-(const Point2 &p1, const Point2 &p2)'],['../namespacemingfx.html#afd07add6169773bae12d40201f8af7db',1,'mingfx::operator-(const Vector3 &v)'],['../namespacemingfx.html#a579b90d99a1d6f794ca44017ded3a8db',1,'mingfx::operator-(const Point3 &p, const Vector3 &v)'],['../namespacemingfx.html#aecdf7f36c4feb04034f1d07c49d5c0e3',1,'mingfx::operator-(const Vector3 &v1, const Vector3 &v2)'],['../namespacemingfx.html#a77d92da8f1a866306518422cd9d2f0af',1,'mingfx::operator-(const Point3 &p1, const Point3 &p2)']]], + ['operator_2f_536',['operator/',['../namespacemingfx.html#a444ae88d836b913ac8307fbf4357f7ed',1,'mingfx::operator/(const Quaternion &q, const float s)'],['../namespacemingfx.html#a79ffb6c38c6c0b68ce1fdb7ae76ea6bd',1,'mingfx::operator/(const Vector2 &v, const float s)'],['../namespacemingfx.html#aa19b1dea0b7aa468950e56044fda328a',1,'mingfx::operator/(const Vector3 &v, const float s)']]], + ['operator_3c_3c_537',['operator<<',['../namespacemingfx.html#a1584104dea1f0a5636c868b67ddf6b10',1,'mingfx::operator<<(std::ostream &os, const Matrix4 &m)'],['../namespacemingfx.html#a6bc967741341f4f318a505d884192906',1,'mingfx::operator<<(std::ostream &os, const Color &c)'],['../namespacemingfx.html#a58ddc500b8c3e12f8af4515f258540cb',1,'mingfx::operator<<(std::ostream &os, const Point2 &p)'],['../namespacemingfx.html#a53ce6bc4f4abdd3797d7af47adecbaf6',1,'mingfx::operator<<(std::ostream &os, const Point3 &p)'],['../namespacemingfx.html#ac4b78a682ff8d1ec298e0df7f742658d',1,'mingfx::operator<<(std::ostream &os, const Quaternion &q)'],['../namespacemingfx.html#ad7c839e598b7be6c1b407330dfacc980',1,'mingfx::operator<<(std::ostream &os, const Ray &r)'],['../namespacemingfx.html#acbe43aa24ecedf663c65becf2be282c7',1,'mingfx::operator<<(std::ostream &os, const Vector2 &v)'],['../namespacemingfx.html#a3425c24faf923364cd3a764d50601c52',1,'mingfx::operator<<(std::ostream &os, const Vector3 &v)']]], + ['operator_3d_538',['operator=',['../classmingfx_1_1_vector3.html#aa5b1c05c285fad7f2709f6f351a63608',1,'mingfx::Vector3::operator=()'],['../classmingfx_1_1_vector2.html#a28c44a323e5bd1a251dee9e00e2e1769',1,'mingfx::Vector2::operator=()'],['../classmingfx_1_1_quaternion.html#ac5f82b7ed1d620c3c15f57aca028fcdd',1,'mingfx::Quaternion::operator=()'],['../classmingfx_1_1_point3.html#a8e54b18bfaa39f4b7048b85c9ca43c3d',1,'mingfx::Point3::operator=()'],['../classmingfx_1_1_point2.html#afc68153cce7dc528e95cf5ad81c63902',1,'mingfx::Point2::operator=()'],['../classmingfx_1_1_matrix4.html#a9ad8a8bc180ce213956d6d7d3fa19770',1,'mingfx::Matrix4::operator=()'],['../classmingfx_1_1_color.html#ae51a066a9bb018e4f050d9b8cc7f330e',1,'mingfx::Color::operator=()']]], + ['operator_3d_3d_539',['operator==',['../classmingfx_1_1_vector3.html#a85486d0a355417fe4b41fa64146c9e98',1,'mingfx::Vector3::operator==()'],['../classmingfx_1_1_vector2.html#ad7acc2cf4dcd2eca210899c846bb7dfe',1,'mingfx::Vector2::operator==()'],['../classmingfx_1_1_ray.html#a87b07c4f7c9f33189efade7e519b5d9d',1,'mingfx::Ray::operator==()'],['../classmingfx_1_1_quaternion.html#aa89165641485cf9337cd6279df40a403',1,'mingfx::Quaternion::operator==()'],['../classmingfx_1_1_point3.html#ab22d5cc4631f26274ada550c90d39699',1,'mingfx::Point3::operator==()'],['../classmingfx_1_1_matrix4.html#a9ec2ee167a450cd7b992384e4cc5bb73',1,'mingfx::Matrix4::operator==()'],['../classmingfx_1_1_color.html#a5411077527ff2a12d18ce1ae52688cf0',1,'mingfx::Color::operator==()'],['../classmingfx_1_1_point2.html#ae8729260293b993bbf3cb31c0a33edfa',1,'mingfx::Point2::operator==()']]], + ['operator_3e_3e_540',['operator>>',['../namespacemingfx.html#a256924759a6718882a2b40e17d3e523d',1,'mingfx::operator>>(std::istream &is, Point2 &p)'],['../namespacemingfx.html#ad95e9b494b9761895d57e2b698b69afd',1,'mingfx::operator>>(std::istream &is, Point3 &p)'],['../namespacemingfx.html#a59fb7a99df5c572849e31065884b2235',1,'mingfx::operator>>(std::istream &is, Quaternion &q)'],['../namespacemingfx.html#a0412270963460363fa015b9b4785cc59',1,'mingfx::operator>>(std::istream &is, Ray &r)'],['../namespacemingfx.html#ab3f12496d7a5028b71882373d6fa7203',1,'mingfx::operator>>(std::istream &is, Vector2 &v)'],['../namespacemingfx.html#a8cc2f52569661416cb2ca67c516b7c93',1,'mingfx::operator>>(std::istream &is, Vector3 &v)'],['../namespacemingfx.html#a6eb31e6e81c6e29144799be4c9db404d',1,'mingfx::operator>>(std::istream &is, Color &c)'],['../namespacemingfx.html#a05fc1c0b2b6011283c019242d6a2de74',1,'mingfx::operator>>(std::istream &is, Matrix4 &m)']]], + ['operator_5b_5d_541',['operator[]',['../classmingfx_1_1_quaternion.html#a40e6587cc0511572297c5507634db7e1',1,'mingfx::Quaternion::operator[]()'],['../classmingfx_1_1_vector2.html#ae1fc0ce3ca1af3d0546af32742e13000',1,'mingfx::Vector2::operator[](const int i) const'],['../classmingfx_1_1_vector2.html#a93acf7f4f150cfe53859e31d90eddd1e',1,'mingfx::Vector2::operator[](const int i)'],['../classmingfx_1_1_vector3.html#aa37b1fc4b1df9f72726d981c08cd0d1b',1,'mingfx::Vector3::operator[](const int i) const'],['../classmingfx_1_1_vector3.html#abcdda4627b24af879aba38d4fc0e6f71',1,'mingfx::Vector3::operator[](const int i)'],['../classmingfx_1_1_quaternion.html#a548d09ecd25788241d734240c0dd7ea8',1,'mingfx::Quaternion::operator[]()'],['../classmingfx_1_1_matrix4.html#af9b02807d81eac55d66238f246c53656',1,'mingfx::Matrix4::operator[](const int i)'],['../classmingfx_1_1_matrix4.html#acd64f0db45e255d61dde4f6fa10a4127',1,'mingfx::Matrix4::operator[](const int i) const'],['../classmingfx_1_1_color.html#a474ed028db8b31e359d8bfec50147bcc',1,'mingfx::Color::operator[](const int i)'],['../classmingfx_1_1_color.html#aa879c4f6e90c419a2c121e323ce31500',1,'mingfx::Color::operator[](const int i) const'],['../classmingfx_1_1_point3.html#a790468d68b6d957b22959f9078f85c3e',1,'mingfx::Point3::operator[](const int i)'],['../classmingfx_1_1_point3.html#a3a586db5b58d5f1fdaddb1e33e84d566',1,'mingfx::Point3::operator[](const int i) const'],['../classmingfx_1_1_point2.html#a50f09df619fd226e6dc3ccff452abab3',1,'mingfx::Point2::operator[](const int i)'],['../classmingfx_1_1_point2.html#af4c0cc334dfbfe8e8068156e6da16542',1,'mingfx::Point2::operator[](const int i) const']]], + ['origin_542',['origin',['../classmingfx_1_1_ray.html#a2fe0ca901c1a5f3ce5f74aa8e5f0d0fe',1,'mingfx::Ray']]], + ['origin_543',['Origin',['../classmingfx_1_1_point2.html#a24d7a5121fceba01b46f3ba0f6525630',1,'mingfx::Point2::Origin()'],['../classmingfx_1_1_point3.html#aecb7c3137356cd4470851c54a47c7930',1,'mingfx::Point3::Origin()']]], + ['orthonormal_544',['Orthonormal',['../classmingfx_1_1_matrix4.html#a9ad5c85784e84fa0a941361eaaae0250',1,'mingfx::Matrix4']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_d.html b/dev/MinGfx/docs/html/search/functions_d.html new file mode 100644 index 0000000..7a1ed06 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_d.js b/dev/MinGfx/docs/html/search/functions_d.js new file mode 100644 index 0000000..85f19fd --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['perspective_545',['Perspective',['../classmingfx_1_1_matrix4.html#a0e34aee86758a0397074590b87712c5e',1,'mingfx::Matrix4']]], + ['pixel_546',['Pixel',['../classmingfx_1_1_texture2_d.html#a1e843f3d8904f9c7a99f7614f87de73b',1,'mingfx::Texture2D']]], + ['pixelstonormalizeddevicecoords_547',['PixelsToNormalizedDeviceCoords',['../classmingfx_1_1_graphics_app.html#a94b19404e61411ef64c0ddde8ad6c07a',1,'mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels)'],['../classmingfx_1_1_graphics_app.html#a4e8ac965474de9046448b8811bf25dd1',1,'mingfx::GraphicsApp::PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels)']]], + ['point2_548',['Point2',['../classmingfx_1_1_point2.html#a2e5869d810b52be4ba43c8a4f4e117a1',1,'mingfx::Point2::Point2()'],['../classmingfx_1_1_point2.html#a716fcff21456f29561ec27118a646483',1,'mingfx::Point2::Point2(float x, float y)'],['../classmingfx_1_1_point2.html#a4ba487a2038ebc78b461b66f1987053f',1,'mingfx::Point2::Point2(float *p)'],['../classmingfx_1_1_point2.html#a97464af92444984e275dca38a3f4eef0',1,'mingfx::Point2::Point2(const Point2 &p)']]], + ['point3_549',['Point3',['../classmingfx_1_1_point3.html#ae8ab322852c24c6e03bed03cac443664',1,'mingfx::Point3::Point3()'],['../classmingfx_1_1_point3.html#a29d113f0fa37fa04a642817c680fe953',1,'mingfx::Point3::Point3(float x, float y, float z)'],['../classmingfx_1_1_point3.html#a062caf579ef643b25129cc35b3dbe756',1,'mingfx::Point3::Point3(float *p)'],['../classmingfx_1_1_point3.html#a23534a1ce3d4466c303b9205bd21cd97',1,'mingfx::Point3::Point3(const Point3 &p)']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_e.html b/dev/MinGfx/docs/html/search/functions_e.html new file mode 100644 index 0000000..22d2a6b --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_e.js b/dev/MinGfx/docs/html/search/functions_e.js new file mode 100644 index 0000000..975d4f8 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['quaternion_550',['Quaternion',['../classmingfx_1_1_quaternion.html#ad58ac80804ec63af354912a71361f165',1,'mingfx::Quaternion::Quaternion()'],['../classmingfx_1_1_quaternion.html#a5c6cbe4fc70e8e4ec23142d0a5a2ba97',1,'mingfx::Quaternion::Quaternion(float qx, float qy, float qz, float qw)'],['../classmingfx_1_1_quaternion.html#a07bb09eb7d0b368ef5e8d9da02fbdad6',1,'mingfx::Quaternion::Quaternion(float *ptr)'],['../classmingfx_1_1_quaternion.html#a0be885a1b3f2d54675c6866ec3578243',1,'mingfx::Quaternion::Quaternion(const Quaternion &other)']]], + ['quickshapes_551',['QuickShapes',['../classmingfx_1_1_quick_shapes.html#a5764a0953013ece013bf3e2a72e4afa2',1,'mingfx::QuickShapes']]] +]; diff --git a/dev/MinGfx/docs/html/search/functions_f.html b/dev/MinGfx/docs/html/search/functions_f.html new file mode 100644 index 0000000..54b7dee --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/functions_f.js b/dev/MinGfx/docs/html/search/functions_f.js new file mode 100644 index 0000000..4bb3e28 --- /dev/null +++ b/dev/MinGfx/docs/html/search/functions_f.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['ray_552',['Ray',['../classmingfx_1_1_ray.html#aee3fe586869e00ae657a74bb4bbbbfda',1,'mingfx::Ray::Ray()'],['../classmingfx_1_1_ray.html#ab38cdd0793b3acfe55fa9ebca5ddebf6',1,'mingfx::Ray::Ray(const Point3 &origin, const Vector3 &direction)']]], + ['read_5fcolor_5fdata_553',['read_color_data',['../classmingfx_1_1_mesh.html#ac5fc517fd8ea4cea8459d3f4d5d6ced3',1,'mingfx::Mesh']]], + ['read_5fnormal_5fdata_554',['read_normal_data',['../classmingfx_1_1_mesh.html#a439361e454ca63c35f564aed5cd0de65',1,'mingfx::Mesh']]], + ['read_5ftex_5fcoords_5fdata_555',['read_tex_coords_data',['../classmingfx_1_1_mesh.html#a51aaa8d6a80af46f22ea9dfecd2f0b31',1,'mingfx::Mesh']]], + ['read_5ftriangle_5findices_5fdata_556',['read_triangle_indices_data',['../classmingfx_1_1_mesh.html#a15d79cbc48a6ef72ef1208d734cc2f8a',1,'mingfx::Mesh']]], + ['read_5fvertex_5fdata_557',['read_vertex_data',['../classmingfx_1_1_mesh.html#ada9371e85aa0b61df79b26fc880b1863',1,'mingfx::Mesh']]], + ['readzvalueatpixel_558',['ReadZValueAtPixel',['../classmingfx_1_1_graphics_app.html#a471951dbf45ffa88027cb92707443646',1,'mingfx::GraphicsApp']]], + ['resizewindow_559',['ResizeWindow',['../classmingfx_1_1_graphics_app.html#a0db71b2465e12a8aef4eefbe8b9fcee5',1,'mingfx::GraphicsApp']]], + ['rotation_560',['Rotation',['../classmingfx_1_1_matrix4.html#acf4abaf4a45826f14b435edf80a8d0e0',1,'mingfx::Matrix4']]], + ['rotation_5fscale_561',['rotation_scale',['../classmingfx_1_1_craft_cam.html#a9fe22cc3b933b12674a5b8f1b5c834ac',1,'mingfx::CraftCam']]], + ['rotationx_562',['RotationX',['../classmingfx_1_1_matrix4.html#a48615deb30590055c0aa9f207eee7f08',1,'mingfx::Matrix4']]], + ['rotationy_563',['RotationY',['../classmingfx_1_1_matrix4.html#aef94f0e9d298a7ba57e0119ef09b71b6',1,'mingfx::Matrix4']]], + ['rotationz_564',['RotationZ',['../classmingfx_1_1_matrix4.html#a4bf1dced8875fdc5827b5b8869e9de93',1,'mingfx::Matrix4']]], + ['run_565',['Run',['../classmingfx_1_1_graphics_app.html#a5ee9ae3d14e76c949979a8008687d6c9',1,'mingfx::GraphicsApp']]] +]; diff --git a/dev/MinGfx/docs/html/search/mag_sel.svg b/dev/MinGfx/docs/html/search/mag_sel.svg new file mode 100644 index 0000000..03626f6 --- /dev/null +++ b/dev/MinGfx/docs/html/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/dev/MinGfx/docs/html/search/namespaces_0.html b/dev/MinGfx/docs/html/search/namespaces_0.html new file mode 100644 index 0000000..21db2c3 --- /dev/null +++ b/dev/MinGfx/docs/html/search/namespaces_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/namespaces_0.js b/dev/MinGfx/docs/html/search/namespaces_0.js new file mode 100644 index 0000000..c7dae22 --- /dev/null +++ b/dev/MinGfx/docs/html/search/namespaces_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mingfx_373',['mingfx',['../namespacemingfx.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/nomatches.html b/dev/MinGfx/docs/html/search/nomatches.html new file mode 100644 index 0000000..2b9360b --- /dev/null +++ b/dev/MinGfx/docs/html/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/dev/MinGfx/docs/html/search/pages_0.html b/dev/MinGfx/docs/html/search/pages_0.html new file mode 100644 index 0000000..8517b48 --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/pages_0.js b/dev/MinGfx/docs/html/search/pages_0.js new file mode 100644 index 0000000..8907ede --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['api_20_2d_20mingfx_20programming_20reference_20organized_20by_20topic_719',['API - MinGfx Programming Reference Organized by Topic',['../api.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/pages_1.html b/dev/MinGfx/docs/html/search/pages_1.html new file mode 100644 index 0000000..a0fb679 --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/pages_1.js b/dev/MinGfx/docs/html/search/pages_1.js new file mode 100644 index 0000000..de07d2e --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['installation_20guide_720',['Installation Guide',['../installation.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/pages_2.html b/dev/MinGfx/docs/html/search/pages_2.html new file mode 100644 index 0000000..084edfd --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/pages_2.js b/dev/MinGfx/docs/html/search/pages_2.js new file mode 100644 index 0000000..8ea29fe --- /dev/null +++ b/dev/MinGfx/docs/html/search/pages_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mingfx_20toolkit_20documentation_721',['MinGfx Toolkit Documentation',['../index.html',1,'']]] +]; diff --git a/dev/MinGfx/docs/html/search/related_0.html b/dev/MinGfx/docs/html/search/related_0.html new file mode 100644 index 0000000..506aaec --- /dev/null +++ b/dev/MinGfx/docs/html/search/related_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/related_0.js b/dev/MinGfx/docs/html/search/related_0.js new file mode 100644 index 0000000..b70d264 --- /dev/null +++ b/dev/MinGfx/docs/html/search/related_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['operator_2b_711',['operator+',['../classmingfx_1_1_a_a_b_b.html#a60e301aa632dd49eccdc27bab7c6d231',1,'mingfx::AABB']]] +]; diff --git a/dev/MinGfx/docs/html/search/search.css b/dev/MinGfx/docs/html/search/search.css new file mode 100644 index 0000000..d41a75c --- /dev/null +++ b/dev/MinGfx/docs/html/search/search.css @@ -0,0 +1,257 @@ +/*---------------- Search Box */ + +#MSearchBox { + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + height: 1.4em; + padding: 0 0 0 0.3em; + margin: 0; +} + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 1.1em; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #A0A0A0; + background-color: #FAFAFA; + z-index: 10001; + 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: #505050; + 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: #F0F0F0; + z-index:10000; +} + +/* ----------------------------------- */ + + +#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: #585858; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #585858; + 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; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial, Verdana, sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial, Verdana, sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F2F2F2; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/dev/MinGfx/docs/html/search/search.js b/dev/MinGfx/docs/html/search/search.js new file mode 100644 index 0000000..fb226f7 --- /dev/null +++ b/dev/MinGfx/docs/html/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + 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 Software. + + THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +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 idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + 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-block'; + 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.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == '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; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/typedefs_0.js b/dev/MinGfx/docs/html/search/typedefs_0.js new file mode 100644 index 0000000..b14dc1d --- /dev/null +++ b/dev/MinGfx/docs/html/search/typedefs_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['stbrp_5fcontext_691',['stbrp_context',['../stb__rect__pack_8h.html#a0455046a8d5457bbc4f3f3ec995c338f',1,'stb_rect_pack.h']]], + ['stbrp_5fcoord_692',['stbrp_coord',['../stb__rect__pack_8h.html#ac2c2491b95dea6a298b7423dc762dfd9',1,'stb_rect_pack.h']]], + ['stbrp_5fnode_693',['stbrp_node',['../stb__rect__pack_8h.html#ae8f871c209d2e6218baf9c0e2a209ea1',1,'stb_rect_pack.h']]], + ['stbrp_5frect_694',['stbrp_rect',['../stb__rect__pack_8h.html#a7c4a99b31ea2207a0b2bbcbdab8f3840',1,'stb_rect_pack.h']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_0.html b/dev/MinGfx/docs/html/search/variables_0.html new file mode 100644 index 0000000..1e477c0 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_0.js b/dev/MinGfx/docs/html/search/variables_0.js new file mode 100644 index 0000000..8c9043a --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['active_5fhead_658',['active_head',['../structstbrp__context.html#a13277239636803aff28f00b0a0376120',1,'stbrp_context']]], + ['align_659',['align',['../structstbrp__context.html#ae36053e2001a725aec2b5756dc990481',1,'stbrp_context']]], + ['ambient_5fintensity_660',['ambient_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a226c173b193459af291687dd45280fbb',1,'mingfx::DefaultShader::LightProperties']]], + ['ambient_5freflectance_661',['ambient_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ad4db9a1b0636db84f57f022c51ce7657',1,'mingfx::DefaultShader::MaterialProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_1.html b/dev/MinGfx/docs/html/search/variables_1.html new file mode 100644 index 0000000..ea73d9a --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_1.js b/dev/MinGfx/docs/html/search/variables_1.js new file mode 100644 index 0000000..0294691 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['color_662',['color',['../classmingfx_1_1_text_shader_1_1_text_format.html#af0483874ac3fcea58b6ff99ef6644ff7',1,'mingfx::TextShader::TextFormat']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_2.html b/dev/MinGfx/docs/html/search/variables_2.html new file mode 100644 index 0000000..0580462 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_2.js b/dev/MinGfx/docs/html/search/variables_2.js new file mode 100644 index 0000000..f7ba507 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['diffuse_5fintensity_663',['diffuse_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a9a010057c15e3db5661b07a03d5176d7',1,'mingfx::DefaultShader::LightProperties']]], + ['diffuse_5freflectance_664',['diffuse_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#aa7b75f95a45d7a1030c297192b14014f',1,'mingfx::DefaultShader::MaterialProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_3.html b/dev/MinGfx/docs/html/search/variables_3.html new file mode 100644 index 0000000..0d69e76 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_3.js b/dev/MinGfx/docs/html/search/variables_3.js new file mode 100644 index 0000000..62868c5 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['extra_665',['extra',['../structstbrp__context.html#a0b80e1fbdac125427526f3500d4e7624',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_4.html b/dev/MinGfx/docs/html/search/variables_4.html new file mode 100644 index 0000000..a4b6506 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_4.js b/dev/MinGfx/docs/html/search/variables_4.js new file mode 100644 index 0000000..6f9192b --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['free_5fhead_666',['free_head',['../structstbrp__context.html#a1336ae32373663847866cc65904c2839',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_5.html b/dev/MinGfx/docs/html/search/variables_5.html new file mode 100644 index 0000000..7e345d1 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_5.js b/dev/MinGfx/docs/html/search/variables_5.js new file mode 100644 index 0000000..82e20a2 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['h_667',['h',['../structstbrp__rect.html#af68de2dadc7972b7c089d5e0c0558398',1,'stbrp_rect']]], + ['h_5falign_668',['h_align',['../classmingfx_1_1_text_shader_1_1_text_format.html#acde55d28b0446e788e6c68b85df83066',1,'mingfx::TextShader::TextFormat']]], + ['half_5fpi_669',['HALF_PI',['../classmingfx_1_1_gfx_math.html#ab5ba8ba54257d86dcf95bd2bbeb534c0',1,'mingfx::GfxMath']]], + ['height_670',['height',['../structstbrp__context.html#af3715a6f3faecfb4fac8f6ccbb71f9c7',1,'stbrp_context']]], + ['heuristic_671',['heuristic',['../structstbrp__context.html#a4b61a7f94e50a54c075e2a8f99f6503a',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_6.html b/dev/MinGfx/docs/html/search/variables_6.html new file mode 100644 index 0000000..7d48e75 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_6.js b/dev/MinGfx/docs/html/search/variables_6.js new file mode 100644 index 0000000..aa6ee2c --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['id_672',['id',['../structstbrp__rect.html#a92da8626bc99df041c0c3bfd01c25f7a',1,'stbrp_rect']]], + ['init_5fmode_673',['init_mode',['../structstbrp__context.html#a007509feee322404083034e4c2d3dc5d',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_7.html b/dev/MinGfx/docs/html/search/variables_7.html new file mode 100644 index 0000000..5c26340 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_7.js b/dev/MinGfx/docs/html/search/variables_7.js new file mode 100644 index 0000000..9237abb --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['max_5flights_674',['MAX_LIGHTS',['../classmingfx_1_1_default_shader.html#a21c1fd93273eaf643e7ac9b05ba0fb24',1,'mingfx::DefaultShader']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_8.html b/dev/MinGfx/docs/html/search/variables_8.html new file mode 100644 index 0000000..dc9ec54 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_8.js b/dev/MinGfx/docs/html/search/variables_8.js new file mode 100644 index 0000000..753e50e --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['next_675',['next',['../structstbrp__node.html#a933cb2dd6cddc4fcaf10e3b40634bed4',1,'stbrp_node']]], + ['num_5fnodes_676',['num_nodes',['../structstbrp__context.html#afa8105d4ef6d3e0ae5aaf8e1ed4b2c58',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_9.html b/dev/MinGfx/docs/html/search/variables_9.html new file mode 100644 index 0000000..7b01475 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_9.js b/dev/MinGfx/docs/html/search/variables_9.js new file mode 100644 index 0000000..f6145ff --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['pi_677',['PI',['../classmingfx_1_1_gfx_math.html#aaa14e60a5f7c158db443f8b6d87958b4',1,'mingfx::GfxMath']]], + ['position_678',['position',['../classmingfx_1_1_default_shader_1_1_light_properties.html#a160b58a0e70294008b9dac8eb6291d3e',1,'mingfx::DefaultShader::LightProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_a.html b/dev/MinGfx/docs/html/search/variables_a.html new file mode 100644 index 0000000..52a724d --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_a.js b/dev/MinGfx/docs/html/search/variables_a.js new file mode 100644 index 0000000..0aea1c4 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_a.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['shinniness_679',['shinniness',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ad77e4c78a2bf60776c673b91bc4c8a13',1,'mingfx::DefaultShader::MaterialProperties']]], + ['size_680',['size',['../classmingfx_1_1_text_shader_1_1_text_format.html#aeecda817624276f0cfb812ddcdbbc2f0',1,'mingfx::TextShader::TextFormat']]], + ['specular_5fintensity_681',['specular_intensity',['../classmingfx_1_1_default_shader_1_1_light_properties.html#abef7666629dbb9da661b163e0584c9a4',1,'mingfx::DefaultShader::LightProperties']]], + ['specular_5freflectance_682',['specular_reflectance',['../classmingfx_1_1_default_shader_1_1_material_properties.html#acfd78796e08f527a24cce3c1e206148c',1,'mingfx::DefaultShader::MaterialProperties']]], + ['surface_5ftexture_683',['surface_texture',['../classmingfx_1_1_default_shader_1_1_material_properties.html#ae26eed46a279c73e947880858763514e',1,'mingfx::DefaultShader::MaterialProperties']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_b.html b/dev/MinGfx/docs/html/search/variables_b.html new file mode 100644 index 0000000..f376b27 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_b.js b/dev/MinGfx/docs/html/search/variables_b.js new file mode 100644 index 0000000..ff2a95f --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['two_5fpi_684',['TWO_PI',['../classmingfx_1_1_gfx_math.html#a0e5c7562116babf11c61f4c7f20f8b69',1,'mingfx::GfxMath']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_c.html b/dev/MinGfx/docs/html/search/variables_c.html new file mode 100644 index 0000000..6019eba --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_c.js b/dev/MinGfx/docs/html/search/variables_c.js new file mode 100644 index 0000000..d3e4719 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['v_5falign_685',['v_align',['../classmingfx_1_1_text_shader_1_1_text_format.html#a8455382a6829022020eb307ae9168bd7',1,'mingfx::TextShader::TextFormat']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_d.html b/dev/MinGfx/docs/html/search/variables_d.html new file mode 100644 index 0000000..f61ae75 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_d.js b/dev/MinGfx/docs/html/search/variables_d.js new file mode 100644 index 0000000..ddd4c60 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['w_686',['w',['../structstbrp__rect.html#a248d43f1eb979c1e7b92ba6df431dec5',1,'stbrp_rect']]], + ['was_5fpacked_687',['was_packed',['../structstbrp__rect.html#a74ba347755ce17f2f8a2ea66c612af49',1,'stbrp_rect']]], + ['width_688',['width',['../structstbrp__context.html#a70cfcb2044ce8397cc440d28b30c09b2',1,'stbrp_context']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_e.html b/dev/MinGfx/docs/html/search/variables_e.html new file mode 100644 index 0000000..7bfd372 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_e.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_e.js b/dev/MinGfx/docs/html/search/variables_e.js new file mode 100644 index 0000000..ebb638d --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_689',['x',['../structstbrp__rect.html#a4cc623a3e29f0bc0d3375f6645c84d18',1,'stbrp_rect::x()'],['../structstbrp__node.html#a45ab31a88025db27d08040d715b129ea',1,'stbrp_node::x()']]] +]; diff --git a/dev/MinGfx/docs/html/search/variables_f.html b/dev/MinGfx/docs/html/search/variables_f.html new file mode 100644 index 0000000..d97920d --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_f.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/dev/MinGfx/docs/html/search/variables_f.js b/dev/MinGfx/docs/html/search/variables_f.js new file mode 100644 index 0000000..6a14e35 --- /dev/null +++ b/dev/MinGfx/docs/html/search/variables_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['y_690',['y',['../structstbrp__rect.html#ae3034c1fbf86043b568f5a4dddf946fa',1,'stbrp_rect::y()'],['../structstbrp__node.html#ad0415cb102a4f37aa45073653307e67e',1,'stbrp_node::y()']]] +]; diff --git a/dev/MinGfx/docs/html/shader__program_8h.html b/dev/MinGfx/docs/html/shader__program_8h.html new file mode 100644 index 0000000..f3b879f --- /dev/null +++ b/dev/MinGfx/docs/html/shader__program_8h.html @@ -0,0 +1,119 @@ + + + + + + + +MinGfx Toolkit: src/shader_program.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    shader_program.h File Reference
    +
    +
    +
    #include "color.h"
    +#include "matrix4.h"
    +#include "opengl_headers.h"
    +#include "point2.h"
    +#include "point3.h"
    +#include "texture2d.h"
    +#include "vector2.h"
    +#include "vector3.h"
    +#include <string>
    +#include <map>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::ShaderProgram
     A wrapper around GLSL shader programs. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/shader__program_8h_source.html b/dev/MinGfx/docs/html/shader__program_8h_source.html new file mode 100644 index 0000000..ff40d8e --- /dev/null +++ b/dev/MinGfx/docs/html/shader__program_8h_source.html @@ -0,0 +1,274 @@ + + + + + + + +MinGfx Toolkit: src/shader_program.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    shader_program.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_SHADERPROGRAM_H_
    +
    15 #define SRC_SHADERPROGRAM_H_
    +
    16 
    +
    17 #include "color.h"
    +
    18 #include "matrix4.h"
    +
    19 #include "opengl_headers.h"
    +
    20 #include "point2.h"
    +
    21 #include "point3.h"
    +
    22 #include "texture2d.h"
    +
    23 #include "vector2.h"
    +
    24 #include "vector3.h"
    +
    25 
    +
    26 #include <string>
    +
    27 #include <map>
    +
    28 
    +
    29 namespace mingfx {
    +
    30 
    + +
    67 public:
    + +
    70 
    +
    71  virtual ~ShaderProgram();
    +
    72 
    +
    73 
    +
    74  // ---- These should be called during startup (e.g., in InitOpenGL()) ----
    +
    75 
    +
    80  bool AddVertexShaderFromFile(const std::string &file);
    +
    81 
    +
    84  bool AddVertexShaderFromSource(const std::string &code);
    +
    85 
    +
    90  bool AddFragmentShaderFromFile(const std::string &file);
    +
    91 
    +
    94  bool AddFragmentShaderFromSource(const std::string &code);
    +
    95 
    +
    99  bool LinkProgram();
    +
    100 
    +
    101 
    +
    102 
    +
    103  // ---- These should be called during rendering (e.g., in DrawUsingOpenGL()) ----
    +
    104 
    +
    110  void UseProgram();
    +
    111 
    +
    112  // Set Uniform Variables in the Shader
    +
    113 
    +
    114  // MinGfx types
    +
    115 
    +
    118  void SetUniform(const std::string &name, const Point2 &p);
    +
    119 
    +
    122  void SetUniform(const std::string &name, const Vector2 &v);
    +
    123 
    +
    126  void SetUniform(const std::string &name, const Point3 &p);
    +
    127 
    +
    130  void SetUniform(const std::string &name, const Vector3 &v);
    +
    131 
    +
    134  void SetUniform(const std::string &name, const Matrix4 &m);
    +
    135 
    +
    138  void SetUniform(const std::string &name, const Color &c);
    +
    139 
    +
    140 
    +
    141  // built-in types
    +
    142 
    +
    145  void SetUniform(const std::string &name, int i);
    +
    146 
    +
    149  void SetUniform(const std::string &name, unsigned int ui);
    +
    150 
    +
    153  void SetUniform(const std::string &name, float f);
    +
    154 
    +
    155 
    +
    156  // built-in types (arrays)
    +
    157 
    +
    160  void SetUniformArray1(const std::string &name, int *i, int count);
    +
    161 
    +
    164  void SetUniformArray1(const std::string &name, unsigned int *ui, int count);
    +
    165 
    +
    168  void SetUniformArray1(const std::string &name, float *f, int count);
    +
    169 
    +
    170 
    +
    173  void SetUniformArray2(const std::string &name, int *i, int count);
    +
    174 
    +
    177  void SetUniformArray2(const std::string &name, unsigned int *ui, int count);
    +
    178 
    +
    181  void SetUniformArray2(const std::string &name, float *f, int count);
    +
    182 
    +
    183 
    +
    186  void SetUniformArray3(const std::string &name, int *i, int count);
    +
    187 
    +
    190  void SetUniformArray3(const std::string &name, unsigned int *ui, int count);
    +
    191 
    +
    194  void SetUniformArray3(const std::string &name, float *f, int count);
    +
    195 
    +
    196 
    +
    199  void SetUniformArray4(const std::string &name, int *i, int count);
    +
    200 
    +
    203  void SetUniformArray4(const std::string &name, unsigned int *ui, int count);
    +
    204 
    +
    207  void SetUniformArray4(const std::string &name, float *f, int count);
    +
    208 
    +
    209 
    +
    210  // Set Textures (Sampler Variables in the Shader)
    +
    211 
    +
    215  void BindTexture(const std::string &name, const Texture2D &tex);
    +
    216 
    +
    219  void BindTexture(const std::string &name, const Texture2D &tex, int texUnit);
    +
    220 
    +
    221 
    +
    223  void StopProgram();
    +
    224 
    +
    226  bool initialized();
    +
    227 
    +
    228 private:
    +
    229  GLuint vertexShader_;
    +
    230  GLuint fragmentShader_;
    +
    231  GLuint program_;
    +
    232  std::map<std::string, int> texBindings_;
    +
    233 };
    +
    234 
    +
    235 
    +
    236 } // end namespace
    +
    237 
    +
    238 #endif
    +
    Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
    Definition: color.h:41
    +
    A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
    Definition: matrix4.h:50
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    A wrapper around GLSL shader programs.
    +
    void SetUniform(const std::string &name, const Vector3 &v)
    Passes the x,y,z,0 values of vector v to the shader program and stores the result in the shader varia...
    +
    ShaderProgram()
    Creates an empty ShaderProgram object.
    +
    void SetUniformArray4(const std::string &name, unsigned int *ui, int count)
    Passes an array of count 4D unsigned int arrays to the shader program and stores the result in the sh...
    +
    void StopProgram()
    Call this after rendering geometry to deactivate the shader.
    +
    bool initialized()
    Returns true if the shader program has been successfully compiled and linked.
    +
    void SetUniform(const std::string &name, const Point2 &p)
    Passes the x,y values of point p to the shader program and stores the result in the shader variable n...
    +
    void BindTexture(const std::string &name, const Texture2D &tex)
    Binds a Texture2D to a sampler2D in the shader program. This version automatically selects an availab...
    +
    void SetUniformArray1(const std::string &name, int *i, int count)
    Passes an array of count ints to the shader program and stores the result in the shader variable name...
    +
    void SetUniformArray1(const std::string &name, float *f, int count)
    Passes an array of count floats to the shader program and stores the result in the shader variable na...
    +
    bool AddVertexShaderFromFile(const std::string &file)
    Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL())....
    +
    void SetUniform(const std::string &name, float f)
    Passes the float to the shader program and stores the result in the shader variable named name,...
    +
    void SetUniformArray2(const std::string &name, unsigned int *ui, int count)
    Passes an array of count 2D unsigned int arrays to the shader program and stores the result in the sh...
    +
    void SetUniform(const std::string &name, unsigned int ui)
    Passes the unsigned int to the shader program and stores the result in the shader variable named name...
    +
    void SetUniform(const std::string &name, const Matrix4 &m)
    Passes the column-major 16 float values of matrix m to the shader program and stores the result in th...
    +
    bool AddFragmentShaderFromSource(const std::string &code)
    This loads and compiles a shader from a string. An error will be printed to stderr if there are any c...
    +
    void SetUniformArray3(const std::string &name, unsigned int *ui, int count)
    Passes an array of count 3D unsigned int arrays to the shader program and stores the result in the sh...
    +
    void SetUniformArray2(const std::string &name, float *f, int count)
    Passes an array of count 2D float arrays to the shader program and stores the result in the shader va...
    + +
    void SetUniformArray4(const std::string &name, float *f, int count)
    Passes an array of count 4D float arrays to the shader program and stores the result in the shader va...
    +
    void SetUniformArray2(const std::string &name, int *i, int count)
    Passes an array of count 2D int arrays to the shader program and stores the result in the shader vari...
    +
    void SetUniform(const std::string &name, const Color &c)
    Passes the r,g,b,a values of color c to the shader program and stores the result in the shader variab...
    +
    void SetUniformArray4(const std::string &name, int *i, int count)
    Passes an array of count 4D int arrays to the shader program and stores the result in the shader vari...
    +
    void SetUniform(const std::string &name, int i)
    Passes the int to the shader program and stores the result in the shader variable named name,...
    +
    bool AddVertexShaderFromSource(const std::string &code)
    This loads and compiles a shader from a string. An error will be printed to stderr if there are any c...
    +
    void SetUniformArray1(const std::string &name, unsigned int *ui, int count)
    Passes an array of count unsigned ints to the shader program and stores the result in the shader vari...
    +
    void SetUniformArray3(const std::string &name, int *i, int count)
    Passes an array of count 3D int arrays to the shader program and stores the result in the shader vari...
    +
    void SetUniform(const std::string &name, const Point3 &p)
    Passes the x,y,z,1 values of point p to the shader program and stores the result in the shader variab...
    +
    bool AddFragmentShaderFromFile(const std::string &file)
    Call during initialization but after the OpenGL context has been created (e.g., inside InitOpenGL())....
    +
    bool LinkProgram()
    Call this after adding vertex and fragment shaders in order to link them together to create the full ...
    +
    void SetUniform(const std::string &name, const Vector2 &v)
    Passes the x,y values of vector v to the shader program and stores the result in the shader variable ...
    +
    void UseProgram()
    Call this first to make the shader program active, then call SetUniform() to pass data from your C++ ...
    +
    void BindTexture(const std::string &name, const Texture2D &tex, int texUnit)
    Binds a Texture2D to a sampler2D in the shader program. This version allows you to specify the textur...
    +
    void SetUniformArray3(const std::string &name, float *f, int count)
    Passes an array of count 3D float arrays to the shader program and stores the result in the shader va...
    +
    A wrapper around a 2D texture that supports loading images from files or setting texture color data d...
    Definition: texture2d.h:42
    +
    A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
    Definition: vector2.h:28
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    + + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + + + + + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/splitbar.png b/dev/MinGfx/docs/html/splitbar.png new file mode 100644 index 0000000..fbb5e55 Binary files /dev/null and b/dev/MinGfx/docs/html/splitbar.png differ diff --git a/dev/MinGfx/docs/html/stb__rect__pack_8h.html b/dev/MinGfx/docs/html/stb__rect__pack_8h.html new file mode 100644 index 0000000..654ccfc --- /dev/null +++ b/dev/MinGfx/docs/html/stb__rect__pack_8h.html @@ -0,0 +1,403 @@ + + + + + + + +MinGfx Toolkit: src/stb_rect_pack.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    stb_rect_pack.h File Reference
    +
    +
    + +

    Go to the source code of this file.

    + + + + + + + + +

    +Classes

    struct  stbrp_rect
     
    struct  stbrp_node
     
    struct  stbrp_context
     
    + + + + + +

    +Macros

    #define STB_RECT_PACK_VERSION   1
     
    #define STBRP_DEF   extern
     
    + + + + + + + + + +

    +Typedefs

    typedef struct stbrp_context stbrp_context
     
    typedef struct stbrp_node stbrp_node
     
    typedef struct stbrp_rect stbrp_rect
     
    typedef unsigned short stbrp_coord
     
    + + + +

    +Enumerations

    enum  { STBRP_HEURISTIC_Skyline_default =0 +, STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default +, STBRP_HEURISTIC_Skyline_BF_sortHeight + }
     
    + + + + + + + + + +

    +Functions

    STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects)
     
    STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
     
    STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem)
     
    STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic)
     
    +

    Macro Definition Documentation

    + +

    ◆ STB_RECT_PACK_VERSION

    + +
    +
    + + + + +
    #define STB_RECT_PACK_VERSION   1
    +
    + +

    Definition at line 59 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ STBRP_DEF

    + +
    +
    + + + + +
    #define STBRP_DEF   extern
    +
    + +

    Definition at line 64 of file stb_rect_pack.h.

    + +
    +
    +

    Typedef Documentation

    + +

    ◆ stbrp_context

    + +
    +
    + + + + +
    typedef struct stbrp_context stbrp_context
    +
    + +

    Definition at line 1 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ stbrp_coord

    + +
    +
    + + + + +
    typedef unsigned short stbrp_coord
    +
    + +

    Definition at line 78 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ stbrp_node

    + +
    +
    + + + + +
    typedef struct stbrp_node stbrp_node
    +
    + +

    Definition at line 1 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ stbrp_rect

    + +
    +
    + + + + +
    typedef struct stbrp_rect stbrp_rect
    +
    + +

    Definition at line 1 of file stb_rect_pack.h.

    + +
    +
    +

    Enumeration Type Documentation

    + +

    ◆ anonymous enum

    + +
    +
    + + + + +
    anonymous enum
    +
    + + + + +
    Enumerator
    STBRP_HEURISTIC_Skyline_default 
    STBRP_HEURISTIC_Skyline_BL_sortHeight 
    STBRP_HEURISTIC_Skyline_BF_sortHeight 
    + +

    Definition at line 153 of file stb_rect_pack.h.

    + +
    +
    +

    Function Documentation

    + +

    ◆ stbrp_init_target()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    STBRP_DEF void stbrp_init_target (stbrp_contextcontext,
    int width,
    int height,
    stbrp_nodenodes,
    int num_nodes 
    )
    +
    + +
    +
    + +

    ◆ stbrp_pack_rects()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    STBRP_DEF int stbrp_pack_rects (stbrp_contextcontext,
    stbrp_rectrects,
    int num_rects 
    )
    +
    + +
    +
    + +

    ◆ stbrp_setup_allow_out_of_mem()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_contextcontext,
    int allow_out_of_mem 
    )
    +
    + +
    +
    + +

    ◆ stbrp_setup_heuristic()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    STBRP_DEF void stbrp_setup_heuristic (stbrp_contextcontext,
    int heuristic 
    )
    +
    + +
    +
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/stb__rect__pack_8h_source.html b/dev/MinGfx/docs/html/stb__rect__pack_8h_source.html new file mode 100644 index 0000000..2d2f39e --- /dev/null +++ b/dev/MinGfx/docs/html/stb__rect__pack_8h_source.html @@ -0,0 +1,742 @@ + + + + + + + +MinGfx Toolkit: src/stb_rect_pack.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    stb_rect_pack.h
    +
    +
    +Go to the documentation of this file.
    1 // stb_rect_pack.h - v0.11 - public domain - rectangle packing
    +
    2 // Sean Barrett 2014
    +
    3 //
    +
    4 // Useful for e.g. packing rectangular textures into an atlas.
    +
    5 // Does not do rotation.
    +
    6 //
    +
    7 // Not necessarily the awesomest packing method, but better than
    +
    8 // the totally naive one in stb_truetype (which is primarily what
    +
    9 // this is meant to replace).
    +
    10 //
    +
    11 // Has only had a few tests run, may have issues.
    +
    12 //
    +
    13 // More docs to come.
    +
    14 //
    +
    15 // No memory allocations; uses qsort() and assert() from stdlib.
    +
    16 // Can override those by defining STBRP_SORT and STBRP_ASSERT.
    +
    17 //
    +
    18 // This library currently uses the Skyline Bottom-Left algorithm.
    +
    19 //
    +
    20 // Please note: better rectangle packers are welcome! Please
    +
    21 // implement them to the same API, but with a different init
    +
    22 // function.
    +
    23 //
    +
    24 // Credits
    +
    25 //
    +
    26 // Library
    +
    27 // Sean Barrett
    +
    28 // Minor features
    +
    29 // Martins Mozeiko
    +
    30 // github:IntellectualKitty
    +
    31 //
    +
    32 // Bugfixes / warning fixes
    +
    33 // Jeremy Jaussaud
    +
    34 //
    +
    35 // Version history:
    +
    36 //
    +
    37 // 0.11 (2017-03-03) return packing success/fail result
    +
    38 // 0.10 (2016-10-25) remove cast-away-const to avoid warnings
    +
    39 // 0.09 (2016-08-27) fix compiler warnings
    +
    40 // 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
    +
    41 // 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
    +
    42 // 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
    +
    43 // 0.05: added STBRP_ASSERT to allow replacing assert
    +
    44 // 0.04: fixed minor bug in STBRP_LARGE_RECTS support
    +
    45 // 0.01: initial release
    +
    46 //
    +
    47 // LICENSE
    +
    48 //
    +
    49 // See end of file for license information.
    +
    50 
    +
    52 //
    +
    53 // INCLUDE SECTION
    +
    54 //
    +
    55 
    +
    56 #ifndef STB_INCLUDE_STB_RECT_PACK_H
    +
    57 #define STB_INCLUDE_STB_RECT_PACK_H
    +
    58 
    +
    59 #define STB_RECT_PACK_VERSION 1
    +
    60 
    +
    61 #ifdef STBRP_STATIC
    +
    62 #define STBRP_DEF static
    +
    63 #else
    +
    64 #define STBRP_DEF extern
    +
    65 #endif
    +
    66 
    +
    67 #ifdef __cplusplus
    +
    68 extern "C" {
    +
    69 #endif
    +
    70 
    +
    71 typedef struct stbrp_context stbrp_context;
    +
    72 typedef struct stbrp_node stbrp_node;
    +
    73 typedef struct stbrp_rect stbrp_rect;
    +
    74 
    +
    75 #ifdef STBRP_LARGE_RECTS
    +
    76 typedef int stbrp_coord;
    +
    77 #else
    +
    78 typedef unsigned short stbrp_coord;
    +
    79 #endif
    +
    80 
    +
    81 STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
    +
    82 // Assign packed locations to rectangles. The rectangles are of type
    +
    83 // 'stbrp_rect' defined below, stored in the array 'rects', and there
    +
    84 // are 'num_rects' many of them.
    +
    85 //
    +
    86 // Rectangles which are successfully packed have the 'was_packed' flag
    +
    87 // set to a non-zero value and 'x' and 'y' store the minimum location
    +
    88 // on each axis (i.e. bottom-left in cartesian coordinates, top-left
    +
    89 // if you imagine y increasing downwards). Rectangles which do not fit
    +
    90 // have the 'was_packed' flag set to 0.
    +
    91 //
    +
    92 // You should not try to access the 'rects' array from another thread
    +
    93 // while this function is running, as the function temporarily reorders
    +
    94 // the array while it executes.
    +
    95 //
    +
    96 // To pack into another rectangle, you need to call stbrp_init_target
    +
    97 // again. To continue packing into the same rectangle, you can call
    +
    98 // this function again. Calling this multiple times with multiple rect
    +
    99 // arrays will probably produce worse packing results than calling it
    +
    100 // a single time with the full rectangle array, but the option is
    +
    101 // available.
    +
    102 //
    +
    103 // The function returns 1 if all of the rectangles were successfully
    +
    104 // packed and 0 otherwise.
    +
    105 
    + +
    107 {
    +
    108  // reserved for your use:
    +
    109  int id;
    +
    110 
    +
    111  // input:
    + +
    113 
    +
    114  // output:
    + +
    116  int was_packed; // non-zero if valid packing
    +
    117 
    +
    118 }; // 16 bytes, nominally
    +
    119 
    +
    120 
    +
    121 STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
    +
    122 // Initialize a rectangle packer to:
    +
    123 // pack a rectangle that is 'width' by 'height' in dimensions
    +
    124 // using temporary storage provided by the array 'nodes', which is 'num_nodes' long
    +
    125 //
    +
    126 // You must call this function every time you start packing into a new target.
    +
    127 //
    +
    128 // There is no "shutdown" function. The 'nodes' memory must stay valid for
    +
    129 // the following stbrp_pack_rects() call (or calls), but can be freed after
    +
    130 // the call (or calls) finish.
    +
    131 //
    +
    132 // Note: to guarantee best results, either:
    +
    133 // 1. make sure 'num_nodes' >= 'width'
    +
    134 // or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
    +
    135 //
    +
    136 // If you don't do either of the above things, widths will be quantized to multiples
    +
    137 // of small integers to guarantee the algorithm doesn't run out of temporary storage.
    +
    138 //
    +
    139 // If you do #2, then the non-quantized algorithm will be used, but the algorithm
    +
    140 // may run out of temporary storage and be unable to pack some rectangles.
    +
    141 
    +
    142 STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
    +
    143 // Optionally call this function after init but before doing any packing to
    +
    144 // change the handling of the out-of-temp-memory scenario, described above.
    +
    145 // If you call init again, this will be reset to the default (false).
    +
    146 
    +
    147 
    +
    148 STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic);
    +
    149 // Optionally select which packing heuristic the library should use. Different
    +
    150 // heuristics will produce better/worse results for different data sets.
    +
    151 // If you call init again, this will be reset to the default.
    +
    152 
    +
    153 enum
    +
    154 {
    + + + +
    158 };
    +
    159 
    +
    160 
    +
    162 //
    +
    163 // the details of the following structures don't matter to you, but they must
    +
    164 // be visible so you can handle the memory allocations for them
    +
    165 
    + +
    167 {
    + + +
    170 };
    +
    171 
    + +
    173 {
    +
    174  int width;
    +
    175  int height;
    +
    176  int align;
    + + + + + +
    182  stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
    +
    183 };
    +
    184 
    +
    185 #ifdef __cplusplus
    +
    186 }
    +
    187 #endif
    +
    188 
    +
    189 #endif
    +
    190 
    +
    192 //
    +
    193 // IMPLEMENTATION SECTION
    +
    194 //
    +
    195 
    +
    196 #ifdef STB_RECT_PACK_IMPLEMENTATION
    +
    197 #ifndef STBRP_SORT
    +
    198 #include <stdlib.h>
    +
    199 #define STBRP_SORT qsort
    +
    200 #endif
    +
    201 
    +
    202 #ifndef STBRP_ASSERT
    +
    203 #include <assert.h>
    +
    204 #define STBRP_ASSERT assert
    +
    205 #endif
    +
    206 
    +
    207 #ifdef _MSC_VER
    +
    208 #define STBRP__NOTUSED(v) (void)(v)
    +
    209 #else
    +
    210 #define STBRP__NOTUSED(v) (void)sizeof(v)
    +
    211 #endif
    +
    212 
    +
    213 enum
    +
    214 {
    +
    215  STBRP__INIT_skyline = 1
    +
    216 };
    +
    217 
    +
    218 STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
    +
    219 {
    +
    220  switch (context->init_mode) {
    +
    221  case STBRP__INIT_skyline:
    +
    222  STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
    +
    223  context->heuristic = heuristic;
    +
    224  break;
    +
    225  default:
    +
    226  STBRP_ASSERT(0);
    +
    227  }
    +
    228 }
    +
    229 
    +
    230 STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
    +
    231 {
    +
    232  if (allow_out_of_mem)
    +
    233  // if it's ok to run out of memory, then don't bother aligning them;
    +
    234  // this gives better packing, but may fail due to OOM (even though
    +
    235  // the rectangles easily fit). @TODO a smarter approach would be to only
    +
    236  // quantize once we've hit OOM, then we could get rid of this parameter.
    +
    237  context->align = 1;
    +
    238  else {
    +
    239  // if it's not ok to run out of memory, then quantize the widths
    +
    240  // so that num_nodes is always enough nodes.
    +
    241  //
    +
    242  // I.e. num_nodes * align >= width
    +
    243  // align >= width / num_nodes
    +
    244  // align = ceil(width/num_nodes)
    +
    245 
    +
    246  context->align = (context->width + context->num_nodes-1) / context->num_nodes;
    +
    247  }
    +
    248 }
    +
    249 
    +
    250 STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
    +
    251 {
    +
    252  int i;
    +
    253 #ifndef STBRP_LARGE_RECTS
    +
    254  STBRP_ASSERT(width <= 0xffff && height <= 0xffff);
    +
    255 #endif
    +
    256 
    +
    257  for (i=0; i < num_nodes-1; ++i)
    +
    258  nodes[i].next = &nodes[i+1];
    +
    259  nodes[i].next = NULL;
    +
    260  context->init_mode = STBRP__INIT_skyline;
    + +
    262  context->free_head = &nodes[0];
    +
    263  context->active_head = &context->extra[0];
    +
    264  context->width = width;
    +
    265  context->height = height;
    +
    266  context->num_nodes = num_nodes;
    +
    267  stbrp_setup_allow_out_of_mem(context, 0);
    +
    268 
    +
    269  // node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
    +
    270  context->extra[0].x = 0;
    +
    271  context->extra[0].y = 0;
    +
    272  context->extra[0].next = &context->extra[1];
    +
    273  context->extra[1].x = (stbrp_coord) width;
    +
    274 #ifdef STBRP_LARGE_RECTS
    +
    275  context->extra[1].y = (1<<30);
    +
    276 #else
    +
    277  context->extra[1].y = 65535;
    +
    278 #endif
    +
    279  context->extra[1].next = NULL;
    +
    280 }
    +
    281 
    +
    282 // find minimum y position if it starts at x1
    +
    283 static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
    +
    284 {
    +
    285  stbrp_node *node = first;
    +
    286  int x1 = x0 + width;
    +
    287  int min_y, visited_width, waste_area;
    +
    288 
    +
    289  STBRP__NOTUSED(c);
    +
    290 
    +
    291  STBRP_ASSERT(first->x <= x0);
    +
    292 
    +
    293  #if 0
    +
    294  // skip in case we're past the node
    +
    295  while (node->next->x <= x0)
    +
    296  ++node;
    +
    297  #else
    +
    298  STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
    +
    299  #endif
    +
    300 
    +
    301  STBRP_ASSERT(node->x <= x0);
    +
    302 
    +
    303  min_y = 0;
    +
    304  waste_area = 0;
    +
    305  visited_width = 0;
    +
    306  while (node->x < x1) {
    +
    307  if (node->y > min_y) {
    +
    308  // raise min_y higher.
    +
    309  // we've accounted for all waste up to min_y,
    +
    310  // but we'll now add more waste for everything we've visted
    +
    311  waste_area += visited_width * (node->y - min_y);
    +
    312  min_y = node->y;
    +
    313  // the first time through, visited_width might be reduced
    +
    314  if (node->x < x0)
    +
    315  visited_width += node->next->x - x0;
    +
    316  else
    +
    317  visited_width += node->next->x - node->x;
    +
    318  } else {
    +
    319  // add waste area
    +
    320  int under_width = node->next->x - node->x;
    +
    321  if (under_width + visited_width > width)
    +
    322  under_width = width - visited_width;
    +
    323  waste_area += under_width * (min_y - node->y);
    +
    324  visited_width += under_width;
    +
    325  }
    +
    326  node = node->next;
    +
    327  }
    +
    328 
    +
    329  *pwaste = waste_area;
    +
    330  return min_y;
    +
    331 }
    +
    332 
    +
    333 typedef struct
    +
    334 {
    +
    335  int x,y;
    +
    336  stbrp_node **prev_link;
    +
    337 } stbrp__findresult;
    +
    338 
    +
    339 static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height)
    +
    340 {
    +
    341  int best_waste = (1<<30), best_x, best_y = (1 << 30);
    +
    342  stbrp__findresult fr;
    +
    343  stbrp_node **prev, *node, *tail, **best = NULL;
    +
    344 
    +
    345  // align to multiple of c->align
    +
    346  width = (width + c->align - 1);
    +
    347  width -= width % c->align;
    +
    348  STBRP_ASSERT(width % c->align == 0);
    +
    349 
    +
    350  node = c->active_head;
    +
    351  prev = &c->active_head;
    +
    352  while (node->x + width <= c->width) {
    +
    353  int y,waste;
    +
    354  y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
    +
    355  if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
    +
    356  // bottom left
    +
    357  if (y < best_y) {
    +
    358  best_y = y;
    +
    359  best = prev;
    +
    360  }
    +
    361  } else {
    +
    362  // best-fit
    +
    363  if (y + height <= c->height) {
    +
    364  // can only use it if it first vertically
    +
    365  if (y < best_y || (y == best_y && waste < best_waste)) {
    +
    366  best_y = y;
    +
    367  best_waste = waste;
    +
    368  best = prev;
    +
    369  }
    +
    370  }
    +
    371  }
    +
    372  prev = &node->next;
    +
    373  node = node->next;
    +
    374  }
    +
    375 
    +
    376  best_x = (best == NULL) ? 0 : (*best)->x;
    +
    377 
    +
    378  // if doing best-fit (BF), we also have to try aligning right edge to each node position
    +
    379  //
    +
    380  // e.g, if fitting
    +
    381  //
    +
    382  // ____________________
    +
    383  // |____________________|
    +
    384  //
    +
    385  // into
    +
    386  //
    +
    387  // | |
    +
    388  // | ____________|
    +
    389  // |____________|
    +
    390  //
    +
    391  // then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
    +
    392  //
    +
    393  // This makes BF take about 2x the time
    +
    394 
    + +
    396  tail = c->active_head;
    +
    397  node = c->active_head;
    +
    398  prev = &c->active_head;
    +
    399  // find first node that's admissible
    +
    400  while (tail->x < width)
    +
    401  tail = tail->next;
    +
    402  while (tail) {
    +
    403  int xpos = tail->x - width;
    +
    404  int y,waste;
    +
    405  STBRP_ASSERT(xpos >= 0);
    +
    406  // find the left position that matches this
    +
    407  while (node->next->x <= xpos) {
    +
    408  prev = &node->next;
    +
    409  node = node->next;
    +
    410  }
    +
    411  STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
    +
    412  y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
    +
    413  if (y + height < c->height) {
    +
    414  if (y <= best_y) {
    +
    415  if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
    +
    416  best_x = xpos;
    +
    417  STBRP_ASSERT(y <= best_y);
    +
    418  best_y = y;
    +
    419  best_waste = waste;
    +
    420  best = prev;
    +
    421  }
    +
    422  }
    +
    423  }
    +
    424  tail = tail->next;
    +
    425  }
    +
    426  }
    +
    427 
    +
    428  fr.prev_link = best;
    +
    429  fr.x = best_x;
    +
    430  fr.y = best_y;
    +
    431  return fr;
    +
    432 }
    +
    433 
    +
    434 static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
    +
    435 {
    +
    436  // find best position according to heuristic
    +
    437  stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
    +
    438  stbrp_node *node, *cur;
    +
    439 
    +
    440  // bail if:
    +
    441  // 1. it failed
    +
    442  // 2. the best node doesn't fit (we don't always check this)
    +
    443  // 3. we're out of memory
    +
    444  if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
    +
    445  res.prev_link = NULL;
    +
    446  return res;
    +
    447  }
    +
    448 
    +
    449  // on success, create new node
    +
    450  node = context->free_head;
    +
    451  node->x = (stbrp_coord) res.x;
    +
    452  node->y = (stbrp_coord) (res.y + height);
    +
    453 
    +
    454  context->free_head = node->next;
    +
    455 
    +
    456  // insert the new node into the right starting point, and
    +
    457  // let 'cur' point to the remaining nodes needing to be
    +
    458  // stiched back in
    +
    459 
    +
    460  cur = *res.prev_link;
    +
    461  if (cur->x < res.x) {
    +
    462  // preserve the existing one, so start testing with the next one
    +
    463  stbrp_node *next = cur->next;
    +
    464  cur->next = node;
    +
    465  cur = next;
    +
    466  } else {
    +
    467  *res.prev_link = node;
    +
    468  }
    +
    469 
    +
    470  // from here, traverse cur and free the nodes, until we get to one
    +
    471  // that shouldn't be freed
    +
    472  while (cur->next && cur->next->x <= res.x + width) {
    +
    473  stbrp_node *next = cur->next;
    +
    474  // move the current node to the free list
    +
    475  cur->next = context->free_head;
    +
    476  context->free_head = cur;
    +
    477  cur = next;
    +
    478  }
    +
    479 
    +
    480  // stitch the list back in
    +
    481  node->next = cur;
    +
    482 
    +
    483  if (cur->x < res.x + width)
    +
    484  cur->x = (stbrp_coord) (res.x + width);
    +
    485 
    +
    486 #ifdef _DEBUG
    +
    487  cur = context->active_head;
    +
    488  while (cur->x < context->width) {
    +
    489  STBRP_ASSERT(cur->x < cur->next->x);
    +
    490  cur = cur->next;
    +
    491  }
    +
    492  STBRP_ASSERT(cur->next == NULL);
    +
    493 
    +
    494  {
    +
    495  stbrp_node *L1 = NULL, *L2 = NULL;
    +
    496  int count=0;
    +
    497  cur = context->active_head;
    +
    498  while (cur) {
    +
    499  L1 = cur;
    +
    500  cur = cur->next;
    +
    501  ++count;
    +
    502  }
    +
    503  cur = context->free_head;
    +
    504  while (cur) {
    +
    505  L2 = cur;
    +
    506  cur = cur->next;
    +
    507  ++count;
    +
    508  }
    +
    509  STBRP_ASSERT(count == context->num_nodes+2);
    +
    510  }
    +
    511 #endif
    +
    512 
    +
    513  return res;
    +
    514 }
    +
    515 
    +
    516 static int rect_height_compare(const void *a, const void *b)
    +
    517 {
    +
    518  const stbrp_rect *p = (const stbrp_rect *) a;
    +
    519  const stbrp_rect *q = (const stbrp_rect *) b;
    +
    520  if (p->h > q->h)
    +
    521  return -1;
    +
    522  if (p->h < q->h)
    +
    523  return 1;
    +
    524  return (p->w > q->w) ? -1 : (p->w < q->w);
    +
    525 }
    +
    526 
    +
    527 static int rect_original_order(const void *a, const void *b)
    +
    528 {
    +
    529  const stbrp_rect *p = (const stbrp_rect *) a;
    +
    530  const stbrp_rect *q = (const stbrp_rect *) b;
    +
    531  return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
    +
    532 }
    +
    533 
    +
    534 #ifdef STBRP_LARGE_RECTS
    +
    535 #define STBRP__MAXVAL 0xffffffff
    +
    536 #else
    +
    537 #define STBRP__MAXVAL 0xffff
    +
    538 #endif
    +
    539 
    +
    540 STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
    +
    541 {
    +
    542  int i, all_rects_packed = 1;
    +
    543 
    +
    544  // we use the 'was_packed' field internally to allow sorting/unsorting
    +
    545  for (i=0; i < num_rects; ++i) {
    +
    546  rects[i].was_packed = i;
    +
    547  #ifndef STBRP_LARGE_RECTS
    +
    548  STBRP_ASSERT(rects[i].w <= 0xffff && rects[i].h <= 0xffff);
    +
    549  #endif
    +
    550  }
    +
    551 
    +
    552  // sort according to heuristic
    +
    553  STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
    +
    554 
    +
    555  for (i=0; i < num_rects; ++i) {
    +
    556  if (rects[i].w == 0 || rects[i].h == 0) {
    +
    557  rects[i].x = rects[i].y = 0; // empty rect needs no space
    +
    558  } else {
    +
    559  stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
    +
    560  if (fr.prev_link) {
    +
    561  rects[i].x = (stbrp_coord) fr.x;
    +
    562  rects[i].y = (stbrp_coord) fr.y;
    +
    563  } else {
    +
    564  rects[i].x = rects[i].y = STBRP__MAXVAL;
    +
    565  }
    +
    566  }
    +
    567  }
    +
    568 
    +
    569  // unsort
    +
    570  STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
    +
    571 
    +
    572  // set was_packed flags and all_rects_packed status
    +
    573  for (i=0; i < num_rects; ++i) {
    +
    574  rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
    +
    575  if (!rects[i].was_packed)
    +
    576  all_rects_packed = 0;
    +
    577  }
    +
    578 
    +
    579  // return the all_rects_packed status
    +
    580  return all_rects_packed;
    +
    581 }
    +
    582 #endif
    +
    583 
    +
    584 /*
    +
    585 ------------------------------------------------------------------------------
    +
    586 This software is available under 2 licenses -- choose whichever you prefer.
    +
    587 ------------------------------------------------------------------------------
    +
    588 ALTERNATIVE A - MIT License
    +
    589 Copyright (c) 2017 Sean Barrett
    +
    590 Permission is hereby granted, free of charge, to any person obtaining a copy of
    +
    591 this software and associated documentation files (the "Software"), to deal in
    +
    592 the Software without restriction, including without limitation the rights to
    +
    593 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
    +
    594 of the Software, and to permit persons to whom the Software is furnished to do
    +
    595 so, subject to the following conditions:
    +
    596 The above copyright notice and this permission notice shall be included in all
    +
    597 copies or substantial portions of the Software.
    +
    598 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +
    599 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +
    600 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +
    601 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +
    602 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    +
    603 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    +
    604 SOFTWARE.
    +
    605 ------------------------------------------------------------------------------
    +
    606 ALTERNATIVE B - Public Domain (www.unlicense.org)
    +
    607 This is free and unencumbered software released into the public domain.
    +
    608 Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
    +
    609 software, either in source code form or as a compiled binary, for any purpose,
    +
    610 commercial or non-commercial, and by any means.
    +
    611 In jurisdictions that recognize copyright laws, the author or authors of this
    +
    612 software dedicate any and all copyright interest in the software to the public
    +
    613 domain. We make this dedication for the benefit of the public at large and to
    +
    614 the detriment of our heirs and successors. We intend this dedication to be an
    +
    615 overt act of relinquishment in perpetuity of all present and future rights to
    +
    616 this software under copyright law.
    +
    617 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +
    618 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +
    619 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +
    620 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    +
    621 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
    +
    622 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +
    623 ------------------------------------------------------------------------------
    +
    624 */
    +
    @ STBRP_HEURISTIC_Skyline_BF_sortHeight
    +
    @ STBRP_HEURISTIC_Skyline_BL_sortHeight
    +
    @ STBRP_HEURISTIC_Skyline_default
    +
    #define STBRP_DEF
    Definition: stb_rect_pack.h:64
    +
    STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
    +
    STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
    +
    STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
    +
    unsigned short stbrp_coord
    Definition: stb_rect_pack.h:78
    +
    STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
    + + +
    stbrp_node extra[2]
    +
    stbrp_node * active_head
    +
    stbrp_node * free_head
    + + + + + + +
    stbrp_coord x
    +
    stbrp_node * next
    +
    stbrp_coord y
    + +
    stbrp_coord w
    +
    stbrp_coord x
    + + +
    stbrp_coord y
    +
    stbrp_coord h
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__context-members.html b/dev/MinGfx/docs/html/structstbrp__context-members.html new file mode 100644 index 0000000..affff9c --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__context-members.html @@ -0,0 +1,99 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    +
    +
    stbrp_context Member List
    +
    + + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__context.html b/dev/MinGfx/docs/html/structstbrp__context.html new file mode 100644 index 0000000..0336ebc --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__context.html @@ -0,0 +1,265 @@ + + + + + + + +MinGfx Toolkit: stbrp_context Struct Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    stbrp_context Struct Reference
    +
    +
    +

    Detailed Description

    +
    +

    Definition at line 172 of file stb_rect_pack.h.

    +
    +

    #include <stb_rect_pack.h>

    + + + + + + + + + + + + + + + + + + + + +

    +Public Attributes

    int width
     
    int height
     
    int align
     
    int init_mode
     
    int heuristic
     
    int num_nodes
     
    stbrp_nodeactive_head
     
    stbrp_nodefree_head
     
    stbrp_node extra [2]
     
    +

    Member Data Documentation

    + +

    ◆ active_head

    + +
    +
    + + + + +
    stbrp_node* stbrp_context::active_head
    +
    + +

    Definition at line 180 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ align

    + +
    +
    + + + + +
    int stbrp_context::align
    +
    + +

    Definition at line 176 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ extra

    + +
    +
    + + + + +
    stbrp_node stbrp_context::extra[2]
    +
    + +

    Definition at line 182 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ free_head

    + +
    +
    + + + + +
    stbrp_node* stbrp_context::free_head
    +
    + +

    Definition at line 181 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ height

    + +
    +
    + + + + +
    int stbrp_context::height
    +
    + +

    Definition at line 175 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ heuristic

    + +
    +
    + + + + +
    int stbrp_context::heuristic
    +
    + +

    Definition at line 178 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ init_mode

    + +
    +
    + + + + +
    int stbrp_context::init_mode
    +
    + +

    Definition at line 177 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ num_nodes

    + +
    +
    + + + + +
    int stbrp_context::num_nodes
    +
    + +

    Definition at line 179 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ width

    + +
    +
    + + + + +
    int stbrp_context::width
    +
    + +

    Definition at line 174 of file stb_rect_pack.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__node-members.html b/dev/MinGfx/docs/html/structstbrp__node-members.html new file mode 100644 index 0000000..f5f798d --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__node-members.html @@ -0,0 +1,93 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    +
    +
    stbrp_node Member List
    +
    +
    + +

    This is the complete list of members for stbrp_node, including all inherited members.

    + + + + +
    nextstbrp_node
    xstbrp_node
    ystbrp_node
    + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__node.html b/dev/MinGfx/docs/html/structstbrp__node.html new file mode 100644 index 0000000..cc4ebe6 --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__node.html @@ -0,0 +1,157 @@ + + + + + + + +MinGfx Toolkit: stbrp_node Struct Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    stbrp_node Struct Reference
    +
    +
    +

    Detailed Description

    +
    +

    Definition at line 166 of file stb_rect_pack.h.

    +
    +

    #include <stb_rect_pack.h>

    + + + + + + + + +

    +Public Attributes

    stbrp_coord x
     
    stbrp_coord y
     
    stbrp_nodenext
     
    +

    Member Data Documentation

    + +

    ◆ next

    + +
    +
    + + + + +
    stbrp_node* stbrp_node::next
    +
    + +

    Definition at line 169 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ x

    + +
    +
    + + + + +
    stbrp_coord stbrp_node::x
    +
    + +

    Definition at line 168 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ y

    + +
    +
    + + + + +
    stbrp_coord stbrp_node::y
    +
    + +

    Definition at line 168 of file stb_rect_pack.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__rect-members.html b/dev/MinGfx/docs/html/structstbrp__rect-members.html new file mode 100644 index 0000000..e73efd1 --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__rect-members.html @@ -0,0 +1,96 @@ + + + + + + + +MinGfx Toolkit: Member List + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    +
    +
    stbrp_rect Member List
    +
    +
    + +

    This is the complete list of members for stbrp_rect, including all inherited members.

    + + + + + + + +
    hstbrp_rect
    idstbrp_rect
    wstbrp_rect
    was_packedstbrp_rect
    xstbrp_rect
    ystbrp_rect
    + + + + + diff --git a/dev/MinGfx/docs/html/structstbrp__rect.html b/dev/MinGfx/docs/html/structstbrp__rect.html new file mode 100644 index 0000000..782b5df --- /dev/null +++ b/dev/MinGfx/docs/html/structstbrp__rect.html @@ -0,0 +1,211 @@ + + + + + + + +MinGfx Toolkit: stbrp_rect Struct Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    stbrp_rect Struct Reference
    +
    +
    +

    Detailed Description

    +
    +

    Definition at line 106 of file stb_rect_pack.h.

    +
    +

    #include <stb_rect_pack.h>

    + + + + + + + + + + + + + + +

    +Public Attributes

    int id
     
    stbrp_coord w
     
    stbrp_coord h
     
    stbrp_coord x
     
    stbrp_coord y
     
    int was_packed
     
    +

    Member Data Documentation

    + +

    ◆ h

    + +
    +
    + + + + +
    stbrp_coord stbrp_rect::h
    +
    + +

    Definition at line 112 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ id

    + +
    +
    + + + + +
    int stbrp_rect::id
    +
    + +

    Definition at line 109 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ w

    + +
    +
    + + + + +
    stbrp_coord stbrp_rect::w
    +
    + +

    Definition at line 112 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ was_packed

    + +
    +
    + + + + +
    int stbrp_rect::was_packed
    +
    + +

    Definition at line 116 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ x

    + +
    +
    + + + + +
    stbrp_coord stbrp_rect::x
    +
    + +

    Definition at line 115 of file stb_rect_pack.h.

    + +
    +
    + +

    ◆ y

    + +
    +
    + + + + +
    stbrp_coord stbrp_rect::y
    +
    + +

    Definition at line 115 of file stb_rect_pack.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + + diff --git a/dev/MinGfx/docs/html/sync_off.png b/dev/MinGfx/docs/html/sync_off.png new file mode 100644 index 0000000..f8b5a50 Binary files /dev/null and b/dev/MinGfx/docs/html/sync_off.png differ diff --git a/dev/MinGfx/docs/html/sync_on.png b/dev/MinGfx/docs/html/sync_on.png new file mode 100644 index 0000000..172451a Binary files /dev/null and b/dev/MinGfx/docs/html/sync_on.png differ diff --git a/dev/MinGfx/docs/html/tab_a.png b/dev/MinGfx/docs/html/tab_a.png new file mode 100644 index 0000000..98b9de2 Binary files /dev/null and b/dev/MinGfx/docs/html/tab_a.png differ diff --git a/dev/MinGfx/docs/html/tab_b.png b/dev/MinGfx/docs/html/tab_b.png new file mode 100644 index 0000000..eca9b7b Binary files /dev/null and b/dev/MinGfx/docs/html/tab_b.png differ diff --git a/dev/MinGfx/docs/html/tab_h.png b/dev/MinGfx/docs/html/tab_h.png new file mode 100644 index 0000000..b46c7fe Binary files /dev/null and b/dev/MinGfx/docs/html/tab_h.png differ diff --git a/dev/MinGfx/docs/html/tab_s.png b/dev/MinGfx/docs/html/tab_s.png new file mode 100644 index 0000000..65a5c21 Binary files /dev/null and b/dev/MinGfx/docs/html/tab_s.png differ diff --git a/dev/MinGfx/docs/html/tabs.css b/dev/MinGfx/docs/html/tabs.css new file mode 100644 index 0000000..85a0cd5 --- /dev/null +++ b/dev/MinGfx/docs/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/dev/MinGfx/docs/html/text__shader_8h.html b/dev/MinGfx/docs/html/text__shader_8h.html new file mode 100644 index 0000000..c8b6d7f --- /dev/null +++ b/dev/MinGfx/docs/html/text__shader_8h.html @@ -0,0 +1,117 @@ + + + + + + + +MinGfx Toolkit: src/text_shader.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    text_shader.h File Reference
    +
    +
    +
    #include <string>
    +#include <map>
    +#include "matrix4.h"
    +#include "mesh.h"
    +#include "shader_program.h"
    +#include "texture2d.h"
    +#include <stb_truetype.h>
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Classes

    class  mingfx::TextShader
     
    class  mingfx::TextShader::TextFormat
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/text__shader_8h_source.html b/dev/MinGfx/docs/html/text__shader_8h_source.html new file mode 100644 index 0000000..7c88741 --- /dev/null +++ b/dev/MinGfx/docs/html/text__shader_8h_source.html @@ -0,0 +1,229 @@ + + + + + + + +MinGfx Toolkit: src/text_shader.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    text_shader.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_TEXT_SHADER_H_
    +
    15 #define SRC_TEXT_SHADER_H_
    +
    16 
    +
    17 #include <string>
    +
    18 #include <map>
    +
    19 
    +
    20 #include "matrix4.h"
    +
    21 #include "mesh.h"
    +
    22 #include "shader_program.h"
    +
    23 #include "texture2d.h"
    +
    24 
    +
    25 // disable warnings for this 3rd party code
    +
    26 #pragma warning ( push, 0 )
    +
    27 #include <stb_truetype.h>
    +
    28 #pragma warning ( pop )
    +
    29 
    +
    30 namespace mingfx {
    +
    31 
    +
    32 
    +
    33 
    +
    36 class TextShader {
    +
    37 public:
    + +
    39  virtual ~TextShader();
    +
    40 
    +
    45  bool Init(const std::string &font_file, int native_font_size);
    +
    46 
    +
    47  enum class HorizAlign {
    + + + +
    51  };
    +
    52 
    +
    53  enum class VertAlign {
    + + + + +
    58  };
    +
    59 
    +
    60  class TextFormat {
    +
    61  public:
    +
    62  // constructor sets defaults
    + +
    64  size(0.1f),
    +
    65  color(1,1,1,1),
    +
    66  h_align(HorizAlign::HORIZ_ALIGN_CENTER),
    +
    67  v_align(VertAlign::VERT_ALIGN_BASELINE) {}
    +
    68 
    +
    69  float size;
    + + + +
    73  };
    +
    74 
    +
    75 
    +
    76  //void Draw2D(const Point2 &pos,
    +
    77  // const std::string &text, TextFormat format, bool cache=false);
    +
    78 
    +
    79 
    +
    80  void Draw3D(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection,
    +
    81  const std::string &text, TextFormat format, bool cache=false);
    +
    82 
    +
    83 
    +
    84  Vector2 TextExtents(const std::string &text, TextFormat format, bool cache=false);
    +
    85 
    + +
    87 
    +
    88 private:
    +
    89  Texture2D atlas_;
    +
    90  float native_font_size_;
    +
    91 
    +
    92  stbtt_packedchar chardata_[128];
    +
    93 
    +
    94  struct MeshData {
    +
    95  Mesh mesh;
    +
    96  Point2 min;
    +
    97  Point2 max;
    +
    98  };
    +
    99 
    +
    100  void SetTextMesh(const std::string &text, MeshData *md);
    +
    101 
    +
    102  std::map<std::string, MeshData> cache_;
    +
    103  MeshData tmp_md_;
    +
    104 
    +
    105  ShaderProgram shader_;
    +
    106 };
    +
    107 
    +
    108 } // end namespace
    +
    109 
    +
    110 #endif
    +
    Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
    Definition: color.h:41
    +
    A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
    Definition: matrix4.h:50
    +
    A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
    Definition: mesh.h:127
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    A wrapper around GLSL shader programs.
    + + + + + + + + +
    void Draw3D(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, const std::string &text, TextFormat format, bool cache=false)
    +
    virtual ~TextShader()
    +
    float native_font_size()
    + + + + + +
    Vector2 TextExtents(const std::string &text, TextFormat format, bool cache=false)
    +
    bool Init(const std::string &font_file, int native_font_size)
    Call this from within the InitOpenGL() function since it will initialize not just the Font's internal...
    + + + + +
    A wrapper around a 2D texture that supports loading images from files or setting texture color data d...
    Definition: texture2d.h:42
    +
    A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
    Definition: vector2.h:28
    + + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/texture2d_8h.html b/dev/MinGfx/docs/html/texture2d_8h.html new file mode 100644 index 0000000..5324545 --- /dev/null +++ b/dev/MinGfx/docs/html/texture2d_8h.html @@ -0,0 +1,112 @@ + + + + + + + +MinGfx Toolkit: src/texture2d.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    texture2d.h File Reference
    +
    +
    +
    #include "opengl_headers.h"
    +#include "color.h"
    +#include <string>
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Texture2D
     A wrapper around a 2D texture that supports loading images from files or setting texture color data directly. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/texture2d_8h_source.html b/dev/MinGfx/docs/html/texture2d_8h_source.html new file mode 100644 index 0000000..2a1f2ea --- /dev/null +++ b/dev/MinGfx/docs/html/texture2d_8h_source.html @@ -0,0 +1,195 @@ + + + + + + + +MinGfx Toolkit: src/texture2d.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    texture2d.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_TEXTURE2D_H_
    +
    15 #define SRC_TEXTURE2D_H_
    +
    16 
    +
    17 
    +
    18 #include "opengl_headers.h"
    +
    19 #include "color.h"
    +
    20 
    +
    21 #include <string>
    +
    22 
    +
    23 
    +
    24 namespace mingfx {
    +
    25 
    +
    42 class Texture2D {
    +
    43 public:
    +
    44 
    +
    47  Texture2D(GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR);
    +
    48  virtual ~Texture2D();
    +
    49 
    +
    50 
    +
    55  bool InitFromFile(const std::string &filename);
    +
    56 
    +
    66  bool InitFromBytes(int width, int height, const unsigned char * data);
    +
    67 
    +
    77  bool InitFromFloats(int width, int height, const float * data);
    +
    78 
    +
    79 
    +
    83  bool UpdateFromBytes(const unsigned char * data);
    +
    84 
    +
    88  bool UpdateFromFloats(const float * data);
    +
    89 
    +
    90 
    +
    92  bool initialized() const;
    +
    93 
    +
    95  int width() const;
    +
    96 
    +
    98  int height() const;
    +
    99 
    +
    101  GLuint opengl_id() const;
    +
    102 
    +
    104  GLenum wrap_mode() const;
    +
    105 
    +
    107  GLenum filter_mode() const;
    +
    108 
    +
    110  void set_wrap_mode(GLenum wrapMode);
    +
    111 
    +
    113  void set_filter_mode(GLenum filterMode);
    +
    114 
    +
    117  Color Pixel(int x, int y) const;
    +
    118 
    +
    119 private:
    +
    120 
    +
    121  bool InitOpenGL();
    +
    122 
    +
    123  GLenum dataType_; // GL_UNSIGNED_BYTE or GL_FLOAT
    +
    124  const unsigned char * data_ubyte_;
    +
    125  const float * data_float_;
    +
    126 
    +
    127  int width_;
    +
    128  int height_;
    +
    129  bool handleMemInternally_;
    +
    130 
    +
    131  GLuint texID_;
    +
    132  GLenum wrapMode_;
    +
    133  GLenum filterMode_;
    +
    134 };
    +
    135 
    +
    136 
    +
    137 } // end namespace
    +
    138 
    +
    139 #endif
    +
    Represents a 4-component (R,G,B,A) color, stored internally in a float array to be compatable with Op...
    Definition: color.h:41
    +
    A wrapper around a 2D texture that supports loading images from files or setting texture color data d...
    Definition: texture2d.h:42
    +
    bool UpdateFromBytes(const unsigned char *data)
    This function may be called to re-read the texture data from an array formated the same as in InitFro...
    +
    bool initialized() const
    Returns true if the texture data has been successfully transferred to OpenGL.
    +
    GLenum wrap_mode() const
    Returns an enumerated constant for the OpenGL wrap mode used by the texture.
    +
    Color Pixel(int x, int y) const
    Returns the color at the specified pixel. The top left corner of the image is (0,0) and the bottom ri...
    +
    int height() const
    Returns the height in pixels of the texture.
    +
    int width() const
    Returns the width in pixels of the texture.
    +
    void set_filter_mode(GLenum filterMode)
    Uses the OpenGL texture filter mode arguments.
    +
    bool InitFromFile(const std::string &filename)
    Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's int...
    +
    Texture2D(GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR)
    Creates an empty texture. Optional parameters can be provided to set the texture wrap mode and filter...
    +
    void set_wrap_mode(GLenum wrapMode)
    Uses the OpenGL texture wrap mode arguments.
    +
    virtual ~Texture2D()
    +
    bool InitFromBytes(int width, int height, const unsigned char *data)
    Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's int...
    +
    GLuint opengl_id() const
    Returns the unsigned int used as the texture handle by OpenGL.
    +
    bool UpdateFromFloats(const float *data)
    This function may be called to re-read the texture data from an array formated the same as in InitFro...
    +
    bool InitFromFloats(int width, int height, const float *data)
    Call this from within the InitOpenGL() function since it will initialize not just the Texture2D's int...
    +
    GLenum filter_mode() const
    Returns an enumerated constant for the OpenGL filter mode used by the texture.
    + +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + +
    + + + + + diff --git a/dev/MinGfx/docs/html/unicam_8h.html b/dev/MinGfx/docs/html/unicam_8h.html new file mode 100644 index 0000000..bb51c32 --- /dev/null +++ b/dev/MinGfx/docs/html/unicam_8h.html @@ -0,0 +1,114 @@ + + + + + + + +MinGfx Toolkit: src/unicam.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    unicam.h File Reference
    +
    +
    +
    #include "quick_shapes.h"
    +#include "point2.h"
    +#include "point3.h"
    +#include "vector2.h"
    +#include "vector3.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::UniCam
     This implements a user interface for controlling the camera with the mouse. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/unicam_8h_source.html b/dev/MinGfx/docs/html/unicam_8h_source.html new file mode 100644 index 0000000..80fa0dc --- /dev/null +++ b/dev/MinGfx/docs/html/unicam_8h_source.html @@ -0,0 +1,234 @@ + + + + + + + +MinGfx Toolkit: src/unicam.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    unicam.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_UNICAM_H_
    +
    15 #define SRC_UNICAM_H_
    +
    16 
    +
    17 #include "quick_shapes.h"
    +
    18 #include "point2.h"
    +
    19 #include "point3.h"
    +
    20 #include "vector2.h"
    +
    21 #include "vector3.h"
    +
    22 
    +
    23 
    +
    24 namespace mingfx {
    +
    25 
    +
    26 
    +
    105 class UniCam {
    +
    106 public:
    +
    107 
    + +
    110 
    +
    112  UniCam(const Matrix4 &initialViewMatrix);
    +
    113 
    +
    114  virtual ~UniCam();
    +
    115 
    +
    116 
    +
    117  // To make the interaction work, the following set of functions need to be
    +
    118  // called from your GraphicsApp or whatever main application class you use
    +
    119  // to receive user input events and a draw callback.
    +
    120 
    +
    132  void OnButtonDown(const Point2 &normalizedMousePos, float mouseZ);
    +
    133 
    +
    142  void OnDrag(const Point2 &normalizedMousePos);
    +
    143 
    +
    152  void OnButtonUp(const Point2 &normalizedMousePos);
    +
    153 
    +
    159  void AdvanceAnimation(double dt);
    +
    160 
    +
    166  void Draw(const Matrix4 &projectionMatrix);
    +
    167 
    +
    168 
    + +
    179 
    +
    180 
    + +
    184 
    + +
    188 
    +
    189 
    +
    190  // -------------
    +
    191 
    +
    194  void set_view_matrix(Matrix4 viewMatrix);
    +
    195 
    +
    202  void set_default_depth(float d);
    +
    203 
    +
    204 
    +
    205 private:
    +
    206 
    +
    207  void recalc_angular_vel();
    +
    208 
    +
    209  enum class UniCamState {
    +
    210  START,
    +
    211  PAN_DOLLY_ROT_DECISION,
    +
    212  PAN_DOLLY_DECISION,
    +
    213  ROT_WAIT_FOR_SECOND_CLICK,
    +
    214  PAN,
    +
    215  DOLLY,
    +
    216  ROT,
    +
    217  SPINNING
    +
    218  };
    +
    219  UniCamState state_;
    +
    220 
    +
    221  Point2 mouseLast_;
    +
    222  double elapsedTime_;
    +
    223 
    +
    224  Point2 initialClickPos_;
    +
    225  bool hitGeometry_;
    +
    226  Point3 hitPoint_;
    +
    227 
    +
    228  bool rotInitialized_;
    +
    229  Point3 rotLastIPoint_;
    +
    230  float boundingSphereRad_;
    +
    231  Point3 boundingSphereCtr_;
    +
    232  double rotLastTime_;
    +
    233  std::vector<std::pair<double, double>> rotAngularVelBuffer_;
    +
    234  double rotAngularVel_;
    +
    235  Vector3 rotAxis_;
    +
    236 
    +
    237  bool dollyInitialized_;
    +
    238  float dollyFactor_;
    +
    239  float defaultDepth_;
    +
    240 
    +
    241  bool showIcon_;
    +
    242  QuickShapes quickShapes_;
    +
    243 
    +
    244  Matrix4 V_;
    +
    245  Matrix4 Vstart_;
    +
    246 
    +
    247  // saved from the last draw call in order to unproject the mouse pos
    +
    248  Matrix4 Pdraw_;
    +
    249 };
    +
    250 
    +
    251 
    +
    252 } // end namespace
    +
    253 
    +
    254 #endif
    +
    255 
    +
    256 
    +
    A 4x4 transformation matrix stored internally as an array of floats in column-major order so as to be...
    Definition: matrix4.h:50
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    This class provides a quick way to draw shapes for use in debugging or simple scenes.
    Definition: quick_shapes.h:69
    +
    This implements a user interface for controlling the camera with the mouse.
    Definition: unicam.h:105
    +
    void OnButtonUp(const Point2 &normalizedMousePos)
    Attach this to the corresponding button up event, for example, call this from within GraphicsApp::OnR...
    +
    void OnDrag(const Point2 &normalizedMousePos)
    Attach this to the corresponding mouse move event, for example, call this from within GraphicsApp::On...
    +
    Point3 eye()
    Returns the "eye" point (i.e., focal point) of the camera in world space coordinates.
    +
    void set_view_matrix(Matrix4 viewMatrix)
    This is not required, but you may use this if you wish to set an initial view matrix or reset the vie...
    +
    UniCam()
    Creates a UniCam object with an initial view matrix = identity.
    +
    void set_default_depth(float d)
    This sets the depth of the center of rotation for the case when the user's click does not intersect a...
    +
    Vector3 look()
    Returns the look direction (i.e., -Z axis of the camera matrix) in world space coordinates.
    +
    void OnButtonDown(const Point2 &normalizedMousePos, float mouseZ)
    Attach this to whatever mouse button you wish, for example, call this from within GraphicsApp::OnRigh...
    +
    void AdvanceAnimation(double dt)
    Attach this to a callback that can be used to control animation. Within GraphicsApp::UpdateSimulation...
    +
    void Draw(const Matrix4 &projectionMatrix)
    Finally, attach this to your draw callback routine. Within GraphicsApp::DrawUsingOpenGL(),...
    +
    UniCam(const Matrix4 &initialViewMatrix)
    Creates a UniCam object with the supplied initial view matrix.
    +
    Matrix4 view_matrix()
    Access the camera view matrix created by the UniCam interactions via this method and use it to draw t...
    +
    virtual ~UniCam()
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    + + + + + +
    + + + + + diff --git a/dev/MinGfx/docs/html/vector2_8h.html b/dev/MinGfx/docs/html/vector2_8h.html new file mode 100644 index 0000000..b035960 --- /dev/null +++ b/dev/MinGfx/docs/html/vector2_8h.html @@ -0,0 +1,149 @@ + + + + + + + +MinGfx Toolkit: src/vector2.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    vector2.h File Reference
    +
    +
    +
    #include <iostream>
    +#include "point2.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Vector2
     A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements, and screen-space vectors. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    Vector2 mingfx::operator/ (const Vector2 &v, const float s)
     Divide the vector by the scalar s. More...
     
    Vector2 mingfx::operator* (const float s, const Vector2 &v)
     Multiply the vector by the scalar s. More...
     
    Vector2 mingfx::operator* (const Vector2 &v, const float s)
     Multiply the vector by the scalar s. More...
     
    Vector2 mingfx::operator- (const Vector2 &v)
     Negate the vector. More...
     
    Point2 mingfx::operator+ (const Vector2 &v, const Point2 &p)
     Adds a vector and a point, returns a point. More...
     
    Point2 mingfx::operator+ (const Point2 &p, const Vector2 &v)
     Adds a point and a vector, returns a point. More...
     
    Vector2 mingfx::operator+ (const Vector2 &v1, const Vector2 &v2)
     Adds a vector and a vector, returns a vector. More...
     
    Point2 mingfx::operator- (const Point2 &p, const Vector2 &v)
     Subtracts a vector from a point, returns a point. More...
     
    Vector2 mingfx::operator- (const Vector2 &v1, const Vector2 &v2)
     Subtracts v2 from v1, returns a vector. More...
     
    Vector2 mingfx::operator- (const Point2 &p1, const Point2 &p2)
     Returns the vector spanning p1 and p2. More...
     
    std::ostream & mingfx::operator<< (std::ostream &os, const Vector2 &v)
     
    std::istream & mingfx::operator>> (std::istream &is, Vector2 &v)
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/vector2_8h_source.html b/dev/MinGfx/docs/html/vector2_8h_source.html new file mode 100644 index 0000000..935000d --- /dev/null +++ b/dev/MinGfx/docs/html/vector2_8h_source.html @@ -0,0 +1,261 @@ + + + + + + + +MinGfx Toolkit: src/vector2.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    vector2.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_VECTOR2_H_
    +
    15 #define SRC_VECTOR2_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 
    +
    19 #include "point2.h"
    +
    20 
    +
    21 
    +
    22 namespace mingfx {
    +
    23 
    +
    24 
    +
    28 class Vector2 {
    +
    29 public:
    +
    30 
    + +
    33 
    +
    36  Vector2(float x, float y);
    +
    37 
    +
    39  Vector2(float *v);
    +
    40 
    +
    42  Vector2(const Vector2& v);
    +
    43 
    +
    45  virtual ~Vector2();
    +
    46 
    +
    48  bool operator==(const Vector2& v) const;
    +
    49 
    +
    51  bool operator!=(const Vector2& v) const;
    +
    52 
    + +
    55 
    +
    57  float operator[](const int i) const;
    +
    58 
    +
    66  float& operator[](const int i);
    +
    67 
    +
    70  float x() const { return v[0]; }
    +
    71 
    +
    74  float y() const { return v[1]; }
    +
    75 
    +
    77  float w() const { return 0.0; }
    +
    78 
    +
    79 
    +
    80  // --- Vector operations ---
    +
    81 
    +
    83  float Dot(const Vector2& v) const;
    +
    84 
    +
    86  float Length() const;
    +
    87 
    +
    89  void Normalize();
    +
    90 
    +
    93  Vector2 ToUnit() const;
    +
    94 
    +
    98  Vector2 Lerp(const Vector2 &b, float alpha) const;
    +
    99 
    +
    101  const float * value_ptr() const;
    +
    102 
    +
    103 
    +
    104 
    +
    106  static Vector2 Normalize(const Vector2 &v);
    +
    107 
    +
    109  static float Dot(const Vector2 &v1, const Vector2 &v2);
    +
    110 
    +
    112  static const Vector2& Zero();
    +
    113 
    +
    115  static const Vector2& One();
    +
    116 
    +
    118  static const Vector2& UnitX();
    +
    119 
    +
    121  static const Vector2& UnitY();
    +
    122 
    +
    125  static Vector2 Lerp(const Vector2 &a, const Vector2 &b, float alpha);
    +
    126 
    +
    127 private:
    +
    128  float v[2];
    +
    129 };
    +
    130 
    +
    131 
    +
    132 // ---------- Operator Overloads for Working with Vectors ----------
    +
    133 
    +
    134 
    +
    135 // --- Scalers ---
    +
    136 
    +
    138 Vector2 operator/(const Vector2& v, const float s);
    +
    139 
    +
    141 Vector2 operator*(const float s, const Vector2& v);
    +
    142 
    +
    144 Vector2 operator*(const Vector2& v, const float s);
    +
    145 
    + +
    148 
    +
    149 // Note: no -(point) operator, that's an undefined operation
    +
    150 
    +
    151 
    +
    152 // --- Point and Vector Arithmetic ---
    +
    153 
    +
    155 Point2 operator+(const Vector2& v, const Point2& p);
    +
    156 
    +
    158 Point2 operator+(const Point2& p, const Vector2& v);
    +
    159 
    +
    161 Vector2 operator+(const Vector2& v1, const Vector2& v2);
    +
    162 
    +
    163 // Note: no (point + point) operator, that's an undefined operation
    +
    164 
    +
    166 Point2 operator-(const Point2& p, const Vector2& v);
    +
    167 
    +
    169 Vector2 operator-(const Vector2& v1, const Vector2& v2);
    +
    170 
    +
    172 Vector2 operator-(const Point2& p1, const Point2& p2);
    +
    173 
    +
    174 // Note: no (vector - point) operator, that's an undefined operation
    +
    175 
    +
    176 
    +
    177 // --- Stream operators ---
    +
    178 
    +
    179 // Vector2
    +
    180 std::ostream & operator<< ( std::ostream &os, const Vector2 &v);
    +
    181 std::istream & operator>> ( std::istream &is, Vector2 &v);
    +
    182 
    +
    183 
    +
    184 } // end namespace
    +
    185 
    +
    186 #endif
    +
    A 2D Point with floating point coordinates, used for storing 2D texture coordinates,...
    Definition: point2.h:28
    +
    A 2D Vector with floating point coordinates, used for storing 2D translations, mouse movements,...
    Definition: vector2.h:28
    +
    static Vector2 Normalize(const Vector2 &v)
    Returns a new vector that is the unit version of v.
    +
    bool operator!=(const Vector2 &v) const
    Check for "inequality", taking floating point imprecision into account.
    +
    float w() const
    In homogeneous coordinates, the w coordinate for all vectors is 0.0.
    Definition: vector2.h:77
    +
    Vector2 & operator=(const Vector2 &v)
    Vector assignment operator.
    +
    Vector2(const Vector2 &v)
    Copy constructor for vector.
    +
    Vector2 Lerp(const Vector2 &b, float alpha) const
    Linear interpolation between this vector and another. Alpha=0.0 returns this vector,...
    +
    static const Vector2 & One()
    (1,1) - a shortcut for a special vector that is frequently needed
    +
    void Normalize()
    Normalizes the vector by making it unit length.
    +
    Vector2(float *v)
    Constructs a vector given a pointer to x,y,z data.
    +
    Vector2 ToUnit() const
    Returns a normalized (i.e., unit length) version of the vector without modifying the original ('this'...
    +
    float Length() const
    Returns the length of the vector.
    +
    static const Vector2 & Zero()
    (0,0) - a shortcut for a special vector that is frequently needed
    +
    const float * value_ptr() const
    Returns a const pointer to the raw data array.
    +
    static const Vector2 & UnitX()
    (1,0) - a shortcut for a special vector that is frequently needed
    +
    float & operator[](const int i)
    Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coo...
    +
    Vector2()
    Default constructor to create zero vector.
    +
    static float Dot(const Vector2 &v1, const Vector2 &v2)
    Returns v1 dot v2.
    +
    static const Vector2 & UnitY()
    (0,1) - a shortcut for a special vector that is frequently needed
    +
    static Vector2 Lerp(const Vector2 &a, const Vector2 &b, float alpha)
    Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b',...
    +
    float y() const
    Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1....
    Definition: vector2.h:74
    +
    virtual ~Vector2()
    Vector destructor.
    +
    Vector2(float x, float y)
    Constructs a vector (x,y,0), where the 0 comes from the use of homogeneous coordinates in computer gr...
    +
    bool operator==(const Vector2 &v) const
    Check for "equality", taking floating point imprecision into account.
    +
    float operator[](const int i) const
    Read only access to the ith coordinate of the vector.
    +
    float Dot(const Vector2 &v) const
    Returns "this dot v".
    +
    float x() const
    Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1....
    Definition: vector2.h:70
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    Quaternion operator-(const Quaternion &q)
    +
    AABB operator+(const AABB &A, const AABB &B)
    +
    Quaternion operator/(const Quaternion &q, const float s)
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    +
    Matrix4 operator*(const Matrix4 &m, const float &s)
    Multiply matrix and scalar, returns the new matrix.
    + +
    + + + + + diff --git a/dev/MinGfx/docs/html/vector3_8h.html b/dev/MinGfx/docs/html/vector3_8h.html new file mode 100644 index 0000000..d2c0502 --- /dev/null +++ b/dev/MinGfx/docs/html/vector3_8h.html @@ -0,0 +1,149 @@ + + + + + + + +MinGfx Toolkit: src/vector3.h File Reference + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    vector3.h File Reference
    +
    +
    +
    #include <iostream>
    +#include "point3.h"
    +
    +

    Go to the source code of this file.

    + + + + + +

    +Classes

    class  mingfx::Vector3
     A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graphics operations. More...
     
    + + + + +

    +Namespaces

     mingfx
     Namespace for the MinGfx Toolkit.
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    Vector3 mingfx::operator/ (const Vector3 &v, const float s)
     Divide the vector by the scalar s. More...
     
    Vector3 mingfx::operator* (const float s, const Vector3 &v)
     Multiply the vector by the scalar s. More...
     
    Vector3 mingfx::operator* (const Vector3 &v, const float s)
     Multiply the vector by the scalar s. More...
     
    Vector3 mingfx::operator- (const Vector3 &v)
     Negate the vector. More...
     
    Point3 mingfx::operator+ (const Vector3 &v, const Point3 &p)
     Adds a vector and a point, returns a point. More...
     
    Point3 mingfx::operator+ (const Point3 &p, const Vector3 &v)
     Adds a point and a vector, returns a point. More...
     
    Vector3 mingfx::operator+ (const Vector3 &v1, const Vector3 &v2)
     Adds a vector and a vector, returns a vector. More...
     
    Point3 mingfx::operator- (const Point3 &p, const Vector3 &v)
     Subtracts a vector from a point, returns a point. More...
     
    Vector3 mingfx::operator- (const Vector3 &v1, const Vector3 &v2)
     Subtracts v2 from v1, returns a vector. More...
     
    Vector3 mingfx::operator- (const Point3 &p1, const Point3 &p2)
     Returns the vector spanning p1 and p2. More...
     
    std::ostream & mingfx::operator<< (std::ostream &os, const Vector3 &v)
     
    std::istream & mingfx::operator>> (std::istream &is, Vector3 &v)
     
    +
    + + + + + diff --git a/dev/MinGfx/docs/html/vector3_8h_source.html b/dev/MinGfx/docs/html/vector3_8h_source.html new file mode 100644 index 0000000..a64d797 --- /dev/null +++ b/dev/MinGfx/docs/html/vector3_8h_source.html @@ -0,0 +1,275 @@ + + + + + + + +MinGfx Toolkit: src/vector3.h Source File + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    MinGfx Toolkit +  1.0 +
    +
    A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    vector3.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  This file is part of the MinGfx Project.
    +
    3 
    +
    4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
    +
    5  All Rights Reserved.
    +
    6 
    +
    7  Original Author(s) of this File:
    +
    8  Dan Keefe, 2018, University of Minnesota
    +
    9 
    +
    10  Author(s) of Significant Updates/Modifications to the File:
    +
    11  ...
    +
    12  */
    +
    13 
    +
    14 #ifndef SRC_VECTOR3_H_
    +
    15 #define SRC_VECTOR3_H_
    +
    16 
    +
    17 #include <iostream>
    +
    18 
    +
    19 #include "point3.h"
    +
    20 
    +
    21 
    +
    22 namespace mingfx {
    +
    23 
    +
    24 
    +
    62 class Vector3 {
    +
    63 public:
    +
    64 
    + +
    67 
    +
    70  Vector3(float x, float y, float z);
    +
    71 
    +
    73  Vector3(float *v);
    +
    74 
    +
    76  Vector3(const Vector3& v);
    +
    77 
    +
    79  virtual ~Vector3();
    +
    80 
    +
    82  bool operator==(const Vector3& v) const;
    +
    83 
    +
    85  bool operator!=(const Vector3& v) const;
    +
    86 
    + +
    89 
    +
    91  float operator[](const int i) const;
    +
    92 
    +
    100  float& operator[](const int i);
    +
    101 
    +
    104  float x() const { return v[0]; }
    +
    105 
    +
    108  float y() const { return v[1]; }
    +
    109 
    +
    112  float z() const { return v[2]; }
    +
    113 
    +
    115  float w() const { return 0.0; }
    +
    116 
    +
    117 
    +
    118  // --- Vector operations ---
    +
    119 
    +
    127  float Dot(const Vector3& v) const;
    +
    128 
    +
    136  Vector3 Cross(const Vector3& v) const;
    +
    137 
    +
    139  float Length() const;
    +
    140 
    +
    142  void Normalize();
    +
    143 
    +
    146  Vector3 ToUnit() const;
    +
    147 
    +
    149  const float * value_ptr() const;
    +
    150 
    +
    154  Vector3 Lerp(const Vector3 &b, float alpha) const;
    +
    155 
    +
    156 
    +
    158  static const Vector3& Zero();
    +
    159 
    +
    161  static const Vector3& One();
    +
    162 
    +
    164  static const Vector3& UnitX();
    +
    165 
    +
    167  static const Vector3& UnitY();
    +
    168 
    +
    170  static const Vector3& UnitZ();
    +
    171 
    +
    172 
    +
    182  static Vector3 Normalize(const Vector3 &v);
    +
    183 
    +
    194  static Vector3 Cross(const Vector3 &v1, const Vector3 &v2);
    +
    195 
    +
    206  static float Dot(const Vector3 &v1, const Vector3 &v2);
    +
    207 
    +
    210  static Vector3 Lerp(const Vector3 &a, const Vector3 &b, float alpha);
    +
    211 
    +
    212 private:
    +
    213  float v[3];
    +
    214 };
    +
    215 
    +
    216 
    +
    217 // ---------- Operator Overloads for Working with Vectors ----------
    +
    218 
    +
    219 
    +
    220 // --- Scalers ---
    +
    221 
    +
    223 Vector3 operator/(const Vector3& v, const float s);
    +
    224 
    +
    226 Vector3 operator*(const float s, const Vector3& v);
    +
    227 
    +
    229 Vector3 operator*(const Vector3& v, const float s);
    +
    230 
    + +
    233 
    +
    234 // Note: no -(point) operator, that's an undefined operation
    +
    235 
    +
    236 
    +
    237 // --- Point and Vector Arithmetic ---
    +
    238 
    +
    240 Point3 operator+(const Vector3& v, const Point3& p);
    +
    241 
    +
    243 Point3 operator+(const Point3& p, const Vector3& v);
    +
    244 
    +
    246 Vector3 operator+(const Vector3& v1, const Vector3& v2);
    +
    247 
    +
    248 // Note: no (point + point) operator, that's an undefined operation
    +
    249 
    +
    251 Point3 operator-(const Point3& p, const Vector3& v);
    +
    252 
    +
    254 Vector3 operator-(const Vector3& v1, const Vector3& v2);
    +
    255 
    +
    257 Vector3 operator-(const Point3& p1, const Point3& p2);
    +
    258 
    +
    259 // Note: no (vector - point) operator, that's an undefined operation
    +
    260 
    +
    261 
    +
    262 
    +
    263 
    +
    264 // --- Stream operators ---
    +
    265 
    +
    266 // Vector3
    +
    267 std::ostream & operator<< ( std::ostream &os, const Vector3 &v);
    +
    268 std::istream & operator>> ( std::istream &is, Vector3 &v);
    +
    269 
    +
    270 
    +
    271 } // end namespace
    +
    272 
    +
    273 #endif
    +
    A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
    Definition: point3.h:52
    +
    A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
    Definition: vector3.h:62
    +
    static float Dot(const Vector3 &v1, const Vector3 &v2)
    Returns v1 dot v2.
    +
    float w() const
    In homogeneous coordinates, the w coordinate for all vectors is 0.0.
    Definition: vector3.h:115
    +
    Vector3(float x, float y, float z)
    Constructs a vector (x,y,z,0), where the 0 comes from the use of homogeneous coordinates in computer ...
    +
    float Dot(const Vector3 &v) const
    Returns "this dot v", for example:
    +
    Vector3 Cross(const Vector3 &v) const
    Returns "this cross v", for example:
    +
    Vector3 ToUnit() const
    Returns a normalized (i.e., unit length) version of the vector without modifying the original 'this' ...
    +
    static Vector3 Cross(const Vector3 &v1, const Vector3 &v2)
    Returns v1 cross v2.
    +
    static Vector3 Lerp(const Vector3 &a, const Vector3 &b, float alpha)
    Linear interpolation between two vectors. Alpha=0.0 returns 'a' and alpha=1.0 returns 'b',...
    +
    static const Vector3 & UnitZ()
    (0,0,1) - a shortcut for a special vector that is frequently needed
    +
    static const Vector3 & Zero()
    (0,0,0) - a shortcut for a special vector that is frequently needed
    +
    virtual ~Vector3()
    Vector destructor.
    +
    float Length() const
    Returns the length of the vector.
    +
    float z() const
    Read only access to the z coordinate. Can also use my_vector[2]. Use the my_vector[2] = 1....
    Definition: vector3.h:112
    +
    Vector3()
    Default constructor to create zero vector.
    +
    bool operator==(const Vector3 &v) const
    Check for "equality", taking floating point imprecision into account.
    +
    static const Vector3 & UnitY()
    (0,1,0) - a shortcut for a special vector that is frequently needed
    +
    Vector3 Lerp(const Vector3 &b, float alpha) const
    Linear interpolation between this vector and another. Alpha=0.0 returns this vector,...
    +
    Vector3(float *v)
    Constructs a vector given a pointer to x,y,z data.
    +
    void Normalize()
    Normalizes the vector by making it unit length.
    +
    float operator[](const int i) const
    Read only access to the ith coordinate of the vector.
    +
    Vector3 & operator=(const Vector3 &v)
    Vector assignment operator.
    +
    const float * value_ptr() const
    Returns a const pointer to the raw data array.
    +
    bool operator!=(const Vector3 &v) const
    Check for "inequality", taking floating point imprecision into account.
    +
    float & operator[](const int i)
    Returns a reference to the ith coordinate of the vector. Use this accessor if you wish to set the coo...
    +
    float x() const
    Read only access to the x coordinate. Can also use my_vector[0]. Use the my_vector[0] = 1....
    Definition: vector3.h:104
    +
    static const Vector3 & UnitX()
    (1,0,0) - a shortcut for a special vector that is frequently needed
    +
    float y() const
    Read only access to the y coordinate. Can also use my_vector[1]. Use the my_vector[1] = 1....
    Definition: vector3.h:108
    +
    static Vector3 Normalize(const Vector3 &v)
    Returns a new vector that is the unit version of v.
    +
    Vector3(const Vector3 &v)
    Copy constructor for vector.
    +
    static const Vector3 & One()
    (1,1,1) - a shortcut for a special vector that is frequently needed
    +
    Namespace for the MinGfx Toolkit.
    Definition: aabb.h:21
    +
    Quaternion operator-(const Quaternion &q)
    +
    AABB operator+(const AABB &A, const AABB &B)
    +
    Quaternion operator/(const Quaternion &q, const float s)
    +
    std::ostream & operator<<(std::ostream &os, const Color &c)
    +
    std::istream & operator>>(std::istream &is, Color &c)
    +
    Matrix4 operator*(const Matrix4 &m, const float &s)
    Multiply matrix and scalar, returns the new matrix.
    + +
    + + + + + diff --git a/dev/MinGfx/docs/index.html b/dev/MinGfx/docs/index.html new file mode 100644 index 0000000..7252082 --- /dev/null +++ b/dev/MinGfx/docs/index.html @@ -0,0 +1,2 @@ + + diff --git a/dev/MinGfx/example/CMakeLists.txt b/dev/MinGfx/example/CMakeLists.txt new file mode 100644 index 0000000..a9b27b7 --- /dev/null +++ b/dev/MinGfx/example/CMakeLists.txt @@ -0,0 +1,166 @@ +# Original Author(s) of this File: +# Daniel Keefe, 2017, University of Minnesota +# +# Author(s) of Significant Updates/Modifications to the File: +# ... + + + +# You are encouraged to copy this example, move it outside of the MinGfx directory, and use +# it as a starting point for your project. When you do this, you'll have to edit the +# following line as needed to point to the MinGfx install prefix used on your system. + +# !!!!!!!!!!!!! EDIT THE FOLLOWING LINE AS NEEDED !!!!!!!!!!!!! +list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../build/install ../../..) + +# For example, you might have installed to a build tree that now looks like this: +# /Users/keefe/courses/cs4611/sw/include/MinGfx-1.0/ +# /Users/keefe/courses/cs4611/sw/include/Eigen +# /Users/keefe/courses/cs4611/sw/include/nanogui +# /Users/keefe/courses/cs4611/sw/include/ etc.. + +# /Users/keefe/courses/cs4611/sw/lib/MinGfx-1.0/libMinGfx.a +# /Users/keefe/courses/cs4611/sw/lib/libnanogui.so +# /Users/keefe/courses/cs4611/sw/lib/ etc.. + +# If so, you would set the prefix path as follows: +#list(APPEND CMAKE_PREFIX_PATH /Users/keefe/courses/cs4611/sw) + + + + + +#### BASIC PROJECT SETUP #### + +project(mingfx-example) + +# Using 3.9 to get a modern version of FindOpenGL.cmake +cmake_minimum_required (VERSION 3.9) + +# Dependencies that are auto-downloaded, built, and installed for you will go in the +# directory pointed to by the CMAKE_INSTALL_PREFIX. It defaults to a location inside +# the build directory. +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "") + set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE ) +endif() + +# Add to paths cmake uses to search for scripts, modules, and config packages +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_INSTALL_PREFIX}) +list(INSERT CMAKE_PREFIX_PATH 0 ${CMAKE_INSTALL_PREFIX}) + +include(MessageMacros) +h1("Building ${PROJECT_NAME}") +h2("Configuring paths") + +message(STATUS "Module path: ${CMAKE_MODULE_PATH}") +message(STATUS "Prefix path: ${CMAKE_PREFIX_PATH}") +message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") + + + +#### SOURCE FOR THIS PROJECT #### +h2("Configuring source files") + +set(SOURCEFILES + main-circleviewer.cpp + CircleViewer.cpp +) + +set(HEADERFILES + CircleViewer.h +) + +set(EXTRAFILES +# README.md +) + +set_source_files_properties(${EXTRAFILES} PROPERTIES HEADER_FILE_ONLY TRUE) + + + +#### COMPILE OPTIONS #### + +h2("Configuring Compiler Options") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + + +message(STATUS "Building for " ${CMAKE_SYSTEM_NAME} ".") + +# Linux specific +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + add_definitions(-DLINUX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") +endif() + + +# Apple specific +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-DOSX) + + # RPATH settings, see https://cmake.org/Wiki/CMake_RPATH_handling + set(CMAKE_MACOSX_RPATH ON) + + # use, i.e. don't skip the full RPATH for the build tree + SET(CMAKE_SKIP_BUILD_RPATH FALSE) + + # when building, don't use the install RPATH already + # (but later on when installing) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) + + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + + # the RPATH to be used when installing, but only if it's not a system directory + LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + IF("${isSystemDir}" STREQUAL "-1") + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + ENDIF("${isSystemDir}" STREQUAL "-1") + +endif() + + +# Windows specific +if (WIN32) + add_definitions(-DWIN32) +endif() + + + + +#### DEFINE TARGET(S) #### + +h2("Defining Target(s)") + +add_executable(${PROJECT_NAME} ${SOURCEFILES} ${HEADERFILES} ${EXTRAFILES}) + + + +#### FIND AND ADD DEPENDENCIES #### + +h2("Adding Dependencies") +set(EXTERNAL_DIR external) + + +# MinGfx (linked with an imported cmake target so no need to specify include dirs) +# This will try to find MinGfxConfig.cmake, which should have been installed under +# CMAKE_INSTALL_PREFIX/lib/cmake/MinGfx when you installed the MinGfx Toolkit. +find_package(MinGfx REQUIRED) +target_link_libraries(${PROJECT_NAME} PUBLIC MinGfx::MinGfx) + +# Add external dependency on OpenGL +include(AutoBuildOpenGL) +AutoBuild_use_package_OpenGL(${PROJECT_NAME} PUBLIC) + + + +#### INSTALL TARGET(S) #### + +h2("Configuring Install Target") + +# The install locations are relative to the CMAKE_INSTALL_PREFIX variable +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) + diff --git a/dev/MinGfx/example/CircleViewer.cpp b/dev/MinGfx/example/CircleViewer.cpp new file mode 100644 index 0000000..9bf50b9 --- /dev/null +++ b/dev/MinGfx/example/CircleViewer.cpp @@ -0,0 +1,122 @@ + +#include "CircleViewer.h" + +#include +#include + + +CircleViewer::CircleViewer() : GraphicsApp(1024,768, "Circle Simulation") { + simTime_ = 0.0; + paused_ = false; + + //InitGraphicsContext(); +} + + +CircleViewer::~CircleViewer() { + +} + +void CircleViewer::InitNanoGUI() { + nanogui::FormHelper *gui = new nanogui::FormHelper(screen()); + nanogui::ref window = gui->addWindow(Eigen::Vector2i(10, 10), "Simulation Controls"); + pauseBtn_ = gui->addButton("Pause", std::bind(&CircleViewer::OnPauseBtnPressed, this)); + gui->addButton("Restart", std::bind(&CircleViewer::OnRestartBtnPressed, this)); + + screen()->performLayout(); +} + +void CircleViewer::UpdateSimulation(double dt) { + if (!paused_) { + simTime_ += dt; + std::cout << "Update Simulation " << simTime_ << std::endl; + } +} + + +void CircleViewer::OnRestartBtnPressed() { + simTime_ = 0.0; +} + +void CircleViewer::OnPauseBtnPressed() { + paused_ = !paused_; + if (paused_) { + pauseBtn_->setCaption("Play"); + } + else { + pauseBtn_->setCaption("Pause"); + } +} + + +void CircleViewer::OnMouseMove(const Point2 &pos, const Vector2 &delta) { + std::cout << "Mouse moved by " << delta << " to reach " << pos << std::endl; +} + + +void CircleViewer::OnLeftMouseDown(const Point2 &pos) { + std::cout << "Left mouse button DOWN at " << pos << std::endl; +} + +void CircleViewer::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) { + std::cout << "Mouse dragged (left button) by " << delta << " to reach " << pos << std::endl; +} + +void CircleViewer::OnLeftMouseUp(const Point2 &pos) { + std::cout << "Left mouse button UP at " << pos << std::endl; +} + + +void CircleViewer::OnRightMouseDown(const Point2 &pos) { + std::cout << "Right mouse button DOWN at " << pos << std::endl; +} + +void CircleViewer::OnRightMouseDrag(const Point2 &pos, const Vector2 &delta) { + std::cout << "Mouse dragged (right button) by " << delta << " to reach " << pos << std::endl; +} + +void CircleViewer::OnRightMouseUp(const Point2 &pos) { + std::cout << "Right mouse button UP at " << pos << std::endl; +} + + +void CircleViewer::OnKeyDown(const char *c, int modifiers) { + std::cout << "Key DOWN (" << c << ") modifiers=" << modifiers << std::endl; +} + +void CircleViewer::OnKeyUp(const char *c, int modifiers) { + std::cout << "Key UP (" << c << ") modifiers=" << modifiers << std::endl; +} + + +void CircleViewer::OnSpecialKeyDown(int key, int scancode, int modifiers) { + std::cout << "Special Key DOWN key=" << key << " scancode=" << scancode << " modifiers=" << modifiers << std::endl; +} + +void CircleViewer::OnSpecialKeyUp(int key, int scancode, int modifiers) { + std::cout << "Special Key UP key=" << key << " scancode=" << scancode << " modifiers=" << modifiers << std::endl; +} + + +void CircleViewer::DrawUsingNanoVG(NVGcontext *ctx) { + // example of drawing some circles + + nvgBeginPath(ctx); + nvgCircle(ctx, 512+50.0*cos(simTime_), 350+200.0*sin(simTime_), 50); + nvgFillColor(ctx, nvgRGBA(100,100,255,200)); + nvgFill(ctx); + nvgStrokeColor(ctx, nvgRGBA(0,0,0,255)); + nvgStroke(ctx); + + nvgBeginPath(ctx); + nvgCircle(ctx, 512+200.0*cos(simTime_), 350+50.0*sin(simTime_), 50); + nvgFillColor(ctx, nvgRGBA(255,100,100,200)); + nvgFill(ctx); + nvgStrokeColor(ctx, nvgRGBA(0,0,0,255)); + nvgStroke(ctx); +} + +void CircleViewer::DrawUsingOpenGL() { + +} + diff --git a/dev/MinGfx/example/CircleViewer.h b/dev/MinGfx/example/CircleViewer.h new file mode 100644 index 0000000..4aefbc8 --- /dev/null +++ b/dev/MinGfx/example/CircleViewer.h @@ -0,0 +1,77 @@ + +#include + + +/** An application that opens up a window that includes a few buttons + for controlling the simulation and can be used to draw circles and + other computer graphics. + + After constructing a new CircleViewer, call Run() to start and + run the application. Run() will not return until the application + window is closed. Make sure that you call cs3081::InitGraphics() + before creating the RobotViewer app. Example: + + ``` + int main(int argc, char **argv) { + cs3081::InitGraphics(); + cs3081::CircleViewer *app = new cs3081::CircleViewer(); + app->Run(); + cs3081::ShutdownGraphics(); + return 0; + } + ``` + + While the window is open UpdateSimulation() will be called + repeatedly, once per frame. Fill this in to update your simulation + or perform any other processing that should happen over time as the + simulation progresses. + + Fill in the On*() methods as desired to respond to user input events. + + Fill in the Draw*() methods to draw graphics to the screen using + either the nanovg library or raw OpenGL. +*/ +class CircleViewer : public GraphicsApp { +public: + CircleViewer(); + ~CircleViewer(); + + void InitNanoGUI(); + + void UpdateSimulation(double dt); + + + void OnRestartBtnPressed(); + + void OnPauseBtnPressed(); + + + void OnMouseMove(const Point2 &pos, const Vector2 &delta); + + void OnLeftMouseDown(const Point2 &pos); + void OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta); + void OnLeftMouseUp(const Point2 &pos); + + void OnRightMouseDown(const Point2 &pos); + void OnRightMouseDrag(const Point2 &pos, const Vector2 &delta); + void OnRightMouseUp(const Point2 &pos); + + + void OnKeyDown(const char *c, int modifiers); + + void OnKeyUp(const char *c, int modifiers); + + void OnSpecialKeyDown(int key, int scancode, int modifiers); + + void OnSpecialKeyUp(int key, int scancode, int modifiers); + + + void DrawUsingNanoVG(NVGcontext *ctx); + + void DrawUsingOpenGL(); + +private: + double simTime_; + bool paused_; + nanogui::Button *pauseBtn_; +}; diff --git a/dev/MinGfx/example/cmake/AutoBuild.cmake b/dev/MinGfx/example/cmake/AutoBuild.cmake new file mode 100644 index 0000000..2e349b9 --- /dev/null +++ b/dev/MinGfx/example/cmake/AutoBuild.cmake @@ -0,0 +1,541 @@ +# Author: Daniel F. Keefe +# Copyright 2017,2018, Daniel F. Keefe and Regents of the University of Minnesota +# All Rights Reserved. + + +# OVERVIEW / INTENT: AutoBuild is a series of CMake macros and functions for working with sub-projects that are dependencies of a main project. We assume that both the main project and dependencies each build with CMake already. AutoBuild manages the process of checking to see if the dependencies are already available, installed on the system. If not, AutoBuild will automatically download, build, and install the dependencies for you as part of the CMake Configure process. + +# WHY IS THIS NEEDED / USEFUL?: AutoBuild is similar in spirit to CMake's ExternalProject_add() command. In fact, AutoBuild uses that command internally. However, there is a key difference between AutoBuild and ExternalProject_add(). With ExternalProject_add() there is a chicken-and-the-egg problem. ExternalProject_add() doesn't download and build the external project until after CMake has finished running and you are building your actual code using Unix Makefiles, Visual Studio, or Xcode. This means the dependency does not exist on disk until CMake has finished running, and, thus, there is no way to use CMake's find_package() routines to find the dependency. You can still make your project link with the dependency, but you have to hardcode paths to tell CMake where it will exist after it is built rather than find it already installed on the system. If you want to only build the dependency if it is not already found on the system, then this means you need to maintain two ways of linking with the dependency in your CMakeLists.txt, using one approach when the dependency is found already installed and using another approach (hardcoded paths with ExternalProject_add()) when it is not found. The hardcoded paths can get a bit complex when working with cross-platform code, and this is precisely what CMake's find_package() is supposed to handle, so it is a bit annoying that it cannot be used in this case. + +# HOW IT WORKS: AutoBuild takes a different approach where the goal is for our project's CMakeLists.txt file to always use the same approach to link with a dependency. If the dependency is found on the system, then we go ahead and link with it right away. If it is not found, then rather than scheduling it to be built as part of the build process for our own project, we "pause" our build for a moment to download, build, and install the dependency. Then, once the dependency has been installed, we try again to find it using find_package(), which should always succeed since we just did the install, and continue on building our program. + +# LIMITATIONS: Handling dependencies is a hard problem, and this "AutoBuild" strategy is not without its own limitations. For example, a complication arises when using the CMake GUI. When using the CMake GUI, users expect to be able to set the CMAKE_INSTALL_PREFIX interactively after pressing Configure once to bring up all the available options. So, there is a problem if we build and install dependency projects during this first run of CMake Configure -- the user will not yet have had a chance to set CMAKE_INSTALL_PREFIX before the dependency projects are installed, and they may be installed to an undesirable location. AutoBuild addresses this by running a status check at the end of the CMake Configure step. The first time the status check detects that a dependency project should be "auto-built", it prints an informative error message, reminding the user to set CMAKE_INSTALL_PREFIX and then re-run CMake Configure to actually do the download, build, and install steps for each dependency. This seems to be a good match for CMake's GUI mode because it also allows the user to check other related settings (e.g., turning off autobuild for specific projects, forcing autobuild even if the dependency is found on the system, setting the directory to use for downloading projects). + +# RUNNING FROM A SCRIPT: When running from the command line or a script, the error-the-first-time-an-autobuild-is-scheduled behavior described above is typically not desired. In this case, users should already be setting CMAKE_INSTALL_PREFIX and any other desired CMake flags on the command line so it is fine to run the autobuilds immediately. To do this, simply run cmake with the following command line argument: -DAUTOBUILD_EXECUTE_NOW=ON + + +# USAGE: WHAT TO ADD TO YOUR CMAKELISTS.TXT FILE TO USE AUTOBUILD: + +# Edit 1: Add two calls to your main CMakeLists.txt: + +# 1a. Near the top of the file include AutoBuild and call init, like so: +# include(AutoBuild) +# AutoBuild_init() + +# 1b. At the end of the file call: +# AutoBuild_check_status() + + +# Edit 2: For each target you wish to link with an external dependency, add a use_package() call right after you +# define the target with add_library() or add_executable. If the dependency you wish to link with uses +# modern CMake Config Packages, then the generic AutoBuild_use_package() call is all that is needed. +# For example, to link my-program with the MinVR library, add the following to the CMakeLists.txt file +# where you define the my-program target with add_executable: + +# add_execuatable(my-program ${SOURCEFILES}) +# AutoBuild_use_package(MinVR . my-program PUBLIC MinVR::MinVR +# DOWNLOAD_ARGS GIT_REPOSITORY https://github.com/MinVR/MinVR.git GIT_TAG beta +# ) + +# Since CMake Config Packages are relatively new and very complex, so not every package provides one +# (or a correct one). In these cases, the generic AutoBuild_use_package() will not work, and we have +# to write a version of that is specific to the project we wish to add as a dependency. For example, +# in order to link with GLFW, which does not provide a ConfigGLFW.cmake file, we must write a +# GLFW-specific version of AutoBuild_use_package() and then use it like so: + +# include(AutoBuildGLFW) +# AutoBuild_use_package_GLFW(my-program PUBLIC) + +# GLFW is one of the first examples in this style, so it is included in the AutoBuild repo. If the +# repo does not already include an AutoBuild.cmake script, then copy an existing +# example, modify it to work for the package of interest, and once it is working, push it back to +# the AutoBuild repo so others can benefit as well. + + + + + + + +# Usage: +# AutoBuild_init() +# Call this one time in your main CMakeLists.txt script somewhere near the beginning of the file. +macro(AutoBuild_init) + message(STATUS "AutoBuild: Initializing.") + + option(AUTOBUILD_DEPENDENCIES "This is a global option that turns on/off the AutoBuild functionality. It is also possible to turn on/off autobuilding for specific packages via variables of the form AUTOBUILD_PACKAGE_." ON) + + set(AUTOBUILD_DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external" CACHE STRING "Location for external project sources downloaded by AutoBuild." ) +endmacro() + + + + + + +# Usage: +# AutoBuild_check_status() +# Call this one time in your main CMakeLists.txt script somewhere near the end of the file. +macro(AutoBuild_check_status) + message(STATUS "AutoBuild: Checking status...") + + # Report status to the user, and if we detected dependencies to autobuild, stop with a + # cmake error to give the user a chance to adjust config options, such as the + # CMAKE_INSTALL_PREFIX and overriding AUTOBUILD_ on a case-by-case basis if + # needed. Assuming all looks good, we will then download, build, and install each + # dependency that we need the next time CMake Configure is run. + + set(PREFIX "AUTOBUILD_PACKAGE_") + get_cmake_property(ALLVARS VARIABLES) + string(REGEX MATCHALL "(^|;)${PREFIX}[A-Za-z0-9_]*" MATCHED_VARS "${ALLVARS}") + + if (NOT "${MATCHED_VARS}" STREQUAL "") + message(STATUS "AutoBuild: Status check for each dependency linked using AutoBuild:") + + set(RERUN_CONFIGURE "FALSE") + + foreach (VARIABLE ${MATCHED_VARS}) + #message(STATUS "${VARIABLE}=${${VARIABLE}}") + + string(REPLACE ${PREFIX} "" PACKAGE_NAME ${VARIABLE}) + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + if ("${${PACKAGE_NAME}_AUTOBUILT}") + set(STATUS_STR "Now installed to CMAKE_INSTALL_PREFIX (${CMAKE_INSTALL_PREFIX}).") + elseif("${${VARIABLE}}") + set(STATUS_STR "Set to auto-build next time you run CMake Configure.") + set(RERUN_CONFIGURE "TRUE") + else() + set(STATUS_STR "Autobuild off (either found on the system or manually turned off).") + endif() + + message(STATUS "AutoBuild: Dependency = ${PACKAGE_NAME}; Status = ${STATUS_STR}") + + endforeach() + + # Error out if any packages are set to autobuild but have not yet been built + if ("${RERUN_CONFIGURE}") + + # This flag confirms that the user has had a chance to see any new AutoBuild config + # options and we can now proceed on the next run of CMake Configure to do the auto + # download, build, and install steps. + set(AUTOBUILD_EXECUTE_NOW "ON" CACHE BOOL "If on, the AutoBuild download, build, install steps will run the next time CMake Configure is run.") + mark_as_advanced(AUTOBUILD_EXECUTE_NOW) + + message(SEND_ERROR "AutoBuild: One or more packages are setup to be downloaded, built, and installed with AutoBuild the next time you run CMake Configure. Check now to make sure that your CMAKE_INSTALL_PREFIX points to the place where you want these dependencies installed. Also, check variables of the form AUTOBUILD_PACKAGE_* to make sure the packages you want to build are ON and the ones you do not are OFF. When all looks good, run Configure again to perform the download, build, and install steps. This message will be shown only once -- the first time your project schedules a dependency to be autobuilt.") + + endif() + endif() + + message(STATUS "AutoBuild: Completed status check.") +endmacro() + + + + + + + +# Usage: +# AutoBuild_use_package( +# # This 1st argument is required, it is the name of the project/package you wish to use. The project should +# # provide a Config.cmake file for CMake to find. +# MinVR +# +# # The 2nd argument is required and it is the relative path from the root of the external project's source +# # tree to a CMakeLists.txt file that can be used to build the project. +# . +# +# # The 3rd argument is required. It is the name of the target you wish to link this dependency to. +# my-program +# +# # The 4th argument is required. It impacts how dependencies are propogated through CMake. You can treat +# # this dependency as an INTERFACE, PUBLIC, or PRIVATE. See the following URL for details: +# # https://cmake.org/cmake/help/latest/command/target_include_directories.html +# PUBLIC +# +# # The 5th argument is required. It is the name of the imported target(s) provided in the projects CMake +# # Config Package. By convention, these typically start with the project name and then ::, like a namespace. +# MinVR::MinVR +# +# # The remaining arguments are optional and are used to provide more specific instructions on the find_package, +# # download, build, and install steps. List additional flags for these steps after the keywords: +# # FIND_PACKAGE_ARGS, DOWNLOAD_ARGS, and/or BUILD_AND_INSTALL_ARGS. For example: +# +# DOWNLOAD_ARGS GIT_REPOSITORY https://github.com/MinVR/MinVR.git GIT_TAG beta +# ) +# +macro(AutoBuild_use_package PACKAGE_NAME RELPATH_TO_CMAKELISTS YOUR_TARGET INTERFACE_PUBLIC_OR_PRIVATE IMPORTED_TARGETS) + + set(OPTIONS) + set(ONE_VALUE_ARGS) + set(MULTI_VALUE_ARGS FIND_PACKAGE_ARGS DOWNLOAD_ARGS BUILD_AND_INSTALL_ARGS) + cmake_parse_arguments(EXTRA "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + AutoBuild_find_package_config_mode(${PACKAGE_NAME} ${EXTRA_FIND_PACKAGE_ARGS}) + + if ("${AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}}") + if ("${AUTOBUILD_EXECUTE_NOW}") + message(STATUS "AutoBuild: Starting download, build, install sequence for ${PACKAGE_NAME}.") + + AutoBuild_download_project(${PACKAGE_NAME} ${EXTRA_DOWNLOAD_ARGS}) + + AutoBuild_build_and_install_project(${PACKAGE_NAME} ${RELPATH_TO_CMAKELISTS} ${EXTRA_BUILD_AND_INSTALL_ARGS}) + + AutoBuild_find_built_package_config_mode(${PACKAGE_NAME} CONFIG ${EXTRA_FIND_PACKAGE_ARGS}) + + set(${PACKAGE_NAME_UPPER}_AUTOBUILT "TRUE" CACHE BOOL "Confirms that package ${PACKAGE_NAME} was successfully built by the AutoBuild system.") + mark_as_advanced(${PACKAGE_NAME}_AUTOBUILT) + + else() + message(STATUS "AutoBuild: Scheduled to build ${PACKAGE_NAME} the next time CMake Configure is run.") + endif() + endif() + + + # If we've found the package, either directly on the system or after autobuilding, then link with it + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency ${PACKAGE_NAME}.") + + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} ${IMPORTED_TARGETS}) + + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DUSE_${PACKAGE_NAME_UPPER}) + endif() + +endmacro() + + + + + + + + + + + +# ------ Implementation Details Below this Line -- External Users Should Not Need To Call Anything Below ------- + + +macro(AutoBuild_find_package_config_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching for package ${PACKAGE_NAME} using cmake's find_package() config mode...") + + if (NOT AUTOBUILD_DEPENDENCIES) + + message(STATUS "AutoBuild: AUTOBUILD_DEPENDENCIES is OFF, using default CMake find_package() behavior.") + find_package(${PACKAGE_NAME} CONFIG ${EXTRA_MACRO_ARGS}) + + else() + + # Try first to find the package within the current CMAKE_INSTALL_PREFIX. In the case when multiple + # versions of a library are installed on the same system, this makes sure that we will find a version + # that was previously built using AutoBuild first. + find_package(${PACKAGE_NAME} CONFIG PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ${EXTRA_MACRO_ARGS}) + + # Try again with the normal version of find_package(), which will search a variety of places on + # the system, see details here: https://cmake.org/cmake/help/latest/command/find_package.html + if (NOT ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}")) + find_package(${PACKAGE_NAME} CONFIG ${EXTRA_MACRO_ARGS}) + endif() + + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + # Found the package on the system, so there is no need to autobuild it, but we still add + # an option (defaulting to OFF) so that users can "force" building their own version of + # the dependency if they wish. + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." OFF) + else() + message(STATUS "AutoBuild: Could not find ${PACKAGE_NAME}, setting AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}=ON.") + # If the package is still not found, then we will need to autobuild it, add the option with a default of ON + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." ON) + endif() + + endif() +endmacro() + + + +macro(AutoBuild_find_built_package_config_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching again (after autobuilding) for package ${PACKAGE_NAME} using config mode...") + + # Try first to find the package within the current CMAKE_INSTALL_PREFIX. In the case when multiple + # versions of a library are installed on the same system, this makes sure that we will find a version + # that was previously built using AutoBuild first. + find_package(${PACKAGE_NAME} PATHS ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ${EXTRA_MACRO_ARGS} QUIET) + + # Try again with the normal version of find_package(), which will search a variety of places on + # the system, see details here: https://cmake.org/cmake/help/latest/command/find_package.html + if (NOT ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}")) + find_package(${PACKAGE_NAME} ${EXTRA_MACRO_ARGS}) + endif() + + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + else() + message(FATAL_ERROR "AutoBuild: Just completed a download, build, and install sequence for package ${PACKAGE_NAME}, and it should now be installed at the prefix ${CMAKE_INSTALL_PREFIX}, but cmake is still unable to find it with find_package().") + endif() +endmacro() + + + +macro(AutoBuild_find_package_module_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching for package ${PACKAGE_NAME} using cmake's find_package() module mode...") + + if (NOT AUTOBUILD_DEPENDENCIES) + + message(STATUS "AutoBuild: AUTOBUILD_DEPENDENCIES is OFF, using default CMake find_package() behavior.") + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + else() + + # AutoBuild allows users to force building a dependency even if it is already found installed on the + # system. To make this work, any Find*.cmake scripts that are used with AutoBuild must look first + # for the library under ${CMAKE_INSTALL_PREFIX}. This makes it so that preference is given to + # libraries just built and installed there with AutoBuild. + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + # Found the package on the system, so there is no need to autobuild it, but we still add + # an option (defaulting to OFF) so that users can "force" building their own version of + # the dependency if they wish. + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." OFF) + else() + message(STATUS "AutoBuild: Could not find ${PACKAGE_NAME}, setting AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER}=ON.") + # If the package is still not found, then we will need to autobuild it, add the option with a default of ON + option(AUTOBUILD_PACKAGE_${PACKAGE_NAME_UPPER} "If on, the AutoBuild CMake plugin will download, build, and install ${PACKAGE_NAME} to CMAKE_INSTALL_PREFIX the next time that CMake Configure is run." ON) + endif() + + endif() +endmacro() + + + +macro(AutoBuild_find_built_package_module_mode PACKAGE_NAME) + # Users can pass in extra arguments to the find_package command if needed. + set(EXTRA_MACRO_ARGS ${ARGN}) + + string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UPPER) + + # Force CMake to find the package again -- need for the case where the package exists on the system + # but we want to force building and installing it. after the install, we need to clear these flags + # so that find_package will find the newlyl installed version. + unset(${PACKAGE_NAME}_DIR CACHE) + unset(${PACKAGE_NAME_UPPER}_DIR CACHE) + unset(${PACKAGE_NAME}_FOUND CACHE) + unset(${PACKAGE_NAME_UPPER}_FOUND CACHE) + + message(STATUS "AutoBuild: Searching again (after autobuilding) for package ${PACKAGE_NAME} using module mode...") + + # AutoBuild allows users to force building a dependency even if it is already found installed on the + # system. To make this work, any Find*.cmake scripts that are used with AutoBuild must look first + # for the library under ${CMAKE_INSTALL_PREFIX}. This makes it so that preference is given to + # libraries just built and installed there with AutoBuild. + find_package(${PACKAGE_NAME} MODULE ${EXTRA_MACRO_ARGS}) + + if ("${${PACKAGE_NAME}_FOUND}" OR "${${PACKAGE_NAME_UPPER}_FOUND}") + set(FOUND_AT_DIR "${${PACKAGE_NAME}_DIR}") + if ("${FOUND_AT_DIR}" STREQUAL "") + set(FOUND_AT_DIR "${${PACKAGE_NAME_UPPER}_DIR}") + endif() + message(STATUS "AutoBuild: OK - Found ${PACKAGE_NAME} at ${FOUND_AT_DIR}.") + else() + message(FATAL_ERROR "AutoBuild: Just completed a download, build, and install sequence for package ${PACKAGE_NAME}, and it should now be installed at the prefix ${CMAKE_INSTALL_PREFIX}, but cmake is still unable to find it with find_package().") + endif() +endmacro() + + + +# Usage: +# AutoBuild_download_project( +# # This first argument is the name of the project to download. It is required: +# glm +# +# # Additional arguments specify how to download the project using GIT, SVN, CVS, or URL. +# # These can be any of the arguments used for the downloading step of the cmake builtin +# # ExternalProject_Add command. +# GIT_REPOSITORY "https://github.com/g-truc/glm.git" +# GIT_TAG master +# etc.. +# ) +function(AutoBuild_download_project EXT_PROJECT_NAME) + + big_message("AUTOBUILD: BEGIN EXTERNAL PROJECT DOWNLOAD (${EXT_PROJECT_NAME}).") + + message(STATUS "AutoBuild: Creating a download helper project for ${EXT_PROJECT_NAME}.") + + set(DOWNLOAD_OPTIONS ${ARGN}) + string (REGEX REPLACE "(^|[^\\\\]);" "\\1 " DOWNLOAD_OPTIONS "${DOWNLOAD_OPTIONS}") + + file(MAKE_DIRECTORY ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}) + + # Write the CMakeLists.txt.in file to disk + set(DLHELPER_FILE_TEXT "\n \ + # This is a helper cmake project -- the only thing this project does is download \n \ + # the external project. So, the configure, build, install, and test commands for \n \ + # ExternalProject_Add() are intentionally set as NOPs. \n \ + \n \ + cmake_minimum_required (VERSION 3.9) \n \ + \n \ + project(@EXT_PROJECT_NAME@-download) \n \ + \n \ + include(ExternalProject) \n \ + ExternalProject_Add( \n \ + @EXT_PROJECT_NAME@ \n \ + SOURCE_DIR \"@AUTOBUILD_DOWNLOAD_DIR@/@EXT_PROJECT_NAME@/src\" \n \ + BINARY_DIR \"@AUTOBUILD_DOWNLOAD_DIR@/@EXT_PROJECT_NAME@/download-helper\" \n \ + @DOWNLOAD_OPTIONS@ \n \ + CONFIGURE_COMMAND \"\" \n \ + BUILD_COMMAND \"\" \n \ + INSTALL_COMMAND \"\" \n \ + TEST_COMMAND \"\" \n \ + LOG_DOWNLOAD ON \n \ + GIT_PROGRESS 1 \n \ + ) \n \ + ") + + file(WRITE ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper/CMakeLists.txt.in ${DLHELPER_FILE_TEXT}) + + configure_file( + ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper/CMakeLists.txt.in + ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper/CMakeLists.txt + ) + + message(STATUS "AutoBuild: Generating build files for the ${EXT_PROJECT_NAME} download helper project.") + message(STATUS " Using working dir: ${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper") + + execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper" OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error while creating download helper project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Building the ${EXT_PROJECT_NAME} download helper project. (This actually performs the download and may take some time...)") + execute_process(COMMAND "${CMAKE_COMMAND}" --build . WORKING_DIRECTORY "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/download-helper" OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error running download helper project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Completed download of external project ${EXT_PROJECT_NAME}.") + +endfunction() + + +# Usage: +# AutoBuild_build_and_install_project( +# # This first argument is the name of the external project to download. It is required: +# VRPN +# # This second argument is the relative path from ${EXTERNAL_DIR_NAME}/projectname/ to the project's +# # main CMakeLists.txt file: +# src +# +# # Additional arguments are passed on as options to the cmake build file generator +# -DVRPN_BUILD_DIRECTSHOW_VIDEO_SERVER=OFF +# -DVRPN_BUILD_HID_GUI=OFF +# etc.. +# ) +function(AutoBuild_build_and_install_project EXT_PROJECT_NAME RELPATH_TO_CMAKELISTS) + + big_message("AUTOBUILD: BEGIN EXTERNAL PROJECT BUILD AND INSTALL (${EXT_PROJECT_NAME}).") + + # any extra args to the function are interpreted as arguments for the cmake config process + set(CMAKE_CONFIG_OPTIONS ${ARGN}) + + # always set the install prefix to be the same as for the main project + list(APPEND CMAKE_CONFIG_OPTIONS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}) + + set(SRC_DIR "${AUTOBUILD_DOWNLOAD_DIR}/${EXT_PROJECT_NAME}/src/${RELPATH_TO_CMAKELISTS}") + set(BUILD_DIR "${CMAKE_BINARY_DIR}/external/${EXT_PROJECT_NAME}") + + file(MAKE_DIRECTORY ${BUILD_DIR}) + + message(STATUS "AutoBuild: Generating build files for external project ${EXT_PROJECT_NAME}.") + message(STATUS " Using source dir: ${SRC_DIR}") + message(STATUS " Using build dir: ${BUILD_DIR}") + message(STATUS " Config options: ${CMAKE_CONFIG_OPTIONS}") + + execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" ${SRC_DIR} ${CMAKE_CONFIG_OPTIONS} WORKING_DIRECTORY ${BUILD_DIR} OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error generating build files for external project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Building external project ${EXT_PROJECT_NAME} (Configuration = Debug). (This may take some time...)") + execute_process(COMMAND "${CMAKE_COMMAND}" --build ${BUILD_DIR} --config Debug --target install OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error building Debug configuration for external project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Building external project ${EXT_PROJECT_NAME} (Configuration = Release). (This may take some time...)") + execute_process(COMMAND "${CMAKE_COMMAND}" --build ${BUILD_DIR} --config Release --target install OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr RESULT_VARIABLE exitcode) + if(NOT "${exitcode}" STREQUAL "0") + message(FATAL_ERROR "AutoBuild: Error building Release configuration for external project: ${stdout} ${stderr}") + endif() + + message(STATUS "AutoBuild: Completed external build of ${EXT_PROJECT_NAME}.\n\n") + +endfunction() + + +macro(big_message TITLE) + string(TOUPPER ${TITLE} TITLE) + message(STATUS "\n\n==== ${TITLE} ====") +endmacro() + + + diff --git a/dev/MinGfx/example/cmake/AutoBuildOpenGL.cmake b/dev/MinGfx/example/cmake/AutoBuildOpenGL.cmake new file mode 100644 index 0000000..c74b2b8 --- /dev/null +++ b/dev/MinGfx/example/cmake/AutoBuildOpenGL.cmake @@ -0,0 +1,47 @@ +# Author: Daniel F. Keefe +# Copyright 2017,2018, Daniel F. Keefe and Regents of the University of Minnesota +# All Rights Reserved. + + +# Usage: +# AutoBuild_use_package_OpenGL( +# # The 1st argument is required. It is the name of the target you wish to link this dependency to. +# my-program +# +# # The 2nd argument is required. It impacts how dependencies are propogated through CMake. You can treat +# # this dependency as an INTERFACE, PUBLIC, or PRIVATE. See the following URL for details: +# # https://cmake.org/cmake/help/latest/command/target_include_directories.html +# PUBLIC +# ) +# +macro(AutoBuild_use_package_OpenGL YOUR_TARGET INTERFACE_PUBLIC_OR_PRIVATE) + + message(STATUS "AutoBuild: Searching for package OpenGL...") + + # Check to see if the library is already installed on the system + # CMake ships with FindOpenGL.cmake and in CMake 3.9+ it defines + # the imported targets OpenGL::GL and OpenGL::GLU. Using these is + # now the preferred way to link with OpenGL and all of its dependencies. + # See https://cmake.org/cmake/help/v3.9/module/FindOpenGL.html + find_package(OpenGL) + + if (NOT ${OPENGL_FOUND}) + message(FATAL_ERROR "AutoBuild: OpenGL was not found on the system. AutoBuild can auto-download + and build many dependencies for you, but not OpenGL. It should come pre-installed on your system.") + endif() + + message(STATUS "AutoBuild: Ok. Found OpenGL.") + message(STATUS " OpenGL headers: ${OPENGL_INCLUDE_DIR}") + message(STATUS " OpenGL libs: ${OPENGL_LIBRARIES}") + + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency OpenGL::GL.") + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} OpenGL::GL) + + if (${OPENGL_GLU_FOUND}) + message(STATUS "Linking target ${YOUR_TARGET} with ${INTERFACE_PUBLIC_OR_PRIVATE} dependency OpenGL::GLU.") + target_link_libraries(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} OpenGL::GLU) + endif() + + target_compile_definitions(${YOUR_TARGET} ${INTERFACE_PUBLIC_OR_PRIVATE} -DUSE_OPENGL) + +endmacro() diff --git a/dev/MinGfx/example/cmake/MessageMacros.cmake b/dev/MinGfx/example/cmake/MessageMacros.cmake new file mode 100644 index 0000000..4628e5c --- /dev/null +++ b/dev/MinGfx/example/cmake/MessageMacros.cmake @@ -0,0 +1,17 @@ +# This file is part of the MinVR cmake build system. +# See the main MinVR/CMakeLists.txt file for authors, copyright, and license info. + + +macro(h1 TITLE) + string(TOUPPER ${TITLE} TITLE) + message(STATUS "\n\n==== ${TITLE} ====") +endmacro() + +macro(h2 TITLE) + message(STATUS "\n* ${TITLE}") +endmacro() + +macro(h3 TITLE) + message(STATUS "- ${TITLE}") +endmacro() + diff --git a/dev/MinGfx/example/main-circleviewer.cpp b/dev/MinGfx/example/main-circleviewer.cpp new file mode 100644 index 0000000..50e0d33 --- /dev/null +++ b/dev/MinGfx/example/main-circleviewer.cpp @@ -0,0 +1,12 @@ + +#include "CircleViewer.h" + + +int main(int argc, char **argv) { + + CircleViewer app; + app.Run(); + + return 0; +} + diff --git a/dev/MinGfx/src/.gitignore b/dev/MinGfx/src/.gitignore new file mode 100644 index 0000000..4d353dd --- /dev/null +++ b/dev/MinGfx/src/.gitignore @@ -0,0 +1,2 @@ +mingfx_config.h + diff --git a/dev/MinGfx/src/CMakeLists.txt b/dev/MinGfx/src/CMakeLists.txt new file mode 100644 index 0000000..ff8225b --- /dev/null +++ b/dev/MinGfx/src/CMakeLists.txt @@ -0,0 +1,107 @@ +# This file is part of the MinGfx cmake build system. +# See the main MinGfx/CMakeLists.txt file for details. + + +set(HEADERFILES + src/aabb.h + src/bvh.h + src/color.h + src/craft_cam.h + src/default_shader.h + src/gfxmath.h + src/graphics_app.h + src/matrix4.h + src/mesh.h + src/mingfx.h + src/mingfx_config.h + src/opengl_headers.h + src/platform.h + src/point2.h + src/point3.h + src/quaternion.h + src/quick_shapes.h + src/ray.h + src/shader_program.h + src/text_shader.h + src/texture2d.h + src/unicam.h + src/vector2.h + src/vector3.h +) + +set(SOURCEFILES + src/aabb.cc + src/bvh.cc + src/color.cc + src/craft_cam.cc + src/default_shader.cc + src/gfxmath.cc + src/graphics_app.cc + src/matrix4.cc + src/mesh.cc + src/platform.cc + src/point2.cc + src/point3.cc + src/quaternion.cc + src/quick_shapes.cc + src/ray.cc + src/shader_program.cc + src/text_shader.cc + src/texture2d.cc + src/unicam.cc + src/vector2.cc + src/vector3.cc +) + +set(EXTRAFILES + src/mingfx_config.h.in +) + +set(SHADERFILES + src/shaders/default.frag + src/shaders/default.vert + src/shaders/fullscreen.frag + src/shaders/fullscreen.vert + src/shaders/text.frag + src/shaders/text.vert +) + +set_source_files_properties(${EXTRAFILES} PROPERTIES HEADER_FILE_ONLY TRUE) +set_source_files_properties(${SHADERFILES} PROPERTIES HEADER_FILE_ONLY TRUE) + +source_group("Header Files" FILES ${HEADERFILES}) +source_group("Source Files" FILES ${SOURCEFILES}) +source_group("Shaders" FILES ${SHADERFILES}) + +#add_library(MinGfx SHARED ${HEADERFILES} ${SOURCEFILES} ${EXTRAFILES} ${SHADERFILES}) + +add_library(MinGfx ${HEADERFILES} ${SOURCEFILES} ${EXTRAFILES} ${SHADERFILES}) + + +# Using target_include_directories() rather than just include_directories() is +# critical in order to support generating a MinGfxConfig.cmake file. It supports +# generator expressions, so we can point to two different include dirs depending +# on whether building or using the installed version. +target_include_directories(MinGfx PUBLIC + $ # for headers when building + $ # for client in install mode +) + +# Add external dependency on NanoGUI +include(AutoBuildNanoGUI) +AutoBuild_use_package_NanoGUI(MinGfx PUBLIC) + +# Add external dependency on OpenGL +include(AutoBuildOpenGL) +AutoBuild_use_package_OpenGL(MinGfx PUBLIC) + + +install(TARGETS MinGfx EXPORT MinGfxTargets COMPONENT CoreLib + LIBRARY DESTINATION "${INSTALL_LIB_DEST}" + ARCHIVE DESTINATION "${INSTALL_LIB_DEST}" + RUNTIME DESTINATION "${INSTALL_BIN_DEST}" +) + +install(FILES ${HEADERFILES} DESTINATION "${INSTALL_INCLUDE_DEST}" COMPONENT CoreLib) +install(FILES ${SHADERFILES} DESTINATION "${INSTALL_SHADERS_DEST}" COMPONENT CoreLib) + diff --git a/dev/MinGfx/src/aabb.cc b/dev/MinGfx/src/aabb.cc new file mode 100644 index 0000000..1d94900 --- /dev/null +++ b/dev/MinGfx/src/aabb.cc @@ -0,0 +1,150 @@ +#include "aabb.h" + +#include "mesh.h" + +#include + +namespace mingfx { + +AABB::AABB() { + min_[0] = min_[1] = min_[2] = std::numeric_limits::max(); + max_[0] = max_[1] = max_[2] = -std::numeric_limits::max(); + user_data_ = 0; +} + + +AABB::AABB(const Point3 &a) { + min_ = a; + max_ = a; + user_data_ = 0; +} + +AABB::AABB(const Vector3 &v) { + min_ = Point3(-0.5f*v[0], -0.5f*v[1], -0.5f*v[2]); + max_ = Point3( 0.5f*v[0], 0.5f*v[1], 0.5f*v[2]); + user_data_ = 0; +} + +AABB::AABB(const Point3 &p, const Vector3 &v) { + min_ = Point3(p[0] - 0.5f*v[0], p[1] - 0.5f*v[1], p[2] - 0.5f*v[2]); + max_ = Point3(p[0] + 0.5f*v[0], p[1] + 0.5f*v[1], p[2] + 0.5f*v[2]); + user_data_ = 0; +} + +AABB::AABB(const Point3 &a, const Point3 &b, const Point3 &c) { + min_ = a; + min_[0] = std::min(min_[0], b[0]); + min_[1] = std::min(min_[1], b[1]); + min_[2] = std::min(min_[2], b[2]); + min_[0] = std::min(min_[0], c[0]); + min_[1] = std::min(min_[1], c[1]); + min_[2] = std::min(min_[2], c[2]); + + max_ = a; + max_[0] = std::max(max_[0], b[0]); + max_[1] = std::max(max_[1], b[1]); + max_[2] = std::max(max_[2], b[2]); + max_[0] = std::max(max_[0], c[0]); + max_[1] = std::max(max_[1], c[1]); + max_[2] = std::max(max_[2], c[2]); + user_data_ = 0; +} + + +AABB::AABB(const Mesh &mesh, unsigned int tri_id) { + std::vector indices = mesh.read_triangle_indices_data(tri_id); + Point3 a = mesh.read_vertex_data(indices[0]); + Point3 b = mesh.read_vertex_data(indices[1]); + Point3 c = mesh.read_vertex_data(indices[2]); + + min_ = a; + min_[0] = std::min(min_[0], b[0]); + min_[1] = std::min(min_[1], b[1]); + min_[2] = std::min(min_[2], b[2]); + min_[0] = std::min(min_[0], c[0]); + min_[1] = std::min(min_[1], c[1]); + min_[2] = std::min(min_[2], c[2]); + + max_ = a; + max_[0] = std::max(max_[0], b[0]); + max_[1] = std::max(max_[1], b[1]); + max_[2] = std::max(max_[2], b[2]); + max_[0] = std::max(max_[0], c[0]); + max_[1] = std::max(max_[1], c[1]); + max_[2] = std::max(max_[2], c[2]); + + user_data_ = 0; +} + + +AABB::AABB(const Mesh &mesh) { + min_[0] = min_[1] = min_[2] = std::numeric_limits::max(); + max_[0] = max_[1] = max_[2] = -std::numeric_limits::max(); + + for (int i=0; i < mesh.num_vertices(); i++) { + Point3 a = mesh.read_vertex_data(i); + min_[0] = std::min(min_[0], a[0]); + min_[1] = std::min(min_[1], a[1]); + min_[2] = std::min(min_[2], a[2]); + + max_[0] = std::max(max_[0], a[0]); + max_[1] = std::max(max_[1], a[1]); + max_[2] = std::max(max_[2], a[2]); + } + + user_data_ = 0; +} + + +AABB::~AABB() {} + +Vector3 AABB::Dimensions() const { + return max_ - min_; +} + +float AABB::Volume() const { + if (max_[0] < min_[0]) { + // empty box + return -1.0; + } + + Vector3 dims = max_ - min_; + return (dims[0] * dims[1] * dims[2]); +} + + +Point3 AABB::min() const { + return min_; +} + +Point3 AABB::max() const { + return max_; +} + + +void AABB::set_user_data(int data) { + user_data_ = data; +} + +int AABB::user_data() { + return user_data_; +} + + +// Compute an AABB that contains both A and B completely +AABB operator+(const AABB &A, const AABB &B) { + AABB C; + + C.min_[0] = std::min(A.min_[0], B.min_[0]); + C.min_[1] = std::min(A.min_[1], B.min_[1]); + C.min_[2] = std::min(A.min_[2], B.min_[2]); + + C.max_[0] = std::max(A.max_[0], B.max_[0]); + C.max_[1] = std::max(A.max_[1], B.max_[1]); + C.max_[2] = std::max(A.max_[2], B.max_[2]); + + return C; +} + + +} // end namespace diff --git a/dev/MinGfx/src/aabb.h b/dev/MinGfx/src/aabb.h new file mode 100644 index 0000000..0c94140 --- /dev/null +++ b/dev/MinGfx/src/aabb.h @@ -0,0 +1,96 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + David Schroeder, 2010-ish, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + Dan Keefe, 2018, University of Minnesota + ... + */ + +#ifndef SRC_AABB_H_ +#define SRC_AABB_H_ + +#include "point3.h" +#include "vector3.h" + +namespace mingfx { + +// forward declaration +class Mesh; + +/** A 3D axis-aligned bounding box defined by two corners (min and max). AABBs + can be added together using the + operator to make them grow to cover the + extents of both boxes. Each box can also store a user_id (int), which can be + used to associate the box with some other object in your program. + */ +class AABB { +public: + /// Creates an empty box. + AABB(); + + /// Box that contains a single point + AABB(const Point3 &a); + + /// Box that contains a triangle defined by 3 points + AABB(const Point3 &a, const Point3 &b, const Point3 &c); + + /// Box centered at the origin with width, height, and depth specified by + /// the vector. + AABB(const Vector3 &extents); + + /// Box centered at the center with width, height, and depth specified by + /// the vector. + AABB(const Point3 ¢er, const Vector3 &extents); + + /// Box that contains a whole mesh + AABB(const Mesh &mesh); + + /// Box that contains just triangle number "tri_id" from the specified mesh. + AABB(const Mesh &mesh, unsigned int tri_id); + + virtual ~AABB(); + + /// Returns the dimensions of the box in x, y, and z as a 3D vector. + Vector3 Dimensions() const; + + /// Returns the volume of the box or -1.0 when empty and 0.0 if the box + /// contains just a single point. + float Volume() const; + + /// Returns the coordinates for the minimum corner of the box. + Point3 min() const; + + /// Returns the coordinates for the maximum corner of the box. + Point3 max() const; + + /// You can set this to whatever you want in order to use it as a handle + /// into your own program. The intent is to make it possible for you to + /// associate this AABB with the id of some object in your application. + void set_user_data(int data); + + /// You can set this to whatever you want in order to use it as a handle + /// into your own program. The intent is to make it possible for you to + /// associate this AABB with the id of some object in your application. + int user_data(); + +private: + + Point3 min_, max_; + + int user_data_; + + friend AABB operator+(const AABB &A, const AABB &B); +}; + +// Returns an AABB that contains both A and B completely (kind of like a union) +AABB operator+(const AABB &A, const AABB &B); + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/bvh.cc b/dev/MinGfx/src/bvh.cc new file mode 100644 index 0000000..ff8dbbc --- /dev/null +++ b/dev/MinGfx/src/bvh.cc @@ -0,0 +1,120 @@ +#include "bvh.h" + +#include "mesh.h" +#include "ray.h" + +#include +#include + +namespace mingfx { + + +BVH::BVH() : root_(NULL) { +} + +BVH::~BVH() { + FreeNodeRecursive(root_); +} + +void BVH::CreateFromMesh(const Mesh &mesh) { + FreeNodeRecursive(root_); + + std::vector tri_boxes; + for (int i=0; i &boxes) { + FreeNodeRecursive(root_); + + root_ = new Node(); + BuildHierarchyRecursive(root_, boxes); +} + + +void BVH::FreeNodeRecursive(Node* node) { + if (node == NULL) return; + FreeNodeRecursive(node->child1); + FreeNodeRecursive(node->child2); + delete node; +} + +bool sort_by_x(const AABB &lhs, const AABB &rhs) { + return (lhs.min()[0] + lhs.max()[0]) < (rhs.min()[0] + rhs.max()[0]); +} + +bool sort_by_y(const AABB &lhs, const AABB &rhs) { + return (lhs.min()[1] + lhs.max()[1]) < (rhs.min()[1] + rhs.max()[1]); +} + +bool sort_by_z(const AABB &lhs, const AABB &rhs) { + return (lhs.min()[2] + lhs.max()[2]) < (rhs.min()[2] + rhs.max()[2]); +} + +void BVH::BuildHierarchyRecursive(Node *node, std::vector tri_boxes) { + // got down to a leaf, a single box + if (tri_boxes.size() == 1) { + node->box = tri_boxes[0]; + return; + } + + // calc the full bounding box for this node + for (int i=0; ibox = node->box + tri_boxes[i]; + } + + // sort boxes along the longest axis + Vector3 dims = node->box.Dimensions(); + dims[0] = fabsf(dims[0]); + dims[1] = fabsf(dims[1]); + dims[2] = fabsf(dims[2]); + + if ((dims[0] > dims[1]) && (dims[0] > dims[2])) { + std::sort(tri_boxes.begin(), tri_boxes.end(), sort_by_x); + } + else if ((dims[1] > dims[0]) && (dims[1] > dims[2])) { + std::sort(tri_boxes.begin(), tri_boxes.end(), sort_by_y); + } + else { + std::sort(tri_boxes.begin(), tri_boxes.end(), sort_by_z); + } + + // assign half to child1 and half to child2 + std::size_t const half_size = tri_boxes.size() / 2; + std::vector left_boxes(tri_boxes.begin(), tri_boxes.begin() + half_size); + std::vector right_boxes(tri_boxes.begin() + half_size, tri_boxes.end()); + + node->child1 = new Node(); + BuildHierarchyRecursive(node->child1, left_boxes); + node->child2 = new Node(); + BuildHierarchyRecursive(node->child2, right_boxes); +} + +std::vector BVH::IntersectAndReturnUserData(const Ray &r) const { + std::vector data_list; + IntersectRecursive(r, root_, &data_list); + return data_list; +} + +void BVH::IntersectRecursive(const Ray &r, Node *node, std::vector *data_list) const { + float t; + if (r.IntersectAABB(node->box, &t)) { + if ((node->child1 == NULL) && (node->child2 == NULL)) { + // reached a leaf node, add the object's user data to the list + data_list->push_back(node->box.user_data()); + } + else { + // go deeper and check children + IntersectRecursive(r, node->child1, data_list); + IntersectRecursive(r, node->child2, data_list); + } + } +} + +} // end namespace diff --git a/dev/MinGfx/src/bvh.h b/dev/MinGfx/src/bvh.h new file mode 100644 index 0000000..46b15ce --- /dev/null +++ b/dev/MinGfx/src/bvh.h @@ -0,0 +1,106 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + David Schroeder, 2010-ish, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + Dan Keefe, 2018, University of Minnesota + ... + */ + +#ifndef SRC_BVH_H_ +#define SRC_BVH_H_ + +#include "aabb.h" +#include "point3.h" + + +namespace mingfx { + +// forward declarations +class Mesh; +class Ray; + + +/** A Bounding Volume Hierarchy (BVH) data structure that can be used to + accelerate ray-object intersection tests by carving up space into a hierarchy + of partitions represented in a tree. Each node of the tree is represented + as an AABB (Axis-Aligned Bounding Box) that contains all of the nodes under it. + Different objects can be stored inside each bounding box. For example, when + a BVH is created for a mesh, each leaf node can contain a AABB that contains + just a single triangle. Or, when a BVH is created for an entire scene, you + could have each leaf node contain an entire mesh or other object within the + scene. In each case, use AABB's set_user_data() and user_data() methods to + store a handle for whetever you want to store inside the nodes. + */ +class BVH { +public: + /// Initializes the class with an empty hierarchy. + BVH(); + + virtual ~BVH(); + + /** Creates a bounding volume hierarchy where each leaf node contains a single + triangle from the mesh. For leaf nodes, the triangle index can be retrieved + with: + ~~~ + int tri_id = leafnode->box.user_data(); + ~~~ + The user_data will be -1 for non-leaf nodes. Once the structure has been + created, it can be used to perform fast ray-mesh intersection tests. See + Ray::FastIntersectMesh(). + */ + void CreateFromMesh(const Mesh &mesh); + + + /** Creates a BVH where each leaf node contains one of the boxes passed in + to the function. + */ + void CreateFromListOfBoxes(const std::vector &boxes); + + + /** Traverse the BVH to find leaf nodes whose AABBs are intersected by the + ray. These are candidates to test more thoroughly using whatever ray-object + intersection test is appropriate for the objects stored inside the AABB. + This routine returns the user_data for each AABB leaf node. In the case of + a BVH created using CreateFromMesh, this means it stores the indices to + the mesh triangles that should be tested for ray-triangle intersection. + */ + std::vector IntersectAndReturnUserData(const Ray &r) const; + + +private: + + // Simple internal data structure for storing each node of the BVH tree. + class Node { + public: + Node() : child1(NULL), child2(NULL) {} + + // Links to children + Node *child1; + Node *child2; + + // Contains all geometry below this node. + AABB box; + }; + + + // for now, the copy constructor is private so no copies are allowed. + // eventually, this would be good to implement and then it can be made public. + BVH(const BVH &other); + + void BuildHierarchyRecursive(Node *node, std::vector boxes); + void IntersectRecursive(const Ray &r, Node *node, std::vector *data_list) const; + void FreeNodeRecursive(Node* node); + + Node* root_; +}; + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/color.cc b/dev/MinGfx/src/color.cc new file mode 100644 index 0000000..cc5db87 --- /dev/null +++ b/dev/MinGfx/src/color.cc @@ -0,0 +1,130 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "color.h" + +#include + +namespace mingfx { + +Color::Color() { + c[0] = 0.0; + c[1] = 0.0; + c[2] = 0.0; + c[3] = 1.0; +} + +Color::Color(float red, float green, float blue, float alpha) { + c[0] = red; + c[1] = green; + c[2] = blue; + c[3] = alpha; +} + +Color::Color(float *ptr) { + c[0] = ptr[0]; + c[1] = ptr[1]; + c[2] = ptr[2]; + c[3] = ptr[3]; +} + +Color::Color(const Color& other) { + c[0] = other[0]; + c[1] = other[1]; + c[2] = other[2]; + c[3] = other[3]; +} + +Color::Color(const std::vector &vals) { + c[0] = vals[0]; + c[1] = vals[1]; + c[2] = vals[2]; + if (vals.size() > 3) { + c[3] = vals[3]; + } + else { + c[3] = 1.0; + } +} + + +Color::~Color() { +} + +bool Color::operator==(const Color& other) const { + return ((other[0] == c[0]) && + (other[1] == c[1]) && + (other[2] == c[2]) && + (other[3] == c[3])); +} + +bool Color::operator!=(const Color& other) const { + return ((other[0] != c[0]) || + (other[1] != c[1]) || + (other[2] != c[2]) || + (other[3] != c[3])); +} + +Color& Color::operator=(const Color& other) { + c[0] = other[0]; + c[1] = other[1]; + c[2] = other[2]; + c[3] = other[3]; + return *this; +} + +float Color::operator[](const int i) const { + return c[i]; +} + +float& Color::operator[](const int i) { + return c[i]; +} + + +const float * Color::value_ptr() const { + return c; +} + +std::vector Color::ToVector() const { + std::vector v; + v.push_back(c[0]); + v.push_back(c[1]); + v.push_back(c[2]); + v.push_back(c[3]); + return v; +} + + +Color Color::Lerp(const Color &b, float alpha) const { + float red = (1.0f-alpha)*(*this)[0] + alpha*b[0]; + float grn = (1.0f-alpha)*(*this)[1] + alpha*b[1]; + float blu = (1.0f-alpha)*(*this)[2] + alpha*b[2]; + float alp = (1.0f-alpha)*(*this)[3] + alpha*b[3]; + return Color(red,grn,blu,alp); +} + +Color Color::Lerp(const Color &a, const Color &b, float alpha) { + float red = (1.0f-alpha)*a[0] + alpha*b[0]; + float grn = (1.0f-alpha)*a[1] + alpha*b[1]; + float blu = (1.0f-alpha)*a[2] + alpha*b[2]; + float alp = (1.0f-alpha)*a[3] + alpha*b[3]; + return Color(red,grn,blu,alp); +} + + +std::ostream & operator<< ( std::ostream &os, const Color &c) { + return os << "(" << c[0] << ", " << c[1] << ", " << c[2] << ", " << c[3] << ")"; +} + +std::istream & operator>> ( std::istream &is, Color &c) { + // format: (r, g, b, a) + char dummy; + return is >> dummy >> c[0] >> dummy >> c[1] >> dummy >> c[2] >> dummy >> c[3] >> dummy; +} + + +} // end namespace diff --git a/dev/MinGfx/src/color.h b/dev/MinGfx/src/color.h new file mode 100644 index 0000000..553dc84 --- /dev/null +++ b/dev/MinGfx/src/color.h @@ -0,0 +1,103 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_COLOR_H_ +#define SRC_COLOR_H_ + +#include +#include + +namespace mingfx { + + +/** Represents a 4-component (R,G,B,A) color, stored internally in a float array + to be compatable with OpenGL. Example usage: + ~~~ + Color black(0, 0, 0); + Color white(1, 1, 1); + Color gray(0.5, 0.5, 0.5); + Color tranparent_red(1.0, 0.0, 0.0, 0.5); + Color orange(1.0, 0.65, 0.0); + + float red_component_of_orange = orange[0]; + float green_component_of_orange = orange[1]; + float blue_component_of_orange = orange[2]; + float alpha_component_of_orange = orange[3]; + + // Use value_ptr() to send the array of floats directly to OpenGL commands + glColor4fv(orange.value_ptr()); + ~~~ + */ +class Color { +public: + /// Defaults to black + Color(); + + /// Constructs a color. Alpha defaults to 1.0 (completely opaque) + Color(float red, float green, float blue, float alpha=1.0); + + /// Constructs a point given a pointer to float array + Color(float *p); + + /// Constructs a point given a 3 or 4-element vector of floats + Color(const std::vector &vals); + + /// Copy constructor + Color(const Color& p); + + /// Color destructor + virtual ~Color(); + + /// Check for equality + bool operator==(const Color& p) const; + + /// Check for inequality + bool operator!=(const Color& p) const; + + /// Assignment operator + Color& operator=(const Color& p); + + /// Accesses the ith component of the color, stored in RGBA order. + float operator[](const int i) const; + + /// Accesses the ith coordinate of the color, stored in RGBA order. + float& operator[](const int i); + + /// Returns a const pointer to the raw data array + const float * value_ptr() const; + + std::vector ToVector() const; + + /// Linear interpolation between this color and another. Alpha=0.0 returns + /// this color, and alpha=1.0 returns the other color, other values blend + /// between the two via a linear interpolation on each color channel. + Color Lerp(const Color &b, float alpha) const; + + /// Linear interpolation between two colors. Alpha=0.0 returns 'a' and + /// alpha=1.0 returns 'b', other values blend between the two via a linear + /// interpolation on each color channel. + static Color Lerp(const Color &a, const Color &b, float alpha); + + +private: + float c[4]; +}; + + +std::ostream & operator<< ( std::ostream &os, const Color &c); +std::istream & operator>> ( std::istream &is, Color &c); + + +} // namespace + +#endif diff --git a/dev/MinGfx/src/craft_cam.cc b/dev/MinGfx/src/craft_cam.cc new file mode 100644 index 0000000..425f524 --- /dev/null +++ b/dev/MinGfx/src/craft_cam.cc @@ -0,0 +1,127 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "craft_cam.h" + +namespace mingfx { + + +CraftCam::CraftCam() : t_scale_(1.0), r_scale_(1.0), l_scale_(1.0), yaw_(0.0), pitch_(0.0) { +} + +CraftCam::CraftCam(const Matrix4 &initialViewMatrix) : + t_scale_(1.0), r_scale_(1.0), l_scale_(1.0), yaw_(0.0), pitch_(0.0) +{ +} + +CraftCam::~CraftCam() +{ +} + + +void CraftCam::UpdateSimulation(double dt, GLFWwindow *window_ptr) { + if ((glfwGetKey(window_ptr, GLFW_KEY_UP) == GLFW_PRESS) || + (glfwGetKey(window_ptr, GLFW_KEY_W) == GLFW_PRESS)) { + WalkForward(dt); + } + if ((glfwGetKey(window_ptr, GLFW_KEY_DOWN) == GLFW_PRESS) || + (glfwGetKey(window_ptr, GLFW_KEY_Z) == GLFW_PRESS)) { + WalkBackward(dt); + } + if ((glfwGetKey(window_ptr, GLFW_KEY_LEFT) == GLFW_PRESS) || + (glfwGetKey(window_ptr, GLFW_KEY_A) == GLFW_PRESS)) { + RotateLeft(dt); + } + if ((glfwGetKey(window_ptr, GLFW_KEY_RIGHT) == GLFW_PRESS) || + (glfwGetKey(window_ptr, GLFW_KEY_S) == GLFW_PRESS)) { + RotateRight(dt); + } +} + + +void CraftCam::OnMouseMove(const Vector2 &normalized_mouse_delta) { + LookWithMouse(normalized_mouse_delta); +} + + + +void CraftCam::WalkForward(double dt) { + base_head_ = Matrix4::Translation(3.0f * (float)dt * t_scale_ * Vector3(0,0,1)) * base_head_; +} + +void CraftCam::WalkBackward(double dt) { + base_head_ = Matrix4::Translation(3.0f * (float)dt * t_scale_ * Vector3(0,0,-1)) * base_head_; +} + +void CraftCam::RotateLeft(double dt) { + base_head_ = Matrix4::RotationY(-0.75f * (float)dt * r_scale_) * base_head_; +} + +void CraftCam::RotateRight(double dt) { + base_head_ = Matrix4::RotationY(0.75f * (float)dt * r_scale_) * base_head_; +} + +void CraftCam::LookWithMouse(const Vector2 &mouse_delta) { + yaw_ += l_scale_ * mouse_delta[0]; + pitch_ += l_scale_ * mouse_delta[1]; + added_rot_ = Matrix4::RotationX(-pitch_) * Matrix4::RotationY(yaw_); +} + + +Matrix4 CraftCam::view_matrix() { + return added_rot_ * base_head_; +} + +void CraftCam::set_view_matrix(Matrix4 view_matrix) { + base_head_ = view_matrix; + added_rot_ = Matrix4(); +} + +Point3 CraftCam::eye() { + Matrix4 camMat = view_matrix().Inverse(); + return camMat.ColumnToPoint3(3); +} + +Vector3 CraftCam::look() { + Matrix4 camMat = view_matrix().Inverse(); + return -camMat.ColumnToVector3(2); +} + + +void CraftCam::set_translation_scale(float s) { + t_scale_ = s; +} + +void CraftCam::set_rotation_scale(float s) { + r_scale_ = s; +} + +void CraftCam::set_look_scale(float s) { + l_scale_ = s; +} + + +float CraftCam::translation_scale() { + return t_scale_; +} + +float CraftCam::rotation_scale() { + return r_scale_; +} + +float CraftCam::look_scale() { + return l_scale_; +} + +void CraftCam::UpdateHeight(float new_y_value) { + Vector3 offset = Vector3(0, new_y_value - eye()[1], 0); + base_head_ = Matrix4::Translation(-offset) * base_head_; +} + + + +} // end namespace + diff --git a/dev/MinGfx/src/craft_cam.h b/dev/MinGfx/src/craft_cam.h new file mode 100644 index 0000000..bdfcd7e --- /dev/null +++ b/dev/MinGfx/src/craft_cam.h @@ -0,0 +1,219 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_CRAFT_CAM_H_ +#define SRC_CRAFT_CAM_H_ + +#include "point2.h" +#include "matrix4.h" +#include "vector2.h" + + +namespace mingfx { + + +/** This implements a user interface for controlling the camera with the mouse. + This interface is appropriate for "first person" camera control, as in games + like Minecraft. + + Use the arrow keys or A,S,W,Z keys to move around in the virtual world. + UP/DOWN and W/Z move forward and back. LEFT/RIGHT or A/S rotate your body + to face left or right. You can rotate and tilt your head to look + left/right/up/down by moving the mouse. In Minecraft, that movement happens + whenever you move the mouse, regardless of whether you are holding down a + mouse button, but in some games you want to hold the camera still while you + use the mouse to draw on the screen or do something else. It's possible to + use this interface both ways by calling the MouseMove() function either every + time the mouse moves, or only when the mouse is in a dragging mode. + + Example usage: + ~~~ + // Create a global or member variable in your MyGraphicsApp class: + CraftCam cam_; + + + // If you want to always rotate the view with the mouse, use this: + void MyGraphicsApp::OnMouseMove(const Point2 &pos, const Vector2 &delta) { + Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos); + cam_.OnMouseMove(delta_ndc); + } + + // Alternatively, if you want to only rotate the view when the mouse button is + // held down, use this instead. Call cam_.OnMouseMove() in either one function + // or the other, but not both! + // void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) { + // Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos); + // cam_.OnMouseMove(delta_ndc); + // } + + // This tells the camera to simulate walking based on the keyboard keys currently + // pressed. You need to pass a pointer to the underlying GLFW window created by + // GraphicsApp. + void MyGraphicsApp::UpdateSimulation(double dt) { + cam_.UpdateSimulation(dt, window()); + } + + void MyGraphicsApp::InitOpenGL() { + cam_.set_view_matrix(Matrix4::lookAt(Point3(0,2,2), Point3(0,2,0), Vector3(0,1,0));); + } + + void MyGraphicsApp::DrawOpenGL() { + // draw your scene using the view matrix from the camera + Matrix4 proj_matrix = Matrix4::perspective(60, aspect_ratio(), 1, 200); + Matrix4 view_matrix = cam_.view_matrix(); + Matrix4 model_matrix = Matrix4::RotateY(to_radians(45.0)); + quick_shapes.DrawCube(model_matrix, view_matirx, proj_matrix, Color(1,1,1)); + } + ~~~ + */ +class CraftCam { +public: + + /// Creates a CraftCam object with an initial view matrix = identity. + CraftCam(); + + /// Creates a CraftCam object with the supplied initial view matrix. + CraftCam(const Matrix4 &initial_view_matrix); + + virtual ~CraftCam(); + + + // To make the interaction work, the following set of functions need to be + // called from your GraphicsApp or whatever main application class you use + // to receive user input events and a draw callback. + + /// Call this from your app's UpdateSimulation() method. This tells the + /// camera to simulate walking based on the keyboard keys currently pressed. + /// You need to pass a pointer to the underlying GLFW window created by + /// GraphicsApp. Example: + /// ~~~ + /// void MyGraphicsApp::UpdateSimulation(double dt) { + /// cam_.UpdateSimulation(dt, window()); + /// } + /// ~~~ + void UpdateSimulation(double dt, GLFWwindow *window_ptr); + + + /// Call this from your app's OnMouseMove() or On*MouseDrag() method. Use + /// OnMouseMove() if you want to always rotate the view with the mouse. + /// Remember to convert the mouse coordinates (usually reported by window + /// managers in pixels) into normalized device coordinates: + /// ~~~ + /// void MyGraphicsApp::OnMouseMove(const Point2 &pos, const Vector2 &delta) { + /// Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos); + /// cam_.OnMouseMove(delta_ndc); + /// } + /// ~~~ + /// Alternatively, if you want to only rotate the view when the mouse button is + /// held down, use On*MouseDrag() instead: + /// ~~~ + /// void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) { + /// Vector2 delta_ndc = PixelsToNormalizedDeviceCoords(pos); + /// cam_.OnMouseMove(delta_ndc); + /// } + /// ~~~ + void OnMouseMove(const Vector2 &normalized_mouse_delta); + + + /// Access the camera view matrix created by the CraftCam interactions via + /// this method and use it to draw the geometry in your scence. + /// For example, within GraphicsApp::DrawUsingOpenGL(), you might have: + /// ~~~ + /// Matrix4 P = Matrix4::Perspective(30, aspect_ratio(), 1, 20); + /// Matrix4 V = cam.view_matrix(); + /// Matrix4 M = Matrix4::RotateY(GfxMath::ToRadians(45.0)); + /// quick_shapes.DrawCube(M, V, P, Color(1,1,1)); + /// ~~~ + Matrix4 view_matrix(); + + + /// Returns the "eye" point (i.e., focal point) of the camera in world + /// space coordinates. + Point3 eye(); + + /// Returns the look direction (i.e., -Z axis of the camera matrix) in world + /// space coordinates. + Vector3 look(); + + + /// Sets the y value of the camera (i.e., the height). If you want to set + /// the entire view matrix, then use set_view_matrix(), but if you just want + /// to update the height, e.g., while walking around a bumpy terrain, then + /// use this. + void UpdateHeight(float new_y_value); + + + // ------------- + + /// This is not required, but you may use this if you wish to set an initial + /// view matrix or reset the view matrix + void set_view_matrix(Matrix4 view_matrix); + + + /// This is the scale factor used to speed up / slow down forward/backward + /// translation when walking for the UP / DOWN keys. It defaults to 1.0, + /// smaller values will make the camera walk slower, larger values will + /// speed it up. + float translation_scale(); + + /// This is the scale factor used to speed up / slow down forward/backward + /// translation when walking for the UP / DOWN keys. It defaults to 1.0, + /// smaller values will make the camera walk slower, larger values will + /// speed it up. + void set_translation_scale(float s); + + /// This is the scale factor used to speed up / slow down left/right + /// rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, + /// smaller values will make the camera turn slower, larger values will + /// speed it up. + float rotation_scale(); + + /// This is the scale factor used to speed up / slow down left/right + /// rotation when walking for the LEFT / RIGHT keys. It defaults to 1.0, + /// smaller values will make the camera turn slower, larger values will + /// speed it up. + void set_rotation_scale(float s); + + /// This is the scale factor used to speed up / slow down looking around + /// when moving the head with the mouse. It defaults to 1.0, smaller values + /// will make the camera turn slower, larger values will speed it up. + float look_scale(); + + /// This is the scale factor used to speed up / slow down looking around + /// when moving the head with the mouse. It defaults to 1.0, smaller values + /// will make the camera turn slower, larger values will speed it up. + void set_look_scale(float s); + +private: + + void WalkForward(double dt); + void WalkBackward(double dt); + void RotateLeft(double dt); + void RotateRight(double dt); + void LookWithMouse(const Vector2 &mouse_delta); + + float t_scale_; + float r_scale_; + float l_scale_; + float yaw_; + float pitch_; + Matrix4 base_head_; + Matrix4 added_rot_; +}; + + +} // end namespace + +#endif + + diff --git a/dev/MinGfx/src/default_shader.cc b/dev/MinGfx/src/default_shader.cc new file mode 100644 index 0000000..63331b8 --- /dev/null +++ b/dev/MinGfx/src/default_shader.cc @@ -0,0 +1,168 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "default_shader.h" + +#include "platform.h" + + +namespace mingfx { + + DefaultShader::DefaultShader(bool addDefaultLight) { + for (int i = 0; i < MAX_LIGHTS; i++) { + lightPositions_[3 * i + 0] = 0.0f; + lightPositions_[3 * i + 1] = 0.0f; + lightPositions_[3 * i + 2] = 0.0f; + + lightIas_[4 * i + 0] = 0.0f; + lightIas_[4 * i + 1] = 0.0f; + lightIas_[4 * i + 2] = 0.0f; + lightIas_[4 * i + 3] = 0.0f; + + lightIds_[4 * i + 0] = 0.0f; + lightIds_[4 * i + 1] = 0.0f; + lightIds_[4 * i + 2] = 0.0f; + lightIds_[4 * i + 3] = 0.0f; + + lightIss_[4 * i + 0] = 0.0f; + lightIss_[4 * i + 1] = 0.0f; + lightIss_[4 * i + 2] = 0.0f; + lightIss_[4 * i + 3] = 0.0f; + } + + if (addDefaultLight) { + AddLight(LightProperties()); + } + } + + DefaultShader::~DefaultShader() { + + } + + void DefaultShader::AddLight(LightProperties light) { + lights_.push_back(light); + update_light_arrays(); + } + + void DefaultShader::SetLight(int i, LightProperties light) { + lights_[i] = light; + update_light_arrays(); + } + + void DefaultShader::update_light_arrays() { + DefaultShader::LightProperties defaultlight; + + for (int i=0; iposition[0]; + lightPositions_[3*i + 1] = light->position[1]; + lightPositions_[3*i + 2] = light->position[2]; + + lightIas_[4*i + 0] = light->ambient_intensity[0]; + lightIas_[4*i + 1] = light->ambient_intensity[1]; + lightIas_[4*i + 2] = light->ambient_intensity[2]; + lightIas_[4*i + 3] = light->ambient_intensity[3]; + + lightIds_[4*i + 0] = light->diffuse_intensity[0]; + lightIds_[4*i + 1] = light->diffuse_intensity[1]; + lightIds_[4*i + 2] = light->diffuse_intensity[2]; + lightIds_[4*i + 3] = light->diffuse_intensity[3]; + + lightIss_[4*i + 0] = light->specular_intensity[0]; + lightIss_[4*i + 1] = light->specular_intensity[1]; + lightIss_[4*i + 2] = light->specular_intensity[2]; + lightIss_[4*i + 3] = light->specular_intensity[3]; + } + } + + + int DefaultShader::num_lights() { + return (int)lights_.size(); + } + + DefaultShader::LightProperties DefaultShader::light(int i) { + return lights_[i]; + } + + + void DefaultShader::Init() { + phongShader_.AddVertexShaderFromFile(Platform::FindMinGfxShaderFile("default.vert")); + phongShader_.AddFragmentShaderFromFile(Platform::FindMinGfxShaderFile("default.frag")); + phongShader_.LinkProgram(); + } + + + + void DefaultShader::Draw(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + Mesh *mesh, const MaterialProperties &material) + { + UseProgram(model, view, projection, material); + + // Draw the mesh using the shader program + mesh->Draw(); + + StopProgram(); + } + + + void DefaultShader::UseProgram(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + const MaterialProperties &material) + { + if (!phongShader_.initialized()) { + Init(); + } + + Matrix4 normalMatrix = (view*model).Inverse().Transpose(); + + for (int i=0; iDraw(). + /// After drawing, it disables the shader. + void Draw(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + Mesh *mesh, const MaterialProperties &material); + + + /// Only needed if you do not want to draw a Mesh. + /// This does all of the same setup for drawing that the Draw() function does + /// and then it returns so that you may draw your own geometry however you want. + /// After doing your draw must call StopProgram() to turn off the shader. + void UseProgram(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + const MaterialProperties &material); + + /// Only needed if you do not want to draw a Mesh. Call this after UseProgram() + /// and after drawing your geometry to turn off the shader. + void StopProgram(); + + + int num_lights(); + + LightProperties light(int i); + + +private: + + std::vector lights_; + + // cached raw float arrays store data to send directly to the gpu + // GLSL requires fixed size arrays for these + float lightPositions_[3*MAX_LIGHTS]; + float lightIas_[4*MAX_LIGHTS]; + float lightIds_[4*MAX_LIGHTS]; + float lightIss_[4*MAX_LIGHTS]; + void update_light_arrays(); + + ShaderProgram phongShader_; +}; + +} // end namespace + +#endif \ No newline at end of file diff --git a/dev/MinGfx/src/gfxmath.cc b/dev/MinGfx/src/gfxmath.cc new file mode 100644 index 0000000..11180e6 --- /dev/null +++ b/dev/MinGfx/src/gfxmath.cc @@ -0,0 +1,82 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "gfxmath.h" + +#define _USE_MATH_DEFINES +#include +#include + +#include "ray.h" + + +namespace mingfx { + +const float GfxMath::PI = 3.14159265359f; +const float GfxMath::TWO_PI = 6.28318530718f; +const float GfxMath::HALF_PI = 1.57079632679f; + + +float GfxMath::Clamp(float x, float a, float b) { + return std::min(std::max(x, a), b); +} + +float GfxMath::ToRadians(float degrees) { + return degrees * GfxMath::PI / 180.0f; +} + +float GfxMath::ToDegrees(float radians) { + return radians * 180.0f / GfxMath::PI; +} + +Vector3 GfxMath::ToRadians(Vector3 degrees) { + return Vector3(ToRadians(degrees[0]), ToRadians(degrees[1]), ToRadians(degrees[2])); +} + +Vector3 GfxMath::ToDegrees(Vector3 radians) { + return Vector3(ToDegrees(radians[0]), ToDegrees(radians[1]), ToDegrees(radians[2])); +} + +float GfxMath::Lerp(float a, float b, float alpha) { + return (1.0f-alpha)*a + alpha*b; +} + +int GfxMath::iLerp(int a, int b, float alpha) { + return (int)std::round((1.0f-alpha)*(float)a + alpha*(float)b); +} + +Point3 GfxMath::ScreenToNearPlane(const Matrix4 &V, const Matrix4 &P, const Point2 &ndcPoint) { + Matrix4 filmPtToWorld = (P*V).Inverse(); + return filmPtToWorld * Point3(ndcPoint[0], ndcPoint[1], -1.0); +} + + +Point3 GfxMath::ScreenToWorld(const Matrix4 &V, const Matrix4 &P, const Point2 &ndcPoint, float zValue) { + Matrix4 filmPtToWorld = (P*V).Inverse(); + float zneg1topos1 = zValue*2.0f - 1.0f; + return filmPtToWorld * Point3(ndcPoint[0], ndcPoint[1], zneg1topos1); +} + + +Point3 GfxMath::ScreenToDepthPlane(const Matrix4 &V, const Matrix4 &P, const Point2 &ndcPoint, float planeDepth) { + Point3 pNear = ScreenToNearPlane(V, P, ndcPoint); + + Matrix4 camMat = V.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + Vector3 look = -camMat.ColumnToVector3(2); + + Ray r(eye, pNear - eye); + + Point3 p3D; + float t; + if (!r.IntersectPlane(eye + planeDepth*look, -look, &t, &p3D)) { + std::cerr << "filmplane2D_to_plane3D() error -- no intersection found!" << std::endl; + } + return p3D; +} + + +} // end namespace diff --git a/dev/MinGfx/src/gfxmath.h b/dev/MinGfx/src/gfxmath.h new file mode 100644 index 0000000..09a3a1d --- /dev/null +++ b/dev/MinGfx/src/gfxmath.h @@ -0,0 +1,81 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_GFXMATH_H_ +#define SRC_GFXMATH_H_ + +#include "point2.h" +#include "point3.h" +#include "vector3.h" +#include "matrix4.h" + +namespace mingfx { + + +/** This class holds a variety of static math functions that are useful to have + defined with creating graphics programs. + */ +class GfxMath { +public: + + /// Returns a if x is less than a and b if x is greater than b. + static float Clamp(float x, float a, float b); + + static float ToRadians(float degrees); + + static float ToDegrees(float radians); + + static Vector3 ToRadians(Vector3 degrees); + + static Vector3 ToDegrees(Vector3 radians); + + static float Lerp(float a, float b, float alpha); + + static int iLerp(int a, int b, float alpha); + + /// Converts a 2D point on the filmplane represented in Normalized Device + /// Coorindates, which means (-1,1) for the top left corner of the screen and + /// (1,-1) for the bottom right corner, to a 3D point that lies on the camera's + /// near plane. Useful for converting mouse coordinates into a 3D point. + /// Remember that this uses NORMALIZED device coordinates for the screenPt, + /// not pixels. GraphicsApp and most other graphics engines report mouse move + /// events in pixels, so you need to convert these to normalized device coordinates + /// first. If you are using GraphicsApp, you can do this with: + /// Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos); + static Point3 ScreenToNearPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt); + + /// Similar to filmplane2D_to_nearplane3D() but here rather than using the + /// nearplane, you specify the depth of the plane to use as a distance away + /// from the camera's focal point. + static Point3 ScreenToDepthPlane(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float planeDepth); + + /// Converts a 2D point on the filmplane represented in Normalized Device + /// Coorindates, which means (-1,1) for the top left corner of the screen and + /// (1,-1) for the bottom right corner, to a 3D point in the world. The depth + /// buffer value under the pixel must be supplied. If you are using GraphicsApp, + /// you can use the mouse pos in pixels to get the required arguments like this: + /// Point2 normPos = graphicsApp->pixels_to_normalized_coordinates(mousePos); + /// float normZ = graphicsApp->z_value_at_pixel(mousePos); + static Point3 ScreenToWorld(const Matrix4 &viewMatrix, const Matrix4 &projMatrix, const Point2 &normalizedScreenPt, float normalizedZ); + + + static const float PI; + static const float TWO_PI; + static const float HALF_PI; +}; + + + +} // end namespace + +#endif \ No newline at end of file diff --git a/dev/MinGfx/src/graphics_app.cc b/dev/MinGfx/src/graphics_app.cc new file mode 100644 index 0000000..57405f5 --- /dev/null +++ b/dev/MinGfx/src/graphics_app.cc @@ -0,0 +1,467 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "graphics_app.h" + + +namespace mingfx { + + + +GraphicsApp::GraphicsApp(int width, int height, const std::string &caption) : + graphicsInitialized_(false), width_(width), height_(height), caption_(caption), lastDrawT_(0.0), + leftDown_(false), middleDown_(false), rightDown_(false), screen_(NULL), window_(NULL) +{ +} + +GraphicsApp::~GraphicsApp() { +} + +void GraphicsApp::InitGraphicsContext() { + + glfwInit(); + + glfwSetTime(0); + + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + + glfwWindowHint(GLFW_SAMPLES, 0); + glfwWindowHint(GLFW_RED_BITS, 8); + glfwWindowHint(GLFW_GREEN_BITS, 8); + glfwWindowHint(GLFW_BLUE_BITS, 8); + glfwWindowHint(GLFW_ALPHA_BITS, 8); + glfwWindowHint(GLFW_STENCIL_BITS, 8); + glfwWindowHint(GLFW_DEPTH_BITS, 24); + glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); + + + // on OSX, glfwCreateWindow bombs if we pass caption_.c_str() in for the 3rd + // parameter perhaps because it's const. so, copying to a tmp char array here. + char *title = new char[caption_.size() + 1]; + for (int i = 0; i < caption_.size(); i++) { + title[i] = caption_[i]; + } + title[caption_.size()] = '\0'; + std::cout << caption_ << std::endl; + + // Create a GLFWwindow object + window_ = glfwCreateWindow(width_, height_, title, NULL, NULL); + if (window_ == nullptr) { + std::cerr << "Failed to create GLFW window" << std::endl; + glfwTerminate(); + exit(-1); + } + glfwMakeContextCurrent(window_); + glfwSetWindowUserPointer(window_, this); + + // cleanup tmp title hack + delete [] title; + + +#if defined(NANOGUI_GLAD) + if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) + throw std::runtime_error("Could not initialize GLAD!"); + glGetError(); // pull and ignore unhandled errors like GL_INVALID_ENUM +#endif + + glClearColor(0.2f, 0.25f, 0.3f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + + // Create a nanogui screen and pass the glfw pointer to initialize + screen_ = new nanogui::Screen(); + screen_->initialize(window_, true); + + glfwGetFramebufferSize(window_, &width_, &height_); + glViewport(0, 0, width_, height_); + glfwSwapInterval(0); + glfwSwapBuffers(window_); + + screen_->setVisible(true); + screen_->performLayout(); + + glfwSetCursorPosCallback(window_, + [](GLFWwindow *window, double x, double y) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->cursor_pos_glfw_cb(x, y); + } + ); + + glfwSetMouseButtonCallback(window_, + [](GLFWwindow *window, int button, int action, int modifiers) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->mouse_button_glfw_cb(button, action, modifiers); + } + ); + + glfwSetKeyCallback(window_, + [](GLFWwindow *window, int key, int scancode, int action, int mods) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->key_glfw_cb(key, scancode, action, mods); + } + ); + + glfwSetCharCallback(window_, + [](GLFWwindow *window, unsigned int codepoint) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->char_glfw_cb(codepoint); + } + ); + + glfwSetDropCallback(window_, + [](GLFWwindow *window, int count, const char **filenames) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->drop_glfw_cb(count, filenames); + } + ); + + glfwSetScrollCallback(window_, + [](GLFWwindow *window, double x, double y) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->scroll_glfw_cb(x, y); + } + ); + + glfwSetFramebufferSizeCallback(window_, + [](GLFWwindow *window, int width, int height) { + GraphicsApp *app = (GraphicsApp*)glfwGetWindowUserPointer(window); + app->resize_glfw_cb(width, height); + } + ); + + graphicsInitialized_ = true; + } + + + +void GraphicsApp::Run() { + + if (!graphicsInitialized_) { + InitGraphicsContext(); + } + + InitNanoGUI(); + + InitOpenGL(); + + // Main program loop + glfwSetTime(0.0); + while (!glfwWindowShouldClose(window_)) { + + // Poll for new user input events and call callbacks + glfwPollEvents(); + + // Update the simulation, i.e., perform all non-graphics updates that + // should happen each frame. + double now = glfwGetTime(); + UpdateSimulation(now-lastDrawT_); + lastDrawT_ = now; + + // Clear is handled in this mainloop so that drawing works even for + // users who do not want to fill in DrawUsingOpenGL() + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + + // NanoGUI sets these to something other than the OpenGL defaults, which + // screws up most OpenGL programs, so we need to reset them each frame here. + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); + glEnable(GL_DEPTH_TEST); + + // Users may fill this in to do raw OpenGL rendering + DrawUsingOpenGL(); + + // This renders the nanogui widgets created on screen_ + screen_->drawContents(); + screen_->drawWidgets(); + + // Users may fill this in to do additional 2D rendering with the NanoVG library + DrawUsingNanoVG(screen_->nvgContext()); + + glfwSwapBuffers(window_); + } + + glfwTerminate(); +} + + + +bool GraphicsApp::cursor_pos_glfw_cb(double x, double y) { + + if (screen_->cursorPosCallbackEvent(x,y)) { + // event was handled by nanogui + lastMouse_ = Point2((float)x, (float)y); + return true; + } + else { + Point2 cur((float)x, (float)y); + Vector2 delta = cur - lastMouse_; + + // if no buttons are down, generate a mouse move event + if (!leftDown_ && !middleDown_ && !rightDown_) { + mouse_move(cur, delta); + } + + // if a button is down, generate a corresponding mouse drag event + if (leftDown_) { + left_mouse_drag(cur, delta); + } + if (middleDown_) { + middle_mouse_drag(cur, delta); + } + if (rightDown_) { + right_mouse_drag(cur, delta); + } + + lastMouse_ = cur; + return false; + } +} + +bool GraphicsApp::mouse_button_glfw_cb(int button, int action, int modifiers) { + if (screen_->mouseButtonCallbackEvent(button, action, modifiers)) { + return true; + } + else if (button == GLFW_MOUSE_BUTTON_LEFT) { + double x,y; + glfwGetCursorPos(window_, &x, &y); + if (action == 1) { + left_mouse_down(Point2((float)x, (float)y)); + leftDown_ = true; + } + else { + left_mouse_up(Point2((float)x, (float)y)); + leftDown_ = false; + } + return true; + } + else if (button == GLFW_MOUSE_BUTTON_MIDDLE) { + double x,y; + glfwGetCursorPos(window_, &x, &y); + if (action == 1) { + middle_mouse_down(Point2((float)x, (float)y)); + middleDown_ = true; + } + else { + middle_mouse_up(Point2((float)x, (float)y)); + middleDown_ = false; + } + return true; + } + else if (button == GLFW_MOUSE_BUTTON_RIGHT) { + double x,y; + glfwGetCursorPos(window_, &x, &y); + if (action == 1) { + right_mouse_down(Point2((float)x, (float)y)); + rightDown_ = true; + } + else { + right_mouse_up(Point2((float)x, (float)y)); + rightDown_ = false; + } + return true; + } + return false; +} + + +bool GraphicsApp::key_glfw_cb(int key, int scancode, int action, int modifiers) { + if (screen_->keyCallbackEvent(key, scancode, action, modifiers)) { + return true; + } + else { + if (glfwGetKeyName(key, scancode) != NULL) { + if (action == GLFW_PRESS) { + key_down(glfwGetKeyName(key, scancode), modifiers); + } + else if (action == GLFW_REPEAT) { + key_repeat(glfwGetKeyName(key, scancode), modifiers); + } + else { + key_up(glfwGetKeyName(key, scancode), modifiers); + } + return true; + } + else { + if (action == GLFW_PRESS) { + special_key_down(key, scancode, modifiers); + } + else if (action == GLFW_REPEAT) { + special_key_repeat(key, scancode, modifiers); + } + else { + special_key_up(key, scancode, modifiers); + } + return true; + } + } + + return false; +} + + +bool GraphicsApp::char_glfw_cb(unsigned int codepoint) { + if (screen_->charCallbackEvent(codepoint)) { + return true; + } + else { + // TODO: could add another virtual function to GraphicsApp to + // respond to this if needed + } + return false; +} + + +bool GraphicsApp::drop_glfw_cb(int count, const char **filenames) { + if (screen_->dropCallbackEvent(count, filenames)) { + return true; + } + else { + // TODO: could add another virtual function to GraphicsApp to + // respond to this if needed + } + return false; +} + + +bool GraphicsApp::scroll_glfw_cb(double x, double y) { + if (screen_->scrollCallbackEvent(x,y)) { + return true; + } + else { + // TODO: could add another virtual function to GraphicsApp to + // respond to this if needed + } + return false; +} + + +bool GraphicsApp::resize_glfw_cb(int width, int height) { + if (screen_->resizeCallbackEvent(width, height)) { + return true; + } + else { + // the width and height reported here are the new framebuffer size + // we will query/save/report the new window size instead + width_ = window_width(); + height_ = window_height(); + OnWindowResize(width_, height_); + } + return false; +} + + +bool GraphicsApp::IsKeyDown(int key) { + return (glfwGetKey(window_, key) == GLFW_PRESS); +} + +bool GraphicsApp::IsLeftMouseDown() { + return (glfwGetMouseButton(window_, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS); +} + + +bool GraphicsApp::IsMiddleMouseDown() { + return (glfwGetMouseButton(window_, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS); +} + + +bool GraphicsApp::IsRightMouseDown() { + return (glfwGetMouseButton(window_, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS); +} + + + +float GraphicsApp::aspect_ratio() { + int width, height; + glfwGetFramebufferSize(window_, &width, &height); + return (float)width/(float)height; +} + +int GraphicsApp::window_width() { + int width, height; + glfwGetWindowSize(window_, &width, &height); + return width; +} + +int GraphicsApp::framebuffer_width() { + int width, height; + glfwGetFramebufferSize(window_, &width, &height); + return width; +} + +int GraphicsApp::window_height() { + int width, height; + glfwGetWindowSize(window_, &width, &height); + return height; +} + +int GraphicsApp::framebuffer_height() { + int width, height; + glfwGetFramebufferSize(window_, &width, &height); + return height; +} + +Point2 GraphicsApp::PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels) { + float x = (pointInPixels[0] / window_width()) * 2.0f - 1.0f; + float y = (1.0f - (pointInPixels[1] / window_height())) * 2.0f - 1.0f; + return Point2(x,y); +} + +Point2 GraphicsApp::NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC) { + float x = 0.5f * (pointInNDC[0] + 1.0f) * window_width(); + float y = (1.0f - (0.5f * (pointInNDC[1] + 1.0f))) * window_height(); + return Point2(x,y); +} + +Vector2 GraphicsApp::PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels) { + float x = (2.0f/window_width()) * vectorInPixels[0]; + float y = (-2.0f/window_height()) * vectorInPixels[1]; + return Vector2(x,y); +} + +Vector2 GraphicsApp::NormalizedDeviceCoordsToPixels(const Vector2 &vectorInNDC) { + float x = (window_width()/2.0f) * vectorInNDC[0]; + float y = (-window_height()/2.0f) * vectorInNDC[1]; + return Vector2(x,y); +} + +float GraphicsApp::ReadZValueAtPixel(const Point2 &pointInPixels, unsigned int whichBuffer) { + // scale screen points to framebuffer size, since they are not the same on retina displays + float x01 = pointInPixels[0] / window_width(); + float y01 = pointInPixels[1] / window_height(); + y01 = 1.0f - y01; + + float x = x01 * (float)framebuffer_width(); + float y = y01 * (float)framebuffer_height(); + + float z; + glReadPixels((int)x, (int)y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &z); + return z; +} + + +nanogui::Screen* GraphicsApp::screen() { + return screen_; +} + +GLFWwindow* GraphicsApp::window() { + return window_; +} + + +void GraphicsApp::ResizeWindow(int new_width, int new_height) { + glfwSetWindowSize(window_, new_width, new_height); + width_ = new_width; + height_ = new_height; + OnWindowResize(new_width, new_height); +} + + + + + +} // end namespace diff --git a/dev/MinGfx/src/graphics_app.h b/dev/MinGfx/src/graphics_app.h new file mode 100644 index 0000000..c32be2c --- /dev/null +++ b/dev/MinGfx/src/graphics_app.h @@ -0,0 +1,481 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2017, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + + +#ifndef SRC_GRAPHICS_APP_H_ +#define SRC_GRAPHICS_APP_H_ + +// disable warnings for this 3rd party code +#pragma warning ( push, 0 ) +#include +#pragma warning ( pop ) + +#include + +#include "point2.h" +#include "vector2.h" + +/** Namespace for the MinGfx Toolkit */ +namespace mingfx { + + +/** This is the main application base class for the MinGfx Toolkit. + + _Create a Subclass:_ + + To create your own graphics application, you should create a subclass of GraphicsApp + and then override some key functions: + + 1. User Input: To get input from the keyboard and mouse, override OnMouseMove() and/or the other On...() functions. + + 2. Drawing Graphics: To draw graphics override one or more of the Draw*() functions. + + - DrawUsingNanoVG() is the right place to make 2D drawing calls using the nanovg library. + + - DrawUsingOpenGL() is the right place to make 2D or 3D drawing calls using OpenGL. This includes drawing using the Mesh, QuickShapes, DefaultShader, ShaderProgram, and all other MinGfx classes since these are all based on OpenGL. + + - InitNanoGUI() is the right place to create nanogui windows to add a 2D user interface to your app. + + - InitOpenGL() is the right place to load textures, meshes, shaders, and other graphics objects that can only be created after the OpenGL context exists. + + 3. Physics, Animation, AI, etc.: Override the UpdateSimulation() function to do other non-graphics calculations required by your program. This is called automatically once per frame. + + Keep in mind that internally the app uses a rendering loop that looks something like this: + ~~~ + InitNanoGUI(); // your hook for initializing NanoGUI widgets + InitOpenGL(); // your hook for initializing OpenGL graphics + while (!program_ready_to_close) { + // user input + internal_get_input_events_from_operating_system(); + OnMouseMove(); // your hook for processing input + On*(); // all other event callbacks -- your hook for processing input + + // phyics, etc. + UpdateSimulation(); // your hook for physics, animation, AI, etc. + + // draw graphics + internal_render_gui_elements_using_nanogui(); + DrawUsingNanoVG(); // your hook for drawing 2D vector graphics + DrawUsingOpenGL(); // your hook for 2D/3D rendering with OpenGL + } + ~~~ + + _A Complete Example with GUI Widgets_ + + If you wish to add some buttons, sliders, etc. in your application, you can do this inside GraphicsApp by accessing the NanoGUI library. You will need to pass NanoGUI a nanogui::screen object, which you can get from the screen() function. NanoGui setup should be done in the constructor, like this: + ~~~ + #include + using namespace mingfx; + + class MyApp : public GraphcisApp { + public: + MyApp() : GraphicsApp(1024,768, "My Amazing App") { + } + + virtual ~MyApp() {} + + void InitNanoGUI() { + // Setup the GUI window + nanogui::Window *window = new nanogui::Window(screen(), "My GUI Panel"); + window->setPosition(Eigen::Vector2i(10, 10)); + window->setSize(Eigen::Vector2i(400,200)); + window->setLayout(new nanogui::GroupLayout()); + + nanogui::Button pause_btn = new nanogui::Button(window, "Pause"); + pause_btn->setCallback(std::bind(&MyApp::OnPauseBtnPressed, this)); + pause_btn->setTooltip("Toggle playback."); + + screen()->performLayout(); + } + + void InitOpenGL() { + glClearColor(0.0, 0.0, 0.0, 1); + } + + // this callback is for the nanogui pause_btn defined above + void OnPauseBtnPressed() { + std::cout << "Pause pressed." << std::endl; + } + + // this callback is built into the base GraphicsApp class + void OnMouseMove(const Point2 &pos, const Vector2 &delta) { + std::cout << "Mouse moved to " << pos << std::endl; + } + + void DrawUsingOpenGL() { + Matrix4 model = Matrix4::Translation(Vector3(-1,0,0)) * Matrix4::Scale(Vector3(0.5, 0.5, 0.5)); + Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); + Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0); + quick_shapes_.DrawCube(model, view, proj, Color(1,1,1)); + } + + private: + QuickShapes quick_shapes_; + }; + + + int main(int argc, const char *argv[]) { + MyApp app; + app.Run(); + return 0; + } + ~~~ + + */ +class GraphicsApp { +public: + + /** \brief Constructs a new app but does not yet run it. + + \param width The width of the client area of the window in pixels. + \param height The height of the client area of the window in pixels. + \param caption The caption for the window's title bar. + */ + GraphicsApp(int width, int height, const std::string &caption); + + + /// The destructor will shutdown the graphics system and window + virtual ~GraphicsApp(); + + + // Callback methods -- override these and fill in to respond to user + // input events. + + /** If the mouse has moved in the past frame and no mouse buttons are currently + pressed, then this callback function will be called to report the new position + of the mouse to you. + + \param pos This is the current position of the mouse in pixels, where (0,0) + is at the top left corner of the screen and (window_width(), window_height()) + is the bottom right corner. + + \param delta This is the change in the position of the mouse in pixels since + the last frame. + */ + virtual void OnMouseMove(const Point2 &pos, const Vector2 &delta) {} + + /** If the mouse button was pressed down since the last frame, then this function + will be called to notify you. + + \param pos This is the current position of the mouse in pixels, where (0,0) + is at the top left corner of the screen and (window_width(), window_height()) + is the bottom right corner. + */ + virtual void OnLeftMouseDown(const Point2 &pos) {} + + /** If the mouse button is held down and the mouse has moved in the past frame + then this function will be called to tell you that a "dragging" operation is + happening. + + \param pos This is the current position of the mouse in pixels, where (0,0) + is at the top left corner of the screen and (window_width(), window_height()) + is the bottom right corner. + + \param delta This is the change in the position of the mouse in pixels since + the last frame. + */ + virtual void OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) {} + + /** If the mouse button was released since the last frame, then this function + will be called to notify you. + + \param pos This is the current position of the mouse in pixels, where (0,0) + is at the top left corner of the screen and (window_width()-1, window_height()-1) + is the bottom right corner. + */ + virtual void OnLeftMouseUp(const Point2 &pos) {} + + + /// \copydoc GraphicsApp::OnLeftMouseDown(const Point2 &pos) + virtual void OnMiddleMouseDown(const Point2 &pos) {} + + /// \copydoc GraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) + virtual void OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta) {} + + /// \copydoc GraphicsApp::OnLeftMouseUp(const Point2 &pos) + virtual void OnMiddleMouseUp(const Point2 &pos) {} + + + /// \copydoc GraphicsApp::OnLeftMouseDown(const Point2 &pos) + virtual void OnRightMouseDown(const Point2 &pos) {} + + /// \copydoc GraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) + virtual void OnRightMouseDrag(const Point2 &pos, const Vector2 &delta) {} + + /// \copydoc GraphicsApp::OnLeftMouseUp(const Point2 &pos) + virtual void OnRightMouseUp(const Point2 &pos) {} + + + /** Transforms a keyboard down event into the actual character typed. + \param c The character for the key that was pressed. + \param modifiers If any modifiers (Alt, Ctrl, Shift, etc.) were held + at the same time, then these are encoded in this int. See the detailed + description here: http://www.glfw.org/docs/latest/group__mods.html + */ + virtual void OnKeyDown(const char *c, int modifiers) {} + + /** Transforms a keyboard repeat event into the actual character typed. + \param c The character for the key that was pressed. + \param modifiers If any modifiers (Alt, Ctrl, Shift, etc.) were held + at the same time, then these are encoded in this int. See the detailed + description here: http://www.glfw.org/docs/latest/group__mods.html + */ + virtual void OnKeyRepeat(const char *c, int modifiers) {} + + /** Transforms a keyboard up event into the actual character typed. + \param c The character for the key that was pressed. + \param modifiers If any modifiers (Alt, Ctrl, Shift, etc.) were held + at the same time, then these are encoded in this int. See the detailed + description here: http://www.glfw.org/docs/latest/group__mods.html + */ + virtual void OnKeyUp(const char *c, int modifiers) {} + + + + /// The values for key, scancode, and modifiers are documented here: + /// http://www.glfw.org/docs/latest/group__keys.html + virtual void OnSpecialKeyDown(int key, int scancode, int modifiers) {} + + /// The values for key, scancode, and modifiers are documented here: + /// http://www.glfw.org/docs/latest/group__keys.html + virtual void OnSpecialKeyRepeat(int key, int scancode, int modifiers) {} + + /// The values for key, scancode, and modifiers are documented here: + /// http://www.glfw.org/docs/latest/group__keys.html + virtual void OnSpecialKeyUp(int key, int scancode, int modifiers) {} + + + /// Override this to respond when the graphics window and/or framebuffer + /// are resized, either by the user dragging the window or through a call + /// to ResizeWindow(). + virtual void OnWindowResize(int new_width, int new_height) {} + + + /** After creating a new GraphicsApp, call this to start the app's + mainloop. Each time through the mainloop the app will: 1. respond + any user input events by calling the On*() callback methods, 2. call + UpdateSimulation(), and 3. call the two Draw*() methods. Note that + Run() does not return until the user closes the app and the program + is ready to shutdown. + */ + virtual void Run(); + + + /** Called at the beginning of the Run() method. Override this to initialize + any NanoGUI graphics related properties including 2D windows, buttons, + sliders, etc... + + IMPORTANT: Put any NanoGUI initialization code here, NOT in the constructors + of the classes that you create, or, create your classes from within this + function. The graphics calls will fail if the OpenGL context has not yet + been initialized, and it is not guaranteed to be initialized until this + function has been called. + */ + virtual void InitNanoGUI() {} + + /** Override this to initialize the OpenGL context with textures, vertex + buffers, etc. that you will use later inside DrawUsingOpenGL(). This + InitOpenGL() function is called once on program startup just after the + OpenGL drawing context is created. + + IMPORTANT: Put any OpenGL initialization code here, NOT in the constructors + of the classes that you create, or, create your classes from within this + function. The graphics calls will fail if the OpenGL context has not yet + been initialized, and it is not guaranteed to be initialized until this + function has been called. + */ + virtual void InitOpenGL() {} + + + /** Called once per frame. Override this and fill it in to update your + simulation code or any other updates you need to make to your model that + are timed rather than in response to user input. + + \param dt is the elapsed time since the last call. + */ + virtual void UpdateSimulation(double dt) {} + + + /// Override this to draw graphics using the nanovg vector graphics + /// library, which provides an easy way to draw 2D shapes to the screen. + virtual void DrawUsingNanoVG(NVGcontext *ctx) {} + + + + /// Override this to draw graphics using raw OpenGL 2D or 3D graphics + /// calls. + virtual void DrawUsingOpenGL() {} + + + /// True if the specified is is currently held down. Uses the GLFW + /// key codes found here: http://www.glfw.org/docs/latest/group__keys.html + virtual bool IsKeyDown(int key); + + /// True if the left mouse button is currently held down. + virtual bool IsLeftMouseDown(); + + /// True if the middle mouse button is currently held down. + virtual bool IsMiddleMouseDown(); + + /// True if the right mouse button is currently held down. + virtual bool IsRightMouseDown(); + + /// Returns the current width of the client area of the window in pixels + virtual int window_width(); + + /// Returns the current height of the client area of the window in pixels + virtual int window_height(); + + /** Returns the current width of the framebuffer in pixels. Note that on + some displays (e.g., Mac Retina) the framebuffer is larger than the + window. + */ + virtual int framebuffer_width(); + + /** Returns the current height of the framebuffer in pixels. Note that on + some displays (e.g., Mac Retina) the framebuffer is larger than the + window. + */ + virtual int framebuffer_height(); + + /// Returns width/height for the current shape of the window + virtual float aspect_ratio(); + + + /** Transforms a point in viewport coordinates (pixels where top left = (0,0) + and bottom right = (window_width()-1, window_height()-1)) to normalized + device coordinates, (top left = (-1,1) bottom right (1,-1)). + */ + virtual Point2 PixelsToNormalizedDeviceCoords(const Point2 &pointInPixels); + + /** Transforms a point in normalized device coordinates (top left = (-1,1) + bottom right (1,-1)) to pixels (top left = (0,0), bottom right = + (window width-1, window height-1)) + */ + virtual Point2 NormalizedDeviceCoordsToPixels(const Point2 &pointInNDC); + + + /** Transforms a vector in viewport coordinates (pixels where top left = (0,0) + and bottom right = (window width-1, window height-1)) to normalized + device coordinates, (top left = (-1,1) bottom right (1,-1)). + */ + virtual Vector2 PixelsToNormalizedDeviceCoords(const Vector2 &vectorInPixels); + + /** Transforms a vector in normalized device coordinates (top left = (-1,1) + bottom right (1,-1)) to pixels (top left = (0,0), bottom right = + (window width-1, window height-1)) + */ + virtual Vector2 NormalizedDeviceCoordsToPixels(const Vector2 &pointInNDC); + + /// Returns the z buffer value under the specified pixel. z will be 0 at + /// the near plane and +1 at the far plane. + virtual float ReadZValueAtPixel(const Point2 &pointInPixels, unsigned int whichBuffer = GL_BACK); + + /// Access to the underlying NanoGUI Screen object + virtual nanogui::Screen* screen(); + + /// Access to the underlying GLFWwindow object + virtual GLFWwindow* window(); + + + /// Cause the graphics windows to resize programmatically rather than by dragging + /// on the corner manually. + virtual void ResizeWindow(int new_width, int new_height); + + + /** Users cannot make any graphics calls (e.g., setting the clear color, + saving mesh data to the GPU) until the graphics context is initialized + by calling this method. It is called automatically by the Run() method + before calling the InitNanoGUI() and InitOpenGL() methods. So, users + should place all of their graphics initialization code inside one of + those two methods. + */ + virtual void InitGraphicsContext(); + +private: + + bool cursor_pos_glfw_cb(double x, double y); + bool mouse_button_glfw_cb(int button, int action, int modifiers); + bool key_glfw_cb(int key, int scancode, int action, int mods); + bool char_glfw_cb(unsigned int codepoint); + bool drop_glfw_cb(int count, const char **filenames); + bool scroll_glfw_cb(double x, double y); + bool resize_glfw_cb(int width, int height); + + virtual void mouse_move(const Point2 &pos, const Vector2 &delta) { + OnMouseMove(pos, delta); + } + virtual void left_mouse_down(const Point2 &pos) { + OnLeftMouseDown(pos); + } + virtual void left_mouse_drag(const Point2 &pos, const Vector2 &delta) { + OnLeftMouseDrag(pos, delta); + } + virtual void left_mouse_up(const Point2 &pos) { + OnLeftMouseUp(pos); + } + virtual void middle_mouse_down(const Point2 &pos) { + OnMiddleMouseDown(pos); + } + virtual void middle_mouse_drag(const Point2 &pos, const Vector2 &delta) { + OnMiddleMouseDrag(pos, delta); + } + virtual void middle_mouse_up(const Point2 &pos) { + OnMiddleMouseUp(pos); + } + virtual void right_mouse_down(const Point2 &pos) { + OnRightMouseDown(pos); + } + virtual void right_mouse_drag(const Point2 &pos, const Vector2 &delta) { + OnRightMouseDrag(pos, delta); + } + virtual void right_mouse_up(const Point2 &pos) { + OnRightMouseUp(pos); + } + virtual void key_down(const char *c, int modifiers) { + OnKeyDown(c, modifiers); + } + virtual void key_repeat(const char *c, int modifiers) { + OnKeyRepeat(c, modifiers); + } + virtual void key_up(const char *c, int modifiers) { + OnKeyUp(c, modifiers); + } + virtual void special_key_down(int key, int scancode, int modifiers) { + OnSpecialKeyDown(key, scancode, modifiers); + } + virtual void special_key_repeat(int key, int scancode, int modifiers) { + OnSpecialKeyRepeat(key, scancode, modifiers); + } + virtual void special_key_up(int key, int scancode, int modifiers) { + OnSpecialKeyUp(key, scancode, modifiers); + } + + bool graphicsInitialized_; + int width_; + int height_; + const std::string caption_; + nanogui::Screen *screen_; + GLFWwindow* window_; + double lastDrawT_; + Point2 lastMouse_; + bool leftDown_; + bool middleDown_; + bool rightDown_; +}; + + +} // end namespace + +#endif + diff --git a/dev/MinGfx/src/matrix4.cc b/dev/MinGfx/src/matrix4.cc new file mode 100644 index 0000000..e38909c --- /dev/null +++ b/dev/MinGfx/src/matrix4.cc @@ -0,0 +1,445 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "matrix4.h" + +#include "gfxmath.h" +#include + +namespace mingfx { + + +Matrix4::Matrix4() { + m[0] = m[5] = m[10] = m[15] = 1.0; + m[1] = m[2] = m[3] = m[4] = 0.0; + m[6] = m[7] = m[8] = m[9] = 0.0; + m[11]= m[12] = m[13] = m[14] = 0.0; +} + + +Matrix4::Matrix4(const float* a) { + memcpy(m,a,16*sizeof(float)); +} + +Matrix4::Matrix4(const std::vector &a) { + for (int i=0;i<16;i++) { + m[i] = a[i]; + } +} + +Matrix4::Matrix4(const Matrix4& m2) { + memcpy(m,m2.m,16*sizeof(float)); +} + +Matrix4::~Matrix4() { +} + + +bool Matrix4::operator==(const Matrix4& m2) const { + for (int i=0;i<16;i++) { + if (fabs(m2.m[i] - m[i]) > MINGFX_MATH_EPSILON) { + return false; + } + } + return true; +} + +bool Matrix4::operator!=(const Matrix4& m2) const { + return !(*this == m2); +} + +Matrix4& Matrix4::operator=(const Matrix4& m2) { + memcpy(m,m2.m,16*sizeof(float)); + return *this; +} + +const float * Matrix4::value_ptr() const { + return m; +} + +float Matrix4::operator[](const int i) const { + return m[i]; +} + +float& Matrix4::operator[](const int i) { + return m[i]; +} + +float Matrix4::operator()(const int r, const int c) const { + return m[c*4+r]; +} + +float& Matrix4::operator()(const int r, const int c) { + return m[c*4+r]; +} + +std::vector Matrix4::ToVector() const { + std::vector v; + for (int i=0;i<16;i++) { + v.push_back(m[i]); + } + return v; +} + + + +Matrix4 Matrix4::Scale(const Vector3& v) { + return Matrix4::FromRowMajorElements( + v[0], 0, 0, 0, + 0, v[1], 0, 0, + 0, 0, v[2], 0, + 0, 0, 0, 1 + ); +} + + +Matrix4 Matrix4::Translation(const Vector3& v) { + return Matrix4::FromRowMajorElements( + 1, 0, 0, v[0], + 0, 1, 0, v[1], + 0, 0, 1, v[2], + 0, 0, 0, 1 + ); +} + + +Matrix4 Matrix4::RotationX(const float radians) { + const float cosTheta = cos(radians); + const float sinTheta = sin(radians); + return Matrix4::FromRowMajorElements( + 1, 0, 0, 0, + 0, cosTheta, -sinTheta, 0, + 0, sinTheta, cosTheta, 0, + 0, 0, 0, 1 + ); +} + + +Matrix4 Matrix4::RotationY(const float radians) { + const float cosTheta = cos(radians); + const float sinTheta = sin(radians); + return Matrix4::FromRowMajorElements( + cosTheta, 0, sinTheta, 0, + 0, 1, 0, 0, + -sinTheta, 0, cosTheta, 0, + 0, 0, 0, 1 + ); +} + + +Matrix4 Matrix4::RotationZ(const float radians) { + const float cosTheta = cos(radians); + const float sinTheta = sin(radians); + return Matrix4::FromRowMajorElements( + cosTheta, -sinTheta, 0, 0, + sinTheta, cosTheta, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); +} + + +Matrix4 Matrix4::Rotation(const Point3& p, const Vector3& v, const float a) { + const float vZ = v[2]; + const float vX = v[0]; + const float theta = atan2(vZ, vX); + const float phi = -atan2((float)v[1], (float)sqrt(vX * vX + vZ * vZ)); + + const Matrix4 transToOrigin = Matrix4::Translation(-1.0*Vector3(p[0], p[1], p[2])); + const Matrix4 A = Matrix4::RotationY(theta); + const Matrix4 B = Matrix4::RotationZ(phi); + const Matrix4 C = Matrix4::RotationX(a); + const Matrix4 invA = Matrix4::RotationY(-theta); + const Matrix4 invB = Matrix4::RotationZ(-phi); + const Matrix4 transBack = Matrix4::Translation(Vector3(p[0], p[1], p[2])); + + return transBack * invA * invB * C * B * A * transToOrigin; +} + + +Matrix4 Matrix4::Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, + const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2) +{ + Vector3 ax = a_v1.ToUnit(); + Vector3 ay = a_v2.ToUnit(); + Vector3 az = ax.Cross(ay).ToUnit(); + ay = az.Cross(ax); + Matrix4 A = Matrix4::FromRowMajorElements(ax[0], ay[0], az[0], a_p[0], + ax[1], ay[1], az[1], a_p[1], + ax[2], ay[2], az[2], a_p[2], + 0, 0, 0, 1); + + Vector3 bx = b_v1.ToUnit(); + Vector3 by = b_v2.ToUnit(); + Vector3 bz = bx.Cross(by).ToUnit(); + by = bz.Cross(bx); + Matrix4 B = Matrix4::FromRowMajorElements(bx[0], by[0], bz[0], b_p[0], + bx[1], by[1], bz[1], b_p[1], + bx[2], by[2], bz[2], b_p[2], + 0, 0, 0, 1); + return B * A.Inverse(); +} + + + +Matrix4 Matrix4::LookAt(Point3 eye, Point3 target, Vector3 up) { + Vector3 lookDir = (target - eye).ToUnit(); + + // desired x,y,z for the camera itself + Vector3 z = -lookDir; + Vector3 x = up.Cross(z).ToUnit(); + Vector3 y = z.Cross(x); + + // for the view matrix rotation, we want the inverse of the rotation for the + // camera, and the inverse of a rotation matrix is its transpose, so the + // x,y,z colums become x,y,z rows. + Matrix4 R = Matrix4::FromRowMajorElements( + x[0], x[1], x[2], 0, + y[0], y[1], y[2], 0, + z[0], z[1], z[2], 0, + 0, 0, 0, 1 + ); + + // also need to translate by -eye + Matrix4 T = Matrix4::Translation(Point3(0,0,0) - eye); + + return R * T; +} + +Matrix4 Matrix4::Perspective(float fovyInDegrees, float aspectRatio, + float nearVal, float farVal) +{ + // https://www.khronos.org/opengl/wiki/GluPerspective_code + float ymax, xmax; + ymax = nearVal * tanf(fovyInDegrees * GfxMath::PI / 360.0f); + // ymin = -ymax; + // xmin = -ymax * aspectRatio; + xmax = ymax * aspectRatio; + return Matrix4::Frustum(-xmax, xmax, -ymax, ymax, nearVal, farVal); +} + + +Matrix4 Matrix4::Frustum(float left, float right, + float bottom, float top, + float nearVal, float farVal) +{ + return Matrix4::FromRowMajorElements( + 2.0f*nearVal/(right-left), 0.0f, (right+left)/(right-left), 0.0f, + 0.0f, 2.0f*nearVal/(top-bottom), (top+bottom)/(top-bottom), 0.0f, + 0.0f, 0.0f, -(farVal+nearVal)/(farVal-nearVal), -2.0f*farVal*nearVal/(farVal-nearVal), + 0.0f, 0.0f, -1.0f, 0.0 + ); +} + + +Matrix4 Matrix4::FromRowMajorElements( + const float r1c1, const float r1c2, const float r1c3, const float r1c4, + const float r2c1, const float r2c2, const float r2c3, const float r2c4, + const float r3c1, const float r3c2, const float r3c3, const float r3c4, + const float r4c1, const float r4c2, const float r4c3, const float r4c4) +{ + float m[16]; + m[0]=r1c1; m[4]=r1c2; m[8]=r1c3; m[12]=r1c4; + m[1]=r2c1; m[5]=r2c2; m[9]=r2c3; m[13]=r2c4; + m[2]=r3c1; m[6]=r3c2; m[10]=r3c3; m[14]=r3c4; + m[3]=r4c1; m[7]=r4c2; m[11]=r4c3; m[15]=r4c4; + return Matrix4(m); +} + + + + +Matrix4 Matrix4::Orthonormal() const { + Vector3 x = ColumnToVector3(0).ToUnit(); + Vector3 y = ColumnToVector3(1); + y = (y - y.Dot(x)*x).ToUnit(); + Vector3 z = x.Cross(y).ToUnit(); + return Matrix4::FromRowMajorElements( + x[0], y[0], z[0], m[12], + x[1], y[1], z[1], m[13], + x[2], y[2], z[2], m[14], + m[3], m[7], m[11], m[15] + ); +} + + +Matrix4 Matrix4::Transpose() const { + return Matrix4::FromRowMajorElements( + m[0], m[1], m[2], m[3], + m[4], m[5], m[6], m[7], + m[8], m[9], m[10], m[11], + m[12], m[13], m[14], m[15] + ); +} + + + + +// Returns the determinant of the 3x3 matrix formed by excluding the specified row and column +// from the 4x4 matrix. The formula for the determinant of a 3x3 is discussed on +// page 705 of Hill & Kelley, but note that there is a typo within the m_ij indices in the +// equation in the book that corresponds to the cofactor02 line in the code below. +float Matrix4::SubDeterminant(int excludeRow, int excludeCol) const { + // Compute non-excluded row and column indices + int row[3]; + int col[3]; + + int r=0; + int c=0; + for (int i=0; i<4; i++) { + if (i != excludeRow) { + row[r] = i; + r++; + } + if (i != excludeCol) { + col[c] = i; + c++; + } + } + + // Compute the cofactors of each element in the first row + float cofactor00 = (*this)(row[1],col[1]) * (*this)(row[2],col[2]) - (*this)(row[1],col[2]) * (*this)(row[2],col[1]); + float cofactor01 = - ((*this)(row[1],col[0]) * (*this)(row[2],col[2]) - (*this)(row[1],col[2]) * (*this)(row[2],col[0])); + float cofactor02 = (*this)(row[1],col[0]) * (*this)(row[2],col[1]) - (*this)(row[1],col[1]) * (*this)(row[2],col[0]); + + // The determinant is then the dot product of the first row and the cofactors of the first row + return (*this)(row[0],col[0])*cofactor00 + (*this)(row[0],col[1])*cofactor01 + (*this)(row[0],col[2])*cofactor02; +} + +// Returns the cofactor matrix. The cofactor matrix is a matrix where each element c_ij is the cofactor +// of the corresponding element m_ij in M. The cofactor of each element m_ij is defined as (-1)^(i+j) times +// the determinant of the "submatrix" formed by deleting the i-th row and j-th column from M. +// See the definition in section A2.1.4 (page 705) in Hill & Kelley. +Matrix4 Matrix4::Cofactor() const { + Matrix4 out; + // We'll use i to incrementally compute -1^(r+c) + int i = 1; + for (int r = 0; r < 4; ++r) { + for (int c = 0; c < 4; ++c) { + // Compute the determinant of the 3x3 submatrix + float det = SubDeterminant(r, c); + out(r,c) = i * det; + i = -i; + } + i = -i; + } + return out; +} + +// Returns the determinant of the 4x4 matrix +// See the hint in step 2 in Appendix A2.1.5 (page 706) in Hill & Kelley to learn how to compute this +float Matrix4::Determinant() const { + // The determinant is the dot product of any row of C (the cofactor matrix of m) with the corresponding row of m + Matrix4 C = Cofactor(); + return C(0,0)*(*this)(0,0) + C(0,1)*(*this)(0,1) + C(0,2)*(*this)(0,2) + C(0,3)*(*this)(0,3); +} + +// Returns the inverse of the 4x4 matrix if it is nonsingular. If it is singular, then returns the +// identity matrix. +Matrix4 Matrix4::Inverse() const { + // Check for singular matrix + float det = Determinant(); + if (fabs(det) < 1e-8) { + return Matrix4(); + } + + // m in nonsingular, so compute inverse using the 4-step procedure outlined in Appendix A2.1.5 + // (page 706) in Hill & Kelley + // 1. Find cofactor matrix C + Matrix4 C = Cofactor(); + // 2. Find the determinant of M as the dot prod of any row of C with the corresponding row of M. + // det = determinant(m); + // 3. Transpose C to get Ctrans + Matrix4 Ctrans = C.Transpose(); + // 4. Scale each element of Ctrans by (1/det) + return Ctrans * (1.0f / det); +} + + +Vector3 Matrix4::ColumnToVector3(int c) const { + return Vector3(m[c*4], m[c*4+1], m[c*4+2]); +} + +Point3 Matrix4::ColumnToPoint3(int c) const { + return Point3(m[c*4], m[c*4+1], m[c*4+2]); +} + + + + +Matrix4 operator*(const Matrix4& m, const float& s) { + Matrix4 result; + for (int r = 0; r < 4; r++) { + for (int c = 0; c < 4; c++) { + result(r,c) = m(r,c) * s; + } + } + return result; +} + +Matrix4 operator*(const float& s, const Matrix4& m) { + return m*s; +} + + +Point3 operator*(const Matrix4& m, const Point3& p) { + // For our points, p[3]=1 and we don't even bother storing p[3], so need to homogenize + // by dividing by w before returning the new point. + const float winv = 1.0f / (p[0] * m(3,0) + p[1] * m(3,1) + p[2] * m(3,2) + 1.0f * m(3,3)); + return Point3(winv * (p[0] * m(0,0) + p[1] * m(0,1) + p[2] * m(0,2) + 1.0f * m(0,3)), + winv * (p[0] * m(1,0) + p[1] * m(1,1) + p[2] * m(1,2) + 1.0f * m(1,3)), + winv * (p[0] * m(2,0) + p[1] * m(2,1) + p[2] * m(2,2) + 1.0f * m(2,3))); + +} + + +Vector3 operator*(const Matrix4& m, const Vector3& v) { + // For a vector v[3]=0 + return Vector3(v[0] * m(0,0) + v[1] * m(0,1) + v[2] * m(0,2), + v[0] * m(1,0) + v[1] * m(1,1) + v[2] * m(1,2), + v[0] * m(2,0) + v[1] * m(2,1) + v[2] * m(2,2)); + +} + + + +Matrix4 operator*(const Matrix4& m1, const Matrix4& m2) { + Matrix4 m = Matrix4::FromRowMajorElements(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0); + for (int r = 0; r < 4; r++) { + for (int c = 0; c < 4; c++) { + for (int i = 0; i < 4; i++) { + m(r,c) += m1(r,i) * m2(i,c); + } + } + } + return m; +} + +Ray operator*(const Matrix4& m, const Ray& r) { + Point3 p = m * r.origin(); + Vector3 d = m * r.direction(); + return Ray(p, d); +} + + +std::ostream & operator<< ( std::ostream &os, const Matrix4 &m) { + // format: [[r1c1, r1c2, r1c3, r1c4], [r2c1, r2c2, r2c3, r2c4], etc.. ] + return os << "[[" << m(0,0) << ", " << m(0,1) << ", " << m(0,2) << ", " << m(0,3) << "], " + << "[" << m(1,0) << ", " << m(1,1) << ", " << m(1,2) << ", " << m(1,3) << "], " + << "[" << m(2,0) << ", " << m(2,1) << ", " << m(2,2) << ", " << m(2,3) << "], " + << "[" << m(3,0) << ", " << m(3,1) << ", " << m(3,2) << ", " << m(3,3) << "]]"; +} + +std::istream & operator>> ( std::istream &is, Matrix4 &m) { + // format: [[r1c1, r1c2, r1c3, r1c4], [r2c1, r2c2, r2c3, r2c4], etc.. ] + char c; + return is >> c >> c >> m(0,0) >> c >> m(0,1) >> c >> m(0,2) >> c >> m(0,3) >> c >> c + >> c >> m(1,0) >> c >> m(1,1) >> c >> m(1,2) >> c >> m(1,3) >> c >> c + >> c >> m(2,0) >> c >> m(2,1) >> c >> m(2,2) >> c >> m(2,3) >> c >> c + >> c >> m(3,0) >> c >> m(3,1) >> c >> m(3,2) >> c >> m(3,3) >> c >> c; +} + +} // end namespace diff --git a/dev/MinGfx/src/matrix4.h b/dev/MinGfx/src/matrix4.h new file mode 100644 index 0000000..4abf29f --- /dev/null +++ b/dev/MinGfx/src/matrix4.h @@ -0,0 +1,260 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2017, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_MATRIX4_H_ +#define SRC_MATRIX4_H_ + +#include + +#include "point3.h" +#include "vector3.h" +#include "ray.h" + + +namespace mingfx { + + +/** A 4x4 transformation matrix stored internally as an array of floats in + column-major order so as to be compatible with OpenGL. Examples: + ~~~ + // constructing various matrices: + Matrix4 T = Matrix4::Translation(Vector3(1,0,0)); + Matrix4 S = Matrix4::Scale(Vector3(2,2,2)); + Matrix4 R = Matrix4::RotateX(GfxMath::toRadians(45.0)); + + // compose matrices together by multiplication + Matrix4 M = T * R * S; + Matrix4 Minv = M.Inverse(); + + // transforming points, vectors, etc. + Point3 p1(1,1,1); + Point3 p2 = M * p1; + + Vector3 v1(1,1,1); + Vector3 v2 = M * v1; + + Ray r1(p1, v1); + Ray r2 = M * r1; + ~~~ + */ +class Matrix4 { +public: + + /// The default constructor creates an identity matrix: + Matrix4(); + + /// Constructs a matrix given from an array of 16 floats in OpenGL matrix format + /// (i.e., column major). + Matrix4(const float* a); + + /// Constructs a matrix given from a vector of 16 floats in OpenGL matrix format + /// (i.e., column major). + Matrix4(const std::vector &a); + + /// Copy constructor + Matrix4(const Matrix4& m2); + + /// Destructor + virtual ~Matrix4(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Matrix4& m2) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Matrix4& m2) const; + + /// Matrix assignment operator + Matrix4& operator=(const Matrix4& m2); + + + /// Returns a pointer to the raw data array used to store the matrix. This + /// is a 1D array of 16-elements stored in column-major order. + const float * value_ptr() const; + + /// Accesses the ith element of the raw data array used to store the matrix. + /// This is a 1D array of 16-elements stored in column-major order. + float operator[](const int i) const; + + /// Accesses the ith element of the raw data array used to store the matrix. + /// This is a 1D array of 16-elements stored in column-major order. + float& operator[](const int i); + + /// Access an individual element of the array using the syntax: + /// Matrix4 mat; float row1col2 = mat(1,2); + float operator()(const int row, const int col) const; + + /// Access an individual element of the array using the syntax: + /// Matrix4 mat; mat(1,2) = 1.0; + float& operator()(const int row, const int col); + + + /// Returns the c-th column of the matrix as a Vector type, e.g.,: + /// Vector3 xAxis = mat.getColumnAsVector3(0); + /// Vector3 yAxis = mat.getColumnAsVector3(1); + /// Vector3 zAxis = mat.getColumnAsVector3(2); + Vector3 ColumnToVector3(int c) const; + + /// Returns the c-th column of the matrix as a Vector type, e.g.,: + /// Point3 pos = mat.getColumnAsPoint3(3); + Point3 ColumnToPoint3(int c) const; + + std::vector ToVector() const; + + + // --- Static Constructors for Special Matrices --- + + /** Returns a matrix constructed from individual elements passed in row major + order so that the matrix looks "correct" on the screen as you write this + constructor on 4 lines of code as below. Note the that internally the + matrix constructed will be stored in a 16 element column major array to + be consistent with OpenGL. + */ + static Matrix4 FromRowMajorElements( + const float r1c1, const float r1c2, const float r1c3, const float r1c4, + const float r2c1, const float r2c2, const float r2c3, const float r2c4, + const float r3c1, const float r3c2, const float r3c3, const float r3c4, + const float r4c1, const float r4c2, const float r4c3, const float r4c4 + ); + + // --- Model Transformations --- + + /// Returns the scale matrix described by the vector + static Matrix4 Scale(const Vector3 &v); + + /// Returns the translation matrix described by the vector + static Matrix4 Translation(const Vector3 &v); + + /// Returns the rotation matrix about the x axis by the specified angle + static Matrix4 RotationX(const float radians); + + /// Returns the rotation matrix about the y axis by the specified angle + static Matrix4 RotationY(const float radians); + + /// Returns the rotation matrix about the z axis by the specified angle + static Matrix4 RotationZ(const float radians); + + /// Returns the rotation matrix around the vector v placed at point p, rotate by angle a + static Matrix4 Rotation(const Point3 &p, const Vector3 &v, const float a); + + /// Creates a transformation matrix that maps a coordinate space, *a*, defined + /// one point, *a_p*, and two vectors, *a_v1* and *a_v2*, to a new coordinate + /// space, *b*, also defined by one point, *b_p*, and two vectors, *b_v1* and + /// *b_v2*. The transformation will thus include both some rotation and some + /// translation. Pseudocode example of aligning a billboard defined in the + /// XY plane with a normal in the +Z direction and that rotates around the Y + /// axis with a camera: + /// ~~~ + /// // define a coordiante space for a canonical billboard geometry defined + /// // right at the origin. + /// Point3 a_p = Point3(0,0,0); // billboard's initial base position + /// Vector3 a_v1 = Vector3(0,1,0); // billboard's initial up direction + /// Vector3 a_v2 = Vector3(0,0,1); // billboard's initial normal direction + /// + /// // define a coordinate space for where we want this billboard to go and + /// // the direction it should be facing + /// Point3 b_p = desired_base_pos; // new position for the billboard + /// Vector3 b_v1 = Vector3(0,1,0); // +Y is still up, doesn't change + /// Vector3 b_v2 = (camera.eye() - desired_base_pos); // the normal should point toward the camera + /// b_v2[1] = 0.0; // with 0 change in Y so the billboard does not tilt + /// b_v2.Normalize(); // convert to a unit vector + /// + /// Matrix4 billboard_model_matrix = Matrix4::Align(a_p, a_v1, a_v2, b_p, b_v1, b_v2); + /// ~~~ + static Matrix4 Align(const Point3 &a_p, const Vector3 &a_v1, const Vector3 &a_v2, + const Point3 &b_p, const Vector3 &b_v1, const Vector3 &b_v2); + + + // --- View Matrices --- + + /** Returns a view matrix that centers the camera at the 'eye' position and + orients it to look at the desired 'target' point with the top of the + screen pointed as closely as possible in the direction of the 'up' vector. + */ + static Matrix4 LookAt(Point3 eye, Point3 target, Vector3 up); + + // --- Projection Matrices --- + + /// Returns a perspective projection matrix equivalent to the one gluPerspective + /// creates. + static Matrix4 Perspective(float fov_y_in_degrees, float aspect_ratio, float near_plane_dist, float far_plane_dist); + + /// Returns a projection matrix equivalent the one glFrustum creates + static Matrix4 Frustum(float left, float right, float bottom, float top, float near_plane_dist, float far_plane_dist); + + // --- Inverse, Transposeand Other General Matrix Functions --- + + /// Returns the inverse of the 4x4 matrix if it is nonsingular. If it is + /// singular, then returns the identity matrix. + Matrix4 Inverse() const; + + /** Returns an orthonormal version of the matrix, i.e., guarantees that the + rotational component of the matrix is built from column vectors that are + all unit vectors and orthogonal to each other. + */ + Matrix4 Orthonormal() const; + + /// Returns the transpose of the matrix + Matrix4 Transpose() const; + + /// Returns the determinant of the 3x3 matrix formed by excluding the specified + /// row and column from the 4x4 matrix. + float SubDeterminant(int exclude_row, int exclude_col) const; + + /// Returns the cofactor matrix. + Matrix4 Cofactor() const; + + /// Returns the determinant of the 4x4 matrix + float Determinant() const; + + + +private: + float m[16]; +}; + + + +// ---------- Operator Overloads for Working with Points, Vectors, & Matrices ---------- + + +// --- Matrix multiplication for Points, Vectors, & Matrices --- + +/// Multiply matrix and scalar, returns the new matrix +Matrix4 operator*(const Matrix4& m, const float& s); + +/// Multiply matrix and scalar, returns the new matrix +Matrix4 operator*(const float& s, const Matrix4& m); + +/// Multiply matrix and point, returns the new point +Point3 operator*(const Matrix4& m, const Point3& p); + +/// Multiply matrix and vector, returns the new vector +Vector3 operator*(const Matrix4& m, const Vector3& v); + +/// Multiply two matrices, returns the result +Matrix4 operator*(const Matrix4& m1, const Matrix4& m2); + + + +/// Multiply matrix and the point and vector portions of the ray, returns the new ray +Ray operator*(const Matrix4& m, const Ray& r); + +// --- Stream operators --- + +std::ostream & operator<< ( std::ostream &os, const Matrix4 &m); +std::istream & operator>> ( std::istream &is, Matrix4 &m); + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/mesh.cc b/dev/MinGfx/src/mesh.cc new file mode 100644 index 0000000..dd967fa --- /dev/null +++ b/dev/MinGfx/src/mesh.cc @@ -0,0 +1,651 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "mesh.h" + +#include "matrix4.h" +#include "opengl_headers.h" + +#include +#include + +namespace mingfx { + +#define MAX_TEX_ATTRIBS 5 + + +Mesh::Mesh() : gpu_dirty_(true), vertex_buffer_(0), vertex_array_(0), element_buffer_(0), bvh_dirty_(true) { +} + +Mesh::Mesh(const Mesh &other) { + verts_ = other.verts_; + norms_ = other.norms_; + colors_ = other.colors_; + tex_coords_ = other.tex_coords_; + indices_ = other.indices_; + gpu_dirty_ = true; + bvh_dirty_ = true; +} + +Mesh::~Mesh() { +} + +int Mesh::AddTriangle(Point3 v1, Point3 v2, Point3 v3) { + gpu_dirty_ = true; + bvh_dirty_ = true; + + verts_.push_back(v1[0]); + verts_.push_back(v1[1]); + verts_.push_back(v1[2]); + + verts_.push_back(v2[0]); + verts_.push_back(v2[1]); + verts_.push_back(v2[2]); + + verts_.push_back(v3[0]); + verts_.push_back(v3[1]); + verts_.push_back(v3[2]); + + return num_triangles()-1; +} + +void Mesh::UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3) { + gpu_dirty_ = true; + bvh_dirty_ = true; + + int index = triangle_id * 9; + verts_[(size_t)index + 0] = v1[0]; + verts_[(size_t)index + 1] = v1[1]; + verts_[(size_t)index + 2] = v1[2]; + + verts_[(size_t)index + 3] = v2[0]; + verts_[(size_t)index + 4] = v2[1]; + verts_[(size_t)index + 5] = v2[2]; + + verts_[(size_t)index + 6] = v3[0]; + verts_[(size_t)index + 7] = v3[1]; + verts_[(size_t)index + 8] = v3[2]; +} + + +void Mesh::SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3) { + gpu_dirty_ = true; + + if (triangle_id >= num_triangles()) { + std::cerr << "Mesh::SetNormals() -- warning: cannot set normals for non-existant triangle with ID=" << triangle_id << ". Make sure the triangle has been added first." << std::endl; + return; + } + + int requiredSize = (triangle_id+1)*9; + if (norms_.size() < requiredSize) { + norms_.resize(requiredSize); + } + int index = triangle_id * 9; + norms_[(size_t)index + 0] = n1[0]; + norms_[(size_t)index + 1] = n1[1]; + norms_[(size_t)index + 2] = n1[2]; + + norms_[(size_t)index + 3] = n2[0]; + norms_[(size_t)index + 4] = n2[1]; + norms_[(size_t)index + 5] = n2[2]; + + norms_[(size_t)index + 6] = n3[0]; + norms_[(size_t)index + 7] = n3[1]; + norms_[(size_t)index + 8] = n3[2]; +} + +void Mesh::SetColors(int triangle_id, Color c1, Color c2, Color c3) { + gpu_dirty_ = true; + + if (triangle_id >= num_triangles()) { + std::cerr << "Mesh::SetColors() -- warning: cannot set colors for non-existant triangle with ID=" << triangle_id << ". Make sure the triangle has been added first." << std::endl; + return; + } + + int requiredSize = (triangle_id+1)*12; + if (colors_.size() < requiredSize) { + colors_.resize(requiredSize); + } + int index = triangle_id * 12; + colors_[(size_t)index + 0] = c1[0]; + colors_[(size_t)index + 1] = c1[1]; + colors_[(size_t)index + 2] = c1[2]; + colors_[(size_t)index + 3] = c1[3]; + + colors_[(size_t)index + 4] = c2[0]; + colors_[(size_t)index + 5] = c2[1]; + colors_[(size_t)index + 6] = c2[2]; + colors_[(size_t)index + 7] = c2[3]; + + colors_[(size_t)index + 8] = c3[0]; + colors_[(size_t)index + 9] = c3[1]; + colors_[(size_t)index + 10] = c3[2]; + colors_[(size_t)index + 11] = c3[3]; +} + +void Mesh::SetTexCoords(int triangle_id, int textureUnit, Point2 uv1, Point2 uv2, Point2 uv3) { + gpu_dirty_ = true; + + if (triangle_id >= num_triangles()) { + std::cerr << "Mesh::SetTexCoords() -- warning: cannot set texture coordinates for non-existant triangle with ID=" << triangle_id << ". Make sure the triangle has been added first." << std::endl; + return; + } + + // resize as needed based on the number of textureUnits used + if (tex_coords_.size() < (size_t)textureUnit+1) { + tex_coords_.resize((size_t)textureUnit+1); + } + + // resize the textureUnit-specific array based on the number of triangles + int requiredSize = (triangle_id+1)*6; + if (tex_coords_[textureUnit].size() < requiredSize) { + tex_coords_[textureUnit].resize(requiredSize); + } + int index = triangle_id * 6; + tex_coords_[textureUnit][(size_t)index + 0] = uv1[0]; + tex_coords_[textureUnit][(size_t)index + 1] = uv1[1]; + + tex_coords_[textureUnit][(size_t)index + 2] = uv2[0]; + tex_coords_[textureUnit][(size_t)index + 3] = uv2[1]; + + tex_coords_[textureUnit][(size_t)index + 4] = uv3[0]; + tex_coords_[textureUnit][(size_t)index + 5] = uv3[1]; +} + + +void Mesh::SetVertices(const std::vector &verts) { + gpu_dirty_ = true; + bvh_dirty_ = true; + + verts_.clear(); + for (int i=0; i &norms) { + gpu_dirty_ = true; + norms_.clear(); + for (int i=0; i &colors) { + gpu_dirty_ = true; + colors_.clear(); + for (int i=0; i &tex_coords) { + gpu_dirty_ = true; + // resize as needed based on the number of textureUnits used + if (tex_coords_.size() < (size_t)texture_unit+1) { + tex_coords_.resize((size_t)texture_unit+1); + } + tex_coords_[texture_unit].clear(); + for (int i=0; i indices) { + gpu_dirty_ = true; + bvh_dirty_ = true; + + indices_.clear(); + for (int i=0; i &xforms) { + gpu_dirty_ = true; + instance_xforms_.clear(); + for (int i=0; i texCoordsMemSize; + std::vector texCoordsMemOffset; + for (int i = 0; i < std::min((int)tex_coords_.size(),(int)MAX_TEX_ATTRIBS); i++) { + texCoordsMemSize.push_back(tex_coords_[i].size() * sizeof(float)); + texCoordsMemOffset.push_back(totalMemSize); + totalMemSize += texCoordsMemSize[i]; + } + + GLsizeiptr instanceXformsMemSize = instance_xforms_.size() * sizeof(float); + GLsizeiptr instanceXformsMemOffset = totalMemSize; + totalMemSize += instanceXformsMemSize; + + + glGenBuffers(1, &vertex_buffer_); + glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_); + glBufferData(GL_ARRAY_BUFFER, totalMemSize, NULL, GL_STATIC_DRAW); + + glBufferSubData(GL_ARRAY_BUFFER, vertsMemOffset, vertsMemSize, &verts_[0]); + if (norms_.size() > 0) { + glBufferSubData(GL_ARRAY_BUFFER, normsMemOffset, normsMemSize, &norms_[0]); + } + if (colors_.size() > 0) { + glBufferSubData(GL_ARRAY_BUFFER, colorsMemOffset, colorsMemSize, &colors_[0]); + } + for (int i=0; i 0) { + glBufferSubData(GL_ARRAY_BUFFER, instanceXformsMemOffset, instanceXformsMemSize, &instance_xforms_[0]); + } + glGenVertexArrays(1, &vertex_array_); + glBindVertexArray(vertex_array_); + glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_); + + // attribute 0 = vertices (required) + int attribID = 0; + int nComponents = 3; + glEnableVertexAttribArray(attribID); + glVertexAttribPointer(attribID, nComponents, GL_FLOAT, GL_FALSE, nComponents*sizeof(GLfloat), (char*)0 + vertsMemOffset); + + // attribute 1 = normals (optional) + attribID = 1; + if (norms_.size()) { + nComponents = 3; + glEnableVertexAttribArray(attribID); + glVertexAttribPointer(attribID, nComponents, GL_FLOAT, GL_TRUE, nComponents*sizeof(GLfloat), (char*)0 + normsMemOffset); + } + else { + glDisableVertexAttribArray(attribID); + } + + // attribute 2 = colors (optional) + attribID = 2; + if (colors_.size()) { + nComponents = 4; + glEnableVertexAttribArray(attribID); + glVertexAttribPointer(attribID, nComponents, GL_FLOAT, GL_TRUE, nComponents*sizeof(GLfloat), (char*)0 + colorsMemOffset); + } + else { + glDisableVertexAttribArray(attribID); + } + + // attribute(s) 3 to 7 = texture coordinates (optional) + nComponents = 2; + for (int i=0; i vertices; + std::vector normals; + std::vector texCoords; + + while (file) { + std::string line; + do + getline(file, line); + while (file && (line.length() == 0 || line[0] == '#')); + std::stringstream linestream(line); + std::string keyword; + linestream >> keyword; + if (keyword == "v") { + Point3 vertex; + linestream >> vertex[0] >> vertex[1] >> vertex[2]; + vertices.push_back(vertex); + } else if (keyword == "vn") { + Vector3 normal; + linestream >> normal[0] >> normal[1] >> normal[2]; + normals.push_back(normal); + } else if (keyword == "vt") { + Point2 texCoord; + linestream >> texCoord[0] >> texCoord[1]; + texCoords.push_back(texCoord); + } else if (keyword == "f") { + std::vector polygon; + std::string word; + while (linestream >> word) { + std::stringstream wstream(word); + int v; + wstream >> v; + polygon.push_back(v-1); // In OBJ files, indices start from 1 + } + for (int i = 2; i < polygon.size(); i++) { + //triangles.push_back(ivec3(polygon[0], polygon[i-1], polygon[i])); + int i1 = polygon[0]; + int i2 = polygon[(size_t)i-1]; + int i3 = polygon[i]; + //int t = AddTriangle(vertices[i1], vertices[i2], vertices[i3]); + //if (normals.size()) { + // SetNormals(t, normals[i1], normals[i2], normals[i3]); + //} + //if (texCoords.size()) { + // SetTexCoords(t, 0, texCoords[i1], texCoords[i2], texCoords[i3]); + //} + + indices_.push_back(i1); + indices_.push_back(i2); + indices_.push_back(i3); + } + } + } + + gpu_dirty_ = true; + std::vector verts, norms, uvs; + for (int i=0;i Mesh::read_triangle_indices_data(int triangle_id) const { + std::vector tri; + int i = 3*triangle_id; + if (indices_.size()) { + // indexed faces mode + tri.push_back(indices_[(size_t)i+0]); + tri.push_back(indices_[(size_t)i+1]); + tri.push_back(indices_[(size_t)i+2]); + } + else { + // ordered faces mode + tri.push_back(i); + tri.push_back(i+1); + tri.push_back(i+2); + } + return tri; +} + + +void Mesh::CalcPerFaceNormals() { + std::vector norms(num_vertices()); + for (int i=0; i indices = read_triangle_indices_data(i); + Point3 a = read_vertex_data(indices[0]); + Point3 b = read_vertex_data(indices[1]); + Point3 c = read_vertex_data(indices[2]); + Vector3 n = Vector3::Cross(b-a, c-a).ToUnit(); + norms[indices[0]] = n; + norms[indices[1]] = n; + norms[indices[2]] = n; + } + SetNormals(norms); +} + + +void Mesh::CalcPerVertexNormals() { + std::vector norms(num_vertices()); + for (int i=0; i indices = read_triangle_indices_data(i); + Point3 a = read_vertex_data(indices[0]); + Point3 b = read_vertex_data(indices[1]); + Point3 c = read_vertex_data(indices[2]); + Vector3 n = Vector3::Cross(b-a, c-a); + norms[indices[0]] = norms[indices[0]] + n; + norms[indices[1]] = norms[indices[1]] + n; + norms[indices[2]] = norms[indices[2]] + n; + } + + for (int i=0; i + + +namespace mingfx { + +class Matrix4; + +/** A triangle mesh data structure that can be rendered with a ShaderProgram + like DefaultShader. The mesh can be created algorithmically by adding triangles + one at a time or it can be loaded from an .obj file. + + Vertices are required -- you cannot have a mesh without vertices, but other + attributes (normals, colors, texture coordinates) are optional. When Draw() + is called the mesh will automatically set these other attributes if available. + + Example of loading from a file: + ~~~ + // during initialization + Mesh m; + m.LoadFromOBJ(Platform::FindMinGfxDataFile("teapot.obj")); + // also create a shader to draw it. + DefaultShader s; + + + // later to draw + Matrix4 M; + Matrix4 V = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); + Matrix4 P = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0); + s.Draw(M, V, P, m, DefaultShader::MaterialProperties()); + ~~~ + + Example of creating a mesh algorithmically: + ~~~ + Mesh mesh1; + int tri_id; + // add a first triangle + tri_id = mesh1.AddTriangle(Point3(0,0,0), Point3(1,0,0), Point3(1,1,0)); + // set attributes for the vertices + mesh1.SetNormals(tri_id, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1)); + mesh1.SetTexCoords(tri_id, 0, Point2(0,1), Point2(1,1), Point2(1,0)); + + // add a second triangle and attributes + tri_id = mesh1.AddTriangle(Point3(0,0,0), Point3(1,1,0), Point3(0,1,0)); + mesh1.SetNormals(tri_id, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1)); + mesh1.SetTexCoords(tri_id, 0, Point2(0,1), Point2(1,0), Point2(0,0)); + + // call this when done to save to the GPU + mesh1.UpdateGPUMemory(); + + // then you can draw the same way as in the previous example. + ~~~ + In the mode used above where you add one triangle at a time there is no way to + reuse vertices in multiple triangles. If you need to do this for efficiency + or other reasons, then you can use an indexed faces mode where you set the + mesh data structures directly. + + Example of creating a mesh that renders in an indexed faces mode: + ~~~ + std::vector indices; + std::vector vertices; + std::vector normals; + std::vector texcoords; + + // four vertices, each requires 3 floats: (x,y,z) + vertices.push_back(Point3(0,0,0)); + vertices.push_back(Point3(1,0,0)); + vertices.push_back(Point3(1,1,0)); + vertices.push_back(Point3(0,1,0)); + + // four normals, each requires 3 floats: (x,y,z) + normals.push_back(Vector3(0,0,1)); + normals.push_back(Vector3(0,0,1)); + normals.push_back(Vector3(0,0,1)); + normals.push_back(Vector3(0,0,1)); + + // four texture coords, each requires 2 floats: (u,v) + texcoords.push_back(Point2(0,1)); + texcoords.push_back(Point2(1,1)); + texcoords.push_back(Point2(1,0)); + texcoords.push_back(Point2(0,0)); + + // indices into the arrays above for the first triangle + indices.push_back(0); + indices.push_back(1); + indices.push_back(2); + + // indices for the second triangle, note some are reused + indices.push_back(0); + indices.push_back(2); + indices.push_back(3); + + Mesh mesh1; + mesh1.SetVertices(vertices); + mesh1.SetNormals(normals); + mesh1.SetTexCoords(0, texcoords); + mesh1.SetIndices(indices); + mesh1.UpdateGPUMemory(); + + // then you can draw the same way as in the previous example. + ~~~ + */ +class Mesh { +public: + /// Creates an empty mesh. + Mesh(); + + /// Copies all data and sets GPU dirty bit for the new mesh. + Mesh(const Mesh &other); + + virtual ~Mesh(); + + + /** This reads a mesh stored in the common Wavefront Obj file format. The + loader here is simplistic and not guaranteed to work on all valid .obj + files, but it should work on many simple ones. UpdateGPUMemory() is + called automatically after the model is loaded. */ + void LoadFromOBJ(const std::string &filename); + + + + // ---- TRIANGLE LIST MODE ---- + // No indices are stored, each set of 3 vertices forms a triangle, and if the + // triangles share vertices, those vertices need to be repeated. + + /** Adds a triangle to the mesh datastructure and returns a triangle ID. + The ID should then be used as the first argument for follow-on calls to + SetNormals(), SetColors(), and SetTexCoords(). The vertices must be + specified in counter-clockwise order so that the normal of the triangle + can be determined following the right-hand rule. */ + int AddTriangle(Point3 v1, Point3 v2, Point3 v3); + + /** Updates the vertex positions for a triangle that has already been added + to the mesh. */ + void UpdateTriangle(int triangle_id, Point3 v1, Point3 v2, Point3 v3); + + /** Sets the normals for the three vertices of a triangle that has already + been added to the mesh */ + void SetNormals(int triangle_id, Vector3 n1, Vector3 n2, Vector3 n3); + + /** Sets per-vertex colors for the three vertices of a triangle that has already + been added to the mesh */ + void SetColors(int triangle_id, Color c1, Color c2, Color c3); + + /** Sets the texture coordinates for the three vertices of a triangle that + has already been added to the mesh. The first textureUnit is 0, and you + should always use 0 for this parameter unless you are doing multi-texturing. */ + void SetTexCoords(int triangle_id, int texture_unit, Point2 uv1, Point2 uv2, Point2 uv3); + + + + // ---- INDEXED TRIANGLES MODE ---- + // Vertices are stored in an array and indices are stored in a separate array + // each set of 3 indices into the vertex array defines one triangle. Here, + // you cannot add one triangle at a time to the mesh. Instead you must set + // the arrays of indices, vertices, and other attributes for the mesh at + // once. + + /// Sets the vertex array for the mesh directly. + void SetVertices(const std::vector &verts); + + /// Sets the normal array for the mesh directly. + void SetNormals(const std::vector &norms); + + /// Sets the per-vertex colors array for the mesh directly. + void SetColors(const std::vector &colors); + + /// Sets a texture coordinates array for the mesh directly. + void SetTexCoords(int texture_unit, const std::vector &tex_coords); + + /// Sets the indices into the vertex array to use to create the triangles. + /// Each consecutive set of 3 indices forms one triangle: + /// (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ... + void SetIndices(const std::vector index_array); + + + void SetInstanceTransforms(const std::vector &xforms); + + + // ---- These functions can be used instead of the above if you are working with + // regular C-style arrays and floats rather than the higher level types like + // Point3 and Vector3. ---- + + /// Sets the vertex array for the mesh directly. Vertices are stored as + /// (x,y,z), (x,y,z), (x,y,z), ... + /// This version of the function accepts a C-style array rather than std::vector<> + void SetVertices(float *verts_array, int num_verts); + + /// Sets the normal array for the mesh directly. Normals are stored as + /// (x,y,z), (x,y,z), (x,y,z), ... following the same ordering as was used + /// for SetVertices(). + /// This version of the function accepts a C-style array rather than std::vector<> + void SetNormals(float *norms_array, int num_norms); + + /// Sets the per-vertex colors array for the mesh directly. Colors are stored as + /// (r,g,b,a), (r,g,b,a), (r,g,b,a), ... following the same ordering as was used + /// for SetVertices(). + /// This version of the function accepts a C-style array rather than std::vector<> + void SetColors(float *colors_array, int num_colors); + + /// Sets a texture coordinates array for the mesh directly. Tex coords are stored as + /// (u,v), (u,v), (u,v), ... following the same ordering as was used + /// for SetVertices(). + /// This version of the function accepts a C-style array rather than std::vector<> + void SetTexCoords(int texture_unit, float *tex_coords_array, int num_tex_coords); + + /// Sets the indices into the vertex array to use to create the triangles. + /// Each consecutive set of 3 indices forms one triangle: + /// (v1,v2,v3), (v1,v2,v3), (v1,v2,v3), ... + /// This version of the function accepts a C-style array rather than std::vector<> + void SetIndices(unsigned int *index_array, int num_indices); + + + + /** This copies the entire mesh data structure to a vertex array in GPU memory, + which must happen before you can draw the mesh. For large meshes, this can + take some time, so you may want to call this during initialization immediately + after generating the mesh. If you do not, it will be called automatically + for you the first time Draw() is called. If the mesh contains normals, per- + vertex colors and/or texture coordinates these are added as attributes within + the vertex array. */ + void UpdateGPUMemory(); + + /** This sends the mesh vertices and attributes down the graphics pipe using + glDrawArrays() for the non-indexed mode and glDrawElements() for the indexed + mode. This is just the geometry -- for anything to show up on the screen, + you must already have a ShaderProgram enabled before calling this function. */ + void Draw(); + + + + /** This (re)calculates the normals for the mesh and stores them with the mesh + data structure. It assumes a faceted mesh, like a cube, where each triangle + has separate vertices. The normal is calculated for each triangle face and + then the result is associated with each vertex that makes up the triangle. + If you have a smooth mesh where vertices are shared between multiple faces + then use CalcPerVertexNormals() instead. */ + void CalcPerFaceNormals(); + + /** This (re)calculates the normals for the mesh and stores them with the mesh + data structure. It assumes a smooth mesh, like a sphere, where each vertex + belongs to one or more triangles. Each vertex normal is calculated as a + weighted sum of the face normals for adjacent faces. The weighting is based + upon the relative areas of the neighboring faces (i.e., a large neighboring + triangle contributes more to the vertex normal than a small one). */ + void CalcPerVertexNormals(); + + + /** This (re)calculates a Bounding Volume Hierarchy for the mesh, which can + be used together with Ray::FastIntersectMesh() to do faster ray-mesh + intersection testing. */ + void BuildBVH(); + + /** Returns a pointer to the underlying BVH data structure. If the data + struture has not yet been build or needs to be updated due to a change in + the geometry of the mesh, then the BVH is recalculated before returning + the pointer. */ + BVH* bvh_ptr(); + + // Access to properties indexed by vertex number + + /// The total number of vertices in the mesh. + int num_vertices() const; + + /// Read only access to the vertex position data. Data are returned as a Point3. Indexed by vertex number. Also see num_vertices(). + /// Use the SetVertices() function to set (or edit) vertex data. + Point3 read_vertex_data(int vertex_id) const; + + /// Read only access to per-vertex normal data. Data are returned as a Vector3. Indexed by vertex number. Also see num_vertices(). + /// Use the SetNormals() function to set (or edit) per-vertex normal data. + Vector3 read_normal_data(int vertex_id) const; + + /// Read only access to per-vertex color data. Data are returned as a Color. Indexed by vertex number. Also see num_vertices(). + /// Use the SetColors() function to set (or edit) per-vertex color data. + Color read_color_data(int vertex_id) const; + + /// Read only access to per-vertex texture coordinates data. Data are returned as a Point2. Indexed by vertex number. Also see num_vertices(). + /// Use the SetTexCoords() function to set (or edit) per-vertex tex coords. + Point2 read_tex_coords_data(int texture_unit, int vertex_id) const; + + + // Access to triangles + + /// The total number of triangles in the mesh. + int num_triangles() const; + + /// Read only access to the indices that make up a particular triangle. Data are returned as a 3-element array + // of unsigned ints. Use the SetIndices() function to set (or edit) the indices for the mesh. + std::vector read_triangle_indices_data(int triangle_id) const; + + +private: + std::vector verts_; + std::vector norms_; + std::vector colors_; + std::vector< std::vector > tex_coords_; + std::vector indices_; + std::vector instance_xforms_; + + bool gpu_dirty_; + GLuint vertex_buffer_; + GLuint vertex_array_; + GLuint element_buffer_; + + bool bvh_dirty_; + BVH bvh_; +}; + + +} // end namespace + + +#endif diff --git a/dev/MinGfx/src/mingfx.h b/dev/MinGfx/src/mingfx.h new file mode 100644 index 0000000..51ea0f8 --- /dev/null +++ b/dev/MinGfx/src/mingfx.h @@ -0,0 +1,46 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + + +/// \file mingfx.h Includes the entire MinGfx library and calls using namespace mingfx + +#ifndef SRC_MINGFX_H_ +#define SRC_MINGFX_H_ + +#include "aabb.h" +#include "bvh.h" +#include "color.h" +#include "craft_cam.h" +#include "default_shader.h" +#include "gfxmath.h" +#include "graphics_app.h" +#include "matrix4.h" +#include "mesh.h" +#include "mingfx_config.h" +#include "opengl_headers.h" +#include "platform.h" +#include "point2.h" +#include "point3.h" +#include "quaternion.h" +#include "quick_shapes.h" +#include "ray.h" +#include "shader_program.h" +#include "text_shader.h" +#include "texture2d.h" +#include "unicam.h" +#include "vector2.h" +#include "vector3.h" + +//using namespace mingfx; + +#endif diff --git a/dev/MinGfx/src/mingfx_config.h.in b/dev/MinGfx/src/mingfx_config.h.in new file mode 100644 index 0000000..eeaf230 --- /dev/null +++ b/dev/MinGfx/src/mingfx_config.h.in @@ -0,0 +1,25 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +// The file config.h.in is processed by cmake to produce config.h. This +// replaces strings of the form "at"CMAKE_VARIABLE_NAME"at" with the value +// of the corresponding cmake variable, allowing us to pass directory paths +// and other information configured with cmake into our C++ code. + + +#define MINGFX_DATA_DIR_BUILD "@CMAKE_CURRENT_SOURCE_DIR@/data" +#define MINGFX_DATA_DIR_INSTALL "@CMAKE_INSTALL_PREFIX@/@INSTALL_DATA_DEST@" + +#define MINGFX_SHADERS_DIR_BUILD "@CMAKE_CURRENT_SOURCE_DIR@/src/shaders" +#define MINGFX_SHADERS_DIR_INSTALL "@CMAKE_INSTALL_PREFIX@/@INSTALL_SHADERS_DEST@" + diff --git a/dev/MinGfx/src/opengl_headers.h b/dev/MinGfx/src/opengl_headers.h new file mode 100644 index 0000000..a220277 --- /dev/null +++ b/dev/MinGfx/src/opengl_headers.h @@ -0,0 +1,48 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +// We often use the code that is commented out below to load opengl headers in a cross-platform way, +// but since nanogui uses glad internally, we will just use their approach to load opengl headers +// so that everything is consistent. + +// disable warnings for this 3rd party code +#pragma warning ( push, 0 ) +#include +#pragma warning ( pop ) + + +/*** Our typical (non-nanogui) appraoch: + +// GLEW is needed on Windows and Linux +#ifdef _WIN32 +#include "GL/glew.h" +#include "GL/wglew.h" +#elif (!defined(__APPLE__)) +#include "GL/glxew.h" +#endif + +// OpenGL Headers +#if defined(WIN32) +#define NOMINMAX +#include +#include +#elif defined(__APPLE__) +#define GL_GLEXT_PROTOTYPES +#include +#include +#else +#define GL_GLEXT_PROTOTYPES +#include +#endif + +***/ \ No newline at end of file diff --git a/dev/MinGfx/src/platform.cc b/dev/MinGfx/src/platform.cc new file mode 100644 index 0000000..5d941b6 --- /dev/null +++ b/dev/MinGfx/src/platform.cc @@ -0,0 +1,78 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "platform.h" + +#include "mingfx_config.h" + +#include +#include + +#ifdef WIN32 + #include +#else + #include +#endif + + +namespace mingfx { + +bool Platform::FileExists(const std::string &filename) { +#ifdef WIN32 + LPCTSTR szPath = (LPCTSTR)filename.c_str(); + DWORD dwAttrib = GetFileAttributes(szPath); + return (dwAttrib != INVALID_FILE_ATTRIBUTES && + !(dwAttrib & FILE_ATTRIBUTE_DIRECTORY)); +#else + struct stat buf; + return (stat(filename.c_str(), &buf) == 0); +#endif +} + + +std::string Platform::FindFile(const std::string &basename, const std::vector &searchpath) { + for (int i=0; i paths; + std::stringstream ss(searchpath); + std::string path; + while (ss >> path) { + paths.push_back(path); + if (ss.peek() == ';') + ss.ignore(); + } + return FindFile(basename, paths); +} + + +std::string Platform::FindMinGfxDataFile(const std::string &basename) { + std::vector searchpath; + searchpath.push_back("."); + searchpath.push_back("data"); + searchpath.push_back(MINGFX_DATA_DIR_INSTALL); + searchpath.push_back(MINGFX_DATA_DIR_BUILD); + return FindFile(basename, searchpath); +} + +std::string Platform::FindMinGfxShaderFile(const std::string &basename) { + std::vector searchpath; + searchpath.push_back("."); + searchpath.push_back("shaders"); + searchpath.push_back(MINGFX_SHADERS_DIR_INSTALL); + searchpath.push_back(MINGFX_SHADERS_DIR_BUILD); + return FindFile(basename, searchpath); +} + + +} // end namespace diff --git a/dev/MinGfx/src/platform.h b/dev/MinGfx/src/platform.h new file mode 100644 index 0000000..e609756 --- /dev/null +++ b/dev/MinGfx/src/platform.h @@ -0,0 +1,83 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_PLATFORM_H_ +#define SRC_PLATFORM_H_ + +#include +#include + +namespace mingfx { + + +/** Provides access to the underlying file system and other platform-specific + routines. + */ +class Platform { +public: + + /// True if filename is found and can be opened for reading on the system + static bool FileExists(const std::string &filename); + + /* Looks for a file named basename in each of the paths specified. If found, + the full path to the file is returned. If not found, then basename is returned. + Example: + ~~~ + std::vector search_path; + search_path.push_back("."); + search_path.push_back("./data"); + search_path.push_back("./shaders"); + search_path.push_back("/usr/local/share/blah/blah/data"); + + std::string file = Platform::findFile("mydata.csv", search_path); + ~~~ + */ + static std::string FindFile(const std::string &basename, const std::vector &searchpath); + + /* Looks for a file named basename in each of the paths specified in a semi-colon + separated list. If found, the full path to the file is returned. If not found, + then basename is returned. Example: + ~~~ + std::string search_path = ".;./data;./shaders;/usr/local/share/blah/blah/data"; + std::string file = Platform::findFile("mydata.csv", search_path); + ~~~ + */ + static std::string FindFile(const std::string &basename, const std::string &searchpath); + + /** Searches for a data file that ships with MinGfx. This will look in the + following locations in order: + 1. the current working directory. + 2. a subdirectory called data within the current working directory. + 3. the installed data directory INSTALL_PREFIX/share/MinGfx-1.0/data. + 4. the data directory in the MinGfx build tree. + If the file is found, the full path is returned, else basename is returned. + */ + static std::string FindMinGfxDataFile(const std::string &basename); + + /** Searches for a shader file that ships with MinGfx. This will look in the + following locations in order: + 1. the current working directory. + 2. a subdirectory called shaders within the current working directory. + 3. the installed shaders directory INSTALL_PREFIX/share/MinGfx-1.0/shaders. + 4. the shaders directory in the MinGfx build tree. + If the file is found, the full path is returned, else basename is returned. + */ + static std::string FindMinGfxShaderFile(const std::string &basename); + +private: +}; + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/point2.cc b/dev/MinGfx/src/point2.cc new file mode 100644 index 0000000..9d98777 --- /dev/null +++ b/dev/MinGfx/src/point2.cc @@ -0,0 +1,104 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "point2.h" + +#include + +namespace mingfx { + +static const Point2 s_zerop2d = Point2(0,0); +static const Point2 s_onep2d = Point2(1,1); + +const Point2& Point2::Origin() { return s_zerop2d; } +const Point2& Point2::Zero() { return s_zerop2d; } +const Point2& Point2::One() { return s_onep2d; } + + +Point2::Point2() { + p[0] = 0.0; + p[1] = 0.0; +} + +Point2::Point2(float x, float y) { + p[0] = x; + p[1] = y; +} + +Point2::Point2(float *ptr) { + p[0] = ptr[0]; + p[1] = ptr[1]; +} + +Point2::Point2(const Point2& other) { + p[0] = other[0]; + p[1] = other[1]; +} + +Point2::~Point2() { +} + +bool Point2::operator==(const Point2& other) const { + return (fabs(other[0] - p[0]) < MINGFX_MATH_EPSILON && + fabs(other[1] - p[1]) < MINGFX_MATH_EPSILON); +} + +bool Point2::operator!=(const Point2& other) const { + return (fabs(other[0] - p[0]) >= MINGFX_MATH_EPSILON || + fabs(other[1] - p[1]) >= MINGFX_MATH_EPSILON); +} + +Point2& Point2::operator=(const Point2& other) { + p[0] = other[0]; + p[1] = other[1]; + return *this; +} + +float Point2::operator[](const int i) const { + if ((i>=0) && (i<=1)) { + return p[i]; + } + else { + // w component of a point is 1 so return the constant 1.0 + return 1.0; + } +} + +float& Point2::operator[](const int i) { + return p[i]; +} + + +Point2 Point2::Lerp(const Point2 &b, float alpha) const { + float x = (1.0f-alpha)*(*this)[0] + alpha*b[0]; + float y = (1.0f-alpha)*(*this)[1] + alpha*b[1]; + return Point2(x,y); +} + +Point2 Point2::Lerp(const Point2 &a, const Point2 &b, float alpha) { + float x = (1.0f-alpha)*a[0] + alpha*b[0]; + float y = (1.0f-alpha)*a[1] + alpha*b[1]; + return Point2(x,y); +} + + +const float * Point2::value_ptr() const { + return p; +} + + +std::ostream & operator<< ( std::ostream &os, const Point2 &p) { + return os << "(" << p[0] << ", " << p[1] << ")"; +} + +std::istream & operator>> ( std::istream &is, Point2 &p) { + // format: (x, y) + char dummy; + return is >> dummy >> p[0] >> dummy >> p[1] >> dummy; +} + + +} // end namespace diff --git a/dev/MinGfx/src/point2.h b/dev/MinGfx/src/point2.h new file mode 100644 index 0000000..954f313 --- /dev/null +++ b/dev/MinGfx/src/point2.h @@ -0,0 +1,112 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_POINT2_H_ +#define SRC_POINT2_H_ + +#include + +namespace mingfx { + +/// Epsilon value used for == and != comparisons within MinGfx +#define MINGFX_MATH_EPSILON 1e-8 + + +/** A 2D Point with floating point coordinates, used for storing 2D texture + coordinates, screen-space graphics, and mouse input. + */ +class Point2 { +public: + /// Default point at the origin + Point2(); + + /// Constructs a point given (x,y,1), where the 1 comes from the use of + /// homogeneous coordinates in computer graphics. + Point2(float x, float y); + + /// Constructs a point given a pointer to x,y data + Point2(float *p); + + /// Copy constructor for point + Point2(const Point2& p); + + /// Point destructor + virtual ~Point2(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Point2& p) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Point2& p) const; + + /// Assignment operator + Point2& operator=(const Point2& p); + + /// Read only access to the ith coordinate of the point. + float operator[](const int i) const; + + /// Returns a reference to the ith coordinate of the point. Use this + /// accessor if you wish to set the coordinate rather than just request + /// its value. Example: + /// ~~~ + /// Point2 a; + /// a[0] = 5.0; // set the x-coordinate of the point + /// ~~~ + float& operator[](const int i); + + /// Read only access to the x coordinate. Can also use my_point[0]. Use + /// the my_point[0] = 1.0; form if you need to set the value. + float x() const { return p[0]; } + + /// Read only access to the y coordinate. Can also use my_point[1]. Use + /// the my_point[1] = 1.0; form if you need to set the value. + float y() const { return p[1]; } + + /// In homogeneous coordinates, the w coordinate for all points is 1.0. + float w() const { return 1.0; } + + + /// Returns a const pointer to the raw data array + const float * value_ptr() const; + + /// Linear interpolation between this point and another. Alpha=0.0 returns + /// this point, and alpha=1.0 returns the other point, other values blend + /// between the two. + Point2 Lerp(const Point2 &b, float alpha) const; + + + /// (0,0) - a shortcut for a special point that is frequently needed + static const Point2& Origin(); + + /// (0,0) - a shortcut for a special point that is frequently needed + static const Point2& Zero(); + + /// (1,1) - a shortcut for a special point that is frequently needed + static const Point2& One(); + + /// Linear interpolation between two points. Alpha=0.0 returns 'a' and + /// alpha=1.0 returns 'b', other values blend between the two. + static Point2 Lerp(const Point2 &a, const Point2 &b, float alpha); + +private: + float p[2]; +}; + + +std::ostream & operator<< ( std::ostream &os, const Point2 &p); +std::istream & operator>> ( std::istream &is, Point2 &p); + + +} // namespace + +#endif diff --git a/dev/MinGfx/src/point3.cc b/dev/MinGfx/src/point3.cc new file mode 100644 index 0000000..c75a18e --- /dev/null +++ b/dev/MinGfx/src/point3.cc @@ -0,0 +1,144 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "point3.h" +#include "vector3.h" + +#include + +namespace mingfx { + +static const Point3 s_zerop3d = Point3(0,0,0); +static const Point3 s_onep3d = Point3(1,1,1); + +const Point3& Point3::Origin() { return s_zerop3d; } +const Point3& Point3::Zero() { return s_zerop3d; } +const Point3& Point3::One() { return s_onep3d; } + + +Point3::Point3() { + p[0] = 0.0; + p[1] = 0.0; + p[2] = 0.0; +} + +Point3::Point3(float x, float y, float z) { + p[0] = x; + p[1] = y; + p[2] = z; +} + +Point3::Point3(float *ptr) { + p[0] = ptr[0]; + p[1] = ptr[1]; + p[2] = ptr[2]; +} + +Point3::Point3(const Point3& other) { + p[0] = other[0]; + p[1] = other[1]; + p[2] = other[2]; +} + +Point3::~Point3() { +} + +bool Point3::operator==(const Point3& other) const { + return (fabs(other[0] - p[0]) < MINGFX_MATH_EPSILON && + fabs(other[1] - p[1]) < MINGFX_MATH_EPSILON && + fabs(other[2] - p[2]) < MINGFX_MATH_EPSILON); +} + +bool Point3::operator!=(const Point3& other) const { + return (fabs(other[0] - p[0]) >= MINGFX_MATH_EPSILON || + fabs(other[1] - p[1]) >= MINGFX_MATH_EPSILON || + fabs(other[2] - p[2]) >= MINGFX_MATH_EPSILON); +} + +Point3& Point3::operator=(const Point3& other) { + p[0] = other[0]; + p[1] = other[1]; + p[2] = other[2]; + return *this; +} + +float Point3::operator[](const int i) const { + if ((i>=0) && (i<=2)) { + return p[i]; + } + else { + // w component of a point is 1 so return the constant 1.0 + return 1.0; + } +} + +float& Point3::operator[](const int i) { + return p[i]; +} + + +const float * Point3::value_ptr() const { + return p; +} + +Point3 Point3::Lerp(const Point3 &b, float alpha) const { + float x = (1.0f-alpha)*(*this)[0] + alpha*b[0]; + float y = (1.0f-alpha)*(*this)[1] + alpha*b[1]; + float z = (1.0f-alpha)*(*this)[2] + alpha*b[2]; + return Point3(x,y,z); +} + +Point3 Point3::Lerp(const Point3 &a, const Point3 &b, float alpha) { + float x = (1.0f-alpha)*a[0] + alpha*b[0]; + float y = (1.0f-alpha)*a[1] + alpha*b[1]; + float z = (1.0f-alpha)*a[2] + alpha*b[2]; + return Point3(x,y,z); +} + + +float Point3::DistanceToPlane(const Point3 &plane_origin, const Vector3 &plane_normal) { + return ((*this) - ClosestPointOnPlane(plane_origin, plane_normal)).Length(); +} + + +Point3 Point3::ClosestPointOnPlane(const Point3 &plane_origin, const Vector3 &plane_normal) { + Vector3 to_plane_origin = plane_origin - (*this); + Vector3 inv_n = -plane_normal; + if (to_plane_origin.Dot(inv_n) < 0.0) { + inv_n = -inv_n; + } + + Vector3 to_plane = inv_n * to_plane_origin.Dot(inv_n); + return (*this) + to_plane; +} + +Point3 Point3::ClosestPoint(const std::vector &point_list) { + int closest_id = 0; + float closest_dist = (point_list[0] - *this).Length(); + for (int i=1; i> ( std::istream &is, Point3 &p) { + // format: (x, y, z) + char dummy; + return is >> dummy >> p[0] >> dummy >> p[1] >> dummy >> p[2] >> dummy; +} + + +} // end namespace diff --git a/dev/MinGfx/src/point3.h b/dev/MinGfx/src/point3.h new file mode 100644 index 0000000..50783f0 --- /dev/null +++ b/dev/MinGfx/src/point3.h @@ -0,0 +1,154 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_POINT3_H_ +#define SRC_POINT3_H_ + +#include +#include + +namespace mingfx { + +/// Epsilon value used for == and != comparisons within MinGfx +#define MINGFX_MATH_EPSILON 1e-8 + +// forward declaration +class Vector3; + + +/** A 3D Point with floating point coordinates, used for storing vertices and + all sorts of other 3D graphics operations. Point3s can be transformed by a + Matrix4. Example: + ~~~ + Point3 a(0,0,1); + std::cout << a << std::endl; + + Matrix4 M = Matrix4::Translation(Vector3(0,0,-1)); + Point3 b = M * a; + std::cout << b << std::endl; + + // you can access the individual components of the point in two ways: + Point3 p(1,2,3); + float option1 = p.x(); + float option2 = p[0]; + + // to set an individual component of the point use the [] operator: + Point3 p2; + p2[0] = 0.4; + p2[1] = 1.2; + p2[2] = 3.1; + ~~~ + */ +class Point3 { +public: + /// Default point at the origin + Point3(); + + /// Constructs a point given (x,y,z,1), where the 1 comes from the use of + /// homogeneous coordinates in computer graphics. + Point3(float x, float y, float z); + + /// Constructs a point given a pointer to x,y,z data + Point3(float *p); + + /// Copy constructor for point + Point3(const Point3& p); + + /// Point destructor + virtual ~Point3(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Point3& p) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Point3& p) const; + + /// Assignment operator + Point3& operator=(const Point3& p); + + /// Read only access to the ith coordinate of the point. + float operator[](const int i) const; + + /// Returns a reference to the ith coordinate of the point. Use this + /// accessor if you wish to set the coordinate rather than just request + /// its value. Example: + /// ~~~ + /// Point3 a; + /// a[0] = 5.0; // set the x-coordinate of the point + /// ~~~ + float& operator[](const int i); + + /// Read only access to the x coordinate. Can also use my_point[0]. Use + /// the my_point[0] = 1.0; form if you need to set the value. + float x() const { return p[0]; } + + /// Read only access to the y coordinate. Can also use my_point[1]. Use + /// the my_point[1] = 1.0; form if you need to set the value. + float y() const { return p[1]; } + + /// Read only access to the z coordinate. Can also use my_point[2]. Use + /// the my_point[2] = 1.0; form if you need to set the value. + float z() const { return p[2]; } + + /// In homogeneous coordinates, the w coordinate for all points is 1.0. + float w() const { return 1.0; } + + /// Returns a const pointer to the raw data array + const float * value_ptr() const; + + + /// Linear interpolation between this point and another. Alpha=0.0 returns + /// this point, and alpha=1.0 returns the other point, other values blend + /// between the two. + Point3 Lerp(const Point3 &b, float alpha) const; + + /// Returns the shortest (i.e., perpendicular) distance from this point to + /// a plane defined by a point and a normal. + float DistanceToPlane(const Point3 &plane_origin, const Vector3 &plane_normal); + + /// Returns the perpendicular projection of this point onto a plane defined + /// by a point and a normal. + Point3 ClosestPointOnPlane(const Point3 &plane_origin, const Vector3 &plane_normal); + + /// Given a list of points, returns the closest in the last to the current point. + Point3 ClosestPoint(const std::vector &point_list); + + + + /// (0,0,0) - a shortcut for a special point that is frequently needed + static const Point3& Origin(); + + /// (0,0,0) - a shortcut for a special point that is frequently needed + static const Point3& Zero(); + + /// (1,1,1) - a shortcut for a special point that is frequently needed + static const Point3& One(); + + /// Linear interpolation between two points. Alpha=0.0 returns 'a' and + /// alpha=1.0 returns 'b', other values blend between the two. + static Point3 Lerp(const Point3 &a, const Point3 &b, float alpha); + + + +private: + float p[3]; +}; + + +std::ostream & operator<< ( std::ostream &os, const Point3 &p); +std::istream & operator>> ( std::istream &is, Point3 &p); + + +} // namespace + +#endif diff --git a/dev/MinGfx/src/quaternion.cc b/dev/MinGfx/src/quaternion.cc new file mode 100644 index 0000000..4f2998f --- /dev/null +++ b/dev/MinGfx/src/quaternion.cc @@ -0,0 +1,260 @@ +/* +Copyright (c) 2017,2018 Regents of the University of Minnesota. +All Rights Reserved. +See corresponding header file for details. +*/ + +#define _USE_MATH_DEFINES +#include "quaternion.h" + +#include "gfxmath.h" + +namespace mingfx { + + +Quaternion::Quaternion() { + q[0] = 0.0; + q[1] = 0.0; + q[2] = 0.0; + q[3] = 1.0; +} + +Quaternion::Quaternion(float qx, float qy, float qz, float qw) { + q[0] = qx; + q[1] = qy; + q[2] = qz; + q[3] = qw; +} + +Quaternion::Quaternion(float *ptr) { + q[0] = ptr[0]; + q[1] = ptr[1]; + q[2] = ptr[2]; + q[3] = ptr[3]; +} + +Quaternion::Quaternion(const Quaternion& other) { + q[0] = other[0]; + q[1] = other[1]; + q[2] = other[2]; + q[3] = other[3]; +} + +Quaternion::~Quaternion() { +} + +bool Quaternion::operator==(const Quaternion& other) const { + return (fabs(other[0] - q[0]) < MINGFX_MATH_EPSILON && + fabs(other[1] - q[1]) < MINGFX_MATH_EPSILON && + fabs(other[2] - q[2]) < MINGFX_MATH_EPSILON && + fabs(other[3] - q[3]) < MINGFX_MATH_EPSILON); +} + +bool Quaternion::operator!=(const Quaternion& other) const { + return (fabs(other[0] - q[0]) >= MINGFX_MATH_EPSILON || + fabs(other[1] - q[1]) >= MINGFX_MATH_EPSILON || + fabs(other[2] - q[2]) >= MINGFX_MATH_EPSILON || + fabs(other[3] - q[3]) >= MINGFX_MATH_EPSILON); +} + +Quaternion& Quaternion::operator=(const Quaternion& other) { + q[0] = other[0]; + q[1] = other[1]; + q[2] = other[2]; + q[3] = other[3]; + return *this; +} + +float Quaternion::operator[](const int i) const { + if ((i>=0) && (i<=3)) { + return q[i]; + } + else { + // this is an error! + return 0.0; + } +} + +float& Quaternion::operator[](const int i) { + return q[i]; +} + + +const float * Quaternion::value_ptr() const { + return q; +} + +Quaternion Quaternion::Slerp(const Quaternion &other, float alpha) const { + // https://en.wikipedia.org/wiki/Slerp + + Quaternion v0 = *this; + Quaternion v1 = other; + + // Only unit quaternions are valid rotations. + // Normalize to avoid undefined behavior. + v0.Normalize(); + v1.Normalize(); + + // Compute the cosine of the angle between the two vectors. + float dot = v0.Dot(v1); + + // If the dot product is negative, the quaternions + // have opposite handed-ness and slerp won't take + // the shorter path. Fix by reversing one quaternion. + if (dot < 0.0f) { + v1 = -v1; + dot = -dot; + } + + const double DOT_THRESHOLD = 0.9995; + if (dot > DOT_THRESHOLD) { + // If the inputs are too close for comfort, linearly interpolate + // and normalize the result. + + Quaternion result = v0 + alpha*(v1 - v0); + result.Normalize(); + return result; + } + + GfxMath::Clamp(dot, -1, 1); // Robustness: Stay within domain of acos() + float theta_0 = acos(dot); // theta_0 = angle between input vectors + float theta = theta_0 * alpha; // theta = angle between v0 and result + + float s0 = cos(theta) - dot * sin(theta) / sin(theta_0); // == sin(theta_0 - theta) / sin(theta_0) + float s1 = sin(theta) / sin(theta_0); + + return (s0 * v0) + (s1 * v1); +} + +Quaternion Quaternion::Slerp(const Quaternion &a, const Quaternion &b, float alpha) { + return a.Slerp(b, alpha); +} + + +std::ostream & operator<< ( std::ostream &os, const Quaternion &q) { + return os << "<" << q[0] << ", " << q[1] << ", " << q[2] << ", " << q[3] << ")"; +} + +std::istream & operator>> ( std::istream &is, Quaternion &q) { + // format: + char dummy; + return is >> dummy >> q[0] >> dummy >> q[1] >> dummy >> q[2] >> dummy >> q[3] >> dummy; +} + + +float Quaternion::Dot(const Quaternion& other) const { + return q[0]*other[0] + q[1]*other[1] + q[2]*other[2] + q[3]*other[3]; + +} + +float Quaternion::Length() const { + return sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]); +} + +void Quaternion::Normalize() { + float sizeSq = + q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]; + if (sizeSq < MINGFX_MATH_EPSILON) { + return; // do nothing to zero quats + } + float scaleFactor = (float)1.0/(float)sqrt(sizeSq); + q[0] *= scaleFactor; + q[1] *= scaleFactor; + q[2] *= scaleFactor; + q[3] *= scaleFactor; +} + +Quaternion Quaternion::ToUnit() const { + Quaternion qtmp(*this); + qtmp.Normalize(); + return qtmp; +} + +/// Returns the conjugate of the quaternion. +Quaternion Quaternion::Conjugate() const { + return Quaternion(-q[0], -q[1], -q[2], q[3]); +} + + +Quaternion Quaternion::FromAxisAngle(const Vector3 &axis, float angle) { + // [qx, qy, qz, qw] = [sin(a/2) * vx, sin(a/2)* vy, sin(a/2) * vz, cos(a/2)] + float x = sin(angle/2.0f) * axis[0]; + float y = sin(angle/2.0f) * axis[1]; + float z = sin(angle/2.0f) * axis[2]; + float w = cos(angle/2.0f); + return Quaternion(x,y,z,w); +} + + +Quaternion Quaternion::FromEulerAnglesZYX(const Vector3 &angles) { + Quaternion rot_x = Quaternion::FromAxisAngle(Vector3::UnitX(), angles[0]); + Quaternion rot_y = Quaternion::FromAxisAngle(Vector3::UnitY(), angles[1]); + Quaternion rot_z = Quaternion::FromAxisAngle(Vector3::UnitZ(), angles[2]); + return rot_z * rot_y * rot_x; +} + +Vector3 Quaternion::ToEulerAnglesZYX() const { + // https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles + + Vector3 angles; + + // roll (x-axis rotation) + float sinr = +2.0f * (w() * x() + y() * z()); + float cosr = +1.0f - 2.0f * (x() * x() + y() * y()); + angles[0] = std::atan2(sinr, cosr); + + // pitch (y-axis rotation) + float sinp = +2.0f * (w() * y() - z() * x()); + if (std::fabs(sinp) >= 1.f) + angles[1] = std::copysign(GfxMath::HALF_PI, sinp); // use 90 degrees if out of range + else + angles[1] = std::asin(sinp); + + // yaw (z-axis rotation) + float siny = +2.0f * (w() * z() + x() * y()); + float cosy = +1.0f - 2.0f * (y() * y() + z() * z()); + angles[2] = std::atan2(siny, cosy); + + return angles; +} + + +Quaternion operator*(const Quaternion& q1, const Quaternion& q2) { + float real1 = q1[3]; + Vector3 imag1 = Vector3(q1[0], q1[1], q1[2]); + + float real2 = q2[3]; + Vector3 imag2 = Vector3(q2[0], q2[1], q2[2]); + + float real = real1*real2 - imag1.Dot(imag2); + Vector3 imag = real1*imag2 + real2*imag1 + imag1.Cross(imag2); + + return Quaternion(imag[0], imag[1], imag[2], real); +} + + +Quaternion operator/(const Quaternion& q, const float s) { + const float invS = 1.0f / s; + return Quaternion(q[0]*invS, q[1]*invS, q[2]*invS, q[3]*invS); +} + +Quaternion operator*(const float s, const Quaternion& q) { + return Quaternion(q[0]*s, q[1]*s, q[2]*s, q[3]*s); +} + +Quaternion operator*(const Quaternion& q, const float s) { + return Quaternion(q[0]*s, q[1]*s, q[2]*s, q[3]*s); +} + +Quaternion operator-(const Quaternion& q) { + return Quaternion(-q[0], -q[1], -q[2], -q[3]); +} + +Quaternion operator+(const Quaternion& q1, const Quaternion& q2) { + return Quaternion(q1[0] + q2[0], q1[1] + q2[1], q1[2] + q2[2], q1[3] + q2[3]); +} + +Quaternion operator-(const Quaternion& q1, const Quaternion& q2) { + return Quaternion(q1[0] - q2[0], q1[1] - q2[1], q1[2] - q2[2], q1[3] - q2[3]); +} + +} // end namespace diff --git a/dev/MinGfx/src/quaternion.h b/dev/MinGfx/src/quaternion.h new file mode 100644 index 0000000..fc69ba7 --- /dev/null +++ b/dev/MinGfx/src/quaternion.h @@ -0,0 +1,142 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_QUATERNION_H_ +#define SRC_QUATERNION_H_ + +#include + +#include "vector3.h" + +namespace mingfx { + +/** A quaternion to represent rotations in 3D space. The main use of quaternions + within the library is to support smooth interpolation between rotations, since + this is not possible using Euler angles or rotation matrices. The class includes + a Slerp routine for spherical interpolation between rotations. Example use: + ~~~ + // find a rotation 1/2 way between r1 and r2, both originally expressed in Euler angles + + Vector3 euler1 = GfxMath::ToRadians(Vector3(0,0,60)); + Vector3 euler2 = GfxMath::ToRadians(Vector3(45,45,60)); + + Quaternion q1 = Quaternion::FromEulerAnglesZYX(euler1); + Quaternion q2 = Quaternion::FromEulerAnglesZYX(euler2); + + float alpha = 0.5; + Quaternion q_half_way = q1.Slerp(q2, alpha); + Vector3 new_euler_angles = GfxMath::ToDegrees(q_half_way.ToEulerAnglesZYX()); + ~~~ + */ +class Quaternion { +public: + /// Creates a quat with the identity rotation + Quaternion(); + + /// Creates a quat from the 4 parameters + Quaternion(float qx, float qy, float qz, float qw); + + /// Creates a quate from a pointer to 4 floating point numbers in the order + /// qx, qy, qz, qw. + Quaternion(float *ptr); + + /// Copy constructor + Quaternion(const Quaternion& other); + + virtual ~Quaternion(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Quaternion& q) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Quaternion& q) const; + + /// Assignment operator + Quaternion& operator=(const Quaternion& q); + + /// Read only access to the ith coordinate of the quaternion (qx, qy, qz, qw). + float operator[](const int i) const; + + /// Writable access the ith coordinate of the quaternion (qx, qy, qz, qw). + float& operator[](const int i); + + /// Read only access to the x coordinate of the imaginary part of the quaternion. + float x() const { return q[0]; } + + /// Read only access to the y coordinate of the imaginary part of the quaternion. + float y() const { return q[1]; } + + /// Read only access to the z coordinate of the imaginary part of the quaternion. + float z() const { return q[2]; } + + /// Read only access to the w, real part, of the quaternion. + float w() const { return q[3]; } + + /// Returns a const pointer to the raw data array, stored in the order qx, qy, qz, qw. + const float * value_ptr() const; + + /// Returns the dot product of this quaternion with another. + float Dot(const Quaternion& q) const; + + /// Returns the length of the quaternion. + float Length() const; + + /// Normalizes the quat by making it unit length. + void Normalize(); + + /// Returns a normalized (i.e., unit length) version of the quaternion without + /// modifying the original. + Quaternion ToUnit() const; + + /// Returns the conjugate of the quaternion. + Quaternion Conjugate() const; + + /// Converts the rotation specified by the quaternion into Euler angles. + Vector3 ToEulerAnglesZYX() const; + + /// Uses spherical interpolation to interpoloate between the rotation stored + /// in this quaternion and the rotation stored in another. + Quaternion Slerp(const Quaternion &other, float alpha) const; + + /// Creates a new quaternion that describes a rotation by angle radians about + // the specified axis. + static Quaternion FromAxisAngle(const Vector3 &axis, float angle); + + /// Creates a new quaternion from a rotation defined in Euler angles. + static Quaternion FromEulerAnglesZYX(const Vector3 &angles); + + /// Uses spherical interpolation to interpoloate between the rotations + /// specified by two quaternions. + static Quaternion Slerp(const Quaternion &a, const Quaternion &b, float alpha); + +private: + float q[4]; +}; + + +Quaternion operator*(const Quaternion& q1, const Quaternion& q2); +Quaternion operator/(const Quaternion& q, const float s); +Quaternion operator*(const float s, const Quaternion& q); +Quaternion operator*(const Quaternion& q, const float s); +Quaternion operator-(const Quaternion& q); +Quaternion operator+(const Quaternion& q1, const Quaternion& q2); +Quaternion operator-(const Quaternion& q1, const Quaternion& q2); + +std::ostream & operator<< ( std::ostream &os, const Quaternion &q); +std::istream & operator>> ( std::istream &is, Quaternion &q); + + +} // end namespace + + +#endif diff --git a/dev/MinGfx/src/quick_shapes.cc b/dev/MinGfx/src/quick_shapes.cc new file mode 100644 index 0000000..388aa3d --- /dev/null +++ b/dev/MinGfx/src/quick_shapes.cc @@ -0,0 +1,727 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "quick_shapes.h" +#include "platform.h" + +#include +#include +#include + + +namespace mingfx { + + + +#define PI 3.14159265359f +#define TWOPI 6.28318530718f + + + +// Helper datastructure for building shapes algorithmically +class Vertex { +public: + Vertex(GLfloat xx, GLfloat yy, GLfloat zz, GLfloat nnx, GLfloat nny, GLfloat nnz) : + x(xx), y(yy), z(zz), nx(nnx), ny(nny), nz(nnz) {} + + GLfloat x; + GLfloat y; + GLfloat z; + GLfloat nx; + GLfloat ny; + GLfloat nz; +}; + + + + +QuickShapes::QuickShapes() { +} + +QuickShapes::~QuickShapes() { +} + + + + +// ------------ CUBE ------------ + + +void QuickShapes::initCube() { + GLfloat vertices[] = { + 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,-1.0f, 1.0f, // v0-v1-v2 (front) + -1.0f,-1.0f, 1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, // v2-v3-v0 + + 1.0f, 1.0f, 1.0f, 1.0f,-1.0f, 1.0f, 1.0f,-1.0f,-1.0f, // v0-v3-v4 (right) + 1.0f,-1.0f,-1.0f, 1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 1.0f, // v4-v5-v0 + + 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,-1.0f, -1.0f, 1.0f,-1.0f, // v0-v5-v6 (top) + -1.0f, 1.0f,-1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, // v6-v1-v0 + + -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,-1.0f, -1.0f,-1.0f,-1.0f, // v1-v6-v7 (left) + -1.0f,-1.0f,-1.0f, -1.0f,-1.0f, 1.0f, -1.0f, 1.0f, 1.0f, // v7-v2-v1.0 + + -1.0f,-1.0f,-1.0f, 1.0f,-1.0f,-1.0f, 1.0f,-1.0f, 1.0f, // v7-v4-v3 (bottom) + 1.0f,-1.0f, 1.0f, -1.0f,-1.0f, 1.0f, -1.0f,-1.0f,-1.0f, // v3-v2-v7 + + 1.0f,-1.0f,-1.0f, -1.0f,-1.0f,-1.0f, -1.0f, 1.0f,-1.0f, // v4-v7-v6 (back) + -1.0f, 1.0f,-1.0f, 1.0f, 1.0f,-1.0f, 1.0f,-1.0f,-1.0f // v6-v5-v4 + }; + + GLfloat normals[] = { + 0, 0, 1, 0, 0, 1, 0, 0, 1, // v0-v1-v2 (front) + 0, 0, 1, 0, 0, 1, 0, 0, 1, // v2-v3-v0 + + 1, 0, 0, 1, 0, 0, 1, 0, 0, // v0-v3-v4 (right) + 1, 0, 0, 1, 0, 0, 1, 0, 0, // v4-v5-v0 + + 0, 1, 0, 0, 1, 0, 0, 1, 0, // v0-v5-v6 (top) + 0, 1, 0, 0, 1, 0, 0, 1, 0, // v6-v1-v0 + + -1, 0, 0, -1, 0, 0, -1, 0, 0, // v1-v6-v7 (left) + -1, 0, 0, -1, 0, 0, -1, 0, 0, // v7-v2-v1 + + 0,-1, 0, 0,-1, 0, 0,-1, 0, // v7-v4-v3 (bottom) + 0,-1, 0, 0,-1, 0, 0,-1, 0, // v3-v2-v7 + + 0, 0,-1, 0, 0,-1, 0, 0,-1, // v4-v7-v6 (back) + 0, 0,-1, 0, 0,-1, 0, 0,-1 // v6-v5-v4 + }; + + cubeMesh_.SetVertices(vertices, 36); + cubeMesh_.SetNormals(normals, 36); + cubeMesh_.UpdateGPUMemory(); +} + + +void QuickShapes::DrawCube(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color) +{ + if (cubeMesh_.num_vertices() == 0) { + initCube(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = emptyTex_; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &cubeMesh_, defaultMaterial_); +} + + + + +// ------------ SQUARE ------------ + + +void QuickShapes::initSquare() { + GLfloat vertices[] = { + 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,-1.0f, -1.0f, 0.0f,-1.0f, // v0-v5-v6 (top) + -1.0f, 0.0f,-1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f // v6-v1-v0 + }; + + GLfloat normals[] = { + 0, 1, 0, 0, 1, 0, 0, 1, 0, + 0, 1, 0, 0, 1, 0, 0, 1, 0 + }; + + GLfloat texcoords[] = { + 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f + }; + + squareMesh_.SetVertices(vertices, 6); + squareMesh_.SetNormals(normals, 6); + squareMesh_.SetTexCoords(0, texcoords, 6); + squareMesh_.UpdateGPUMemory(); +} + + +void QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color) +{ + if (squareMesh_.num_vertices() == 0) { + initSquare(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = emptyTex_; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &squareMesh_, defaultMaterial_); +} + + +void QuickShapes::DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color, + const Texture2D &tex) +{ + if (squareMesh_.num_vertices() == 0) { + initSquare(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = tex; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &squareMesh_, defaultMaterial_); +} + + + + + +// ------------ CYLINDER ------------ + + +void QuickShapes::initCyl() { + + std::vector verts; + + Vertex top(0,1,0, 0,1,0); + Vertex bot(0,-1,0, 0,-1,0); + + const int nslices = 20; + for (int s=1; s vertices; + std::vector normals; + for (int i=0; i verts; + + Vertex top(0,1,0, 0,1,0); + Vertex bot(0,-1,0, 0,-1,0); + + const int nslices = 20; + for (int s=1; s vertices; + std::vector normals; + for (int i = 0; i < verts.size(); i++) { + vertices.push_back(Point3(verts[i].x, verts[i].y, verts[i].z)); + normals.push_back(Vector3(verts[i].nx, verts[i].ny, verts[i].nz)); + } + + coneMesh_.SetVertices(vertices); + coneMesh_.SetNormals(normals); + coneMesh_.UpdateGPUMemory(); +} + + +void QuickShapes::DrawCone(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color) +{ + if (coneMesh_.num_vertices() == 0) { + initCone(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = emptyTex_; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &coneMesh_, defaultMaterial_); +} + + + + + +// ------------ SPHERE ------------ + + +void QuickShapes::initSph() { + + std::vector verts; + + Vertex top(0,1,0, 0,1,0); + Vertex bot(0,-1,0, 0,-1,0); + + const int nslices = 40; + const int nstacks = 40; + for (int s=1; s vertices; + std::vector normals; + for (int i = 0; i < verts.size(); i++) { + vertices.push_back(Point3(verts[i].x, verts[i].y, verts[i].z)); + normals.push_back(Vector3(verts[i].nx, verts[i].ny, verts[i].nz)); + } + sphereMesh_.SetVertices(vertices); + sphereMesh_.SetNormals(normals); + sphereMesh_.UpdateGPUMemory(); +} + + +void QuickShapes::DrawSphere(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color) +{ + if (sphereMesh_.num_vertices() == 0) { + initSph(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = emptyTex_; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &sphereMesh_, defaultMaterial_); +} + + + + +// ------------ BRUSH ------------ + + +void QuickShapes::initBrush() { + + // Raw vertices -- points that make up the brush geometry + const GLfloat v[19][3] = { + { 0.5f, 0.0f, 0.0f}, // 0 + {-0.5f, 0.0f, 0.0f}, // 1 + + { 0.5f, 0.1f, 0.25f}, // 2 + {-0.5f, 0.1f, 0.25f}, // 3 + { 0.5f, 0.1f, 0.75f}, // 4 + {-0.5f, 0.1f, 0.75f}, // 5 + { 0.1f, 0.06f, 1.0f}, // 6 + {-0.1f, 0.06f, 1.0f}, // 7 + { 0.15f, 0.1f, 1.75f}, // 8 + {-0.15f, 0.1f, 1.75f}, // 9 + + { 0.0f, 0.0f, 1.85f}, // 10 + + { 0.5f, -0.1f, 0.25f}, // 11 + {-0.5f, -0.1f, 0.25f}, // 12 + { 0.5f, -0.1f, 0.75f}, // 13 + {-0.5f, -0.1f, 0.75f}, // 14 + { 0.1f, -0.06f, 1.0f}, // 15 + {-0.1f, -0.06f, 1.0f}, // 16 + { 0.15f, -0.1f, 1.75f}, // 17 + {-0.15f, -0.1f, 1.75f} // 18 + }; + + + // Vertices arranged into triangles + const GLfloat verts[34][3][3] = { + // top + {{v[0][0], v[0][1], v[0][2]}, {v[1][0], v[1][1], v[1][2]}, {v[2][0], v[2][1], v[2][2]}}, + {{v[1][0], v[1][1], v[1][2]}, {v[3][0], v[3][1], v[3][2]}, {v[2][0], v[2][1], v[2][2]}}, + + {{v[2][0], v[2][1], v[2][2]}, {v[3][0], v[3][1], v[3][2]}, {v[4][0], v[4][1], v[4][2]}}, + {{v[3][0], v[3][1], v[3][2]}, {v[5][0], v[5][1], v[5][2]}, {v[4][0], v[4][1], v[4][2]}}, + + {{v[4][0], v[4][1], v[4][2]}, {v[5][0], v[5][1], v[5][2]}, {v[6][0], v[6][1], v[6][2]}}, + {{v[5][0], v[5][1], v[5][2]}, {v[7][0], v[7][1], v[7][2]}, {v[6][0], v[6][1], v[6][2]}}, + + {{v[6][0], v[6][1], v[6][2]}, {v[7][0], v[7][1], v[7][2]}, {v[8][0], v[8][1], v[8][2]}}, + {{v[7][0], v[7][1], v[7][2]}, {v[9][0], v[9][1], v[9][2]}, {v[8][0], v[8][1], v[8][2]}}, + + {{v[8][0], v[8][1], v[8][2]}, {v[9][0], v[9][1], v[9][2]}, {v[10][0], v[10][1], v[10][2]}}, + + // bottom + {{v[0][0], v[0][1], v[0][2]}, {v[12][0], v[12][1], v[12][2]}, {v[1][0], v[1][1], v[1][2]}}, + {{v[11][0], v[11][1], v[11][2]}, {v[12][0], v[12][1], v[12][2]}, {v[0][0], v[0][1], v[0][2]}}, + + {{v[11][0], v[11][1], v[11][2]}, {v[14][0], v[14][1], v[14][2]}, {v[12][0], v[12][1], v[12][2]}}, + {{v[13][0], v[13][1], v[13][2]}, {v[14][0], v[14][1], v[14][2]}, {v[11][0], v[11][1], v[11][2]}}, + + {{v[13][0], v[13][1], v[13][2]}, {v[16][0], v[16][1], v[16][2]}, {v[14][0], v[14][1], v[14][2]}}, + {{v[15][0], v[15][1], v[15][2]}, {v[16][0], v[16][1], v[16][2]}, {v[13][0], v[13][1], v[13][2]}}, + + {{v[15][0], v[15][1], v[15][2]}, {v[18][0], v[18][1], v[18][2]}, {v[16][0], v[16][1], v[16][2]}}, + {{v[17][0], v[17][1], v[17][2]}, {v[18][0], v[18][1], v[18][2]}, {v[15][0], v[15][1], v[15][2]}}, + + {{v[18][0], v[18][1], v[18][2]}, {v[17][0], v[17][1], v[17][2]}, {v[10][0], v[10][1], v[10][2]}}, + + // one side + {{v[11][0], v[11][1], v[11][2]}, {v[0][0], v[0][1], v[0][2]}, {v[2][0], v[2][1], v[2][2]}}, + + {{v[11][0], v[11][1], v[11][2]}, {v[2][0], v[2][1], v[2][2]}, {v[4][0], v[4][1], v[4][2]}}, + {{v[4][0], v[4][1], v[4][2]}, {v[13][0], v[13][1], v[13][2]}, {v[11][0], v[11][1], v[11][2]}}, + + {{v[13][0], v[13][1], v[13][2]}, {v[4][0], v[4][1], v[4][2]}, {v[6][0], v[6][1], v[6][2]}}, + {{v[6][0], v[6][1], v[6][2]}, {v[15][0], v[15][1], v[15][2]}, {v[13][0], v[13][1], v[13][2]}}, + + {{v[15][0], v[15][1], v[15][2]}, {v[6][0], v[6][1], v[6][2]}, {v[8][0], v[8][1], v[8][2]}}, + {{v[8][0], v[8][1], v[8][2]}, {v[17][0], v[17][1], v[17][2]}, {v[15][0], v[15][1], v[15][2]}}, + + {{v[17][0], v[17][1], v[17][2]}, {v[8][0], v[8][1], v[8][2]}, {v[10][0], v[10][1], v[10][2]}}, + + // other side + {{v[3][0], v[3][1], v[3][2]}, {v[1][0], v[1][1], v[1][2]}, {v[12][0], v[12][1], v[12][2]}}, + + {{v[3][0], v[3][1], v[3][2]}, {v[12][0], v[12][1], v[12][2]}, {v[14][0], v[14][1], v[14][2]}}, + {{v[14][0], v[14][1], v[14][2]}, {v[5][0], v[5][1], v[5][2]}, {v[3][0], v[3][1], v[3][2]}}, + + {{v[5][0], v[5][1], v[5][2]}, {v[14][0], v[14][1], v[14][2]}, {v[16][0], v[16][1], v[16][2]}}, + {{v[16][0], v[16][1], v[16][2]}, {v[7][0], v[7][1], v[7][2]}, {v[5][0], v[5][1], v[5][2]}}, + + {{v[7][0], v[7][1], v[7][2]}, {v[16][0], v[16][1], v[16][2]}, {v[18][0], v[18][1], v[18][2]}}, + {{v[18][0], v[18][1], v[18][2]}, {v[9][0], v[9][1], v[9][2]}, {v[7][0], v[7][1], v[7][2]}}, + + {{v[9][0], v[9][1], v[9][2]}, {v[18][0], v[18][1], v[18][2]}, {v[10][0], v[10][1], v[10][2]}} + + }; + + + // Normals defined so as to make each face of the brush a flat surface + const GLfloat norms[34][3][3] = { + // top + {{0.0f, 0.93f, -0.37f}, {0.0f, 0.93f, -0.37f}, {0.0f, 0.93f, -0.37f}}, + {{0.0f, 0.93f, -0.37f}, {0.0f, 0.93f, -0.37f}, {0.0f, 0.93f, -0.37f}}, + + {{0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}}, + {{0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 1.0f, 0.0f}}, + + {{0.0f, 0.988f, 0.158f}, {0.0f, 0.988f, 0.158f}, {0.0f, 0.988f, 0.158f}}, + {{0.0f, 0.988f, 0.158f}, {0.0f, 0.988f, 0.158f}, {0.0f, 0.988f, 0.158f}}, + + {{0.0f, 0.999f, -0.0533f}, {0.0f, 0.999f, -0.0533f}, {0.0f, 0.999f, -0.0533f}}, + {{0.0f, 0.999f, -0.0533f}, {0.0f, 0.999f, -0.0533f}, {0.0f, 0.999f, -0.0533f}}, + + {{0.0f, 0.709f, 0.709f}, {0.0f, 0.709f, 0.709f}, {0.0f, 0.709f, 0.709f}}, + + // bottom + {{0.0f, -0.93f, -0.37f}, {0.0f, -0.93f, -0.37f}, {0.0f, -0.93f, -0.37f}}, + {{0.0f, -0.93f, -0.37f}, {0.0f, -0.93f, -0.37f}, {0.0f, -0.93f, -0.37f}}, + + {{0.0f, -1.0f, 0.0f}, {0.0f, -1.0f, 0.0f}, {0.0f, -1.0f, 0.0f}}, + {{0.0f, -1.0f, 0.0f}, {0.0f, -1.0f, 0.0f}, {0.0f, -1.0f, 0.0f}}, + + {{0.0f, -0.988f, 0.158f}, {0.0f, -0.988f, 0.158f}, {0.0f, -0.988f, 0.158f}}, + {{0.0f, -0.988f, 0.158f}, {0.0f, -0.988f, 0.158f}, {0.0f, -0.988f, 0.158f}}, + + {{0.0f, -0.999f, -0.0533f}, {0.0f, -0.999f, -0.0533f}, {0.0f, -0.999f, -0.0533f}}, + {{0.0f, -0.999f, -0.0533f}, {0.0f, -0.999f, -0.0533f}, {0.0f, -0.999f, -0.0533f}}, + + {{0.0f, -0.709f, 0.709f}, {0.0f, -0.709f, 0.709f}, {0.0f, -0.709f, 0.709f}}, + + // one side + {{1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}}, + + {{1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}}, + {{1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}}, + + {{0.848f, 0.0f, 0.530f}, {0.848f, 0.0f, 0.530f}, {0.848f, 0.0f, 0.530f}}, + {{0.848f, 0.0f, 0.530f}, {0.848f, 0.0f, 0.530f}, {0.848f, 0.0f, 0.530f}}, + + {{1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}}, + {{1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}}, + + {{0.709f, 0.0f, 0.709f}, {0.709f, 0.0f, 0.709f}, {0.709f, 0.0f, 0.709f}}, + + // other side + {{-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}}, + + {{-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}}, + {{-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}}, + + {{-0.848f, 0.0f, 0.530f}, {-0.848f, 0.0f, 0.530f}, {-0.848f, 0.0f, 0.530f}}, + {{-0.848f, 0.0f, 0.530f}, {-0.848f, 0.0f, 0.530f}, {-0.848f, 0.0f, 0.530f}}, + + {{-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}}, + {{-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f}}, + + {{-0.709f, 0.0f, 0.709f}, {-0.709f, 0.0f, 0.709f}, {-0.709f, 0.0f, 0.709f}} + }; + + brushMesh_.SetVertices((float*)verts, 102); + brushMesh_.SetNormals((float*)norms, 102); + brushMesh_.UpdateGPUMemory(); +} + + +void QuickShapes::DrawBrush(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color) +{ + if (brushMesh_.num_vertices() == 0) { + initBrush(); + } + defaultMaterial_.ambient_reflectance = color; + defaultMaterial_.diffuse_reflectance = color; + defaultMaterial_.surface_texture = emptyTex_; + defaultShader_.Draw(modelMatrix, viewMatrix, projectionMatrix, &brushMesh_, defaultMaterial_); +} + + + +// ---------------- + + +void QuickShapes::DrawLineSegment(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color, + const Point3 &p1, + const Point3 &p2, + float radius) +{ + Matrix4 S = Matrix4::Scale(Vector3(radius, 0.5f*(p2-p1).Length(), radius)); + Vector3 y = (p2-p1).ToUnit(); + Vector3 z = Vector3(1,0,0).Cross(y).ToUnit(); + if (z == Vector3(0,0,0)) { + z = Vector3(0,0,1).Cross(y).ToUnit(); + } + Vector3 x = y.Cross(z); + Matrix4 R = Matrix4::FromRowMajorElements( + x[0], y[0], z[0], 0, + x[1], y[1], z[1], 0, + x[2], y[2], z[2], 0, + 0, 0, 0, 1 + ); + Matrix4 T = Matrix4::Translation(0.5 * Vector3(p1[0]+p2[0], p1[1]+p2[1], p1[2]+p2[2])); + + Matrix4 M = T * R * S; + + DrawCylinder(modelMatrix * M, viewMatrix, projectionMatrix, color); +} + + + +void QuickShapes::DrawLines(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color, + const std::vector &points, + LinesType ltype, + float radius) +{ + if (ltype == LinesType::LINES) { + for (size_t i=0; iDraw(); + + // Deactivate the shader program + fullscreenShader_.StopProgram(); + + glEnable(GL_DEPTH_TEST); + glDepthMask(GL_TRUE); +} + + +DefaultShader* QuickShapes::default_shader() { + return &defaultShader_; +} + + +DefaultShader::MaterialProperties* QuickShapes::material() { + return &defaultMaterial_; +} + + +} // end namespace diff --git a/dev/MinGfx/src/quick_shapes.h b/dev/MinGfx/src/quick_shapes.h new file mode 100644 index 0000000..c38ac52 --- /dev/null +++ b/dev/MinGfx/src/quick_shapes.h @@ -0,0 +1,254 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2017, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_QUICK_SHAPES_H_ +#define SRC_QUICK_SHAPES_H_ + +#include "color.h" +#include "default_shader.h" +#include "mesh.h" +#include "point3.h" +#include "shader_program.h" +#include "texture2d.h" +#include "vector3.h" +#include "matrix4.h" + +#include + + + +namespace mingfx { + +/** This class provides a quick way to draw shapes for use in debugging or + simple scenes. You can specify the color for each shape as part of the + Draw...() call. Other lighting parameters (the intensity of the light, + advanced material properties) are pre-set to reasonable defaults that apply + to all of the shapes drawn. You can edit these if you wish, but note that + the intent of this class is just to provide a quick way to draw shapes -- + this is not the right tool to use if you wish to do quality renderings and + use multiple types of materials. + + Example usage: + ~~~ + // define a new QuickShapes object during initialization, or as a class + // member variable + QuickShapes quick_shapes; + + + void DrawUsingOpenGL() { + // later, in your draw routine, use it to draw shapes + Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); + Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0); + + Matrix4 m_cube = Matrix4::Translation(Vector3(-2.5,0,0)) * Matrix4::Scale(Vector3(0.5, 0.5, 0.5)); + quick_shapes.DrawCube(m_cube, view, proj, Color(1,1,1)); + + Matrix4 m_sphere = Matrix4::Scale(Vector3(2.5, 2.5, 2.5)); + quick_shapes.DrawSphere(m_sphere, view, proj, Color(1,1,1)); + + Matrix4 m_loop; + std::vector loop; + loop.push_back(Point3( 4.0, 4.0, -4.0)); + loop.push_back(Point3(-4.0, 4.0, -4.0)); + loop.push_back(Point3(-4.0, 4.0, 4.0)); + loop.push_back(Point3( 4.0, 4.0, 4.0)); + quick_shapes.DrawLines(m_loop, view, proj, Color(1,1,1), loop, QuickShapes::LinesType::LINE_LOOP, 0.1); + } + ~~~ + */ +class QuickShapes { +public: + + QuickShapes(); + virtual ~QuickShapes(); + + + // -------- 3D PRIMITIVES -------- + + /** Draws a cube with extents -1 to 1 given the model, view, and projection + matrices provided and using the supplied color as a material property. + */ + void DrawCube(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color); + + /** Draws a cylinder with radius 1 and height y=-1 to 1 given the model, + view, and projection matrices provided and using the supplied color as a + material property. + */ + void DrawCylinder(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color); + + /** Draws a cone with radius 1 and height y=-1 to 1 given the model, + view, and projection matrices provided and using the supplied color as a + material property. + */ + void DrawCone(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color); + + /** Draws a sphere with radius 1 given the model, view, and projection + matrices provided and using the supplied color as a material property. + */ + void DrawSphere(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color); + + /** Draws the classic 3D paintbrush cursor from the 2001 Keefe et al. + CavePainting paper. The tip of the brush is at (0,0,0), the front + flat edge runs along the X axis, and the handle runs in the +Z direction. + */ + void DrawBrush(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color); + + + // -------- 3D COMPOSITE SHAPES -------- + + /** Draws a cylinder between the two points. + */ + void DrawLineSegment(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color, + const Point3 &p1, + const Point3 &p2, + float radius); + + enum class LinesType { + LINES, + LINE_STRIP, + LINE_LOOP + }; + + /** Draws a series of line segments. Using linesType=LINES connects each + consecutive pair of points in the points array with a line. A linesType=LINE_STRIP + will connect each point to the next. And, a linesType=LINE_LOOP will connect + each point to the next and in addition connect the last to the first. Example: + ~~~ + Matrix4 model; + Matrix4 view = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); + Matrix4 proj = Matrix4::Perspective(60.0, aspect_ratio(), 0.1, 10.0); + std::vector loop; + loop.push_back(Point3( 4.0, 4.0, -4.0)); + loop.push_back(Point3(-4.0, 4.0, -4.0)); + loop.push_back(Point3(-4.0, 4.0, 4.0)); + loop.push_back(Point3( 4.0, 4.0, 4.0)); + quick_shapes.DrawLines(model, view, proj, Color(1,1,1), loop, QuickShapes::LinesType::LINE_LOOP, 0.1); + ~~~ + */ + void DrawLines(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color, + const std::vector &points, + LinesType linesType, + float radius); + + /** Draws an arrow originating at point p and extending in the direction and + length specified by dir. radius is the radius of the cylinder used to + draw the shaft of the arrow. + */ + void DrawArrow(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, + const Color &color, + Point3 p, Vector3 dir, float radius); + + /** Draws a right handed set of axes at the coordinate frame specified by + the modelMatrix. The arrows are 1 unit in length and colored based + on the axis: X=red, Y=green, Z=blue. + */ + void DrawAxes(const Matrix4 &modelMatrix, + const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix); + + + // -------- 2D PRIMITIVES -------- + + /** Draws a square in the X-Y plane with extents -1 to 1 and normal in the + +Y direction. Uses the model, view, and projection matrices provided + and the supplied color as a material property. + */ + void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color); + + /** Draws a square, which you can deform into some other shape by adjusting + the model matrix, and applies a texture to it. The texture must already + be bound to the OpenGL textureID provided. The square lies in the X-Y + plane with extents -1 to 1 and normal in the +Y direction. No lighting + is applied. + */ + void DrawSquare(const Matrix4 &modelMatrix, const Matrix4 &viewMatrix, + const Matrix4 &projectionMatrix, const Color &color, + const Texture2D &texture); + + /** Draws a background texture across the whole screen. Typically, you will + want to do this before any other draw calls. + */ + void DrawFullscreenTexture(const Color &color, const Texture2D &texture); + + + /** Returns a pointer to the default shader used internally by the Draw class + so that you may change the default lighting properties if you wish. + */ + DefaultShader* default_shader(); + + /** Returns a pointer to the default material properties for the shapes so + that you may adjust the reflectance properties used by all the shapes + if needed. + */ + DefaultShader::MaterialProperties* material(); + + +private: + + void DrawWithFullscreen(const Color &color, Mesh *mesh, const Texture2D &tex); + + Mesh cubeMesh_; + void initCube(); + + Mesh squareMesh_; + void initSquare(); + + Mesh fullMesh_; + void initFull(); + + Mesh cylMesh_; + void initCyl(); + + Mesh coneMesh_; + void initCone(); + + Mesh sphereMesh_; + void initSph(); + + Mesh brushMesh_; + void initBrush(); + + DefaultShader defaultShader_; + DefaultShader::MaterialProperties defaultMaterial_; + Texture2D emptyTex_; + + ShaderProgram fullscreenShader_; +}; + +} // end namespace + +#endif \ No newline at end of file diff --git a/dev/MinGfx/src/ray.cc b/dev/MinGfx/src/ray.cc new file mode 100644 index 0000000..5d406ef --- /dev/null +++ b/dev/MinGfx/src/ray.cc @@ -0,0 +1,313 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "ray.h" + +namespace mingfx { + + Ray::Ray() : p_(Point3::Origin()), d_(-Vector3::UnitZ()) { + } + + Ray::Ray(const Point3 &origin, const Vector3 &direction) : p_(origin), d_(direction) { + } + + Ray::~Ray() { + } + + + bool Ray::operator==(const Ray& other) const { + return (p_ == other.origin()) && (d_ == other.direction()); + } + + + bool Ray::operator!=(const Ray& other) const { + return (p_ != other.origin()) || (d_ != other.direction()); + } + + + float Ray::Length() const { + return d_.Length(); + } + + + Point3 Ray::origin() const { + return p_; + } + + + Vector3 Ray::direction() const { + return d_; + } + + + + bool Ray::IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal, + float *iTime, Point3 *iPoint) const + { + float dot = planeNormal.Dot(d_); + + // return false if we would hit the back face of the plane + if (dot > 0.0) { + return false; + } + + // return false if the ray and plane are parallel + if (std::fabs(dot) < MINGFX_MATH_EPSILON) { + return false; + } + + float denom = planeNormal.Dot(d_); + if (std::abs(denom) > MINGFX_MATH_EPSILON) { + *iTime = (planePt - p_).Dot(planeNormal) / denom; + if (*iTime >= 0) { + *iPoint = p_ + (*iTime)*d_; + return true; + } + } + return false; + } + + + bool Ray::IntersectTriangle(const Point3 &vertex0, const Point3 &vertex1, const Point3 &vertex2, + float *iTime, Point3 *iPoint) const + { + // Implementation of the Möller–Trumbore intersection algorithm + // https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm + + Vector3 edge1, edge2, h, s, q; + float a,f,u,v; + edge1 = vertex1 - vertex0; + edge2 = vertex2 - vertex0; + h = d_.Cross(edge2); + a = edge1.Dot(h); + if (a > -MINGFX_MATH_EPSILON && a < MINGFX_MATH_EPSILON) + return false; + f = 1.f/a; + s = p_ - vertex0; + u = f * (s.Dot(h)); + if (u < 0.0 || u > 1.f) + return false; + q = s.Cross(edge1); + v = f * d_.Dot(q); + if ((v < 0.0) || (u + v > 1.0f)) + return false; + // At this stage we can compute t to find out where the intersection point is on the line. + *iTime = f * edge2.Dot(q); + if (*iTime > MINGFX_MATH_EPSILON) { // ray intersection + *iPoint = p_ + d_ * (*iTime); + return true; + } + else // This means that there is a line intersection but not a ray intersection. + return false; + + + /*** + // A basic implementation + + // find the point of intersection of the ray with the plane of the triangle + Vector3 AB = B - A; + Vector3 AC = C - A; + Vector3 cross = AB.Cross(AC); + Vector3 N = cross.ToUnit(); + if (!IntersectPlane(A, N, iTime, iPoint)) { + return false; + } + + // check to see if iPoint lies within the triangle + Vector3 edge1 = B - A; + Vector3 v1 = *iPoint - A; + Vector3 check1 = edge1.Cross(v1); + if (N.Dot(check1) < 0.0) { + return false; + } + + Vector3 edge2 = C - B; + Vector3 v2 = *iPoint - B; + Vector3 check2 = edge2.Cross(v2); + if (N.Dot(check2) < 0.0) { + return false; + } + + Vector3 edge3 = A - C; + Vector3 v3 = *iPoint - C; + Vector3 check3 = edge3.Cross(v3); + if (N.Dot(check3) < 0.0) { + return false; + } + + return true; + ***/ + } + + + bool Ray::IntersectQuad(const Point3 &A, const Point3 &B, const Point3 &C, const Point3 &D, + float *iTime, Point3 *iPoint) const + { + if (IntersectTriangle(A, B, C, iTime, iPoint)) { + return true; + } + else if (IntersectTriangle(A, C, D, iTime, iPoint)) { + return true; + } + else { + return false; + } + } + + + bool Ray::IntersectSphere(const Point3 ¢er, float radius, + float *iTime, Point3 *iPoint) const + { + Point3 P = p_ + (Point3::Origin() - center); + Vector3 D = d_; + + // A = (Dx^2 + Dy^2 + Dz^2) + const double A = ((double)D[0]*D[0] + (double)D[1]*D[1] + (double)D[2]*D[2]); + + // B = (Px * Dx + Py * Dy + Pz * Dz) + const double B = ((double)P[0]*D[0] + (double)P[1]*D[1] + (double)P[2]*D[2]); + + // C = (Px^2 + Py^2 + Pz^2 - (sphere radius)^2) + const double C = ((double)P[0]*P[0] + (double)P[1]*P[1] + (double)P[2]*P[2] - (double)radius*radius); + + // Discriminant of quadratic = B^2 - A * C + double discriminant = B*B - A*C; + + if (discriminant < 0.0) { + return false; + } + else { + double discRoot = sqrt(discriminant); + double t1 = (-B - discRoot) / A; + double t2 = (-B + discRoot) / A; + bool hit1 = false; + bool hit2 = false; + if (t1 > MINGFX_MATH_EPSILON) { + hit1 = true; + *iTime = (float)t1; + } + if (t2 > MINGFX_MATH_EPSILON) { + hit2 = true; + *iTime = (float)t2; + } + if ((!hit1) && (!hit2)) { + return false; + } + if ((hit1) && (hit2)) { + if (t1 < t2) { + *iTime = (float)t1; + } + } + + *iPoint = p_ + (*iTime)*d_; + return true; + } + } + + + bool Ray::IntersectMesh(const Mesh &mesh, + float *iTime, Point3 *iPoint, int *iTriangleID) const + { + *iTime = -1.0; + for (int i=0; i indices = mesh.read_triangle_indices_data(i); + if (IntersectTriangle(mesh.read_vertex_data(indices[0]), mesh.read_vertex_data(indices[1]), mesh.read_vertex_data(indices[2]), &t, &p)) { + if ((*iTime < 0.0) || (t < *iTime)) { + *iPoint = p; + *iTime = t; + *iTriangleID = i; + } + } + } + return (*iTime > 0.0); + } + + bool Ray::FastIntersectMesh(Mesh *mesh, float *iTime, + Point3 *iPoint, int *iTriangleID) const + { + std::vector tri_ids = mesh->bvh_ptr()->IntersectAndReturnUserData(*this); + if (tri_ids.size()) { + *iTime = -1.0; + for (int i=0; i indices = mesh->read_triangle_indices_data(tri_ids[i]); + if (IntersectTriangle(mesh->read_vertex_data(indices[0]), mesh->read_vertex_data(indices[1]), mesh->read_vertex_data(indices[2]), &t, &p)) { + if ((*iTime < 0.0) || (t < *iTime)) { + *iPoint = p; + *iTime = t; + *iTriangleID = i; + } + } + } + return (*iTime > 0.0); + } + else { + return false; + } + } + + + bool Ray::IntersectAABB(const AABB &box, float *iTime) const { + // https://gamedev.stackexchange.com/questions/18436/most-efficient-aabb-vs-ray-collision-algorithms + + Point3 origin = p_; + + Vector3 invdir = d_; + invdir[0] = 1.0f / invdir[0]; + invdir[1] = 1.0f / invdir[1]; + invdir[2] = 1.0f / invdir[2]; + + float t1 = (box.min()[0] - origin[0])*invdir[0]; + float t2 = (box.max()[0] - origin[0])*invdir[0]; + float t3 = (box.min()[1] - origin[1])*invdir[1]; + float t4 = (box.max()[1] - origin[1])*invdir[1]; + float t5 = (box.min()[2] - origin[2])*invdir[2]; + float t6 = (box.max()[2] - origin[2])*invdir[2]; + + float tmin = std::max(std::max(std::min(t1, t2), std::min(t3, t4)), std::min(t5, t6)); + float tmax = std::min(std::min(std::max(t1, t2), std::max(t3, t4)), std::max(t5, t6)); + + // if tmax < 0, ray (line) is intersecting AABB, but the whole AABB is behind us + if (tmax < 0) { + *iTime = tmax; + return false; + } + + // if tmin > tmax, ray doesn't intersect AABB + if (tmin > tmax) { + *iTime = tmax; + return false; + } + + *iTime = tmin; + return true; + } + + + void Ray::set(Point3 newOrigin, Vector3 newDir) { + p_ = newOrigin; + d_ = newDir; + } + + std::ostream & operator<< ( std::ostream &os, const Ray &r) { + return os << r.origin() << " " << r.direction(); + } + + std::istream & operator>> ( std::istream &is, Ray &r) { + // format: (x, y, z) + char dummy; + Point3 p; + Vector3 d; + is >> p >> dummy >> d; + r.set(p, d); + return is; + } + + +} // end namespace diff --git a/dev/MinGfx/src/ray.h b/dev/MinGfx/src/ray.h new file mode 100644 index 0000000..8e84546 --- /dev/null +++ b/dev/MinGfx/src/ray.h @@ -0,0 +1,167 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_RAY_H_ +#define SRC_RAY_H_ + +#include + +#include "aabb.h" +#include "point3.h" +#include "vector3.h" +#include "mesh.h" + + +namespace mingfx { + + +/** Stores the mathematical object of a ray that begins at an origin (a 3D + point) and points in a direction (a unit 3D vector). Rays can intersect + a variety of other computer graphics objects, such as planes, triangles, + spheres, 3D meshes, etc. These intersections can be tested with the + Intersect...() methods. The Ray can also be transformed by a Matrix4. + Example: + ~~~ + // Create a pick ray from the mouse position + void MyGraphicsApp::OnLeftMouseDown(const Point2 &pos) { + Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos); + float mouse_z = ReadZValueAtPixel(pos); + Point3 mouse_3d = GfxMath::ScreenToNearPlane(view_matrix, proj_matrix, mouse_xy, mouse_z); + Matrix4 camera_matrix = view_matrix.Inverse(); + Point3 eye = camera_matrix.ColumnToPoint3(3); + + Ray pick_ray(eye, mouse_3d - eye); + + // check to see if the ray intersects a sphere + float t; + Point3 p; + if (pick_ray.IntersectSphere(Point3(0,0,0), 2.0, &t, &p)) { + std::cout << "Mouse pointing at sphere! Intersection point = " << p << std::endl; + } + } + ~~~ + */ +class Ray { +public: + + /// Defaults to a ray at the origin and pointing in the -Z direction + Ray(); + + /// Creates a ray from a 3D origin and direction + Ray(const Point3 &origin, const Vector3 &direction); + + /// Ray destructor + virtual ~Ray(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Ray& other) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Ray& other) const; + + /// Returns the length of the direction vector + float Length() const; + + /** Checks to see if the ray intersects a plane defined by a point and a normal. + If there was an intersection, true is returned, iTime is set to the intersection + time, and iPoint is set to the intersection point. The plane is considered + to be 1-sided. That is the intersection will only occur if the ray hits the + plane from its front side as determined by the plane's normal. + */ + bool IntersectPlane(const Point3 &planePt, const Vector3 &planeNormal, + float *iTime, Point3 *iPoint) const; + + /** Checks to see if the ray intersects a triangle defined by the vertices v1, v2, and v3. + The vertices must be provided in counter-clockwise order so that the normal of the + triangle can be determined via the right-hand rule. The intersection will only happen + if the ray hits the front side of the triangle. If there was an intersection, + true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point. + */ + bool IntersectTriangle(const Point3 &v1, const Point3 &v2, const Point3 &v3, + float *iTime, Point3 *iPoint) const; + + /** Checks to see if the ray intersects a quad defined by the vertices v1, v2, v3, and v4. + The vertices must be provided in counter-clockwise order so that the normal of the + triangle can be determined via the right-hand rule. The intersection will only happen + if the ray hits the front side of the triangle. If there was an intersection, + true is returned, iTime is set to the intersection time, and iPoint is set to the intersection point. + */ + bool IntersectQuad(const Point3 &v1, const Point3 &v2, const Point3 &v3, const Point3 &v4, + float *iTime, Point3 *iPoint) const; + + /** Checks to see if the ray intersects a sphere defined by a center point and a radius. + If there was an intersection, true is returned, iTime is set to the intersection time, + and iPoint is set to the intersection point. + */ + bool IntersectSphere(const Point3 ¢er, float radius, + float *iTime, Point3 *iPoint) const; + + /** Checks to see if the ray intersects a triangle mesh. This is a brute-force + check over each triangle in the mesh. If there was an intersection, true is returned, + iTime is set to the intersection time, iPoint is set to the intersection point, + and iTriangleID is set to the ID of the closest intersected triangle along the ray. + */ + bool IntersectMesh(const Mesh &mesh, float *iTime, + Point3 *iPoint, int *iTriangleID) const; + + /** Checks to see if the ray intersects a triangle mesh. This uses a BVH + (Bounding Volume Hierarchy) to accelerate the ray-triangle intersection tests. + Each mesh can optionally store a BVH. If a BVH has already been calculated + for the mesh (done with Mesh::CalculateBVH()), then this function will be + much faster than the brute-force IntersectMesh() function. If a BVH has + not already been calculated for the mesh, the first call to FastIntersectMesh() + will trigger the mesh to create a BVH (not a fast operation) but then + subsequent calls to FastIntersectMesh() will be fast. + */ + bool FastIntersectMesh(Mesh *mesh, float *iTime, + Point3 *iPoint, int *iTriangleID) const; + + /** Checks to see if the ray intersects an AABB (Axis-Aligned Bounding Box). + Typically, this is the first step of a more detailed intersection test and + we don't care about the actual point of intersection, just whether it + intersects or not. So, we don't bother calculating the iPoint. We get the + iTime for free though, so we do return that. You can calc the iPoint if + you want using: + ~~~ + float t; + if (ray.IntersectAABB(box, &t)) { + Point3 iPoint = ray.origin() + t*ray.direction(); + } + ~~~ + */ + bool IntersectAABB(const AABB &box, float *iTime) const; + + /// Returns the origin + Point3 origin() const; + + /// Returns the direction + Vector3 direction() const; + + /// Sets a new origin and direction + void set(Point3 newOrigin, Vector3 newDir); + +private: + Point3 p_; + Vector3 d_; +}; + + +// --- Stream operators --- + +std::ostream & operator<< ( std::ostream &os, const Ray &r); +std::istream & operator>> ( std::istream &is, Ray &r); + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/shader_program.cc b/dev/MinGfx/src/shader_program.cc new file mode 100644 index 0000000..faeb82e --- /dev/null +++ b/dev/MinGfx/src/shader_program.cc @@ -0,0 +1,389 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "shader_program.h" + +#include "opengl_headers.h" + +#include +#include + + +namespace mingfx { + + +ShaderProgram::ShaderProgram() : vertexShader_(0), fragmentShader_(0), program_(0) { +} + +ShaderProgram::~ShaderProgram() { +} + +bool ShaderProgram::initialized() { + return (program_ != 0); +} + +bool ShaderProgram::AddVertexShaderFromSource(const std::string &vertexSource) { + // https://www.khronos.org/opengl/wiki/Shader_Compilation + + // Create an empty vertex shader handle + vertexShader_ = glCreateShader(GL_VERTEX_SHADER); + + // Send the vertex shader source code to GL + // Note that std::string's .c_str is NULL character terminated. + const GLchar *source = (const GLchar *)vertexSource.c_str(); + glShaderSource(vertexShader_, 1, &source, 0); + + // Compile the vertex shader + glCompileShader(vertexShader_); + + GLint isCompiled = 0; + glGetShaderiv(vertexShader_, GL_COMPILE_STATUS, &isCompiled); + if (isCompiled == GL_FALSE) { + GLint maxLength = 0; + glGetShaderiv(vertexShader_, GL_INFO_LOG_LENGTH, &maxLength); + + // The maxLength includes the NULL character + std::vector infoLog(maxLength); + glGetShaderInfoLog(vertexShader_, maxLength, &maxLength, &infoLog[0]); + + // We don't need the shader anymore. + glDeleteShader(vertexShader_); + + std::cerr << "ShaderProgram: Error compiling vertex shader program: " << std::endl; + std::cerr << &infoLog[0] << std::endl; + std::cerr << vertexSource << std::endl; + return false; + } + return true; +} + +bool ShaderProgram::AddVertexShaderFromFile(const std::string &file) { + std::cout << "Loading vertex shader from file: " << file << std::endl; + std::string source; + std::string line; + std::ifstream myfile (file); + if (myfile.is_open()) { + while (std::getline(myfile, line)) { + source += line + "\n"; + } + myfile.close(); + return AddVertexShaderFromSource(source); + } + else { + std::cerr << "ShaderProgram: Cannot open file " << file << std::endl; + return false; + } +} + + + +bool ShaderProgram::AddFragmentShaderFromSource(const std::string &fragmentSource) { + // https://www.khronos.org/opengl/wiki/Shader_Compilation + + // Create an empty fragment shader handle + fragmentShader_ = glCreateShader(GL_FRAGMENT_SHADER); + + // Send the fragment shader source code to GL + // Note that std::string's .c_str is NULL character terminated. + const GLchar *source = (const GLchar *)fragmentSource.c_str(); + glShaderSource(fragmentShader_, 1, &source, 0); + + // Compile the fragment shader + glCompileShader(fragmentShader_); + + GLint isCompiled = 0; + glGetShaderiv(fragmentShader_, GL_COMPILE_STATUS, &isCompiled); + if (isCompiled == GL_FALSE) { + GLint maxLength = 0; + glGetShaderiv(fragmentShader_, GL_INFO_LOG_LENGTH, &maxLength); + + // The maxLength includes the NULL character + std::vector infoLog(maxLength); + glGetShaderInfoLog(fragmentShader_, maxLength, &maxLength, &infoLog[0]); + + // We don't need the shader anymore. + glDeleteShader(fragmentShader_); + + std::cerr << "ShaderProgram: Error compiling fragment shader program: " << std::endl; + std::cerr << &infoLog[0] << std::endl; + std::cerr << fragmentSource << std::endl; + return false; + } + return true; +} + + +bool ShaderProgram::AddFragmentShaderFromFile(const std::string &file) { + std::cout << "Loading fragment shader from file: " << file << std::endl; + std::string source; + std::string line; + std::ifstream myfile (file); + if (myfile.is_open()) { + while (std::getline(myfile, line)) { + source += line + "\n"; + } + myfile.close(); + return AddFragmentShaderFromSource(source); + } + else { + std::cerr << "ShaderProgram: Cannot open file " << file << std::endl; + return false; + } +} + + +bool ShaderProgram::LinkProgram() { + if (!vertexShader_) { + std::cerr << "ShaderProgram: Error linking program. A vertex shader must be added and successfully compiled before the program can be linked." << std::endl; + return false; + } + if (!fragmentShader_) { + std::cerr << "ShaderProgram: Error linking program. A fragment shader must be added and successfully compiled before the program can be linked." << std::endl; + return false; + } + + // Vertex and fragment shaders are successfully compiled. + // Now time to link them together into a program. + // Get a program object. + program_ = glCreateProgram(); + + // Attach our shaders to our program + glAttachShader(program_, vertexShader_); + glAttachShader(program_, fragmentShader_); + + // Link our program + glLinkProgram(program_); + + // Note the different functions here: glGetProgram* instead of glGetShader*. + GLint isLinked = 0; + glGetProgramiv(program_, GL_LINK_STATUS, (int *)&isLinked); + if (isLinked == GL_FALSE) { + GLint maxLength = 0; + glGetProgramiv(program_, GL_INFO_LOG_LENGTH, &maxLength); + + // The maxLength includes the NULL character + std::vector infoLog(maxLength); + glGetProgramInfoLog(program_, maxLength, &maxLength, &infoLog[0]); + + // We don't need the program anymore. + glDeleteProgram(program_); + // Don't leak shaders either. + glDeleteShader(vertexShader_); + glDeleteShader(fragmentShader_); + + std::cerr << "ShaderProgram: Error linking program: " << std::endl; + std::cerr << &infoLog[0] << std::endl; + return false; + } + + // Always detach shaders after a successful link. + glDetachShader(program_, vertexShader_); + glDetachShader(program_, fragmentShader_); + + return true; +} + + +void ShaderProgram::UseProgram() { + if (!initialized()) { + std::cerr << "ShaderProgram: Warning cannot UseProgram() until it shaders have been added and linked. Calling LinkProgram() for you now." << std::endl; + LinkProgram(); + } + glUseProgram(program_); +} + + +void ShaderProgram::StopProgram() { + glUseProgram(0); +} + + +// MinGfx math types +void ShaderProgram::SetUniform(const std::string &name, const Point2 &p) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform2f(loc, p[0], p[1]); +} + +void ShaderProgram::SetUniform(const std::string &name, const Vector2 &v) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform2f(loc, v[0], v[1]); +} + +void ShaderProgram::SetUniform(const std::string &name, const Point3 &p) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform3f(loc, p[0], p[1], p[2]); +} + +void ShaderProgram::SetUniform(const std::string &name, const Vector3 &v) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform3f(loc, v[0], v[1], v[2]); +} + +void ShaderProgram::SetUniform(const std::string &name, const Matrix4 &m) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniformMatrix4fv(loc, 1, GL_FALSE, m.value_ptr()); +} + +void ShaderProgram::SetUniform(const std::string &name, const Color &c) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform4f(loc, c[0], c[1], c[2], c[3]); +} + + +// built-in types +void ShaderProgram::SetUniform(const std::string &name, int i) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1i(loc, i); +} + +void ShaderProgram::SetUniform(const std::string &name, unsigned int ui) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1ui(loc, ui); +} + +void ShaderProgram::SetUniform(const std::string &name, float f) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1f(loc, f); +} + + + +// built-in types - arrays +void ShaderProgram::SetUniformArray1(const std::string &name, int *i, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1iv(loc, count, i); +} + +void ShaderProgram::SetUniformArray1(const std::string &name, unsigned int *ui, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1uiv(loc, count, ui); +} + +void ShaderProgram::SetUniformArray1(const std::string &name, float *f, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1fv(loc, count, f); +} + + +void ShaderProgram::SetUniformArray2(const std::string &name, int *i, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform2iv(loc, count, i); +} + +void ShaderProgram::SetUniformArray2(const std::string &name, unsigned int *ui, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform2uiv(loc, count, ui); +} + +void ShaderProgram::SetUniformArray2(const std::string &name, float *f, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform2fv(loc, count, f); +} + + +void ShaderProgram::SetUniformArray3(const std::string &name, int *i, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform3iv(loc, count, i); +} + +void ShaderProgram::SetUniformArray3(const std::string &name, unsigned int *ui, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform3uiv(loc, count, ui); +} + +void ShaderProgram::SetUniformArray3(const std::string &name, float *f, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform3fv(loc, count, f); +} + + +void ShaderProgram::SetUniformArray4(const std::string &name, int *i, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform4iv(loc, count, i); +} + +void ShaderProgram::SetUniformArray4(const std::string &name, unsigned int *ui, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform4uiv(loc, count, ui); +} + +void ShaderProgram::SetUniformArray4(const std::string &name, float *f, int count) { + UseProgram(); + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform4fv(loc, count, f); +} + + + +void ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex) { + UseProgram(); + + int texUnit = 0; + + std::map::const_iterator it = texBindings_.find(name); + if (it != texBindings_.end()) { + // Found: This sampler was already bound to a tex unit, so use the same one + texUnit = texBindings_[name]; + } + else { + // Not found: This sampler was not already bound to a tex unit, so loop through the + // past/current bindings and pick the next available texUnit + std::map::const_iterator it2; + for (it2 = texBindings_.begin(); it2 != texBindings_.end(); ++it2) { + if (texUnit <= it2->second) { + texUnit = it2->second + 1; + } + } + // save it for future reference + texBindings_[name] = texUnit; + } + + // associate the named shader program sampler variable with the selected texture unit + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1i(loc, texUnit); + // bind the opengl texture handle to the same texture unit + glActiveTexture(GL_TEXTURE0 + texUnit); + glBindTexture(GL_TEXTURE_2D, tex.opengl_id()); +} + +void ShaderProgram::BindTexture(const std::string &name, const Texture2D &tex, int texUnit) { + UseProgram(); + + texBindings_[name] = texUnit; + + // associate the named shader program sampler variable with the selected texture unit + GLint loc = glGetUniformLocation(program_, name.c_str()); + glUniform1i(loc, texUnit); + // bind the opengl texture handle to the same texture unit + glActiveTexture(GL_TEXTURE0 + texUnit); + glBindTexture(GL_TEXTURE_2D, tex.opengl_id()); +} + + + +} // end namespace + + diff --git a/dev/MinGfx/src/shader_program.h b/dev/MinGfx/src/shader_program.h new file mode 100644 index 0000000..2bf5f87 --- /dev/null +++ b/dev/MinGfx/src/shader_program.h @@ -0,0 +1,238 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_SHADERPROGRAM_H_ +#define SRC_SHADERPROGRAM_H_ + +#include "color.h" +#include "matrix4.h" +#include "opengl_headers.h" +#include "point2.h" +#include "point3.h" +#include "texture2d.h" +#include "vector2.h" +#include "vector3.h" + +#include +#include + +namespace mingfx { + +/** A wrapper around GLSL shader programs. This class supports loading vertex + and fragment shaders from files or strings, compiling them, and then linking + them into a shader program. Uniform variables within the shader programs can + be set in order to pass parameters from C++ code into the shader program. + Textures can also be bound to the shader. Example usage: + ~~~ + + ShaderProgram shader_prog; + + void MyGraphicsApp::InitOpenGL() { + shader_prog.AddVertexShaderFromFile(Platform::findFile("my_shader.vert", searchPath)); + shader_prog.AddFragmentShaderFromFile(Platform::findFile("my_shader.frag", searchPath)); + shader_prog.LinkProgram(); + } + + void MyGraphicsApp::DrawUsingOpenGL() { + // Activate the shader program + shader_prog.UseProgram(); + + // Pass uniforms and textures from C++ to the GPU Shader Program + shader_prog.SetUniform("ModelMatrix", modelMat); + shader_prog.SetUniform("ViewMatrix", viewMat); + shader_prog.SetUniform("ProjectionMatrix", projMat); + shader_prog.SetUniform("LightPosition", Point3(2,2,2)); + shader_prog.BindTexture("SurfaceTexture", my_tex); + + // Draw whatever geometry you want now + mesh1.Draw(); + mesh2.Draw(); + + // Deactivate the shader program + shader_prog.StopProgram(); + } + ~~~ + */ +class ShaderProgram { +public: + /// Creates an empty ShaderProgram object. + ShaderProgram(); + + virtual ~ShaderProgram(); + + + // ---- These should be called during startup (e.g., in InitOpenGL()) ---- + + /// Call during initialization but after the OpenGL context has been created + /// (e.g., inside InitOpenGL()). This loads the shader from the file and + /// compiles it. An error will be printed to stderr if there are any + /// compilation errors. + bool AddVertexShaderFromFile(const std::string &file); + + /// This loads and compiles a shader from a string. An error will be printed + /// to stderr if there are any compilation errors. + bool AddVertexShaderFromSource(const std::string &code); + + /// Call during initialization but after the OpenGL context has been created + /// (e.g., inside InitOpenGL()). This loads the shader from the file and + /// compiles it. An error will be printed to stderr if there are any + /// compilation errors. + bool AddFragmentShaderFromFile(const std::string &file); + + /// This loads and compiles a shader from a string. An error will be printed + /// to stderr if there are any compilation errors. + bool AddFragmentShaderFromSource(const std::string &code); + + /// Call this after adding vertex and fragment shaders in order to link them + /// together to create the full shader program. An error will be printed to + /// stderr if there are any linking errors. + bool LinkProgram(); + + + + // ---- These should be called during rendering (e.g., in DrawUsingOpenGL()) ---- + + /// Call this first to make the shader program active, then call SetUniform() to + /// pass data from your C++ program into the shader code via the named uniform + /// variables that appear in the code. Then render whatever geometry you wish + /// with your own glDrawArrays() call(s). Finally, call StopProgram() to turn + /// off the shader program. + void UseProgram(); + + // Set Uniform Variables in the Shader + + // MinGfx types + + /// Passes the x,y values of point p to the shader program and stores the + /// result in the shader variable named name, which should be of type vec2. + void SetUniform(const std::string &name, const Point2 &p); + + /// Passes the x,y values of vector v to the shader program and stores the + /// result in the shader variable named name, which should be of type vec2. + void SetUniform(const std::string &name, const Vector2 &v); + + /// Passes the x,y,z,1 values of point p to the shader program and stores the + /// result in the shader variable named name, which should be of type vec4. + void SetUniform(const std::string &name, const Point3 &p); + + /// Passes the x,y,z,0 values of vector v to the shader program and stores the + /// result in the shader variable named name, which should be of type vec4. + void SetUniform(const std::string &name, const Vector3 &v); + + /// Passes the column-major 16 float values of matrix m to the shader program + /// and stores the result in the shader variable named name, which should be of type mat4. + void SetUniform(const std::string &name, const Matrix4 &m); + + /// Passes the r,g,b,a values of color c to the shader program and stores the + /// result in the shader variable named name, which should be of type vec4. + void SetUniform(const std::string &name, const Color &c); + + + // built-in types + + /// Passes the int to the shader program and stores the result in the shader + /// variable named name, which should be of type int. + void SetUniform(const std::string &name, int i); + + /// Passes the unsigned int to the shader program and stores the result in the shader + /// variable named name, which should be of type uint. + void SetUniform(const std::string &name, unsigned int ui); + + /// Passes the float to the shader program and stores the result in the shader + /// variable named name, which should be of type float. + void SetUniform(const std::string &name, float f); + + + // built-in types (arrays) + + /// Passes an array of count ints to the shader program and stores the result + /// in the shader variable named name, which should be of type int name[count]. + void SetUniformArray1(const std::string &name, int *i, int count); + + /// Passes an array of count unsigned ints to the shader program and stores the result + /// in the shader variable named name, which should be of type uint name[count]. + void SetUniformArray1(const std::string &name, unsigned int *ui, int count); + + /// Passes an array of count floats to the shader program and stores the result + /// in the shader variable named name, which should be of type float name[count]. + void SetUniformArray1(const std::string &name, float *f, int count); + + + /// Passes an array of count 2D int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type ivec2 name[count]. + void SetUniformArray2(const std::string &name, int *i, int count); + + /// Passes an array of count 2D unsigned int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type uivec2 name[count]. + void SetUniformArray2(const std::string &name, unsigned int *ui, int count); + + /// Passes an array of count 2D float arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type vec2 name[count]. + void SetUniformArray2(const std::string &name, float *f, int count); + + + /// Passes an array of count 3D int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type ivec3 name[count]. + void SetUniformArray3(const std::string &name, int *i, int count); + + /// Passes an array of count 3D unsigned int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type uivec3 name[count]. + void SetUniformArray3(const std::string &name, unsigned int *ui, int count); + + /// Passes an array of count 3D float arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type vec3 name[count]. + void SetUniformArray3(const std::string &name, float *f, int count); + + + /// Passes an array of count 4D int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type ivec4 name[count]. + void SetUniformArray4(const std::string &name, int *i, int count); + + /// Passes an array of count 4D unsigned int arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type uivec4 name[count]. + void SetUniformArray4(const std::string &name, unsigned int *ui, int count); + + /// Passes an array of count 4D float arrays to the shader program and stores the result + /// in the shader variable named name, which should be of type vec4 name[count]. + void SetUniformArray4(const std::string &name, float *f, int count); + + + // Set Textures (Sampler Variables in the Shader) + + /// Binds a Texture2D to a sampler2D in the shader program. + /// This version automatically selects an available texture unit, i.e., one + /// not already used by this shader program. + void BindTexture(const std::string &name, const Texture2D &tex); + + /// Binds a Texture2D to a sampler2D in the shader program. + /// This version allows you to specify the texture unit to use. + void BindTexture(const std::string &name, const Texture2D &tex, int texUnit); + + + /// Call this after rendering geometry to deactivate the shader. + void StopProgram(); + + /// Returns true if the shader program has been successfully compiled and linked. + bool initialized(); + +private: + GLuint vertexShader_; + GLuint fragmentShader_; + GLuint program_; + std::map texBindings_; +}; + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/shaders/default.frag b/dev/MinGfx/src/shaders/default.frag new file mode 100644 index 0000000..59b9f27 --- /dev/null +++ b/dev/MinGfx/src/shaders/default.frag @@ -0,0 +1,76 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +const int MAX_LIGHTS = 10; + +in vec3 N; +in vec3 v; +in vec2 uv; +in vec4 col_interp; + +out vec4 fragColor; + +uniform int NumLights; +uniform vec3 LightPositions[MAX_LIGHTS]; +uniform vec4 LightIntensitiesAmbient[MAX_LIGHTS]; +uniform vec4 LightIntensitiesDiffuse[MAX_LIGHTS]; +uniform vec4 LightIntensitiesSpecular[MAX_LIGHTS]; + +uniform vec4 MatReflectanceAmbient; +uniform vec4 MatReflectanceDiffuse; +uniform vec4 MatReflectanceSpecular; +uniform float MatReflectanceShininess; + +uniform int UseSurfaceTexture; +uniform sampler2D SurfaceTexture; + +void main() { + + // initialize the fragment color to the interpolated value of per-vertex colors + // since some meshes will have color specified per-vertex. if there are no + // per vertex colors, then this will default to white. + fragColor = col_interp; + + + // if there is a surface texture, then factor this into the base color of this + // fragment as well + if (UseSurfaceTexture != 0) { + fragColor *= texture(SurfaceTexture, uv); + } + + // modulate this base color by the additive intensity from all light sources + vec3 Ia = vec3(0,0,0); + vec3 Id = vec3(0,0,0); + vec3 Is = vec3(0,0,0); + + vec3 n = normalize(N); + + for (int i=0; i 0.0) { + Id += clamp(MatReflectanceDiffuse.rgb * LightIntensitiesDiffuse[i].rgb * max(dot(n, L), 0.0), 0.0, 1.0); + + Is += MatReflectanceSpecular.rgb * LightIntensitiesSpecular[i].rgb * pow(max(dot(R, V), 0.0), MatReflectanceShininess); + Is = clamp(Is, 0.0, 1.0); + } + } + fragColor.rgb *= Ia + Id + Is; +} + diff --git a/dev/MinGfx/src/shaders/default.vert b/dev/MinGfx/src/shaders/default.vert new file mode 100644 index 0000000..c961992 --- /dev/null +++ b/dev/MinGfx/src/shaders/default.vert @@ -0,0 +1,39 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +layout(location = 0) in vec3 position; +layout(location = 1) in vec3 normal; +layout(location = 2) in vec4 color; +layout(location = 3) in vec2 texcoord; + +layout(location = 8) in mat4 instance_xform; + +uniform mat4 ModelMatrix; +uniform mat4 ViewMatrix; +uniform mat4 ProjectionMatrix; +uniform mat4 NormalMatrix; + +out vec3 N; +out vec3 v; +out vec2 uv; +out vec4 col_interp; + +void main() { + v = (ViewMatrix * ModelMatrix * vec4(position, 1)).xyz; + N = normalize((NormalMatrix * vec4(normal, 0)).xyz); + uv = texcoord.xy; + gl_Position = ProjectionMatrix * ViewMatrix * instance_xform * ModelMatrix * vec4(position, 1); + col_interp = color; +} \ No newline at end of file diff --git a/dev/MinGfx/src/shaders/fullscreen.frag b/dev/MinGfx/src/shaders/fullscreen.frag new file mode 100644 index 0000000..ce3d624 --- /dev/null +++ b/dev/MinGfx/src/shaders/fullscreen.frag @@ -0,0 +1,23 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +in vec2 uv; +uniform sampler2D SurfaceTexture; + +out vec4 fragColor; + +void main() { + fragColor = texture(SurfaceTexture, uv); +} \ No newline at end of file diff --git a/dev/MinGfx/src/shaders/fullscreen.vert b/dev/MinGfx/src/shaders/fullscreen.vert new file mode 100644 index 0000000..db96659 --- /dev/null +++ b/dev/MinGfx/src/shaders/fullscreen.vert @@ -0,0 +1,24 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +layout(location = 0) in vec3 position; +layout(location = 3) in vec2 texcoord; + +out vec2 uv; + +void main() { + uv = texcoord.xy; + gl_Position = vec4(position,1.0); +} diff --git a/dev/MinGfx/src/shaders/text.frag b/dev/MinGfx/src/shaders/text.frag new file mode 100644 index 0000000..2642061 --- /dev/null +++ b/dev/MinGfx/src/shaders/text.frag @@ -0,0 +1,25 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +in vec2 uv; +uniform vec4 color; +uniform sampler2D font_atlas; + +out vec4 frag_color; + +void main() { + frag_color = color * texture(font_atlas, uv); + // frag_color.a = frag_color.r; +} \ No newline at end of file diff --git a/dev/MinGfx/src/shaders/text.vert b/dev/MinGfx/src/shaders/text.vert new file mode 100644 index 0000000..36c6b03 --- /dev/null +++ b/dev/MinGfx/src/shaders/text.vert @@ -0,0 +1,28 @@ +#version 330 + +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +layout(location = 0) in vec3 vertex; +layout(location = 3) in vec2 texcoord; + +uniform mat4 mvp_matrix; +uniform float scale; +uniform vec3 offset; + +out vec2 uv; + +void main() { + uv = texcoord.xy; + gl_Position = mvp_matrix * vec4(scale*(vertex+offset),1.0); +} diff --git a/dev/MinGfx/src/stb_rect_pack.h b/dev/MinGfx/src/stb_rect_pack.h new file mode 100644 index 0000000..9faf578 --- /dev/null +++ b/dev/MinGfx/src/stb_rect_pack.h @@ -0,0 +1,624 @@ +// stb_rect_pack.h - v0.11 - public domain - rectangle packing +// Sean Barrett 2014 +// +// Useful for e.g. packing rectangular textures into an atlas. +// Does not do rotation. +// +// Not necessarily the awesomest packing method, but better than +// the totally naive one in stb_truetype (which is primarily what +// this is meant to replace). +// +// Has only had a few tests run, may have issues. +// +// More docs to come. +// +// No memory allocations; uses qsort() and assert() from stdlib. +// Can override those by defining STBRP_SORT and STBRP_ASSERT. +// +// This library currently uses the Skyline Bottom-Left algorithm. +// +// Please note: better rectangle packers are welcome! Please +// implement them to the same API, but with a different init +// function. +// +// Credits +// +// Library +// Sean Barrett +// Minor features +// Martins Mozeiko +// github:IntellectualKitty +// +// Bugfixes / warning fixes +// Jeremy Jaussaud +// +// Version history: +// +// 0.11 (2017-03-03) return packing success/fail result +// 0.10 (2016-10-25) remove cast-away-const to avoid warnings +// 0.09 (2016-08-27) fix compiler warnings +// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0) +// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0) +// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort +// 0.05: added STBRP_ASSERT to allow replacing assert +// 0.04: fixed minor bug in STBRP_LARGE_RECTS support +// 0.01: initial release +// +// LICENSE +// +// See end of file for license information. + +////////////////////////////////////////////////////////////////////////////// +// +// INCLUDE SECTION +// + +#ifndef STB_INCLUDE_STB_RECT_PACK_H +#define STB_INCLUDE_STB_RECT_PACK_H + +#define STB_RECT_PACK_VERSION 1 + +#ifdef STBRP_STATIC +#define STBRP_DEF static +#else +#define STBRP_DEF extern +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct stbrp_context stbrp_context; +typedef struct stbrp_node stbrp_node; +typedef struct stbrp_rect stbrp_rect; + +#ifdef STBRP_LARGE_RECTS +typedef int stbrp_coord; +#else +typedef unsigned short stbrp_coord; +#endif + +STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects); +// Assign packed locations to rectangles. The rectangles are of type +// 'stbrp_rect' defined below, stored in the array 'rects', and there +// are 'num_rects' many of them. +// +// Rectangles which are successfully packed have the 'was_packed' flag +// set to a non-zero value and 'x' and 'y' store the minimum location +// on each axis (i.e. bottom-left in cartesian coordinates, top-left +// if you imagine y increasing downwards). Rectangles which do not fit +// have the 'was_packed' flag set to 0. +// +// You should not try to access the 'rects' array from another thread +// while this function is running, as the function temporarily reorders +// the array while it executes. +// +// To pack into another rectangle, you need to call stbrp_init_target +// again. To continue packing into the same rectangle, you can call +// this function again. Calling this multiple times with multiple rect +// arrays will probably produce worse packing results than calling it +// a single time with the full rectangle array, but the option is +// available. +// +// The function returns 1 if all of the rectangles were successfully +// packed and 0 otherwise. + +struct stbrp_rect +{ + // reserved for your use: + int id; + + // input: + stbrp_coord w, h; + + // output: + stbrp_coord x, y; + int was_packed; // non-zero if valid packing + +}; // 16 bytes, nominally + + +STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes); +// Initialize a rectangle packer to: +// pack a rectangle that is 'width' by 'height' in dimensions +// using temporary storage provided by the array 'nodes', which is 'num_nodes' long +// +// You must call this function every time you start packing into a new target. +// +// There is no "shutdown" function. The 'nodes' memory must stay valid for +// the following stbrp_pack_rects() call (or calls), but can be freed after +// the call (or calls) finish. +// +// Note: to guarantee best results, either: +// 1. make sure 'num_nodes' >= 'width' +// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1' +// +// If you don't do either of the above things, widths will be quantized to multiples +// of small integers to guarantee the algorithm doesn't run out of temporary storage. +// +// If you do #2, then the non-quantized algorithm will be used, but the algorithm +// may run out of temporary storage and be unable to pack some rectangles. + +STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem); +// Optionally call this function after init but before doing any packing to +// change the handling of the out-of-temp-memory scenario, described above. +// If you call init again, this will be reset to the default (false). + + +STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic); +// Optionally select which packing heuristic the library should use. Different +// heuristics will produce better/worse results for different data sets. +// If you call init again, this will be reset to the default. + +enum +{ + STBRP_HEURISTIC_Skyline_default=0, + STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default, + STBRP_HEURISTIC_Skyline_BF_sortHeight +}; + + +////////////////////////////////////////////////////////////////////////////// +// +// the details of the following structures don't matter to you, but they must +// be visible so you can handle the memory allocations for them + +struct stbrp_node +{ + stbrp_coord x,y; + stbrp_node *next; +}; + +struct stbrp_context +{ + int width; + int height; + int align; + int init_mode; + int heuristic; + int num_nodes; + stbrp_node *active_head; + stbrp_node *free_head; + stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' +}; + +#ifdef __cplusplus +} +#endif + +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// IMPLEMENTATION SECTION +// + +#ifdef STB_RECT_PACK_IMPLEMENTATION +#ifndef STBRP_SORT +#include +#define STBRP_SORT qsort +#endif + +#ifndef STBRP_ASSERT +#include +#define STBRP_ASSERT assert +#endif + +#ifdef _MSC_VER +#define STBRP__NOTUSED(v) (void)(v) +#else +#define STBRP__NOTUSED(v) (void)sizeof(v) +#endif + +enum +{ + STBRP__INIT_skyline = 1 +}; + +STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic) +{ + switch (context->init_mode) { + case STBRP__INIT_skyline: + STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight); + context->heuristic = heuristic; + break; + default: + STBRP_ASSERT(0); + } +} + +STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem) +{ + if (allow_out_of_mem) + // if it's ok to run out of memory, then don't bother aligning them; + // this gives better packing, but may fail due to OOM (even though + // the rectangles easily fit). @TODO a smarter approach would be to only + // quantize once we've hit OOM, then we could get rid of this parameter. + context->align = 1; + else { + // if it's not ok to run out of memory, then quantize the widths + // so that num_nodes is always enough nodes. + // + // I.e. num_nodes * align >= width + // align >= width / num_nodes + // align = ceil(width/num_nodes) + + context->align = (context->width + context->num_nodes-1) / context->num_nodes; + } +} + +STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes) +{ + int i; +#ifndef STBRP_LARGE_RECTS + STBRP_ASSERT(width <= 0xffff && height <= 0xffff); +#endif + + for (i=0; i < num_nodes-1; ++i) + nodes[i].next = &nodes[i+1]; + nodes[i].next = NULL; + context->init_mode = STBRP__INIT_skyline; + context->heuristic = STBRP_HEURISTIC_Skyline_default; + context->free_head = &nodes[0]; + context->active_head = &context->extra[0]; + context->width = width; + context->height = height; + context->num_nodes = num_nodes; + stbrp_setup_allow_out_of_mem(context, 0); + + // node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly) + context->extra[0].x = 0; + context->extra[0].y = 0; + context->extra[0].next = &context->extra[1]; + context->extra[1].x = (stbrp_coord) width; +#ifdef STBRP_LARGE_RECTS + context->extra[1].y = (1<<30); +#else + context->extra[1].y = 65535; +#endif + context->extra[1].next = NULL; +} + +// find minimum y position if it starts at x1 +static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste) +{ + stbrp_node *node = first; + int x1 = x0 + width; + int min_y, visited_width, waste_area; + + STBRP__NOTUSED(c); + + STBRP_ASSERT(first->x <= x0); + + #if 0 + // skip in case we're past the node + while (node->next->x <= x0) + ++node; + #else + STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency + #endif + + STBRP_ASSERT(node->x <= x0); + + min_y = 0; + waste_area = 0; + visited_width = 0; + while (node->x < x1) { + if (node->y > min_y) { + // raise min_y higher. + // we've accounted for all waste up to min_y, + // but we'll now add more waste for everything we've visted + waste_area += visited_width * (node->y - min_y); + min_y = node->y; + // the first time through, visited_width might be reduced + if (node->x < x0) + visited_width += node->next->x - x0; + else + visited_width += node->next->x - node->x; + } else { + // add waste area + int under_width = node->next->x - node->x; + if (under_width + visited_width > width) + under_width = width - visited_width; + waste_area += under_width * (min_y - node->y); + visited_width += under_width; + } + node = node->next; + } + + *pwaste = waste_area; + return min_y; +} + +typedef struct +{ + int x,y; + stbrp_node **prev_link; +} stbrp__findresult; + +static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height) +{ + int best_waste = (1<<30), best_x, best_y = (1 << 30); + stbrp__findresult fr; + stbrp_node **prev, *node, *tail, **best = NULL; + + // align to multiple of c->align + width = (width + c->align - 1); + width -= width % c->align; + STBRP_ASSERT(width % c->align == 0); + + node = c->active_head; + prev = &c->active_head; + while (node->x + width <= c->width) { + int y,waste; + y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste); + if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL + // bottom left + if (y < best_y) { + best_y = y; + best = prev; + } + } else { + // best-fit + if (y + height <= c->height) { + // can only use it if it first vertically + if (y < best_y || (y == best_y && waste < best_waste)) { + best_y = y; + best_waste = waste; + best = prev; + } + } + } + prev = &node->next; + node = node->next; + } + + best_x = (best == NULL) ? 0 : (*best)->x; + + // if doing best-fit (BF), we also have to try aligning right edge to each node position + // + // e.g, if fitting + // + // ____________________ + // |____________________| + // + // into + // + // | | + // | ____________| + // |____________| + // + // then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned + // + // This makes BF take about 2x the time + + if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) { + tail = c->active_head; + node = c->active_head; + prev = &c->active_head; + // find first node that's admissible + while (tail->x < width) + tail = tail->next; + while (tail) { + int xpos = tail->x - width; + int y,waste; + STBRP_ASSERT(xpos >= 0); + // find the left position that matches this + while (node->next->x <= xpos) { + prev = &node->next; + node = node->next; + } + STBRP_ASSERT(node->next->x > xpos && node->x <= xpos); + y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste); + if (y + height < c->height) { + if (y <= best_y) { + if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) { + best_x = xpos; + STBRP_ASSERT(y <= best_y); + best_y = y; + best_waste = waste; + best = prev; + } + } + } + tail = tail->next; + } + } + + fr.prev_link = best; + fr.x = best_x; + fr.y = best_y; + return fr; +} + +static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height) +{ + // find best position according to heuristic + stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height); + stbrp_node *node, *cur; + + // bail if: + // 1. it failed + // 2. the best node doesn't fit (we don't always check this) + // 3. we're out of memory + if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) { + res.prev_link = NULL; + return res; + } + + // on success, create new node + node = context->free_head; + node->x = (stbrp_coord) res.x; + node->y = (stbrp_coord) (res.y + height); + + context->free_head = node->next; + + // insert the new node into the right starting point, and + // let 'cur' point to the remaining nodes needing to be + // stiched back in + + cur = *res.prev_link; + if (cur->x < res.x) { + // preserve the existing one, so start testing with the next one + stbrp_node *next = cur->next; + cur->next = node; + cur = next; + } else { + *res.prev_link = node; + } + + // from here, traverse cur and free the nodes, until we get to one + // that shouldn't be freed + while (cur->next && cur->next->x <= res.x + width) { + stbrp_node *next = cur->next; + // move the current node to the free list + cur->next = context->free_head; + context->free_head = cur; + cur = next; + } + + // stitch the list back in + node->next = cur; + + if (cur->x < res.x + width) + cur->x = (stbrp_coord) (res.x + width); + +#ifdef _DEBUG + cur = context->active_head; + while (cur->x < context->width) { + STBRP_ASSERT(cur->x < cur->next->x); + cur = cur->next; + } + STBRP_ASSERT(cur->next == NULL); + + { + stbrp_node *L1 = NULL, *L2 = NULL; + int count=0; + cur = context->active_head; + while (cur) { + L1 = cur; + cur = cur->next; + ++count; + } + cur = context->free_head; + while (cur) { + L2 = cur; + cur = cur->next; + ++count; + } + STBRP_ASSERT(count == context->num_nodes+2); + } +#endif + + return res; +} + +static int rect_height_compare(const void *a, const void *b) +{ + const stbrp_rect *p = (const stbrp_rect *) a; + const stbrp_rect *q = (const stbrp_rect *) b; + if (p->h > q->h) + return -1; + if (p->h < q->h) + return 1; + return (p->w > q->w) ? -1 : (p->w < q->w); +} + +static int rect_original_order(const void *a, const void *b) +{ + const stbrp_rect *p = (const stbrp_rect *) a; + const stbrp_rect *q = (const stbrp_rect *) b; + return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed); +} + +#ifdef STBRP_LARGE_RECTS +#define STBRP__MAXVAL 0xffffffff +#else +#define STBRP__MAXVAL 0xffff +#endif + +STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects) +{ + int i, all_rects_packed = 1; + + // we use the 'was_packed' field internally to allow sorting/unsorting + for (i=0; i < num_rects; ++i) { + rects[i].was_packed = i; + #ifndef STBRP_LARGE_RECTS + STBRP_ASSERT(rects[i].w <= 0xffff && rects[i].h <= 0xffff); + #endif + } + + // sort according to heuristic + STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare); + + for (i=0; i < num_rects; ++i) { + if (rects[i].w == 0 || rects[i].h == 0) { + rects[i].x = rects[i].y = 0; // empty rect needs no space + } else { + stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h); + if (fr.prev_link) { + rects[i].x = (stbrp_coord) fr.x; + rects[i].y = (stbrp_coord) fr.y; + } else { + rects[i].x = rects[i].y = STBRP__MAXVAL; + } + } + } + + // unsort + STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order); + + // set was_packed flags and all_rects_packed status + for (i=0; i < num_rects; ++i) { + rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL); + if (!rects[i].was_packed) + all_rects_packed = 0; + } + + // return the all_rects_packed status + return all_rects_packed; +} +#endif + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is 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 Software. +THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS 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 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ diff --git a/dev/MinGfx/src/text_shader.cc b/dev/MinGfx/src/text_shader.cc new file mode 100644 index 0000000..ca99953 --- /dev/null +++ b/dev/MinGfx/src/text_shader.cc @@ -0,0 +1,238 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "text_shader.h" + +#include "platform.h" +#include + +// disable warnings for this 3rd party code +#pragma warning (push, 0) +#define STB_RECT_PACK_IMPLEMENTATION +#include "stb_rect_pack.h" +#define STB_TRUETYPE_IMPLEMENTATION +#include +#pragma warning (pop) + + +namespace mingfx { + +// Reference implementation: https://github.com/nothings/stb/blob/master/tests/oversample/main.c + + +TextShader::TextShader() : native_font_size_(0.0) +{ + for (int i = 0; i < 128; i++) { + chardata_[i] = stbtt_packedchar(); + } +} + +TextShader::~TextShader() { +} + + +bool TextShader::Init(const std::string &filename, int font_size) { + // load shader + shader_.AddVertexShaderFromFile(Platform::FindMinGfxShaderFile("text.vert")); + shader_.AddFragmentShaderFromFile(Platform::FindMinGfxShaderFile("text.frag")); + shader_.LinkProgram(); + + // load font + native_font_size_ = (float)font_size; + std::ifstream is(filename.c_str(), std::ifstream::binary); + if (is) { + is.seekg(0, is.end); + int length = (int)is.tellg(); + is.seekg(0, is.beg); + + char *ttf_buffer = new char[length]; + is.read(ttf_buffer, length); + if (is) + std::cout << "all characters read successfully."; + else + std::cout << "error: only " << is.gcount() << " could be read"; + is.close(); + + // todo: calc an appropriate pow of 2 size given the font_size + int atlas_width = 1024; + int atlas_height = 1024; + + stbtt_pack_context pc; + unsigned char *bitmap = new unsigned char[(size_t)atlas_width * atlas_height]; + + stbtt_PackBegin(&pc, bitmap, atlas_width, atlas_height, 0, 1, NULL); + stbtt_PackSetOversampling(&pc, 2, 2); + stbtt_PackFontRange(&pc, (unsigned char*)ttf_buffer, 0, (float)font_size, 32, 95, chardata_+32); + stbtt_PackEnd(&pc); + + // convert to 4-channel since that is all that Texture2D currently supports + unsigned char *bitmap4D = new unsigned char[(size_t)4 * atlas_width * atlas_height]; + for (int i=0; i < atlas_width * atlas_height; i++) { + bitmap4D[4*i + 0] = bitmap[i]; + bitmap4D[4*i + 1] = bitmap[i]; + bitmap4D[4*i + 2] = bitmap[i]; + bitmap4D[4*i + 3] = bitmap[i]; + } + + atlas_.InitFromBytes(atlas_width, atlas_height, bitmap4D); + + delete [] ttf_buffer; + delete [] bitmap; + delete [] bitmap4D; + + return true; + } + else { + std::cerr << "TextShader: Error font file does not exist: " << filename << std::endl; + return false; + } + +} + + +void TextShader::Draw3D(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + const std::string &text, TextFormat format, bool cache) +{ + MeshData *md = NULL; + std::map::iterator it = cache_.find(text); + if (it != cache_.end()) { + // use an existing cached mesh + md = &(it->second); + } + else { + // need to create a new mesh, add a new one to the cache or use the tmp_mesh + if (cache) { + MeshData new_md; + cache_[text] = new_md; + md = &(cache_[text]); + } + else { + md = &tmp_md_; + } + + // set appropriate vertices and texcoords for this text string + SetTextMesh(text, md); + } + + Vector3 offset; + if (format.h_align == HorizAlign::HORIZ_ALIGN_LEFT) { + offset[0] = 0; + } + else if (format.h_align == HorizAlign::HORIZ_ALIGN_CENTER) { + offset[0] = -0.5f * (md->max[0] - md->min[0]); + } + else if (format.h_align == HorizAlign::HORIZ_ALIGN_RIGHT) { + offset[0] = -(md->max[0] - md->min[0]); + } + + if (format.v_align == VertAlign::VERT_ALIGN_TOP) { + offset[1] = -md->max[1]; + } + else if (format.v_align == VertAlign::VERT_ALIGN_CENTER) { + offset[1] = -0.5f * md->max[1]; + } + else if (format.v_align == VertAlign::VERT_ALIGN_BASELINE) { + offset[1] = 0; + } + else if (format.v_align == VertAlign::VERT_ALIGN_BOTTOM) { + offset[1] = -md->min[1]; + } + + glDisable(GL_CULL_FACE); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + shader_.UseProgram(); + Matrix4 mvp = projection * view * model; + shader_.SetUniform("mvp_matrix", mvp); + shader_.SetUniform("scale", format.size / native_font_size_); + shader_.SetUniform("offset", offset); + shader_.SetUniform("color", format.color); + shader_.BindTexture("font_atlas", atlas_); + md->mesh.Draw(); + shader_.StopProgram(); + + glEnable(GL_CULL_FACE); +} + + +void TextShader::SetTextMesh(const std::string &text, MeshData *md) { + std::vector verts; + std::vector uvs; + std::vector indices; + + const char *c = text.c_str(); + float x = 0.0; + float y = 0.0; + while (*c) { + stbtt_aligned_quad q; + stbtt_GetPackedQuad(chardata_, atlas_.width(), atlas_.height(), *c++, &x, &y, &q, 0); + + // top left + verts.push_back(Point3(q.x0, -q.y0, 0.0)); + uvs.push_back(Point2(q.s0, q.t0)); + // top right + verts.push_back(Point3(q.x1, -q.y0, 0.0)); + uvs.push_back(Point2(q.s1, q.t0)); + // bot right + verts.push_back(Point3(q.x1, -q.y1, 0.0)); + uvs.push_back(Point2(q.s1, q.t1)); + // bot left + verts.push_back(Point3(q.x0, -q.y1, 0.0)); + uvs.push_back(Point2(q.s0, q.t1)); + + + indices.push_back((unsigned int)verts.size()-2); + indices.push_back((unsigned int)verts.size()-3); + indices.push_back((unsigned int)verts.size()-4); + + indices.push_back((unsigned int)verts.size()-2); + indices.push_back((unsigned int)verts.size()-4); + indices.push_back((unsigned int)verts.size()-1); + } + + md->mesh.SetVertices(verts); + md->mesh.SetTexCoords(0, uvs); + md->mesh.SetIndices(indices); + + md->min = Point2(verts[0][0], verts[0][1]); + md->max = md->min; + for (int i=0; imin[0]) md->min[0] = p[0]; + if (p[0] > md->max[0]) md->max[0] = p[0]; + if (p[1] < md->min[1]) md->min[1] = p[1]; + if (p[1] > md->max[1]) md->max[1] = p[1]; + } +} + +Vector2 TextShader::TextExtents(const std::string &text, TextFormat format, bool cache) { + MeshData *md = NULL; + std::map::iterator it = cache_.find(text); + if (it != cache_.end()) { + // use an existing cached mesh + md = &(it->second); + } + else { + // need to create a new mesh, add a new one to the cache or use the tmp_mesh + if (cache) { + MeshData new_md; + cache_[text] = new_md; + md = &(cache_[text]); + } + else { + md = &tmp_md_; + } + + // set appropriate vertices and texcoords for this text string + SetTextMesh(text, md); + } + + return format.size / native_font_size_ * (md->max - md->min); +} + + +} // end namespace \ No newline at end of file diff --git a/dev/MinGfx/src/text_shader.h b/dev/MinGfx/src/text_shader.h new file mode 100644 index 0000000..a075cd2 --- /dev/null +++ b/dev/MinGfx/src/text_shader.h @@ -0,0 +1,110 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_TEXT_SHADER_H_ +#define SRC_TEXT_SHADER_H_ + +#include +#include + +#include "matrix4.h" +#include "mesh.h" +#include "shader_program.h" +#include "texture2d.h" + +// disable warnings for this 3rd party code +#pragma warning ( push, 0 ) +#include +#pragma warning ( pop ) + +namespace mingfx { + + + +/** + */ +class TextShader { +public: + TextShader(); + virtual ~TextShader(); + + /// Call this from within the InitOpenGL() function since it will initialize + /// not just the Font's internal data but also an OpenGL texture to be + /// stored on the graphics card. Internally, this uses the stb_truetype + /// library to load true type fonts (files with a .ttf extension). + bool Init(const std::string &font_file, int native_font_size); + + enum class HorizAlign { + HORIZ_ALIGN_LEFT, + HORIZ_ALIGN_CENTER, + HORIZ_ALIGN_RIGHT + }; + + enum class VertAlign { + VERT_ALIGN_TOP, + VERT_ALIGN_CENTER, + VERT_ALIGN_BASELINE, + VERT_ALIGN_BOTTOM + }; + + class TextFormat { + public: + // constructor sets defaults + TextFormat() : + size(0.1f), + color(1,1,1,1), + h_align(HorizAlign::HORIZ_ALIGN_CENTER), + v_align(VertAlign::VERT_ALIGN_BASELINE) {} + + float size; + Color color; + HorizAlign h_align; + VertAlign v_align; + }; + + + //void Draw2D(const Point2 &pos, + // const std::string &text, TextFormat format, bool cache=false); + + + void Draw3D(const Matrix4 &model, const Matrix4 &view, const Matrix4 &projection, + const std::string &text, TextFormat format, bool cache=false); + + + Vector2 TextExtents(const std::string &text, TextFormat format, bool cache=false); + + float native_font_size(); + +private: + Texture2D atlas_; + float native_font_size_; + + stbtt_packedchar chardata_[128]; + + struct MeshData { + Mesh mesh; + Point2 min; + Point2 max; + }; + + void SetTextMesh(const std::string &text, MeshData *md); + + std::map cache_; + MeshData tmp_md_; + + ShaderProgram shader_; +}; + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/texture2d.cc b/dev/MinGfx/src/texture2d.cc new file mode 100644 index 0000000..230ad5f --- /dev/null +++ b/dev/MinGfx/src/texture2d.cc @@ -0,0 +1,232 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "texture2d.h" +#include "platform.h" + +#pragma warning (push) +#pragma warning (disable : 6001) +#pragma warning (disable : 6011) +#pragma warning (disable : 6262) +#pragma warning (disable : 6385) +#pragma warning (disable : 6387) +#pragma warning (disable : 26450) +#pragma warning (disable : 26451) +#pragma warning (disable : 26453) +#pragma warning (disable : 26495) +#pragma warning (disable : 26812) + +#ifdef WIN32 + // this is not needed on OSX or Linux, it must pick up the symbols from + // libnanogui.so, but it appears to be needed on Windows. + #define STB_IMAGE_IMPLEMENTATION +#endif +#include + +#pragma warning (pop) + +#include + + +namespace mingfx { + + + +Texture2D::Texture2D(GLenum wrapMode, GLenum filterMode) : + dataType_(GL_UNSIGNED_BYTE), data_ubyte_(NULL), data_float_(NULL), + width_(0), height_(0), handleMemInternally_(true), texID_(0), + wrapMode_(wrapMode), filterMode_(filterMode) +{ +} + +Texture2D::~Texture2D() { + + // Mem handled internally is always of type data_ubyte_ because that is + // what the stbi image loading library returns + if ((handleMemInternally_) && (data_ubyte_ != NULL)) { + // BUG, TODO: Not sure why the call below does not seem to work. + // There will be a mem leak unless we can call this somehow. + //stbi_image_free(data_); + } + + // This is how to delete GL's version of the texture on the GPU + // but you have to be very careful with this. For example, if we cause + // C++ to make a tmp copy of the Texture2D or we do an assignment tex1=tex2 + // we now have two Texture2D objects pointing to the same OpenGL texture id. + // If one of them is deleted before the other, then the other will not be + // able to draw itself because the OpenGL tex id will be invalid. For now, + // this is "addressed" by simply skipping the glDeleteTextures call. This + // leads to some wasted OpenGL memory, and that would be a good thing to + // fix in the future, maybe via a shared_ptr or static refcount that maps + // opengl texids to a count of Texture2D objects that reference them. Then, + // only delete the opengl tex if the refcount would go to 0. + //glDeleteTextures(1, &texID_); +} + + +bool Texture2D::InitFromFile(const std::string &filename) { + handleMemInternally_ = true; + dataType_ = GL_UNSIGNED_BYTE; + + + std::cout << "Loading texture from file: " << filename << std::endl; + + if (Platform::FileExists(filename)) { + stbi_set_unpremultiply_on_load(1); + stbi_convert_iphone_png_to_rgb(1); + int numChannels; + data_ubyte_ = stbi_load(filename.c_str(), &width_, &height_, &numChannels, 4); + if (data_ubyte_ == NULL) { + std::cerr << "Texture2D: Failed to load file " << filename << " - " << stbi_failure_reason() << std::endl; + return false; + } + } + else { + std::cerr << "Texture2D: File " << filename << " does not exist." << std::endl; + return false; + } + + return InitOpenGL(); +} + +bool Texture2D::InitFromBytes(int width, int height, const unsigned char * data) { + handleMemInternally_ = false; + width_ = width; + height_ = height; + data_ubyte_ = data; + dataType_ = GL_UNSIGNED_BYTE; + + return InitOpenGL(); +} + +bool Texture2D::InitFromFloats(int width, int height, const float * data) { + handleMemInternally_ = false; + width_ = width; + height_ = height; + data_float_ = data; + dataType_ = GL_FLOAT; + + return InitOpenGL(); +} + +bool Texture2D::InitOpenGL() { + glGenTextures(1, &texID_); + glBindTexture(GL_TEXTURE_2D, texID_); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapMode_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapMode_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterMode_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterMode_); + + if (dataType_ == GL_UNSIGNED_BYTE) { + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA, dataType_, data_ubyte_); + } + else if (dataType_ == GL_FLOAT) { + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA, dataType_, data_float_); + } + else { + std::cerr << "Texture2D: Unsupported texture data type " << dataType_ << "." << std::endl; + return false; + } + + return true; +} + + +bool Texture2D::UpdateFromBytes(const unsigned char * data) { + dataType_ = GL_UNSIGNED_BYTE; + data_ubyte_ = data; + glBindTexture(GL_TEXTURE_2D, texID_); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA, dataType_, data_ubyte_); + // presumably glTexSubImage2D is faster, but this crashes on OSX for some reason + //glActiveTexture(texID_); + //glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width_, height_, GL_RGBA, dataType_, data_ubyte_); + return true; +} + +bool Texture2D::UpdateFromFloats(const float * data) { + dataType_ = GL_FLOAT; + data_float_ = data; + glBindTexture(GL_TEXTURE_2D, texID_); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width_, height_, 0, GL_RGBA, dataType_, data_float_); + // presumably glTexSubImage2D is faster, but this crashes on OSX for some reason + //glActiveTexture(texID_); + //glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width_, height_, GL_RGBA, dataType_, data_ubyte_); + return true; +} + + + +int Texture2D::width() const { + return width_; +} + +int Texture2D::height() const { + return height_; +} + + +GLuint Texture2D::opengl_id() const { + if (!initialized()) { + std::cerr << "Texture2D: Warning, accessing opengl_id() before it has been initialized." << std::endl + << "You might be calling opengl_id() before InitOpenGL(). Or, there might have been a" << std::endl + << "error loading texture data or binding it to OpenGL." << std::endl; + } + return texID_; +} + +GLenum Texture2D::wrap_mode() const { + return wrapMode_; +} + +GLenum Texture2D::filter_mode() const { + return filterMode_; +} + +void Texture2D::set_wrap_mode(GLenum wrapMode) { + wrapMode_ = wrapMode; + glBindTexture(GL_TEXTURE_2D, texID_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapMode_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapMode_); +} + +void Texture2D::set_filter_mode(GLenum filterMode) { + filterMode_ = filterMode; + glBindTexture(GL_TEXTURE_2D, texID_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterMode_); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterMode_); +} + +bool Texture2D::initialized() const { + return texID_ != 0; +} + + +Color Texture2D::Pixel(int x, int y) const { + int index = y*4*width() + x*4; + + if (dataType_ == GL_UNSIGNED_BYTE) { + unsigned char r = data_ubyte_[index+0]; + unsigned char g = data_ubyte_[index+1]; + unsigned char b = data_ubyte_[index+2]; + unsigned char a = data_ubyte_[index+3]; + return Color((float)r/255.0f, (float)g/255.0f, (float)b/255.0f, (float)a/255.0f); + } + else if (dataType_ == GL_FLOAT) { + float r = data_float_[index+0]; + float g = data_float_[index+1]; + float b = data_float_[index+2]; + float a = data_float_[index+3]; + return Color(r, g, b, a); + } + else { + std::cerr << "Texture2D: Unsupported texture data type " << dataType_ << "." << std::endl; + return Color(); + } +} + +} // end namespace + diff --git a/dev/MinGfx/src/texture2d.h b/dev/MinGfx/src/texture2d.h new file mode 100644 index 0000000..a07d80f --- /dev/null +++ b/dev/MinGfx/src/texture2d.h @@ -0,0 +1,139 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_TEXTURE2D_H_ +#define SRC_TEXTURE2D_H_ + + +#include "opengl_headers.h" +#include "color.h" + +#include + + +namespace mingfx { + +/** A wrapper around a 2D texture that supports loading images from files or + setting texture color data directly. Example: + ~~~ + Texture2D tex1; + Texture2D tex2(GL_CLAMP_TO_EDGE); + + void MyGraphicsApp::InitOpenGL() { + std::vector search_path; + search_path.push_back("."); + search_path.push_back("./data"); + search_path.push_back("./shaders"); + tex1.InitFromFile(Platform::FindFile("earth-2k.png", search_path)); + tex2.InitFromFile(Platform::FindFile("toon-ramp.png", search_path)); + } + ~~~ + */ +class Texture2D { +public: + + /// Creates an empty texture. Optional parameters can be provided to set + /// the texture wrap mode and filter mode. + Texture2D(GLenum wrapMode=GL_REPEAT, GLenum filterMode=GL_LINEAR); + virtual ~Texture2D(); + + + /// Call this from within the InitOpenGL() function since it will initialize + /// not just the Texture2D's internal data but also an OpenGL texture to be + /// stored on the graphics card. Internally, this uses the stbi library to + /// load images. It supports png, jpg, bmp, and other file formats. + bool InitFromFile(const std::string &filename); + + /// Call this from within the InitOpenGL() function since it will initialize + /// not just the Texture2D's internal data but also an OpenGL texture to be + /// stored on the graphics card. + /// With this version of Init, you may pass in your own pointer to color data. + /// The data argument must point to an array of 4-channel color data stored as + /// unsigned chars in RGBA format. You are responsible for managing the memory + /// for this array. If you will never call Pixel(), then it is safe to free + /// data as soon as this function returns. Otherwise, you need to make sure + /// data does not change in memory until you destroy the Texture2D object. + bool InitFromBytes(int width, int height, const unsigned char * data); + + /// Call this from within the InitOpenGL() function since it will initialize + /// not just the Texture2D's internal data but also an OpenGL texture to be + /// stored on the graphics card. + /// With this version of Init, you may pass in your own pointer to color data. + /// The data argument must point to an array of 4-channel color data stored as + /// floats in RGBA format. You are responsible for managing the memory + /// for this array. If you will never call Pixel(), then it is safe to free + /// data as soon as this function returns. Otherwise, you need to make sure + /// data does not change in memory until you destroy the Texture2D object. + bool InitFromFloats(int width, int height, const float * data); + + + /// This function may be called to re-read the texture data from an array + /// formated the same as in InitFromBytes. The width and height of the + /// texture must remain the same. + bool UpdateFromBytes(const unsigned char * data); + + /// This function may be called to re-read the texture data from an array + /// formated the same as in InitFromFloats. The width and height of the + /// texture must remain the same. + bool UpdateFromFloats(const float * data); + + + /// Returns true if the texture data has been successfully transferred to OpenGL. + bool initialized() const; + + /// Returns the width in pixels of the texture. + int width() const; + + /// Returns the height in pixels of the texture. + int height() const; + + /// Returns the unsigned int used as the texture handle by OpenGL + GLuint opengl_id() const; + + /// Returns an enumerated constant for the OpenGL wrap mode used by the texture. + GLenum wrap_mode() const; + + /// Returns an enumerated constant for the OpenGL filter mode used by the texture. + GLenum filter_mode() const; + + /// Uses the OpenGL texture wrap mode arguments + void set_wrap_mode(GLenum wrapMode); + + /// Uses the OpenGL texture filter mode arguments + void set_filter_mode(GLenum filterMode); + + /// Returns the color at the specified pixel. The top left corner of the + /// image is (0,0) and the bottom right is (width()-1, height()-1). + Color Pixel(int x, int y) const; + +private: + + bool InitOpenGL(); + + GLenum dataType_; // GL_UNSIGNED_BYTE or GL_FLOAT + const unsigned char * data_ubyte_; + const float * data_float_; + + int width_; + int height_; + bool handleMemInternally_; + + GLuint texID_; + GLenum wrapMode_; + GLenum filterMode_; +}; + + +} // end namespace + +#endif \ No newline at end of file diff --git a/dev/MinGfx/src/unicam.cc b/dev/MinGfx/src/unicam.cc new file mode 100644 index 0000000..0acb9c9 --- /dev/null +++ b/dev/MinGfx/src/unicam.cc @@ -0,0 +1,317 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "unicam.h" + +#include "gfxmath.h" + +namespace mingfx { + + +UniCam::UniCam() : state_(UniCamState::START), defaultDepth_(4.0), boundingSphereRad_(1.0), + dollyFactor_(1.0), dollyInitialized_(false), elapsedTime_(0.0), hitGeometry_(false), + rotAngularVel_(0.0), rotInitialized_(false), rotLastTime_(0.0), showIcon_(false) +{ +} + +UniCam::UniCam(const Matrix4 &initialViewMatrix) : + state_(UniCamState::START), defaultDepth_(4.0), V_(initialViewMatrix), boundingSphereRad_(1.0), + dollyFactor_(1.0), dollyInitialized_(false), elapsedTime_(0.0), hitGeometry_(false), + rotAngularVel_(0.0), rotInitialized_(false), rotLastTime_(0.0), showIcon_(false) +{ +} + +UniCam::~UniCam() +{ +} + + +void UniCam::recalc_angular_vel() { + // update angular velocity + float cutoff = (float)elapsedTime_ - 0.2f; // look just at the last 0.2 secs + while ((rotAngularVelBuffer_.size()) && (rotAngularVelBuffer_[0].first < cutoff)) { + rotAngularVelBuffer_.erase(rotAngularVelBuffer_.begin()); + } + rotAngularVel_ = 0.0; + if (rotAngularVelBuffer_.size()) { + for (int i=0; i panMovementThreshold) { + // already lots of horizontal movement, we can go right to pan + state_ = UniCamState::PAN; + showIcon_ = false; + } + else if (fabs(mousePos[1] - initialClickPos_[1]) > dollyMovementThreshold) { + // already lots of vertical movement, we can go right to dolly + state_ = UniCamState::DOLLY; + showIcon_ = false; + } + else if (elapsedTime_ > 1.0) { + // timeout, this was not a quick click to set a center of rotation, + // so there is no intent to rotate. instead we will be doing either + // pan or dolly. + state_ = UniCamState::PAN_DOLLY_DECISION; + showIcon_ = false; + } + } + else if (state_ == UniCamState::PAN_DOLLY_DECISION) { + const double panMovementThreshold = 0.01; + const double dollyMovementThreshold = 0.01; + if (fabs(mousePos[0] - initialClickPos_[0]) > panMovementThreshold) { + // lots of horizontal movement, go to pan + state_ = UniCamState::PAN; + } + else if (fabs(mousePos[1] - initialClickPos_[1]) > dollyMovementThreshold) { + // lots of vertical movement, go to dolly + state_ = UniCamState::DOLLY; + } + } + else if (state_ == UniCamState::PAN) { + Matrix4 camMat = V_.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + Vector3 look = -camMat.ColumnToVector3(2); + float depth = (hitPoint_ - eye).Dot(look); + Point3 pWorld1 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, mouseLast_, depth); + Point3 pWorld2 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, mousePos, depth); + V_ = V_ * Matrix4::Translation(pWorld2 - pWorld1); + } + else if (state_ == UniCamState::DOLLY) { + if (!dollyInitialized_) { + // Setup dollyFactor so that if you move the mouse to the bottom of the screen, the point + // you clicked on will be right on top of the camera. + Matrix4 camMat = V_.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + Vector3 look = -camMat.ColumnToVector3(2); + float depth = (hitPoint_ - eye).Dot(look); + float deltaYToBottom = initialClickPos_[1] + 1; + dollyFactor_ = depth / deltaYToBottom; + dollyInitialized_ = true; + } + Vector3 d(0, 0, -dollyFactor_ * (mousePos[1] - mouseLast_[1])); + V_ = Matrix4::Translation(d) * V_ ; + } + else if (state_ == UniCamState::ROT) { + if (!rotInitialized_) { + float depth = 0.0; + if (hitGeometry_) { + // if we hit some geometry, then make that the center of rotation + boundingSphereCtr_ = hitPoint_; + Matrix4 camMat = V_.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + Vector3 look = -camMat.ColumnToVector3(2); + depth = (hitPoint_ - eye).Dot(look); + } + else { + // if we did not hit any geometry, then center the bounding sphere in front of + // the camera at a distance that can be configured by the user. + boundingSphereCtr_ = GfxMath::ScreenToDepthPlane(V_, Pdraw_, Point2(0,0), defaultDepth_); + depth = defaultDepth_; + } + + // determine the size of the bounding sphere by projecting a screen-space + // distance of 0.75 units to the depth of the sphere center + Point3 pWorld1 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, Point2(0,0), depth); + Point3 pWorld2 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, Point2(0.75,0), depth); + boundingSphereRad_ = (pWorld2-pWorld1).Length(); + + rotLastTime_ = elapsedTime_; + rotAngularVelBuffer_.clear(); + rotInitialized_ = true; + } + else { + // Do a trackball rotation based on the mouse movement and the bounding sphere + // setup earlier. + + Matrix4 camMat = V_.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + + // last mouse pos + bool hit1 = false; + Point3 mouse3D1 = GfxMath::ScreenToNearPlane(V_, Pdraw_, mouseLast_); + Ray ray1(eye, mouse3D1 - eye); + float t1; + Point3 iPoint1; + if (ray1.IntersectSphere(boundingSphereCtr_, boundingSphereRad_, &t1, &iPoint1)) { + hit1 = true; + } + + // current mouse pos + bool hit2 = false; + Point3 mouse3D2 = GfxMath::ScreenToNearPlane(V_, Pdraw_, mousePos); + Ray ray2(eye, mouse3D2 - eye); + float t2; + Point3 iPoint2; + if (ray2.IntersectSphere(boundingSphereCtr_, boundingSphereRad_, &t2, &iPoint2)) { + hit2 = true; + } + rotLastIPoint_ = iPoint2; + + if (hit1 && hit2) { + Vector3 v1 = (iPoint1 - boundingSphereCtr_).ToUnit(); + Vector3 v2 = (iPoint2 - boundingSphereCtr_).ToUnit(); + + rotAxis_ = v1.Cross(v2).ToUnit(); + float angle = std::acos(v1.Dot(v2)); + + if (std::isfinite(angle)) { + Matrix4 R = Matrix4::Rotation(boundingSphereCtr_, rotAxis_, angle); + R = R.Orthonormal(); + V_ = V_ * R; + //V_ = V_.orthonormal(); + + // add a sample to the angular vel vector + double dt = elapsedTime_ - rotLastTime_; + double avel = angle / dt; + if (std::isfinite(avel)) { + rotAngularVelBuffer_.push_back(std::make_pair(elapsedTime_, avel)); + } + rotLastTime_ = elapsedTime_; + } + } + + recalc_angular_vel(); + } + } + else if (state_ == UniCamState::START) { + // picked up a little mouse movement after "catching" a spinning model + // nothing to do, just wait for the button up. + } + else { + std::cerr << "UniCam::OnDrag() unexpected state." << std::endl; + } + mouseLast_ = mousePos; +} + +void UniCam::OnButtonUp(const Point2 &mousePos) { + if (state_ == UniCamState::PAN_DOLLY_ROT_DECISION) { + // here, we got a quick click of the mouse to indicate a center of rotation + // so we now go into a mode of waiting for a second click to start rotating + // around that point. + state_ = UniCamState::ROT_WAIT_FOR_SECOND_CLICK; + } + else if (state_ == UniCamState::ROT) { + showIcon_ = false; + // if we are leaving the rotation state and the angular velocity is + // greater than some thresold, then the user has "thrown" the model + // keep rotating the same way by entering the spinning state. + + recalc_angular_vel(); + //std::cout << "check for spin: " << n-start << " " << rotAngularVel_ << " " << avel2 << std::endl; + + const float threshold = 0.2f; + if (std::fabs(rotAngularVel_) > threshold) { + state_ = UniCamState::SPINNING; + } + else { + state_ = UniCamState::START; + } + } + else { + showIcon_ = false; + // all other cases go back to the start state + state_ = UniCamState::START; + } +} + +void UniCam::AdvanceAnimation(double dt) { + elapsedTime_ += dt; + + if (state_ == UniCamState::SPINNING) { + double deltaT = elapsedTime_ - rotLastTime_; + rotLastTime_ = elapsedTime_; + double angle = (double)rotAngularVel_ * deltaT; + Matrix4 R = Matrix4::Rotation(boundingSphereCtr_, rotAxis_, (float)angle); + //R = R.orthonormal(); + V_ = V_ * R; + } +} + + +void UniCam::Draw(const Matrix4 &projectionMatrix) { + Pdraw_ = projectionMatrix; + + if (showIcon_) { + Matrix4 camMat = V_.Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + Vector3 look = -camMat.ColumnToVector3(2); + float depth = (hitPoint_ - eye).Dot(look); + Point3 pWorld1 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, Point2(0.f,0.f), depth); + Point3 pWorld2 = GfxMath::ScreenToDepthPlane(V_, Pdraw_, Point2(0.015f,0.f), depth); + float rad = (pWorld2 - pWorld1).Length(); + Matrix4 M = Matrix4::Translation(hitPoint_ - Point3::Origin()) * Matrix4::Scale(Vector3(rad, rad, rad)); + quickShapes_.DrawSphere(M, V_, Pdraw_, Color(0,0,0)); + } +} + + +Matrix4 UniCam::view_matrix() { + return V_; +} + +void UniCam::set_view_matrix(Matrix4 viewMatrix) { + V_ = viewMatrix; +} + +void UniCam::set_default_depth(float d) { + defaultDepth_ = d; +} + +Point3 UniCam::eye() { + Matrix4 camMat = V_.Inverse(); + return camMat.ColumnToPoint3(3); +} + +Vector3 UniCam::look() { + Matrix4 camMat = V_.Inverse(); + return -camMat.ColumnToVector3(2); +} + + + + +} // end namespace diff --git a/dev/MinGfx/src/unicam.h b/dev/MinGfx/src/unicam.h new file mode 100644 index 0000000..999232b --- /dev/null +++ b/dev/MinGfx/src/unicam.h @@ -0,0 +1,256 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_UNICAM_H_ +#define SRC_UNICAM_H_ + +#include "quick_shapes.h" +#include "point2.h" +#include "point3.h" +#include "vector2.h" +#include "vector3.h" + + +namespace mingfx { + + +/** This implements a user interface for controlling the camera with the mouse. + It is a special interface inspired by the "Unicam" technique developed by + Zeleznik et al. + + The key feature is that this interface makes it possible to control camera pan, + dolly, and rotation with only a single mouse button. That is quite useful + because it leaves the other mouse buttons free for pointing, sketching, or + other interaction techniques. + + The only downside of this technique is that it can take some time to learn. In + order to enjoy it, you will need to read these brief instructions on how to Pan, + Dolly, Rotate, and Spin: + + - Pan: Click and drag horizontally with the mouse. Once you make an initial + horizontal movement you can than pan up and down as well, but the key to entering + pan mode is to start with a horizontal movement. + + - Dolly: Click and drag vertically with the mouse. The initial movement must + be vertical. If you click on some object in the scene, then the speed of dollying + is set so that the object will come all the up to the camera lens if you drag + the mouse to the bottom of the screen. + + - Rotate: Start with a quick click and release to set the center of rotation. + This is most useful if you click on some object in the scene. You will see a + black dot appear to mark the center of rotation. If you click on the background + then a center of rotation will be selected for you. It will be a point straight + ahead and at a depth 4.0 units away. The depth can be adjusted for your application + with set_default_depth(). Once your center of rotation is established, move + your mouse away a bit and then click and drag to do a trackball rotatation of + the scene around this point. Come to a stop before letting go of the mouse + button in order to avoid entering the spin state! + + - Spin: For some fun, try "throwing" the scene so that it continues to rotate + even after you let go. To do this, start a rotation and then let go of the + mouse button while your mouse is still moving. To stop spinning just click and + release the mouse once to "catch" the scene. + + + Example usage: +~~~ +// Create a global or member variable in your MyGraphicsApp class: +UniCam unicam_; + + +void MyGraphicsApp::OnLeftMouseDown(const Point2 &pos) { + Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos); + float mouse_z = ReadZValueAtPixel(pos); + unicam_.OnButtonDown(mouse_xy, mouse_z); +} + +void MyGraphicsApp::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) { + Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos); + unicam_.OnDrag(mouse_xy); +} + +void MyGraphicsApp::OnLeftMouseUp(const Point2 &pos) { + Point2 mouse_xy = PixelsToNormalizedDeviceCoords(pos); + unicam_.OnButtonUp(mouse_xy); +} + +void MyGraphicsApp::InitOpenGL() { + projMatrix_ = Matrix4::perspective(30, aspect_ratio(), 1, 20); + unicam_.set_view_matrix(Matrix4::lookAt(Point3(2.5,1,2.5), Point3(0,0,0), Vector3(0,1,0));); +} + +void MyGraphicsApp::DrawOpenGL() { + // draw your scene using the view matrix from UniCam + Matrix4 proj_matrix = Matrix4::Perspective(60, aspect_ratio(), 0.001, 10);; + Matrix4 view_matrix = uniCam.view_matrix(); + Matrix4 model_matrix = Matrix4::RotateY(to_radians(45.0)); + quickShapes.DrawCube(model_matrix, view_matirx, proj_matrix, Color(1,1,1)); + + // tell unicam to draw itself (i.e., the small sphere that marks the center of + // rotation when in rotation mode) + unicam_.Draw(proj_matrix); +} +~~~ +*/ +class UniCam { +public: + + /// Creates a UniCam object with an initial view matrix = identity. + UniCam(); + + /// Creates a UniCam object with the supplied initial view matrix. + UniCam(const Matrix4 &initialViewMatrix); + + virtual ~UniCam(); + + + // To make the interaction work, the following set of functions need to be + // called from your GraphicsApp or whatever main application class you use + // to receive user input events and a draw callback. + + /// Attach this to whatever mouse button you wish, for example, call this + /// from within GraphicsApp::OnRightMouseDown(). If your mousePos is reported + /// in pixels, you will need to convert it to normalized device coordinates + /// before passing it on to this routine. The depth buffer value for the + /// pixel under the mouse is also needed. If you are using GraphicsApp, you + /// can access both of these as follows: + /// ~~~ + /// Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels); + /// float mouse_z = ReadZValueAtPixel(mouse_in_pixels); + /// uniCam.OnButtonDown(mouse_xy, mouse_z); + /// ~~~ + void OnButtonDown(const Point2 &normalizedMousePos, float mouseZ); + + /// Attach this to the corresponding mouse move event, for example, call this + /// from within GraphicsApp::OnRightMouseDrag(). If your mousePos is reported + /// in pixels, you will need to convert it to normalized device coordinates + /// before passing it on to this routine. Within GraphicsApp, use: + /// ~~~ + /// Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels); + /// uniCam.OnDrag(mouse_xy); + /// ~~~ + void OnDrag(const Point2 &normalizedMousePos); + + /// Attach this to the corresponding button up event, for example, call this + /// from within GraphicsApp::OnRightMouseUp(). If your mousePos is reported + /// in pixels, you will need to convert it to normalized device coordinates + /// before passing it on to this routine. Within GraphicsApp, use: + /// ~~~ + /// Point2 mouse_xy = PixelsToNormalizedDeviceCoords(mouse_in_pixels); + /// uniCam.OnButtonUp(mouse_xy); + /// ~~~ + void OnButtonUp(const Point2 &normalizedMousePos); + + /// Attach this to a callback that can be used to control animation. Within + /// GraphicsApp::UpdateSimulation(), use: + /// ~~~ + /// uniCam.AdvanceAnimation(dt); + /// ~~~ + void AdvanceAnimation(double dt); + + /// Finally, attach this to your draw callback routine. Within + /// GraphicsApp::DrawUsingOpenGL(), use: + /// ~~~ + /// uniCam.Draw(projMatrix); + /// ~~~ + void Draw(const Matrix4 &projectionMatrix); + + + /// Access the camera view matrix created by the UniCam interactions via + /// this method and use it to draw the geometry in your scence. + /// For example, within GraphicsApp::DrawUsingOpenGL(), you might have: + /// ~~~ + /// Matrix4 P = Matrix4::Perspective(30, aspect_ratio(), 1, 20); + /// Matrix4 V = unicam.view_matrix(); + /// Matrix4 M = Matrix4::RotateY(GfxMath::ToRadians(45.0)); + /// quick_shapes.DrawCube(M, V, P, Color(1,1,1)); + /// ~~~ + Matrix4 view_matrix(); + + + /// Returns the "eye" point (i.e., focal point) of the camera in world + /// space coordinates. + Point3 eye(); + + /// Returns the look direction (i.e., -Z axis of the camera matrix) in world + /// space coordinates. + Vector3 look(); + + + // ------------- + + /// This is not required, but you may use this if you wish to set an initial + /// view matrix or reset the view matrix + void set_view_matrix(Matrix4 viewMatrix); + + /// This sets the depth of the center of rotation for the case when the user's + /// click does not intersect any geometry. It defaults to 4 units, but the + /// right value to use depends very much on the current scene. For example, + /// you could set a very good value by calculating the current centroid of + /// your scene and the finding the depth of this point (the distance along + /// the look vector) relative to the camera. + void set_default_depth(float d); + + +private: + + void recalc_angular_vel(); + + enum class UniCamState { + START, + PAN_DOLLY_ROT_DECISION, + PAN_DOLLY_DECISION, + ROT_WAIT_FOR_SECOND_CLICK, + PAN, + DOLLY, + ROT, + SPINNING + }; + UniCamState state_; + + Point2 mouseLast_; + double elapsedTime_; + + Point2 initialClickPos_; + bool hitGeometry_; + Point3 hitPoint_; + + bool rotInitialized_; + Point3 rotLastIPoint_; + float boundingSphereRad_; + Point3 boundingSphereCtr_; + double rotLastTime_; + std::vector> rotAngularVelBuffer_; + double rotAngularVel_; + Vector3 rotAxis_; + + bool dollyInitialized_; + float dollyFactor_; + float defaultDepth_; + + bool showIcon_; + QuickShapes quickShapes_; + + Matrix4 V_; + Matrix4 Vstart_; + + // saved from the last draw call in order to unproject the mouse pos + Matrix4 Pdraw_; +}; + + +} // end namespace + +#endif + + diff --git a/dev/MinGfx/src/vector2.cc b/dev/MinGfx/src/vector2.cc new file mode 100644 index 0000000..cada189 --- /dev/null +++ b/dev/MinGfx/src/vector2.cc @@ -0,0 +1,185 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "vector2.h" + +#include + +namespace mingfx { + + +static const Vector2 s_zerov2d = Vector2(0,0); +static const Vector2 s_onev2d = Vector2(1,1); +static const Vector2 s_unitxv2d = Vector2(1,0); +static const Vector2 s_unityv2d = Vector2(0,1); + +const Vector2& Vector2::Zero() { return s_zerov2d; } +const Vector2& Vector2::One() { return s_onev2d; } +const Vector2& Vector2::UnitX() { return s_unitxv2d; } +const Vector2& Vector2::UnitY() { return s_unityv2d; } + +Vector2::Vector2() { + v[0] = 0.0; + v[1] = 0.0; +} + +Vector2::Vector2(float x, float y) { + v[0] = x; + v[1] = y; +} + +Vector2::Vector2(float *ptr) { + v[0] = ptr[0]; + v[1] = ptr[1]; +} + +Vector2::Vector2(const Vector2& other) { + v[0] = other[0]; + v[1] = other[1]; +} + +Vector2::~Vector2() { +} + +bool Vector2::operator==(const Vector2& other) const { + return (fabs(other[0] - v[0]) < MINGFX_MATH_EPSILON && + fabs(other[1] - v[1]) < MINGFX_MATH_EPSILON); +} + +bool Vector2::operator!=(const Vector2& other) const { + return (fabs(other[0] - v[0]) >= MINGFX_MATH_EPSILON && + fabs(other[1] - v[1]) >= MINGFX_MATH_EPSILON); +} + +Vector2& Vector2::operator=(const Vector2& other) { + v[0] = other[0]; + v[1] = other[1]; + return *this; +} + +float Vector2::operator[](const int i) const { + if ((i>=0) && (i<=1)) { + return v[i]; + } + else { + // w component of a vector is 0 so return the constant 0.0 + return 0.0; + } +} + +float& Vector2::operator[](const int i) { + return v[i]; +} + +float Vector2::Dot(const Vector2& other) const { + return v[0]*other[0] + v[1]*other[1]; +} + +float Vector2::Length() const { + return sqrt(v[0]*v[0] + v[1]*v[1]); +} + +void Vector2::Normalize() { + // Hill & Kelley provide this: + float sizeSq = + v[0]*v[0] + v[1]*v[1]; + if (sizeSq < MINGFX_MATH_EPSILON) { + return; // do nothing to zero vectors; + } + float scaleFactor = (float)1.0/(float)sqrt(sizeSq); + v[0] *= scaleFactor; + v[1] *= scaleFactor; +} + +Vector2 Vector2::ToUnit() const { + Vector2 v(*this); + v.Normalize(); + return v; +} + + +Vector2 Vector2::Lerp(const Vector2 &b, float alpha) const { + float x = (1.0f-alpha)*(*this)[0] + alpha*b[0]; + float y = (1.0f-alpha)*(*this)[1] + alpha*b[1]; + return Vector2(x,y); +} + +Vector2 Vector2::Lerp(const Vector2 &a, const Vector2 &b, float alpha) { + float x = (1.0f-alpha)*a[0] + alpha*b[0]; + float y = (1.0f-alpha)*a[1] + alpha*b[1]; + return Vector2(x,y); +} + + +const float * Vector2::value_ptr() const { + return v; +} + + +Vector2 Vector2::Normalize(const Vector2 &v) { + return v.ToUnit(); +} + + +float Vector2::Dot(const Vector2 &v1, const Vector2 &v2) { + return v1.Dot(v2); +} + + + +Vector2 operator/(const Vector2& v, const float s) { + const float invS = 1 / s; + return Vector2(v[0]*invS, v[1]*invS); +} + +Vector2 operator*(const float s, const Vector2& v) { + return Vector2(v[0]*s, v[1]*s); +} + +Vector2 operator*(const Vector2& v, const float s) { + return Vector2(v[0]*s, v[1]*s); +} + +Vector2 operator-(const Vector2& v) { + return Vector2(-v[0], -v[1]); +} + +Point2 operator+(const Vector2& v, const Point2& p) { + return Point2(p[0] + v[0], p[1] + v[1]); +}; + +Point2 operator+(const Point2& p, const Vector2& v) { + return Point2(p[0] + v[0], p[1] + v[1]); +} + +Vector2 operator+(const Vector2& v1, const Vector2& v2) { + return Vector2(v1[0] + v2[0], v1[1] + v2[1]); +} + +Point2 operator-(const Point2& p, const Vector2& v) { + return Point2(p[0] - v[0], p[1] - v[1]); +} + +Vector2 operator-(const Vector2& v1, const Vector2& v2) { + return Vector2(v1[0] - v2[0], v1[1] - v2[1]); +} + +Vector2 operator-(const Point2& p1, const Point2& p2) { + return Vector2(p1[0] - p2[0], p1[1] - p2[1]); +} + + +std::ostream & operator<< ( std::ostream &os, const Vector2 &v) { + return os << "<" << v[0] << ", " << v[1] << ">"; +} + +std::istream & operator>> ( std::istream &is, Vector2 &v) { + // format: + char dummy; + return is >> dummy >> v[0] >> dummy >> v[1] >> dummy; +} + + +} // end namespace diff --git a/dev/MinGfx/src/vector2.h b/dev/MinGfx/src/vector2.h new file mode 100644 index 0000000..f1a8d3e --- /dev/null +++ b/dev/MinGfx/src/vector2.h @@ -0,0 +1,186 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_VECTOR2_H_ +#define SRC_VECTOR2_H_ + +#include + +#include "point2.h" + + +namespace mingfx { + + +/** A 2D Vector with floating point coordinates, used for storing 2D translations, + mouse movements, and screen-space vectors. + */ +class Vector2 { +public: + + /// Default constructor to create zero vector + Vector2(); + + /// Constructs a vector (x,y,0), where the 0 comes from the use of + /// homogeneous coordinates in computer graphics. + Vector2(float x, float y); + + /// Constructs a vector given a pointer to x,y,z data + Vector2(float *v); + + /// Copy constructor for vector + Vector2(const Vector2& v); + + /// Vector destructor + virtual ~Vector2(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Vector2& v) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Vector2& v) const; + + /// Vector assignment operator + Vector2& operator=(const Vector2& v); + + /// Read only access to the ith coordinate of the vector. + float operator[](const int i) const; + + /// Returns a reference to the ith coordinate of the vector. Use this + /// accessor if you wish to set the coordinate rather than just request + /// its value. Example: + /// ~~~ + /// Vector2 a; + /// a[0] = 5.0; // set the x-coordinate of the vector + /// ~~~ + float& operator[](const int i); + + /// Read only access to the x coordinate. Can also use my_vector[0]. Use + /// the my_vector[0] = 1.0; form if you need to set the value. + float x() const { return v[0]; } + + /// Read only access to the y coordinate. Can also use my_vector[1]. Use + /// the my_vector[1] = 1.0; form if you need to set the value. + float y() const { return v[1]; } + + /// In homogeneous coordinates, the w coordinate for all vectors is 0.0. + float w() const { return 0.0; } + + + // --- Vector operations --- + + /// Returns "this dot v" + float Dot(const Vector2& v) const; + + /// Returns the length of the vector + float Length() const; + + /// Normalizes the vector by making it unit length. + void Normalize(); + + /// Returns a normalized (i.e., unit length) version of the vector without + /// modifying the original ('this') vector. + Vector2 ToUnit() const; + + /// Linear interpolation between this vector and another. Alpha=0.0 returns + /// this vector, and alpha=1.0 returns the other vector, other values blend + /// between the two. + Vector2 Lerp(const Vector2 &b, float alpha) const; + + /// Returns a const pointer to the raw data array + const float * value_ptr() const; + + + + /// Returns a new vector that is the unit version of v. + static Vector2 Normalize(const Vector2 &v); + + /// Returns v1 dot v2 + static float Dot(const Vector2 &v1, const Vector2 &v2); + + /// (0,0) - a shortcut for a special vector that is frequently needed + static const Vector2& Zero(); + + /// (1,1) - a shortcut for a special vector that is frequently needed + static const Vector2& One(); + + /// (1,0) - a shortcut for a special vector that is frequently needed + static const Vector2& UnitX(); + + /// (0,1) - a shortcut for a special vector that is frequently needed + static const Vector2& UnitY(); + + /// Linear interpolation between two vectors. Alpha=0.0 returns 'a' and + /// alpha=1.0 returns 'b', other values blend between the two. + static Vector2 Lerp(const Vector2 &a, const Vector2 &b, float alpha); + +private: + float v[2]; +}; + + +// ---------- Operator Overloads for Working with Vectors ---------- + + +// --- Scalers --- + +/// Divide the vector by the scalar s +Vector2 operator/(const Vector2& v, const float s); + +/// Multiply the vector by the scalar s +Vector2 operator*(const float s, const Vector2& v); + +/// Multiply the vector by the scalar s +Vector2 operator*(const Vector2& v, const float s); + +/// Negate the vector +Vector2 operator-(const Vector2& v); + +// Note: no -(point) operator, that's an undefined operation + + +// --- Point and Vector Arithmetic --- + +/// Adds a vector and a point, returns a point +Point2 operator+(const Vector2& v, const Point2& p); + +/// Adds a point and a vector, returns a point +Point2 operator+(const Point2& p, const Vector2& v); + +/// Adds a vector and a vector, returns a vector +Vector2 operator+(const Vector2& v1, const Vector2& v2); + +// Note: no (point + point) operator, that's an undefined operation + +/// Subtracts a vector from a point, returns a point +Point2 operator-(const Point2& p, const Vector2& v); + +/// Subtracts v2 from v1, returns a vector +Vector2 operator-(const Vector2& v1, const Vector2& v2); + +/// Returns the vector spanning p1 and p2 +Vector2 operator-(const Point2& p1, const Point2& p2); + +// Note: no (vector - point) operator, that's an undefined operation + + +// --- Stream operators --- + +// Vector2 +std::ostream & operator<< ( std::ostream &os, const Vector2 &v); +std::istream & operator>> ( std::istream &is, Vector2 &v); + + +} // end namespace + +#endif diff --git a/dev/MinGfx/src/vector3.cc b/dev/MinGfx/src/vector3.cc new file mode 100644 index 0000000..19262c2 --- /dev/null +++ b/dev/MinGfx/src/vector3.cc @@ -0,0 +1,206 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + +#include "vector3.h" + +#include + +namespace mingfx { + +static const Vector3 s_zerov3d = Vector3(0,0,0); +static const Vector3 s_onev3d = Vector3(1,1,1); +static const Vector3 s_unitxv3d = Vector3(1,0,0); +static const Vector3 s_unityv3d = Vector3(0,1,0); +static const Vector3 s_unitzv3d = Vector3(0,0,1); + +const Vector3& Vector3::Zero() { return s_zerov3d; } +const Vector3& Vector3::One() { return s_onev3d; } +const Vector3& Vector3::UnitX() { return s_unitxv3d; } +const Vector3& Vector3::UnitY() { return s_unityv3d; } +const Vector3& Vector3::UnitZ() { return s_unitzv3d; } + + +Vector3::Vector3() { + v[0] = 0.0; + v[1] = 0.0; + v[2] = 0.0; +} + +Vector3::Vector3(float x, float y, float z) { + v[0] = x; + v[1] = y; + v[2] = z; +} + +Vector3::Vector3(float *ptr) { + v[0] = ptr[0]; + v[1] = ptr[1]; + v[2] = ptr[2]; +} + +Vector3::Vector3(const Vector3& other) { + v[0] = other[0]; + v[1] = other[1]; + v[2] = other[2]; +} + +Vector3::~Vector3() { +} + +bool Vector3::operator==(const Vector3& other) const { + return (fabs(other[0] - v[0]) < MINGFX_MATH_EPSILON && + fabs(other[1] - v[1]) < MINGFX_MATH_EPSILON && + fabs(other[2] - v[2]) < MINGFX_MATH_EPSILON); +} + +bool Vector3::operator!=(const Vector3& other) const { + return (fabs(other[0] - v[0]) >= MINGFX_MATH_EPSILON && + fabs(other[1] - v[1]) >= MINGFX_MATH_EPSILON && + fabs(other[2] - v[2]) >= MINGFX_MATH_EPSILON); +} + +Vector3& Vector3::operator=(const Vector3& other) { + v[0] = other[0]; + v[1] = other[1]; + v[2] = other[2]; + return *this; +} + +float Vector3::operator[](const int i) const { + if ((i>=0) && (i<=2)) { + return v[i]; + } + else { + // w component of a vector is 0 so return the constant 0.0 + return 0.0; + } +} + +float& Vector3::operator[](const int i) { + return v[i]; +} + +float Vector3::Dot(const Vector3& other) const { + return v[0]*other[0] + v[1]*other[1] + v[2]*other[2]; +} + +Vector3 Vector3::Cross(const Vector3& other) const { + return Vector3(v[1] * other[2] - v[2] * other[1], + v[2] * other[0] - v[0] * other[2], + v[0] * other[1] - v[1] * other[0]); +} + +float Vector3::Length() const { + return sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]); +} + +void Vector3::Normalize() { + // Hill & Kelley provide this: + float sizeSq = + v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; + if (sizeSq < MINGFX_MATH_EPSILON) { + return; // do nothing to zero vectors; + } + float scaleFactor = (float)1.0/(float)sqrt(sizeSq); + v[0] *= scaleFactor; + v[1] *= scaleFactor; + v[2] *= scaleFactor; +} + + +Vector3 Vector3::ToUnit() const { + Vector3 v(*this); + v.Normalize(); + return v; +} + +const float * Vector3::value_ptr() const { + return v; +} + + + +Vector3 Vector3::Normalize(const Vector3 &v) { + return v.ToUnit(); +} + +Vector3 Vector3::Cross(const Vector3 &v1, const Vector3 &v2) { + return v1.Cross(v2); +} + +float Vector3::Dot(const Vector3 &v1, const Vector3 &v2) { + return v1.Dot(v2); +} + +Vector3 Vector3::Lerp(const Vector3 &b, float alpha) const { + float x = (1.0f-alpha)*(*this)[0] + alpha*b[0]; + float y = (1.0f-alpha)*(*this)[1] + alpha*b[1]; + float z = (1.0f-alpha)*(*this)[2] + alpha*b[2]; + return Vector3(x,y,z); +} + +Vector3 Vector3::Lerp(const Vector3 &a, const Vector3 &b, float alpha) { + float x = (1.0f-alpha)*a[0] + alpha*b[0]; + float y = (1.0f-alpha)*a[1] + alpha*b[1]; + float z = (1.0f-alpha)*a[2] + alpha*b[2]; + return Vector3(x,y,z); +} + + + +Vector3 operator/(const Vector3& v, const float s) { + const float invS = 1 / s; + return Vector3(v[0]*invS, v[1]*invS, v[2]*invS); +} + +Vector3 operator*(const float s, const Vector3& v) { + return Vector3(v[0]*s, v[1]*s, v[2]*s); +} + +Vector3 operator*(const Vector3& v, const float s) { + return Vector3(v[0]*s, v[1]*s, v[2]*s); +} + +Vector3 operator-(const Vector3& v) { + return Vector3(-v[0], -v[1], -v[2]); +} + +Point3 operator+(const Vector3& v, const Point3& p) { + return Point3(p[0] + v[0], p[1] + v[1], p[2] + v[2]); +}; + +Point3 operator+(const Point3& p, const Vector3& v) { + return Point3(p[0] + v[0], p[1] + v[1], p[2] + v[2]); +} + +Vector3 operator+(const Vector3& v1, const Vector3& v2) { + return Vector3(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]); +} + +Point3 operator-(const Point3& p, const Vector3& v) { + return Point3(p[0] - v[0], p[1] - v[1], p[2] - v[2]); +} + +Vector3 operator-(const Vector3& v1, const Vector3& v2) { + return Vector3(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]); +} + +Vector3 operator-(const Point3& p1, const Point3& p2) { + return Vector3(p1[0] - p2[0], p1[1] - p2[1], p1[2] - p2[2]); +} + + +std::ostream & operator<< ( std::ostream &os, const Vector3 &v) { + return os << "<" << v[0] << ", " << v[1] << ", " << v[2] << ">"; +} + +std::istream & operator>> ( std::istream &is, Vector3 &v) { + // format: + char dummy; + return is >> dummy >> v[0] >> dummy >> v[1] >> dummy >> v[2] >> dummy; +} + + +} // end namespace diff --git a/dev/MinGfx/src/vector3.h b/dev/MinGfx/src/vector3.h new file mode 100644 index 0000000..d12c819 --- /dev/null +++ b/dev/MinGfx/src/vector3.h @@ -0,0 +1,273 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#ifndef SRC_VECTOR3_H_ +#define SRC_VECTOR3_H_ + +#include + +#include "point3.h" + + +namespace mingfx { + + +/** A 3D Vector with floating point coordinates, used for storing normals and + all sorts of other 3D graphics operations. Vector3s can be transformed by a + Matrix4, and a Vector3 can be created by subtracting two Point3s. Example: + ~~~ + // subtracting two points creates a vector + Point3 a(0,0,0); + Point3 b(2,0,0); + Vector3 c = b - a; + + // vectors can be transformed by Matrix4s + Vector3 dir = c.ToUnit(); + Matrix4 M = Matrix4::RotateX(GfxMath::ToDegrees(30.0)); + Vector3 dir_transformed = M * dir; + + // vectors can be added and subtracted + Vector3 d(1,0,0); + Vector3 e = c + d; + + // and we can do the usual dot products and cross products too + float f = d.Dot(e); + Vector3 g = b.Cross(d); + + // you can access the individual components of the vector in two ways: + Vector3 v(1,2,3); + float option1 = v.x(); + float option2 = v[0]; + + // to set an individual component of the vector use the [] operator: + Vector3 w; + w[0] = 0.4; + w[1] = 1.2; + w[2] = 3.1; + + // you can print the vector by sending it to stdout: + std::cout << v << std::endl; + ~~~ + */ +class Vector3 { +public: + + /// Default constructor to create zero vector + Vector3(); + + /// Constructs a vector (x,y,z,0), where the 0 comes from the use of + /// homogeneous coordinates in computer graphics + Vector3(float x, float y, float z); + + /// Constructs a vector given a pointer to x,y,z data + Vector3(float *v); + + /// Copy constructor for vector + Vector3(const Vector3& v); + + /// Vector destructor + virtual ~Vector3(); + + /// Check for "equality", taking floating point imprecision into account + bool operator==(const Vector3& v) const; + + /// Check for "inequality", taking floating point imprecision into account + bool operator!=(const Vector3& v) const; + + /// Vector assignment operator + Vector3& operator=(const Vector3& v); + + /// Read only access to the ith coordinate of the vector. + float operator[](const int i) const; + + /// Returns a reference to the ith coordinate of the vector. Use this + /// accessor if you wish to set the coordinate rather than just request + /// its value. Example: + /// ~~~ + /// Vector3 a; + /// a[0] = 5.0; // set the x-coordinate of the vector + /// ~~~ + float& operator[](const int i); + + /// Read only access to the x coordinate. Can also use my_vector[0]. Use + /// the my_vector[0] = 1.0; form if you need to set the value. + float x() const { return v[0]; } + + /// Read only access to the y coordinate. Can also use my_vector[1]. Use + /// the my_vector[1] = 1.0; form if you need to set the value. + float y() const { return v[1]; } + + /// Read only access to the z coordinate. Can also use my_vector[2]. Use + /// the my_vector[2] = 1.0; form if you need to set the value. + float z() const { return v[2]; } + + /// In homogeneous coordinates, the w coordinate for all vectors is 0.0. + float w() const { return 0.0; } + + + // --- Vector operations --- + + /** Returns "this dot v", for example: + ~~~ + Vector3 a(1,0,0); + Vector3 b(0.5,0,0); + float c = a.Dot(b); + ~~~ + */ + float Dot(const Vector3& v) const; + + /** Returns "this cross v", for example: + ~~~ + Vector3 x(1,0,0); + Vector3 y(0,1,0); + Vector3 z = x.Cross(y); + ~~~ + */ + Vector3 Cross(const Vector3& v) const; + + /// Returns the length of the vector + float Length() const; + + /// Normalizes the vector by making it unit length. + void Normalize(); + + /// Returns a normalized (i.e., unit length) version of the vector without + /// modifying the original 'this' vector. + Vector3 ToUnit() const; + + /// Returns a const pointer to the raw data array + const float * value_ptr() const; + + /// Linear interpolation between this vector and another. Alpha=0.0 returns + /// this vector, and alpha=1.0 returns the other vector, other values blend + /// between the two. + Vector3 Lerp(const Vector3 &b, float alpha) const; + + + /// (0,0,0) - a shortcut for a special vector that is frequently needed + static const Vector3& Zero(); + + /// (1,1,1) - a shortcut for a special vector that is frequently needed + static const Vector3& One(); + + /// (1,0,0) - a shortcut for a special vector that is frequently needed + static const Vector3& UnitX(); + + /// (0,1,0) - a shortcut for a special vector that is frequently needed + static const Vector3& UnitY(); + + /// (0,0,1) - a shortcut for a special vector that is frequently needed + static const Vector3& UnitZ(); + + + /** Returns a new vector that is the unit version of v. This is just an + alternative syntax for ToUnit(). Example: + ~~~ + Vector3 a(100,150,80); + Vector3 b = Vector3::Normalize(a); + Vector3 c = a.ToUnit(); + // b and c are the same. + ~~~ + */ + static Vector3 Normalize(const Vector3 &v); + + /** Returns v1 cross v2. This is just an alternative syntax for Cross(). + Example: + ~~~ + Vector3 x(1,0,0); + Vector3 y(0,1,0); + Vector3 z1 = Vector3::Cross(x,y); + Vector3 z2 = x.Cross(y); + // z1 and z2 are the same. + ~~~ + */ + static Vector3 Cross(const Vector3 &v1, const Vector3 &v2); + + /** Returns v1 dot v2. This is just an alternative syntax for Dot(). + Example: + ~~~ + Vector3 a(1,0,0); + Vector3 b(0.5,0,0); + Vector3 c1 = a.Dot(b); + Vector3 c2 = Vector3::Dot(a,b); + // c1 and c2 are the same. + ~~~ + */ + static float Dot(const Vector3 &v1, const Vector3 &v2); + + /// Linear interpolation between two vectors. Alpha=0.0 returns 'a' and + /// alpha=1.0 returns 'b', other values blend between the two. + static Vector3 Lerp(const Vector3 &a, const Vector3 &b, float alpha); + +private: + float v[3]; +}; + + +// ---------- Operator Overloads for Working with Vectors ---------- + + +// --- Scalers --- + +/// Divide the vector by the scalar s +Vector3 operator/(const Vector3& v, const float s); + +/// Multiply the vector by the scalar s +Vector3 operator*(const float s, const Vector3& v); + +/// Multiply the vector by the scalar s +Vector3 operator*(const Vector3& v, const float s); + +/// Negate the vector +Vector3 operator-(const Vector3& v); + +// Note: no -(point) operator, that's an undefined operation + + +// --- Point and Vector Arithmetic --- + +/// Adds a vector and a point, returns a point +Point3 operator+(const Vector3& v, const Point3& p); + +/// Adds a point and a vector, returns a point +Point3 operator+(const Point3& p, const Vector3& v); + +/// Adds a vector and a vector, returns a vector +Vector3 operator+(const Vector3& v1, const Vector3& v2); + +// Note: no (point + point) operator, that's an undefined operation + +/// Subtracts a vector from a point, returns a point +Point3 operator-(const Point3& p, const Vector3& v); + +/// Subtracts v2 from v1, returns a vector +Vector3 operator-(const Vector3& v1, const Vector3& v2); + +/// Returns the vector spanning p1 and p2 +Vector3 operator-(const Point3& p1, const Point3& p2); + +// Note: no (vector - point) operator, that's an undefined operation + + + + +// --- Stream operators --- + +// Vector3 +std::ostream & operator<< ( std::ostream &os, const Vector3 &v); +std::istream & operator>> ( std::istream &is, Vector3 &v); + + +} // end namespace + +#endif diff --git a/dev/MinGfx/tests/blank_window/CMakeLists.txt b/dev/MinGfx/tests/blank_window/CMakeLists.txt new file mode 100644 index 0000000..2081638 --- /dev/null +++ b/dev/MinGfx/tests/blank_window/CMakeLists.txt @@ -0,0 +1,41 @@ +# This file is part of the MinGfx cmake build system. +# See the main MinGfx/CMakeLists.txt file for details. + +project(mingfx-test-blank-window) + + +# Source: +set (SOURCEFILES + main.cc +) +set (HEADERFILES +) +set (CONFIGFILES +) + + +# Define the target +add_executable(${PROJECT_NAME} ${HEADERFILES} ${SOURCEFILES}) + + +# Add dependency on libMinGfx: +target_include_directories(${PROJECT_NAME} PUBLIC ../../src) +target_link_libraries(${PROJECT_NAME} PUBLIC MinGfx) + +# Add external dependency on NanoGUI +include(AutoBuildNanoGUI) +AutoBuild_use_package_NanoGUI(${PROJECT_NAME} PUBLIC) + + + +# Installation: +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION ${INSTALL_BIN_DEST} + COMPONENT Tests) + + +# For better organization when using an IDE with folder structures: +set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER "Tests") +source_group("Header Files" FILES ${HEADERFILES}) +set_source_files_properties(${CONFIGFILES} PROPERTIES HEADER_FILE_ONLY TRUE) +source_group("Config Files" FILES ${CONFIGFILES}) diff --git a/dev/MinGfx/tests/blank_window/main.cc b/dev/MinGfx/tests/blank_window/main.cc new file mode 100644 index 0000000..da81ccb --- /dev/null +++ b/dev/MinGfx/tests/blank_window/main.cc @@ -0,0 +1,25 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +// The GraphicsApp base class can also run as its own app, but it just displays a blank screen + +#include +using namespace mingfx; + +int main(int argc, char **argv) { + + GraphicsApp *app = new GraphicsApp(1024, 768, "A Blank Window!"); + app->Run(); + + return 0; +} diff --git a/dev/MinGfx/tests/gui_plus_opengl/CMakeLists.txt b/dev/MinGfx/tests/gui_plus_opengl/CMakeLists.txt new file mode 100644 index 0000000..5e49e7c --- /dev/null +++ b/dev/MinGfx/tests/gui_plus_opengl/CMakeLists.txt @@ -0,0 +1,44 @@ +# This file is part of the MinGfx cmake build system. +# See the main MinGfx/CMakeLists.txt file for details. + +project(mingfx-test-gui-plus-opengl) + + +# Source: +set (SOURCEFILES + gui_plus_opengl.cc + main.cc +) +set (HEADERFILES + gui_plus_opengl.h +) +set (CONFIGFILES +) + + +# Define the target +add_executable(${PROJECT_NAME} ${HEADERFILES} ${SOURCEFILES}) + + +# Add dependency on libMinGfx: +target_include_directories(${PROJECT_NAME} PUBLIC ../../src) +target_link_libraries(${PROJECT_NAME} PUBLIC MinGfx) + +# Add external dependency on NanoGUI +include(AutoBuildNanoGUI) +AutoBuild_use_package_NanoGUI(${PROJECT_NAME} PUBLIC) + + + +# Installation: +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION ${INSTALL_BIN_DEST} + COMPONENT Tests) + + +# For better organization when using an IDE with folder structures: +set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER "Tests") +source_group("Header Files" FILES ${HEADERFILES}) +set_source_files_properties(${CONFIGFILES} PROPERTIES HEADER_FILE_ONLY TRUE) +source_group("Config Files" FILES ${CONFIGFILES}) + diff --git a/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.cc b/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.cc new file mode 100644 index 0000000..be83d2e --- /dev/null +++ b/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.cc @@ -0,0 +1,374 @@ +/* + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + See corresponding header file for details. + */ + + +#define _USE_MATH_DEFINES +#include "gui_plus_opengl.h" +#include "default_shader.h" +#include "mesh.h" +#include "shader_program.h" +#include "texture2d.h" +#include "text_shader.h" +#include "unicam.h" + + +#pragma warning (push) +#pragma warning (disable : 6001) +#pragma warning (disable : 6011) +#pragma warning (disable : 6262) +#pragma warning (disable : 6385) +#pragma warning (disable : 6387) +#pragma warning (disable : 26450) +#pragma warning (disable : 26451) +#pragma warning (disable : 26453) +#pragma warning (disable : 26495) +#pragma warning (disable : 26812) +#include +#pragma warning (pop) + +#include + + +QuickShapes *qs; +Ray pickRay; + + +GLuint vbo, vao, vshader, fshader, shaderProgram; +float model[16]; +GLuint texID = 0; + +Mesh mesh1, mesh2; +ShaderProgram shaderprog1; +Texture2D tex1; + +DefaultShader dShader; +DefaultShader::MaterialProperties mat1; + +Matrix4 P,V; + +UniCam uniCam; + +Point2 mpos; + + +TextShader ts; + + + +GuiPlusOpenGL::GuiPlusOpenGL() : GraphicsApp(1024,768, "Circle Simulation") { + + InitGraphicsContext(); + + simTime_ = 0.0; + paused_ = false; + pauseBtn_ = NULL; + + int i; + i = mesh1.AddTriangle(Point3(0,0,0), Point3(1,0,0), Point3(1,1,0)); + mesh1.SetNormals(i, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1)); + mesh1.SetTexCoords(i, 0, Point2(0,0), Point2(1,0), Point2(1,1)); + i = mesh1.AddTriangle(Point3(0,0,0), Point3(1,1,0), Point3(0,1,0)); + mesh1.SetNormals(i, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1)); + mesh1.SetTexCoords(i, 0, Point2(0,0), Point2(1,1), Point2(0,1)); + + //i = mesh1.AppendTriangle(Point3(0,0,0), Point3(0,0,1), Point3(1,1,0)); + //mesh1.SetNormals(i, Vector3(0,0,1), Vector3(0,0,1), Vector3(0,0,1)); +} + + + + +GuiPlusOpenGL::~GuiPlusOpenGL() { + +} + +void GuiPlusOpenGL::InitNanoGUI() { + nanogui::FormHelper *gui = new nanogui::FormHelper(screen()); + nanogui::ref window = gui->addWindow(Eigen::Vector2i(10, 10), "Simulation Controls"); + pauseBtn_ = gui->addButton("Pause", std::bind(&GuiPlusOpenGL::OnPauseBtnPressed, this)); + gui->addButton("Restart", std::bind(&GuiPlusOpenGL::OnRestartBtnPressed, this)); + + screen()->performLayout(); +} + + + +void GuiPlusOpenGL::UpdateSimulation(double dt) { + if (!paused_) { + simTime_ += dt; + //std::cout << "Update Simulation " << simTime_ << std::endl; + } + uniCam.AdvanceAnimation(dt); +} + + +void GuiPlusOpenGL::OnRestartBtnPressed() { + simTime_ = 0.0; +} + +void GuiPlusOpenGL::OnPauseBtnPressed() { + paused_ = !paused_; + if (paused_) { + pauseBtn_->setCaption("Play"); + } + else { + pauseBtn_->setCaption("Pause"); + } +} + + + +void GuiPlusOpenGL::OnMouseMove(const Point2 &pos, const Vector2 &delta) { + //std::cout << "Mouse moved to " << pos << " delta from last frame " << delta << std::endl; + + Point2 mouseInNDC = PixelsToNormalizedDeviceCoords(pos); + Point3 filmplanePt = GfxMath::ScreenToNearPlane(uniCam.view_matrix(), P, mouseInNDC); + + Matrix4 camMat = uniCam.view_matrix().Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + + pickRay = Ray(eye, filmplanePt - eye); + + mpos = pos; +} + +void GuiPlusOpenGL::OnLeftMouseDown(const Point2 &pos) { + //std::cout << "Left mouse button down at " << pos << std::endl; + + Point2 mouseInNDC = PixelsToNormalizedDeviceCoords(pos); + float mouseZ = ReadZValueAtPixel(pos); + uniCam.OnButtonDown(mouseInNDC, mouseZ); + +} + +void GuiPlusOpenGL::OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta) { + //std::cout << "Mouse dragged (left button) to " << pos << " delta from last frame " << delta << std::endl; + + Point2 mouseInNDC = PixelsToNormalizedDeviceCoords(pos); + uniCam.OnDrag(mouseInNDC); +} + +void GuiPlusOpenGL::OnLeftMouseUp(const Point2 &pos) { + //std::cout << "Left mouse button up at " << pos << std::endl; + + Point2 mouseInNDC = PixelsToNormalizedDeviceCoords(pos); + uniCam.OnButtonUp(mouseInNDC); + +} + + +void GuiPlusOpenGL::OnMiddleMouseDown(const Point2 &pos) { + //std::cout << "Middle mouse button down at " << pos << std::endl; +} + +void GuiPlusOpenGL::OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta) { + //std::cout << "Mouse dragged (middle button) to " << pos << " delta from last frame " << delta << std::endl; +} + +void GuiPlusOpenGL::OnMiddleMouseUp(const Point2 &pos) { + //std::cout << "Middle mouse button up at " << pos << std::endl; +} + + +void GuiPlusOpenGL::OnRightMouseDown(const Point2 &pos) { + //std::cout << "Right mouse button down at " << pos << std::endl; +} + +void GuiPlusOpenGL::OnRightMouseDrag(const Point2 &pos, const Vector2 &delta) { + //std::cout << "Mouse dragged (right button) to " << pos << " delta from last frame " << delta << std::endl; + Point2 mouseInNDC = PixelsToNormalizedDeviceCoords(pos); + Point3 filmplanePt = GfxMath::ScreenToNearPlane(uniCam.view_matrix(), P, mouseInNDC); + + Matrix4 camMat = uniCam.view_matrix().Inverse(); + Point3 eye = camMat.ColumnToPoint3(3); + + pickRay = Ray(eye, filmplanePt - eye); +} + +void GuiPlusOpenGL::OnRightMouseUp(const Point2 &pos) { + //std::cout << "Right mouse button up at " << pos << std::endl; +} + + + +void GuiPlusOpenGL::OnKeyDown(const char *c, int modifiers) { + //std::cout << "Key DOWN (" << c << ") modifiers=" << modifiers << std::endl; +} + +void GuiPlusOpenGL::OnKeyUp(const char *c, int modifiers) { + //std::cout << "Key UP (" << c << ") modifiers=" << modifiers << std::endl; +} + +void GuiPlusOpenGL::OnSpecialKeyDown(int key, int scancode, int modifiers) { + //std::cout << "Special Key DOWN key=" << key << " scancode=" << scancode << " modifiers=" << modifiers << std::endl; +} + +void GuiPlusOpenGL::OnSpecialKeyUp(int key, int scancode, int modifiers) { + //std::cout << "Special Key UP key=" << key << " scancode=" << scancode << " modifiers=" << modifiers << std::endl; +} + + +void GuiPlusOpenGL::DrawUsingNanoVG(NVGcontext *ctx) { + + // example of drawing some circles + + nvgBeginPath(ctx); + nvgCircle(ctx, 512.0f+50.0f*std::cosf((float)simTime_), 350.0f+200.0f*std::sinf((float)simTime_), 50.0f); + nvgFillColor(ctx, nvgRGBA(100,100,255,200)); + nvgFill(ctx); + nvgStrokeColor(ctx, nvgRGBA(0,0,0,255)); + nvgStroke(ctx); + + nvgBeginPath(ctx); + nvgCircle(ctx, 512.0f+200.0f*std::cosf((float)simTime_), 350.0f+50.0f*std::sinf((float)simTime_), 50.0f); + nvgFillColor(ctx, nvgRGBA(255,100,100,200)); + nvgFill(ctx); + nvgStrokeColor(ctx, nvgRGBA(0,0,0,255)); + nvgStroke(ctx); + +} + + +void GuiPlusOpenGL::InitOpenGL() { + std::string fname = Platform::FindMinGfxDataFile("Futura_Medium_BT.ttf"); + ts.Init(fname, 42); + + qs = new QuickShapes(); + + P = Matrix4::Perspective(60.0f, aspect_ratio(), 0.1f, 10.0f); + V = Matrix4::LookAt(Point3(0,0,3), Point3(0,0,0), Vector3(0,1,0)); + uniCam.set_view_matrix(V); + + mesh1.UpdateGPUMemory(); + + mesh2.LoadFromOBJ(Platform::FindMinGfxDataFile("teapot.obj")); + std::vector xforms; + for (float x=-4.0; x <= 4.0; x += 1.0) { + //xforms.push_back(Matrix4()); + xforms.push_back(Matrix4::Translation(Vector3(x,0,0))); + } + mesh2.SetInstanceTransforms(xforms); + + + tex1.InitFromFile(Platform::FindMinGfxDataFile("test.png")); + mat1.surface_texture = tex1; + + DefaultShader::LightProperties l; + l.position = Point3(-10, 5, 5); + l.diffuse_intensity = Color(1,0,0); + dShader.AddLight(l); +} + + +void GuiPlusOpenGL::DrawUsingOpenGL() { + + V = uniCam.view_matrix(); + Matrix4 M = Matrix4::Translation(Vector3(-1,0,0)) * Matrix4::Scale(Vector3(0.5, 0.5, 0.5)); + + // Draw several quick shapes + float col[3] = {0.4f, 0.4f, 0.8f}; + Matrix4 M2 = Matrix4::Translation(Vector3(1.0f, 1.5f, 0.0f))*Matrix4::Scale(Vector3(0.2f, 0.2f, 0.2f)); + qs->DrawSphere(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawCylinder(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawCone(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawCube(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawBrush(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawSquare(M2, V, P, col); + + M2 = Matrix4::Translation(Vector3(0,-0.5,0)) * M2; + qs->DrawSquare(M2, V, P, col, tex1); + + + qs->DrawArrow(Matrix4(), V, P, col, Point3(0,0,0), Vector3(-1,1.5,0), 0.01f); + + qs->DrawLineSegment(Matrix4(), V, P, col, Point3(0,0,0), Point3(1, 1.5, 0), 0.01f); + + qs->DrawAxes(Matrix4(), V, P); + + dShader.Draw(Matrix4(), V, P, &mesh1, mat1); + dShader.Draw(Matrix4(), V, P, &mesh2, DefaultShader::MaterialProperties()); + + + float t; + Point3 p; + int id; + if (pickRay.IntersectMesh(mesh1, &t, &p, &id)) { + M2 = Matrix4::Translation(p - Point3::Origin()) * Matrix4::Scale(Vector3(0.025f, 0.025f, 0.025f)); + qs->DrawSphere(M2, V, P, Color(1,0,1)); + } + if (pickRay.IntersectMesh(mesh2, &t, &p, &id)) { + M2 = Matrix4::Translation(p - Point3::Origin()) * Matrix4::Scale(Vector3(0.025f, 0.025f, 0.025f)); + qs->DrawSphere(M2, V, P, Color(1,1,0)); + } + + uniCam.Draw(P); + + + Matrix4 M3 = Matrix4::Translation(Vector3(-1,0,0)); + TextShader::TextFormat f; + + + f.color = Color(1,1,0); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_TOP; + ts.Draw3D(M3, V, P, "TOPgg", f, true); + + f.color = Color(0,1,1); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_CENTER; + ts.Draw3D(M3, V, P, "V_CENTERyy", f, true); + + f.color = Color(1,0,1); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_BOTTOM; + ts.Draw3D(M3, V, P, "BOTTOMgg", f, true); + + f.color = Color(1,1,1); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_BASELINE; + ts.Draw3D(M3, V, P, "Hello good buddy", f, true); + + qs->DrawLineSegment(M3, V, P, col, Point3(0,0,0), Point3(1, 0, 0), 0.01f); + + M3 = M3 * Matrix4::Translation(Vector3(0,0.5,0)); + + + f.color = Color(1,0,0); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_LEFT; + f.v_align = TextShader::VertAlign::VERT_ALIGN_TOP; + ts.Draw3D(M3, V, P, "LEFT", f, true); + + f.color = Color(0,1,0); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_TOP; + ts.Draw3D(M3, V, P, "CENTER", f, true); + + f.color = Color(0,0,1); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_RIGHT; + f.v_align = TextShader::VertAlign::VERT_ALIGN_TOP; + ts.Draw3D(M3, V, P, "RIGHT", f, true); + + + M3 = Matrix4::Translation(Vector3(0,0,1)); + f.color = Color(1,1,1); + f.h_align = TextShader::HorizAlign::HORIZ_ALIGN_CENTER; + f.v_align = TextShader::VertAlign::VERT_ALIGN_BASELINE; + f.size = 0.25; + ts.Draw3D(M3, V, P, "Hello good buddy", f, true); + + + //std::cout << mpos << " z = " << z_value_at_pixel(mpos) << std::endl; +} diff --git a/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.h b/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.h new file mode 100644 index 0000000..faf3580 --- /dev/null +++ b/dev/MinGfx/tests/gui_plus_opengl/gui_plus_opengl.h @@ -0,0 +1,96 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#include +using namespace mingfx; + + +/** An application that opens up a window that includes a few buttons + for controlling the simulation and can be used to draw circles and + other computer graphics. + + After constructing a new CircleViewer, call Run() to start and + run the application. Run() will not return until the application + window is closed. Make sure that you call cs3081::InitGraphics() + before creating the RobotViewer app. Example: + + ``` + int main(int argc, char **argv) { + cs3081::InitGraphics(); + cs3081::CircleViewer *app = new cs3081::CircleViewer(); + app->Run(); + cs3081::ShutdownGraphics(); + return 0; + } + ``` + + While the window is open UpdateSimulation() will be called + repeatedly, once per frame. Fill this in to update your simulation + or perform any other processing that should happen over time as the + simulation progresses. + + Fill in the On*() methods as desired to respond to user input events. + + Fill in the Draw*() methods to draw graphics to the screen using + either the nanovg library or raw OpenGL. +*/ +class GuiPlusOpenGL : public GraphicsApp { +public: + GuiPlusOpenGL(); + ~GuiPlusOpenGL(); + + void InitNanoGUI(); + + void UpdateSimulation(double dt); + + + void OnRestartBtnPressed(); + void OnPauseBtnPressed(); + + + void OnMouseMove(const Point2 &pos, const Vector2 &delta); + + void OnLeftMouseDown(const Point2 &pos); + void OnLeftMouseDrag(const Point2 &pos, const Vector2 &delta); + void OnLeftMouseUp(const Point2 &pos); + + void OnMiddleMouseDown(const Point2 &pos); + void OnMiddleMouseDrag(const Point2 &pos, const Vector2 &delta); + void OnMiddleMouseUp(const Point2 &pos); + + void OnRightMouseDown(const Point2 &pos); + void OnRightMouseDrag(const Point2 &pos, const Vector2 &delta); + void OnRightMouseUp(const Point2 &pos); + + + + void OnKeyDown(const char *c, int modifiers); + + void OnKeyUp(const char *c, int modifiers); + + void OnSpecialKeyDown(int key, int scancode, int modifiers); + + void OnSpecialKeyUp(int key, int scancode, int modifiers); + + + void DrawUsingNanoVG(NVGcontext *ctx); + + void InitOpenGL(); + + void DrawUsingOpenGL(); + +private: + double simTime_; + bool paused_; + nanogui::Button *pauseBtn_; +}; diff --git a/dev/MinGfx/tests/gui_plus_opengl/main.cc b/dev/MinGfx/tests/gui_plus_opengl/main.cc new file mode 100644 index 0000000..e520953 --- /dev/null +++ b/dev/MinGfx/tests/gui_plus_opengl/main.cc @@ -0,0 +1,25 @@ +/* + This file is part of the MinGfx Project. + + Copyright (c) 2017,2018 Regents of the University of Minnesota. + All Rights Reserved. + + Original Author(s) of this File: + Dan Keefe, 2018, University of Minnesota + + Author(s) of Significant Updates/Modifications to the File: + ... + */ + +#include +#include "gui_plus_opengl.h" + + +int main(int argc, char **argv) { + + GuiPlusOpenGL *app = new GuiPlusOpenGL(); + app->Run(); + + return 0; +} + -- cgit v1.2.3