diff --git a/build3/premake4.lua b/build3/premake4.lua index 6534013b3..c4ef1e4e8 100644 --- a/build3/premake4.lua +++ b/build3/premake4.lua @@ -45,6 +45,13 @@ description = "Try to link and use system X11 headers instead of dynamically loading X11 (dlopen is default)" } + newoption + { + trigger = "enable_static_vr_plugin", + description = "Statically link vr plugin (in examples/SharedMemory/plugins/vrSyncPlugin)" + } + + newoption { trigger = "noopengl3", @@ -276,6 +283,11 @@ end if not _OPTIONS["glfw_lib_name"] then _OPTIONS["glfw_lib_name"] = default_glfw_lib_name end + + if (_OPTIONS["enable_static_vr_plugin"]) then + defines("STATIC_LINK_VR_PLUGIN") + end + newoption { trigger = "glfw_include_dir", diff --git a/build_visual_studio_vr_pybullet_double.bat b/build_visual_studio_vr_pybullet_double.bat index 9dee15a2e..c98d916b2 100644 --- a/build_visual_studio_vr_pybullet_double.bat +++ b/build_visual_studio_vr_pybullet_double.bat @@ -17,7 +17,8 @@ del tmp1234.txt cd build3 -premake4 --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010 + +premake4 --double --midi --enable_static_vr_plugin --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010 #premake4 --serial --audio --double --midi --enable_openvr --enable_pybullet --python_include_dir="%myvar%/include" --python_lib_dir="%myvar%/libs" --targetdir="../bin" vs2010 diff --git a/data/kitchens/1.sdf b/data/kitchens/1.sdf index 33e914375..572cf7234 100644 --- a/data/kitchens/1.sdf +++ b/data/kitchens/1.sdf @@ -4135,123 +4135,7 @@ - - 1 - -12.0 -13.9 0 0 0 0 - - - 0 - - 0.166667 - 0 - 0 - 0.166667 - 0 - 0.166667 - - - - - - .1 .1 .1 - fatihrmutfak/part106.obj - - - - - - - .1 .1 .1 - fatihrmutfak/part106.obj - - - - 1 0 0 1 - 0.600000 0.894100 0.600000 1 - 0.1 0.1 0.1 1 - 0 0 0 0 - - - - - - 1 - -12.0 -13.9 0 0 0 0 - - - 0 - - 0.166667 - 0 - 0 - 0.166667 - 0 - 0.166667 - - - - - - .1 .1 .1 - fatihrmutfak/part107.obj - - - - - - - .1 .1 .1 - fatihrmutfak/part107.obj - - - - 1 0 0 1 - 0.690200 0.102000 0.102000 1 - 0.1 0.1 0.1 1 - 0 0 0 0 - - - - - - 1 - -12.0 -13.9 0 0 0 0 - - - 0 - - 0.166667 - 0 - 0 - 0.166667 - 0 - 0.166667 - - - - - - .1 .1 .1 - fatihrmutfak/part108.obj - - - - - - - .1 .1 .1 - fatihrmutfak/part108.obj - - - - 1 0 0 1 - 0.600000 0.894100 0.600000 1 - 0.1 0.1 0.1 1 - 0 0 0 0 - - - - + 1 -12.0 -13.9 0 0 0 0 diff --git a/data/kitchens/fatihrmutfak/Concrete.jpg b/data/kitchens/fatihrmutfak/Concrete.jpg new file mode 100644 index 000000000..21ee652de Binary files /dev/null and b/data/kitchens/fatihrmutfak/Concrete.jpg differ diff --git a/data/kitchens/fatihrmutfak/Seamless_Aegean_Marble_Texture.jpg b/data/kitchens/fatihrmutfak/Seamless_Aegean_Marble_Texture.jpg new file mode 100644 index 000000000..04d1a10d6 Binary files /dev/null and b/data/kitchens/fatihrmutfak/Seamless_Aegean_Marble_Texture.jpg differ diff --git a/data/kitchens/fatihrmutfak/Seamless_white_marble _texture.jpg b/data/kitchens/fatihrmutfak/Seamless_white_marble _texture.jpg new file mode 100644 index 000000000..835a5feda Binary files /dev/null and b/data/kitchens/fatihrmutfak/Seamless_white_marble _texture.jpg differ diff --git a/data/kitchens/fatihrmutfak/WoodFine0010_M.jpg b/data/kitchens/fatihrmutfak/WoodFine0010_M.jpg new file mode 100644 index 000000000..2e0087442 Binary files /dev/null and b/data/kitchens/fatihrmutfak/WoodFine0010_M.jpg differ diff --git a/data/kitchens/fatihrmutfak/bedroom.mtl b/data/kitchens/fatihrmutfak/bedroom.mtl index 9b253b577..b5897df59 100644 --- a/data/kitchens/fatihrmutfak/bedroom.mtl +++ b/data/kitchens/fatihrmutfak/bedroom.mtl @@ -9,7 +9,8 @@ newmtl wire_028089177 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.1098 0.3490 0.6941 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_214229166 Ns 32 @@ -19,7 +20,8 @@ newmtl wire_214229166 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.8392 0.8980 0.6510 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl Rubi Ns 10.0000 @@ -54,6 +56,7 @@ newmtl wire_115115115 Ka 0.0000 0.0000 0.0000 Kd 0.4510 0.4510 0.4510 Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_087224198 Ns 32 @@ -63,7 +66,8 @@ newmtl wire_087224198 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.3412 0.8784 0.7765 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_086086086 Ns 32 @@ -73,7 +77,8 @@ newmtl wire_086086086 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.3373 0.3373 0.3373 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_026177088 Ns 32 @@ -83,7 +88,8 @@ newmtl wire_026177088 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.1020 0.6941 0.3451 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_000000000 Ns 32 @@ -93,7 +99,8 @@ newmtl wire_000000000 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.0000 0.0000 0.0000 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_153228153 Ns 32 @@ -103,7 +110,8 @@ newmtl wire_153228153 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.6000 0.8941 0.6000 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_176026026 Ns 32 @@ -113,7 +121,8 @@ newmtl wire_176026026 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.6902 0.1020 0.1020 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_255255255 Ns 32 @@ -123,7 +132,19 @@ newmtl wire_255255255 illum 2 Ka 0.0000 0.0000 0.0000 Kd 1.0000 1.0000 1.0000 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd WoodFine0010_M.jpg + +newmtl marble_255255255 + Ns 32 + d 1 + Tr 1 + Tf 1 1 1 + illum 2 + Ka 0.0000 0.0000 0.0000 + Kd 1.0000 1.0000 1.0000 + Ks 0.3500 0.3500 0.3500 + map_Kd Seamless_Aegean_Marble_Texture.jpg newmtl wire_165000082 Ns 32 @@ -133,7 +154,7 @@ newmtl wire_165000082 illum 2 Ka 0.0000 0.0000 0.0000 Kd 1 1 1 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 map_Kd 48x48copsy.png newmtl wire_255223127 @@ -144,7 +165,8 @@ newmtl wire_255223127 illum 2 Ka 0.0000 0.0000 0.0000 Kd 1.0000 0.8745 0.4980 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl wire_165103082 Ns 32 @@ -154,7 +176,8 @@ newmtl wire_165103082 illum 2 Ka 0.0000 0.0000 0.0000 Kd 0.6471 0.4039 0.3216 - Ks 0.3500 0.3500 0.3500 + Ks 0.3500 0.3500 0.3500 + map_Kd Concrete.jpg newmtl 02___Default Ns 32.0000 diff --git a/data/kitchens/fatihrmutfak/marble.jpg b/data/kitchens/fatihrmutfak/marble.jpg new file mode 100644 index 000000000..1e28f6cb6 Binary files /dev/null and b/data/kitchens/fatihrmutfak/marble.jpg differ diff --git a/data/kitchens/fatihrmutfak/metal.jpg b/data/kitchens/fatihrmutfak/metal.jpg new file mode 100644 index 000000000..c86bfaa85 Binary files /dev/null and b/data/kitchens/fatihrmutfak/metal.jpg differ diff --git a/data/kitchens/fatihrmutfak/part122.obj b/data/kitchens/fatihrmutfak/part122.obj index 1ede37fa9..4af62aa3b 100644 --- a/data/kitchens/fatihrmutfak/part122.obj +++ b/data/kitchens/fatihrmutfak/part122.obj @@ -479,7 +479,7 @@ v 119.729897 158.723099 9.000000 v 150.229904 158.723099 9.000000 v 119.729897 158.723099 8.700000 v 150.229904 158.723099 8.700000 -usemtl wire_255255255 +usemtl marble_255255255 vn -1.000000 0.000000 0.000000 vn -1.000000 0.000000 0.000000 diff --git a/data/marble_cube.mtl b/data/marble_cube.mtl new file mode 100644 index 000000000..c959d0c2a --- /dev/null +++ b/data/marble_cube.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'marble_cube.blend' +# Material Count: 1 + +newmtl None +Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +Ks 0.8 0.8 0.8 +d 1 +illum 2 +map_Kd tiles.jpg diff --git a/data/marble_cube.obj b/data/marble_cube.obj new file mode 100644 index 000000000..4f6c8a49a --- /dev/null +++ b/data/marble_cube.obj @@ -0,0 +1,50 @@ +# Blender v2.68 (sub 0) OBJ File: 'marble_cube.blend' +# www.blender.org +mtllib marble_cube.mtl +o Cube +v -1.000000 -1.000000 1.000000 +v -1.000000 -1.000000 -1.000000 +v 1.000000 -1.000000 -1.000000 +v 1.000000 -1.000000 1.000000 +v -1.000000 1.000000 1.000000 +v -1.000000 1.000000 -1.000000 +v 1.000000 1.000000 -1.000000 +v 1.000000 1.000000 1.000000 +vt 0.900965 0.983117 +vt 0.607937 0.967373 +vt 0.920037 0.686085 +vt 0.327732 0.352741 +vt 0.031938 0.342703 +vt 0.332102 0.029274 +vt 0.618409 0.671643 +vt 0.324243 0.658970 +vt 0.630389 0.363047 +vt 0.919788 0.686473 +vt 0.618344 0.672098 +vt 0.939406 0.372060 +vt 0.039476 0.936128 +vt 0.319860 0.951754 +vt 0.036647 0.646397 +vt 0.642259 0.035851 +vt 0.630105 0.363646 +vt 0.332098 0.029351 +vt 0.617757 0.671237 +vt 0.027235 0.021626 +vt 0.327768 0.352473 +vt 0.630480 0.363422 +vt 0.325108 0.659325 +vt 0.327845 0.352523 +usemtl None +s off +f 5/1 6/2 1/3 +f 6/4 7/5 2/6 +f 7/7 8/8 3/9 +f 8/10 5/11 4/12 +f 1/13 2/14 4/15 +f 8/16 7/17 5/18 +f 6/2 2/19 1/3 +f 7/5 3/20 2/6 +f 8/8 4/21 3/9 +f 5/11 1/22 4/12 +f 2/14 3/23 4/15 +f 7/17 6/24 5/18 diff --git a/data/marble_cube.urdf b/data/marble_cube.urdf new file mode 100644 index 000000000..831fcd3ba --- /dev/null +++ b/data/marble_cube.urdf @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/quadruped/license.txt b/data/quadruped/license.txt new file mode 100644 index 000000000..08f850007 --- /dev/null +++ b/data/quadruped/license.txt @@ -0,0 +1,27 @@ +LICENSE: +Copyright (c) 2017, Erwin Coumans +Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions or derived work must retain this copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/data/table/license.txt b/data/table/license.txt new file mode 100644 index 000000000..08f850007 --- /dev/null +++ b/data/table/license.txt @@ -0,0 +1,27 @@ +LICENSE: +Copyright (c) 2017, Erwin Coumans +Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions or derived work must retain this copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/data/table/table2.mtl b/data/table/table2.mtl new file mode 100644 index 000000000..2d80d819a --- /dev/null +++ b/data/table/table2.mtl @@ -0,0 +1,11 @@ +# Blender MTL File: 'table1.blend' +# Material Count: 1 + +newmtl None +Ns 0 +Ka 0.000000 0.000000 0.000000 +Kd 0.8 0.8 0.8 +Ks 0.8 0.8 0.8 +d 1 +illum 2 +map_Kd tabletop.jpg diff --git a/data/table/table2.obj b/data/table/table2.obj new file mode 100644 index 000000000..938020709 --- /dev/null +++ b/data/table/table2.obj @@ -0,0 +1,2050 @@ +# Blender v2.68 (sub 0) OBJ File: 'table1.blend' +# www.blender.org +mtllib table2.mtl +o Cylinder_Cylinder.001 +v 0.000000 -0.005000 -0.500000 +v 0.000000 0.005000 -0.500000 +v 0.012271 -0.005000 -0.499849 +v 0.012271 0.005000 -0.499849 +v 0.024534 -0.005000 -0.499398 +v 0.024534 0.005000 -0.499398 +v 0.036782 -0.005000 -0.498645 +v 0.036782 0.005000 -0.498645 +v 0.049009 -0.005000 -0.497592 +v 0.049009 0.005000 -0.497592 +v 0.061205 -0.005000 -0.496240 +v 0.061205 0.005000 -0.496240 +v 0.073365 -0.005000 -0.494588 +v 0.073365 0.005000 -0.494588 +v 0.085481 -0.005000 -0.492639 +v 0.085481 0.005000 -0.492639 +v 0.097545 -0.005000 -0.490393 +v 0.097545 0.005000 -0.490393 +v 0.109551 -0.005000 -0.487851 +v 0.109551 0.005000 -0.487851 +v 0.121490 -0.005000 -0.485016 +v 0.121490 0.005000 -0.485016 +v 0.133356 -0.005000 -0.481888 +v 0.133356 0.005000 -0.481888 +v 0.145142 -0.005000 -0.478470 +v 0.145142 0.005000 -0.478470 +v 0.156841 -0.005000 -0.474764 +v 0.156841 0.005000 -0.474764 +v 0.168445 -0.005000 -0.470772 +v 0.168445 0.005000 -0.470772 +v 0.179948 -0.005000 -0.466496 +v 0.179948 0.005000 -0.466496 +v 0.191342 -0.005000 -0.461940 +v 0.191342 0.005000 -0.461940 +v 0.202621 -0.005000 -0.457105 +v 0.202621 0.005000 -0.457105 +v 0.213778 -0.005000 -0.451995 +v 0.213778 0.005000 -0.451995 +v 0.224806 -0.005000 -0.446612 +v 0.224806 0.005000 -0.446612 +v 0.235698 -0.005000 -0.440961 +v 0.235698 0.005000 -0.440961 +v 0.246449 -0.005000 -0.435043 +v 0.246449 0.005000 -0.435043 +v 0.257051 -0.005000 -0.428864 +v 0.257051 0.005000 -0.428864 +v 0.267499 -0.005000 -0.422427 +v 0.267499 0.005000 -0.422427 +v 0.277785 -0.005000 -0.415735 +v 0.277785 0.005000 -0.415735 +v 0.287904 -0.005000 -0.408792 +v 0.287904 0.005000 -0.408792 +v 0.297850 -0.005000 -0.401604 +v 0.297850 0.005000 -0.401604 +v 0.307616 -0.005000 -0.394173 +v 0.307616 0.005000 -0.394173 +v 0.317197 -0.005000 -0.386505 +v 0.317197 0.005000 -0.386505 +v 0.326586 -0.005000 -0.378604 +v 0.326586 0.005000 -0.378604 +v 0.335780 -0.005000 -0.370476 +v 0.335780 0.005000 -0.370476 +v 0.344770 -0.005000 -0.362123 +v 0.344770 0.005000 -0.362123 +v 0.353553 -0.005000 -0.353553 +v 0.353553 0.005000 -0.353553 +v 0.362124 -0.005000 -0.344770 +v 0.362124 0.005000 -0.344770 +v 0.370476 -0.005000 -0.335779 +v 0.370476 0.005000 -0.335779 +v 0.378605 -0.005000 -0.326586 +v 0.378605 0.005000 -0.326586 +v 0.386505 -0.005000 -0.317197 +v 0.386505 0.005000 -0.317197 +v 0.394173 -0.005000 -0.307616 +v 0.394173 0.005000 -0.307616 +v 0.401604 -0.005000 -0.297850 +v 0.401604 0.005000 -0.297850 +v 0.408792 -0.005000 -0.287904 +v 0.408792 0.005000 -0.287904 +v 0.415735 -0.005000 -0.277785 +v 0.415735 0.005000 -0.277785 +v 0.422427 -0.005000 -0.267499 +v 0.422427 0.005000 -0.267499 +v 0.428864 -0.005000 -0.257051 +v 0.428864 0.005000 -0.257051 +v 0.435044 -0.005000 -0.246449 +v 0.435044 0.005000 -0.246449 +v 0.440961 -0.005000 -0.235698 +v 0.440961 0.005000 -0.235698 +v 0.446612 -0.005000 -0.224806 +v 0.446612 0.005000 -0.224806 +v 0.451995 -0.005000 -0.213778 +v 0.451995 0.005000 -0.213778 +v 0.457105 -0.005000 -0.202621 +v 0.457105 0.005000 -0.202621 +v 0.461940 -0.005000 -0.191342 +v 0.461940 0.005000 -0.191342 +v 0.466496 -0.005000 -0.179948 +v 0.466496 0.005000 -0.179948 +v 0.470772 -0.005000 -0.168445 +v 0.470772 0.005000 -0.168445 +v 0.474764 -0.005000 -0.156841 +v 0.474764 0.005000 -0.156841 +v 0.478470 -0.005000 -0.145142 +v 0.478470 0.005000 -0.145142 +v 0.481888 -0.005000 -0.133357 +v 0.481888 0.005000 -0.133357 +v 0.485016 -0.005000 -0.121490 +v 0.485016 0.005000 -0.121490 +v 0.487851 -0.005000 -0.109551 +v 0.487851 0.005000 -0.109551 +v 0.490393 -0.005000 -0.097545 +v 0.490393 0.005000 -0.097545 +v 0.492639 -0.005000 -0.085481 +v 0.492639 0.005000 -0.085481 +v 0.494588 -0.005000 -0.073366 +v 0.494588 0.005000 -0.073366 +v 0.496240 -0.005000 -0.061206 +v 0.496240 0.005000 -0.061206 +v 0.497592 -0.005000 -0.049009 +v 0.497592 0.005000 -0.049009 +v 0.498645 -0.005000 -0.036783 +v 0.498645 0.005000 -0.036783 +v 0.499398 -0.005000 -0.024534 +v 0.499398 0.005000 -0.024534 +v 0.499849 -0.005000 -0.012271 +v 0.499849 0.005000 -0.012271 +v 0.500000 -0.005000 -0.000000 +v 0.500000 0.005000 -0.000000 +v 0.499849 -0.005000 0.012270 +v 0.499849 0.005000 0.012270 +v 0.499398 -0.005000 0.024533 +v 0.499398 0.005000 0.024533 +v 0.498645 -0.005000 0.036782 +v 0.498645 0.005000 0.036782 +v 0.497592 -0.005000 0.049008 +v 0.497592 0.005000 0.049008 +v 0.496240 -0.005000 0.061205 +v 0.496240 0.005000 0.061205 +v 0.494588 -0.005000 0.073365 +v 0.494588 0.005000 0.073365 +v 0.492639 -0.005000 0.085480 +v 0.492639 0.005000 0.085480 +v 0.490393 -0.005000 0.097545 +v 0.490393 0.005000 0.097545 +v 0.487851 -0.005000 0.109550 +v 0.487851 0.005000 0.109550 +v 0.485016 -0.005000 0.121489 +v 0.485016 0.005000 0.121489 +v 0.481888 -0.005000 0.133356 +v 0.481888 0.005000 0.133356 +v 0.478470 -0.005000 0.145142 +v 0.478470 0.005000 0.145142 +v 0.474764 -0.005000 0.156840 +v 0.474764 0.005000 0.156840 +v 0.470772 -0.005000 0.168444 +v 0.470772 0.005000 0.168444 +v 0.466497 -0.005000 0.179947 +v 0.466497 0.005000 0.179947 +v 0.461940 -0.005000 0.191341 +v 0.461940 0.005000 0.191341 +v 0.457105 -0.005000 0.202620 +v 0.457105 0.005000 0.202620 +v 0.451995 -0.005000 0.213777 +v 0.451995 0.005000 0.213777 +v 0.446613 -0.005000 0.224805 +v 0.446613 0.005000 0.224805 +v 0.440961 -0.005000 0.235698 +v 0.440961 0.005000 0.235698 +v 0.435044 -0.005000 0.246448 +v 0.435044 0.005000 0.246448 +v 0.428865 -0.005000 0.257051 +v 0.428865 0.005000 0.257051 +v 0.422427 -0.005000 0.267498 +v 0.422427 0.005000 0.267498 +v 0.415735 -0.005000 0.277785 +v 0.415735 0.005000 0.277785 +v 0.408793 -0.005000 0.287904 +v 0.408793 0.005000 0.287904 +v 0.401604 -0.005000 0.297849 +v 0.401604 0.005000 0.297849 +v 0.394174 -0.005000 0.307615 +v 0.394174 0.005000 0.307615 +v 0.386506 -0.005000 0.317196 +v 0.386506 0.005000 0.317196 +v 0.378605 -0.005000 0.326586 +v 0.378605 0.005000 0.326586 +v 0.370476 -0.005000 0.335779 +v 0.370476 0.005000 0.335779 +v 0.362124 -0.005000 0.344770 +v 0.362124 0.005000 0.344770 +v 0.353554 -0.005000 0.353553 +v 0.353554 0.005000 0.353553 +v 0.344770 -0.005000 0.362123 +v 0.344770 0.005000 0.362123 +v 0.335780 -0.005000 0.370475 +v 0.335780 0.005000 0.370475 +v 0.326587 -0.005000 0.378604 +v 0.326587 0.005000 0.378604 +v 0.317197 -0.005000 0.386505 +v 0.317197 0.005000 0.386505 +v 0.307616 -0.005000 0.394173 +v 0.307616 0.005000 0.394173 +v 0.297850 -0.005000 0.401604 +v 0.297850 0.005000 0.401604 +v 0.287904 -0.005000 0.408792 +v 0.287904 0.005000 0.408792 +v 0.277785 -0.005000 0.415735 +v 0.277785 0.005000 0.415735 +v 0.267499 -0.005000 0.422427 +v 0.267499 0.005000 0.422427 +v 0.257051 -0.005000 0.428864 +v 0.257051 0.005000 0.428864 +v 0.246449 -0.005000 0.435044 +v 0.246449 0.005000 0.435044 +v 0.235698 -0.005000 0.440961 +v 0.235698 0.005000 0.440961 +v 0.224806 -0.005000 0.446612 +v 0.224806 0.005000 0.446612 +v 0.213777 -0.005000 0.451995 +v 0.213777 0.005000 0.451995 +v 0.202621 -0.005000 0.457105 +v 0.202621 0.005000 0.457105 +v 0.191342 -0.005000 0.461940 +v 0.191342 0.005000 0.461940 +v 0.179947 -0.005000 0.466496 +v 0.179947 0.005000 0.466496 +v 0.168445 -0.005000 0.470772 +v 0.168445 0.005000 0.470772 +v 0.156841 -0.005000 0.474764 +v 0.156841 0.005000 0.474764 +v 0.145142 -0.005000 0.478470 +v 0.145142 0.005000 0.478470 +v 0.133356 -0.005000 0.481888 +v 0.133356 0.005000 0.481888 +v 0.121490 -0.005000 0.485016 +v 0.121490 0.005000 0.485016 +v 0.109550 -0.005000 0.487851 +v 0.109550 0.005000 0.487851 +v 0.097545 -0.005000 0.490393 +v 0.097545 0.005000 0.490393 +v 0.085480 -0.005000 0.492639 +v 0.085480 0.005000 0.492639 +v 0.073365 -0.005000 0.494588 +v 0.073365 0.005000 0.494588 +v 0.061205 -0.005000 0.496240 +v 0.061205 0.005000 0.496240 +v 0.049008 -0.005000 0.497592 +v 0.049008 0.005000 0.497592 +v 0.036782 -0.005000 0.498645 +v 0.036782 0.005000 0.498645 +v 0.024533 -0.005000 0.499398 +v 0.024533 0.005000 0.499398 +v 0.012270 -0.005000 0.499849 +v 0.012270 0.005000 0.499849 +v -0.000001 -0.005000 0.500000 +v -0.000001 0.005000 0.500000 +v -0.012271 -0.005000 0.499849 +v -0.012271 0.005000 0.499849 +v -0.024535 -0.005000 0.499398 +v -0.024535 0.005000 0.499398 +v -0.036783 -0.005000 0.498645 +v -0.036783 0.005000 0.498645 +v -0.049009 -0.005000 0.497592 +v -0.049009 0.005000 0.497592 +v -0.061206 -0.005000 0.496240 +v -0.061206 0.005000 0.496240 +v -0.073366 -0.005000 0.494588 +v -0.073366 0.005000 0.494588 +v -0.085482 -0.005000 0.492639 +v -0.085482 0.005000 0.492639 +v -0.097546 -0.005000 0.490392 +v -0.097546 0.005000 0.490392 +v -0.109552 -0.005000 0.487851 +v -0.109552 0.005000 0.487851 +v -0.121491 -0.005000 0.485015 +v -0.121491 0.005000 0.485015 +v -0.133357 -0.005000 0.481888 +v -0.133357 0.005000 0.481888 +v -0.145143 -0.005000 0.478470 +v -0.145143 0.005000 0.478470 +v -0.156842 -0.005000 0.474764 +v -0.156842 0.005000 0.474764 +v -0.168446 -0.005000 0.470772 +v -0.168446 0.005000 0.470772 +v -0.179949 -0.005000 0.466496 +v -0.179949 0.005000 0.466496 +v -0.191343 -0.005000 0.461939 +v -0.191343 0.005000 0.461939 +v -0.202622 -0.005000 0.457104 +v -0.202622 0.005000 0.457104 +v -0.213779 -0.005000 0.451994 +v -0.213779 0.005000 0.451994 +v -0.224807 -0.005000 0.446612 +v -0.224807 0.005000 0.446612 +v -0.235700 -0.005000 0.440960 +v -0.235700 0.005000 0.440960 +v -0.246450 -0.005000 0.435043 +v -0.246450 0.005000 0.435043 +v -0.257053 -0.005000 0.428864 +v -0.257053 0.005000 0.428864 +v -0.267500 -0.005000 0.422426 +v -0.267500 0.005000 0.422426 +v -0.277786 -0.005000 0.415734 +v -0.277786 0.005000 0.415734 +v -0.287905 -0.005000 0.408791 +v -0.287905 0.005000 0.408791 +v -0.297851 -0.005000 0.401603 +v -0.297851 0.005000 0.401603 +v -0.307617 -0.005000 0.394172 +v -0.307617 0.005000 0.394172 +v -0.317198 -0.005000 0.386504 +v -0.317198 0.005000 0.386504 +v -0.326588 -0.005000 0.378603 +v -0.326588 0.005000 0.378603 +v -0.335781 -0.005000 0.370474 +v -0.335781 0.005000 0.370474 +v -0.344772 -0.005000 0.362122 +v -0.344772 0.005000 0.362122 +v -0.353555 -0.005000 0.353552 +v -0.353555 0.005000 0.353552 +v -0.362125 -0.005000 0.344769 +v -0.362125 0.005000 0.344769 +v -0.370477 -0.005000 0.335778 +v -0.370477 0.005000 0.335778 +v -0.378606 -0.005000 0.326585 +v -0.378606 0.005000 0.326585 +v -0.386506 -0.005000 0.317195 +v -0.386506 0.005000 0.317195 +v -0.394174 -0.005000 0.307614 +v -0.394174 0.005000 0.307614 +v -0.401605 -0.005000 0.297848 +v -0.401605 0.005000 0.297848 +v -0.408794 -0.005000 0.287902 +v -0.408794 0.005000 0.287902 +v -0.415736 -0.005000 0.277783 +v -0.415736 0.005000 0.277783 +v -0.422428 -0.005000 0.267497 +v -0.422428 0.005000 0.267497 +v -0.428865 -0.005000 0.257050 +v -0.428865 0.005000 0.257050 +v -0.435045 -0.005000 0.246447 +v -0.435045 0.005000 0.246447 +v -0.440962 -0.005000 0.235696 +v -0.440962 0.005000 0.235696 +v -0.446613 -0.005000 0.224804 +v -0.446613 0.005000 0.224804 +v -0.451996 -0.005000 0.213776 +v -0.451996 0.005000 0.213776 +v -0.457106 -0.005000 0.202619 +v -0.457106 0.005000 0.202619 +v -0.461941 -0.005000 0.191340 +v -0.461941 0.005000 0.191340 +v -0.466497 -0.005000 0.179945 +v -0.466497 0.005000 0.179945 +v -0.470773 -0.005000 0.168443 +v -0.470773 0.005000 0.168443 +v -0.474765 -0.005000 0.156839 +v -0.474765 0.005000 0.156839 +v -0.478471 -0.005000 0.145140 +v -0.478471 0.005000 0.145140 +v -0.481889 -0.005000 0.133354 +v -0.481889 0.005000 0.133354 +v -0.485016 -0.005000 0.121488 +v -0.485016 0.005000 0.121488 +v -0.487852 -0.005000 0.109548 +v -0.487852 0.005000 0.109548 +v -0.490393 -0.005000 0.097543 +v -0.490393 0.005000 0.097543 +v -0.492639 -0.005000 0.085478 +v -0.492639 0.005000 0.085478 +v -0.494589 -0.005000 0.073363 +v -0.494589 0.005000 0.073363 +v -0.496240 -0.005000 0.061203 +v -0.496240 0.005000 0.061203 +v -0.497593 -0.005000 0.049006 +v -0.497593 0.005000 0.049006 +v -0.498645 -0.005000 0.036780 +v -0.498645 0.005000 0.036780 +v -0.499398 -0.005000 0.024531 +v -0.499398 0.005000 0.024531 +v -0.499849 -0.005000 0.012268 +v -0.499849 0.005000 0.012268 +v -0.500000 -0.005000 -0.000003 +v -0.500000 0.005000 -0.000003 +v -0.499849 -0.005000 -0.012274 +v -0.499849 0.005000 -0.012274 +v -0.499398 -0.005000 -0.024537 +v -0.499398 0.005000 -0.024537 +v -0.498645 -0.005000 -0.036785 +v -0.498645 0.005000 -0.036785 +v -0.497592 -0.005000 -0.049012 +v -0.497592 0.005000 -0.049012 +v -0.496239 -0.005000 -0.061208 +v -0.496239 0.005000 -0.061208 +v -0.494588 -0.005000 -0.073368 +v -0.494588 0.005000 -0.073368 +v -0.492638 -0.005000 -0.085484 +v -0.492638 0.005000 -0.085484 +v -0.490392 -0.005000 -0.097548 +v -0.490392 0.005000 -0.097548 +v -0.487850 -0.005000 -0.109554 +v -0.487850 0.005000 -0.109554 +v -0.485015 -0.005000 -0.121493 +v -0.485015 0.005000 -0.121493 +v -0.481887 -0.005000 -0.133360 +v -0.481887 0.005000 -0.133360 +v -0.478469 -0.005000 -0.145145 +v -0.478469 0.005000 -0.145145 +v -0.474763 -0.005000 -0.156844 +v -0.474763 0.005000 -0.156844 +v -0.470771 -0.005000 -0.168448 +v -0.470771 0.005000 -0.168448 +v -0.466495 -0.005000 -0.179951 +v -0.466495 0.005000 -0.179951 +v -0.461938 -0.005000 -0.191345 +v -0.461938 0.005000 -0.191345 +v -0.457103 -0.005000 -0.202624 +v -0.457103 0.005000 -0.202624 +v -0.451993 -0.005000 -0.213781 +v -0.451993 0.005000 -0.213781 +v -0.446611 -0.005000 -0.224809 +v -0.446611 0.005000 -0.224809 +v -0.440959 -0.005000 -0.235702 +v -0.440959 0.005000 -0.235702 +v -0.435042 -0.005000 -0.246452 +v -0.435042 0.005000 -0.246452 +v -0.428862 -0.005000 -0.257054 +v -0.428862 0.005000 -0.257054 +v -0.422425 -0.005000 -0.267502 +v -0.422425 0.005000 -0.267502 +v -0.415733 -0.005000 -0.277788 +v -0.415733 0.005000 -0.277788 +v -0.408790 -0.005000 -0.287907 +v -0.408790 0.005000 -0.287907 +v -0.401602 -0.005000 -0.297853 +v -0.401602 0.005000 -0.297853 +v -0.394171 -0.005000 -0.307619 +v -0.394171 0.005000 -0.307619 +v -0.386503 -0.005000 -0.317200 +v -0.386503 0.005000 -0.317200 +v -0.378602 -0.005000 -0.326589 +v -0.378602 0.005000 -0.326589 +v -0.370473 -0.005000 -0.335782 +v -0.370473 0.005000 -0.335782 +v -0.362121 -0.005000 -0.344773 +v -0.362121 0.005000 -0.344773 +v -0.353551 -0.005000 -0.353556 +v -0.353551 0.005000 -0.353556 +v -0.344767 -0.005000 -0.362126 +v -0.344767 0.005000 -0.362126 +v -0.335776 -0.005000 -0.370478 +v -0.335776 0.005000 -0.370478 +v -0.326583 -0.005000 -0.378607 +v -0.326583 0.005000 -0.378607 +v -0.317193 -0.005000 -0.386508 +v -0.317193 0.005000 -0.386508 +v -0.307613 -0.005000 -0.394176 +v -0.307613 0.005000 -0.394176 +v -0.297846 -0.005000 -0.401606 +v -0.297846 0.005000 -0.401606 +v -0.287901 -0.005000 -0.408795 +v -0.287901 0.005000 -0.408795 +v -0.277782 -0.005000 -0.415737 +v -0.277782 0.005000 -0.415737 +v -0.267495 -0.005000 -0.422429 +v -0.267495 0.005000 -0.422429 +v -0.257048 -0.005000 -0.428867 +v -0.257048 0.005000 -0.428867 +v -0.246445 -0.005000 -0.435046 +v -0.246445 0.005000 -0.435046 +v -0.235694 -0.005000 -0.440963 +v -0.235694 0.005000 -0.440963 +v -0.224802 -0.005000 -0.446614 +v -0.224802 0.005000 -0.446614 +v -0.213774 -0.005000 -0.451997 +v -0.213774 0.005000 -0.451997 +v -0.202617 -0.005000 -0.457107 +v -0.202617 0.005000 -0.457107 +v -0.191338 -0.005000 -0.461942 +v -0.191338 0.005000 -0.461942 +v -0.179943 -0.005000 -0.466498 +v -0.179943 0.005000 -0.466498 +v -0.168441 -0.005000 -0.470774 +v -0.168441 0.005000 -0.470774 +v -0.156836 -0.005000 -0.474766 +v -0.156836 0.005000 -0.474766 +v -0.145138 -0.005000 -0.478472 +v -0.145138 0.005000 -0.478472 +v -0.133352 -0.005000 -0.481889 +v -0.133352 0.005000 -0.481889 +v -0.121485 -0.005000 -0.485017 +v -0.121485 0.005000 -0.485017 +v -0.109546 -0.005000 -0.487852 +v -0.109546 0.005000 -0.487852 +v -0.097540 -0.005000 -0.490394 +v -0.097540 0.005000 -0.490394 +v -0.085476 -0.005000 -0.492640 +v -0.085476 0.005000 -0.492640 +v -0.073360 -0.005000 -0.494589 +v -0.073360 0.005000 -0.494589 +v -0.061200 -0.005000 -0.496240 +v -0.061200 0.005000 -0.496240 +v -0.049004 -0.005000 -0.497593 +v -0.049004 0.005000 -0.497593 +v -0.036777 -0.005000 -0.498646 +v -0.036777 0.005000 -0.498646 +v -0.024529 -0.005000 -0.499398 +v -0.024529 0.005000 -0.499398 +v -0.012266 -0.005000 -0.499850 +v -0.012266 0.005000 -0.499850 +vt 0.131765 0.298777 +vt 0.127902 0.294881 +vt 0.126842 0.307708 +vt 0.122925 0.303911 +vt 0.122141 0.316756 +vt 0.118171 0.313061 +vt 0.117666 0.325918 +vt 0.113645 0.322326 +vt 0.113417 0.335188 +vt 0.109349 0.331699 +vt 0.109399 0.344559 +vt 0.105287 0.341176 +vt 0.105614 0.354027 +vt 0.101459 0.350750 +vt 0.102063 0.363586 +vt 0.097868 0.360416 +vt 0.098750 0.373230 +vt 0.094518 0.370168 +vt 0.095675 0.382953 +vt 0.091409 0.379999 +vt 0.092842 0.392749 +vt 0.088543 0.389905 +vt 0.090250 0.402612 +vt 0.085923 0.399879 +vt 0.087903 0.412537 +vt 0.083550 0.409915 +vt 0.085802 0.422517 +vt 0.081425 0.420007 +vt 0.083947 0.432547 +vt 0.079549 0.430150 +vt 0.082341 0.442620 +vt 0.077925 0.440336 +vt 0.080983 0.452731 +vt 0.076552 0.450559 +vt 0.079875 0.462873 +vt 0.075431 0.460815 +vt 0.079017 0.473039 +vt 0.074564 0.471096 +vt 0.078410 0.483225 +vt 0.073950 0.481396 +vt 0.078055 0.493424 +vt 0.073591 0.491709 +vt 0.077951 0.503630 +vt 0.073485 0.502029 +vt 0.078098 0.513836 +vt 0.073634 0.512349 +vt 0.078497 0.524036 +vt 0.074038 0.522664 +vt 0.079147 0.534225 +vt 0.074695 0.532967 +vt 0.080048 0.544396 +vt 0.075606 0.543252 +vt 0.081199 0.554543 +vt 0.076770 0.553513 +vt 0.082600 0.564660 +vt 0.078187 0.563743 +vt 0.084249 0.574741 +vt 0.079854 0.573937 +vt 0.086146 0.584779 +vt 0.081773 0.584088 +vt 0.088290 0.594770 +vt 0.083941 0.594190 +vt 0.090679 0.604706 +vt 0.086357 0.604237 +vt 0.093312 0.614581 +vt 0.089019 0.614223 +vt 0.096187 0.624390 +vt 0.091927 0.624143 +vt 0.099303 0.634128 +vt 0.095077 0.633989 +vt 0.102658 0.643787 +vt 0.098469 0.643756 +vt 0.106249 0.653362 +vt 0.102101 0.653439 +vt 0.110075 0.662848 +vt 0.105969 0.663031 +vt 0.114132 0.672238 +vt 0.110073 0.672527 +vt 0.118420 0.681528 +vt 0.114408 0.681920 +vt 0.122935 0.690711 +vt 0.118974 0.691206 +vt 0.127674 0.699781 +vt 0.123766 0.700378 +vt 0.132634 0.708735 +vt 0.128782 0.709432 +vt 0.137814 0.717565 +vt 0.134020 0.718361 +vt 0.143209 0.726267 +vt 0.139475 0.727161 +vt 0.148816 0.734835 +vt 0.145145 0.735825 +vt 0.154632 0.743265 +vt 0.151026 0.744349 +vt 0.160653 0.751551 +vt 0.157114 0.752728 +vt 0.166876 0.759688 +vt 0.163407 0.760956 +vt 0.173297 0.767672 +vt 0.169900 0.769029 +vt 0.179912 0.775497 +vt 0.176589 0.776942 +vt 0.186717 0.783159 +vt 0.183470 0.784690 +vt 0.193708 0.790653 +vt 0.190540 0.792268 +vt 0.200881 0.797975 +vt 0.197793 0.799672 +vt 0.208231 0.805120 +vt 0.205226 0.806897 +vt 0.215755 0.812084 +vt 0.212834 0.813939 +vt 0.223447 0.818863 +vt 0.220612 0.820794 +vt 0.231303 0.825452 +vt 0.228556 0.827457 +vt 0.239318 0.831849 +vt 0.236661 0.833925 +vt 0.247487 0.838048 +vt 0.244922 0.840194 +vt 0.255806 0.844046 +vt 0.253334 0.846259 +vt 0.264269 0.849840 +vt 0.261892 0.852118 +vt 0.272872 0.855426 +vt 0.270591 0.857767 +vt 0.281608 0.860800 +vt 0.279425 0.863202 +vt 0.290474 0.865960 +vt 0.288390 0.868420 +vt 0.299463 0.870903 +vt 0.297480 0.873417 +vt 0.308570 0.875624 +vt 0.306689 0.878192 +vt 0.317790 0.880123 +vt 0.316012 0.882740 +vt 0.327116 0.884395 +vt 0.325443 0.887060 +vt 0.336545 0.888438 +vt 0.334977 0.891149 +vt 0.346069 0.892250 +vt 0.344608 0.895004 +vt 0.355683 0.895829 +vt 0.354329 0.898622 +vt 0.365381 0.899171 +vt 0.364136 0.902003 +vt 0.375158 0.902277 +vt 0.374023 0.905143 +vt 0.385007 0.905142 +vt 0.383982 0.908040 +vt 0.394923 0.907767 +vt 0.394009 0.910694 +vt 0.404899 0.910148 +vt 0.404097 0.913103 +vt 0.414930 0.912286 +vt 0.414241 0.915264 +vt 0.425009 0.914177 +vt 0.424433 0.917177 +vt 0.435132 0.915822 +vt 0.434669 0.918840 +vt 0.445290 0.917219 +vt 0.444941 0.920253 +vt 0.455478 0.918368 +vt 0.455244 0.921414 +vt 0.465691 0.919268 +vt 0.465571 0.922324 +vt 0.475922 0.919917 +vt 0.475916 0.922981 +vt 0.486165 0.920317 +vt 0.486274 0.923385 +vt 0.496413 0.920466 +vt 0.496637 0.923536 +vt 0.506661 0.920365 +vt 0.506999 0.923433 +vt 0.516902 0.920013 +vt 0.517355 0.923078 +vt 0.527130 0.919411 +vt 0.527698 0.922469 +vt 0.537339 0.918559 +vt 0.538021 0.921607 +vt 0.547523 0.917458 +vt 0.548319 0.920494 +vt 0.557675 0.916108 +vt 0.558586 0.919129 +vt 0.567790 0.914510 +vt 0.568814 0.917513 +vt 0.577862 0.912665 +vt 0.578999 0.915648 +vt 0.587884 0.910575 +vt 0.589133 0.913534 +vt 0.597851 0.908240 +vt 0.599211 0.911172 +vt 0.607755 0.905661 +vt 0.609227 0.908565 +vt 0.617593 0.902841 +vt 0.619174 0.905714 +vt 0.627356 0.899782 +vt 0.629047 0.902620 +vt 0.637040 0.896484 +vt 0.638840 0.899285 +vt 0.646639 0.892950 +vt 0.648547 0.895712 +vt 0.656147 0.889183 +vt 0.658161 0.891902 +vt 0.665559 0.885183 +vt 0.667678 0.887858 +vt 0.674867 0.880955 +vt 0.677091 0.883582 +vt 0.684068 0.876499 +vt 0.686395 0.879076 +vt 0.693155 0.871820 +vt 0.695584 0.874345 +vt 0.702124 0.866919 +vt 0.704652 0.869389 +vt 0.710967 0.861801 +vt 0.713595 0.864213 +vt 0.719681 0.856467 +vt 0.722407 0.858819 +vt 0.728260 0.850921 +vt 0.731082 0.853211 +vt 0.736699 0.845166 +vt 0.739615 0.847392 +vt 0.744992 0.839207 +vt 0.748002 0.841366 +vt 0.753136 0.833045 +vt 0.756236 0.835136 +vt 0.761124 0.826686 +vt 0.764314 0.828705 +vt 0.768952 0.820133 +vt 0.772229 0.822079 +vt 0.776615 0.813390 +vt 0.779979 0.815260 +vt 0.784109 0.806461 +vt 0.787557 0.808253 +vt 0.791429 0.799350 +vt 0.794959 0.801062 +vt 0.798571 0.792061 +vt 0.802181 0.793692 +vt 0.805531 0.784600 +vt 0.809218 0.786147 +vt 0.812304 0.776969 +vt 0.816067 0.778431 +vt 0.818885 0.769175 +vt 0.822723 0.770549 +vt 0.825273 0.761221 +vt 0.829181 0.762507 +vt 0.831461 0.753113 +vt 0.835439 0.754307 +vt 0.837447 0.744855 +vt 0.841492 0.745957 +vt 0.843227 0.736452 +vt 0.847337 0.737460 +vt 0.848798 0.727910 +vt 0.852971 0.728822 +vt 0.854156 0.719233 +vt 0.858388 0.720047 +vt 0.859298 0.710426 +vt 0.863588 0.711143 +vt 0.864221 0.701496 +vt 0.868566 0.702112 +vt 0.868921 0.692447 +vt 0.873319 0.692962 +vt 0.873397 0.683286 +vt 0.877845 0.683698 +vt 0.877645 0.674016 +vt 0.882141 0.674324 +vt 0.881663 0.664644 +vt 0.886204 0.664847 +vt 0.885449 0.655176 +vt 0.890032 0.655273 +vt 0.888999 0.645617 +vt 0.893622 0.645608 +vt 0.892313 0.635974 +vt 0.896973 0.635856 +vt 0.895387 0.626251 +vt 0.900082 0.626024 +vt 0.898221 0.616455 +vt 0.902947 0.616118 +vt 0.900812 0.606591 +vt 0.905567 0.606144 +vt 0.903159 0.596666 +vt 0.907941 0.596108 +vt 0.905260 0.586686 +vt 0.910066 0.586016 +vt 0.907115 0.576656 +vt 0.911941 0.575874 +vt 0.908722 0.566583 +vt 0.913566 0.565688 +vt 0.910080 0.556473 +vt 0.914939 0.555464 +vt 0.911188 0.546331 +vt 0.916059 0.545208 +vt 0.912045 0.536164 +vt 0.916927 0.534927 +vt 0.912652 0.525978 +vt 0.917540 0.524627 +vt 0.913008 0.515779 +vt 0.917900 0.514314 +vt 0.913112 0.505574 +vt 0.918005 0.503994 +vt 0.912965 0.495367 +vt 0.917856 0.493674 +vt 0.912565 0.485167 +vt 0.917452 0.483359 +vt 0.911915 0.474978 +vt 0.916795 0.473056 +vt 0.911014 0.464807 +vt 0.915884 0.462771 +vt 0.909863 0.454660 +vt 0.914720 0.452510 +vt 0.908463 0.444543 +vt 0.913303 0.442280 +vt 0.906813 0.434462 +vt 0.911636 0.432086 +vt 0.904916 0.424424 +vt 0.909717 0.421935 +vt 0.902772 0.414433 +vt 0.907549 0.411833 +vt 0.900383 0.404497 +vt 0.905133 0.401786 +vt 0.897750 0.394622 +vt 0.902471 0.391799 +vt 0.894874 0.384812 +vt 0.899563 0.381880 +vt 0.891758 0.375075 +vt 0.896412 0.372034 +vt 0.888404 0.365416 +vt 0.893020 0.362266 +vt 0.884813 0.355841 +vt 0.889389 0.352584 +vt 0.880987 0.346355 +vt 0.885520 0.342992 +vt 0.876929 0.336965 +vt 0.881417 0.333496 +vt 0.872642 0.327675 +vt 0.877081 0.324102 +vt 0.868127 0.318492 +vt 0.872516 0.314817 +vt 0.863388 0.309421 +vt 0.867724 0.305644 +vt 0.858427 0.300468 +vt 0.862707 0.296591 +vt 0.853247 0.291638 +vt 0.857470 0.287662 +vt 0.847853 0.282936 +vt 0.852015 0.278862 +vt 0.842246 0.274368 +vt 0.846345 0.270198 +vt 0.836430 0.265938 +vt 0.840463 0.261674 +vt 0.830408 0.257652 +vt 0.834375 0.253295 +vt 0.824185 0.249515 +vt 0.828082 0.245066 +vt 0.817764 0.241531 +vt 0.821589 0.236993 +vt 0.811149 0.233706 +vt 0.814900 0.229080 +vt 0.804344 0.226044 +vt 0.808019 0.221333 +vt 0.797353 0.218550 +vt 0.800949 0.213755 +vt 0.790180 0.211228 +vt 0.793696 0.206351 +vt 0.782829 0.204083 +vt 0.786263 0.199126 +vt 0.775306 0.197119 +vt 0.778655 0.192083 +vt 0.767614 0.190340 +vt 0.770877 0.185229 +vt 0.759758 0.183751 +vt 0.762933 0.178565 +vt 0.751743 0.177354 +vt 0.754828 0.172097 +vt 0.743573 0.171155 +vt 0.746567 0.165829 +vt 0.735254 0.165157 +vt 0.738154 0.159763 +vt 0.726791 0.159363 +vt 0.729596 0.153904 +vt 0.718188 0.153777 +vt 0.720897 0.148256 +vt 0.709452 0.148403 +vt 0.712063 0.142821 +vt 0.700586 0.143243 +vt 0.703098 0.137603 +vt 0.691597 0.138300 +vt 0.694008 0.132606 +vt 0.682490 0.133579 +vt 0.684799 0.127831 +vt 0.673270 0.129081 +vt 0.675476 0.123282 +vt 0.663943 0.124808 +vt 0.666044 0.118963 +vt 0.654515 0.120765 +vt 0.656510 0.114874 +vt 0.644991 0.116953 +vt 0.646879 0.111019 +vt 0.635377 0.113375 +vt 0.637158 0.107401 +vt 0.625678 0.110032 +vt 0.627351 0.104020 +vt 0.615901 0.106927 +vt 0.617464 0.100881 +vt 0.606052 0.104061 +vt 0.607505 0.097983 +vt 0.596136 0.101437 +vt 0.597478 0.095329 +vt 0.586160 0.099055 +vt 0.587390 0.092921 +vt 0.576129 0.096918 +vt 0.577246 0.090760 +vt 0.566049 0.095027 +vt 0.567054 0.088847 +vt 0.555927 0.093382 +vt 0.556818 0.087184 +vt 0.545769 0.091984 +vt 0.546546 0.085771 +vt 0.535580 0.090836 +vt 0.536243 0.084609 +vt 0.525367 0.089936 +vt 0.525916 0.083700 +vt 0.515137 0.089287 +vt 0.515570 0.083043 +vt 0.504894 0.088887 +vt 0.505213 0.082639 +vt 0.494646 0.088738 +vt 0.494850 0.082488 +vt 0.484398 0.088840 +vt 0.484487 0.082591 +vt 0.474157 0.089192 +vt 0.474132 0.082947 +vt 0.463929 0.089794 +vt 0.463789 0.083556 +vt 0.453720 0.090646 +vt 0.453465 0.084417 +vt 0.443536 0.091747 +vt 0.443167 0.085531 +vt 0.433383 0.093097 +vt 0.432901 0.086896 +vt 0.423268 0.094695 +vt 0.422672 0.088512 +vt 0.413197 0.096540 +vt 0.412488 0.090377 +vt 0.403175 0.098631 +vt 0.402354 0.092491 +vt 0.393208 0.100966 +vt 0.392276 0.094853 +vt 0.383303 0.103544 +vt 0.382260 0.097460 +vt 0.373466 0.106364 +vt 0.372313 0.100311 +vt 0.363703 0.109424 +vt 0.362439 0.103405 +vt 0.354019 0.112722 +vt 0.352647 0.106740 +vt 0.344420 0.116255 +vt 0.342940 0.110314 +vt 0.334912 0.120023 +vt 0.333326 0.114124 +vt 0.325500 0.124023 +vt 0.323809 0.118168 +vt 0.316192 0.128251 +vt 0.314396 0.122444 +vt 0.306991 0.132707 +vt 0.305092 0.126949 +vt 0.297904 0.137386 +vt 0.295903 0.131681 +vt 0.288935 0.142287 +vt 0.286835 0.136637 +vt 0.280092 0.147406 +vt 0.277892 0.141813 +vt 0.271378 0.152740 +vt 0.269080 0.147207 +vt 0.262799 0.158286 +vt 0.260405 0.152815 +vt 0.254360 0.164040 +vt 0.251872 0.158634 +vt 0.246067 0.170000 +vt 0.243486 0.164661 +vt 0.237924 0.176161 +vt 0.235251 0.170891 +vt 0.229936 0.182520 +vt 0.227174 0.177321 +vt 0.222108 0.189074 +vt 0.219258 0.183948 +vt 0.214445 0.195817 +vt 0.211509 0.190767 +vt 0.206950 0.202746 +vt 0.203931 0.197773 +vt 0.199630 0.209857 +vt 0.196529 0.204964 +vt 0.192488 0.217146 +vt 0.189307 0.212334 +vt 0.185529 0.224607 +vt 0.182269 0.219880 +vt 0.178756 0.232238 +vt 0.175421 0.227596 +vt 0.172175 0.240032 +vt 0.168765 0.235477 +vt 0.165788 0.247986 +vt 0.162307 0.243520 +vt 0.159599 0.256094 +vt 0.156049 0.251720 +vt 0.153613 0.264353 +vt 0.149996 0.260070 +vt 0.147833 0.272755 +vt 0.144151 0.268567 +vt 0.142262 0.281298 +vt 0.136905 0.289975 +vt 0.133100 0.285980 +vt 0.138518 0.277205 +usemtl None +s off +f 1/1 2/2 3/3 +f 3/3 4/4 5/5 +f 5/5 6/6 7/7 +f 7/7 8/8 9/9 +f 9/9 10/10 11/11 +f 11/11 12/12 13/13 +f 13/13 14/14 15/15 +f 15/15 16/16 17/17 +f 17/17 18/18 19/19 +f 19/19 20/20 21/21 +f 21/21 22/22 23/23 +f 23/23 24/24 25/25 +f 25/25 26/26 27/27 +f 27/27 28/28 29/29 +f 29/29 30/30 31/31 +f 31/31 32/32 33/33 +f 33/33 34/34 35/35 +f 35/35 36/36 37/37 +f 37/37 38/38 39/39 +f 39/39 40/40 41/41 +f 41/41 42/42 43/43 +f 43/43 44/44 45/45 +f 45/45 46/46 47/47 +f 47/47 48/48 49/49 +f 49/49 50/50 51/51 +f 51/51 52/52 53/53 +f 53/53 54/54 55/55 +f 55/55 56/56 57/57 +f 57/57 58/58 59/59 +f 59/59 60/60 61/61 +f 61/61 62/62 63/63 +f 63/63 64/64 65/65 +f 65/65 66/66 67/67 +f 67/67 68/68 69/69 +f 69/69 70/70 71/71 +f 71/71 72/72 73/73 +f 73/73 74/74 75/75 +f 75/75 76/76 77/77 +f 77/77 78/78 79/79 +f 79/79 80/80 81/81 +f 81/81 82/82 83/83 +f 83/83 84/84 85/85 +f 85/85 86/86 87/87 +f 87/87 88/88 89/89 +f 89/89 90/90 91/91 +f 91/91 92/92 93/93 +f 93/93 94/94 95/95 +f 95/95 96/96 97/97 +f 97/97 98/98 99/99 +f 99/99 100/100 101/101 +f 101/101 102/102 103/103 +f 103/103 104/104 105/105 +f 105/105 106/106 107/107 +f 107/107 108/108 109/109 +f 109/109 110/110 111/111 +f 111/111 112/112 113/113 +f 113/113 114/114 115/115 +f 115/115 116/116 117/117 +f 117/117 118/118 119/119 +f 119/119 120/120 121/121 +f 121/121 122/122 123/123 +f 123/123 124/124 125/125 +f 125/125 126/126 127/127 +f 127/127 128/128 129/129 +f 129/129 130/130 131/131 +f 131/131 132/132 133/133 +f 133/133 134/134 135/135 +f 135/135 136/136 137/137 +f 137/137 138/138 139/139 +f 139/139 140/140 141/141 +f 141/141 142/142 143/143 +f 143/143 144/144 145/145 +f 145/145 146/146 147/147 +f 147/147 148/148 149/149 +f 149/149 150/150 151/151 +f 151/151 152/152 153/153 +f 153/153 154/154 155/155 +f 155/155 156/156 157/157 +f 157/157 158/158 159/159 +f 159/159 160/160 161/161 +f 161/161 162/162 163/163 +f 163/163 164/164 165/165 +f 165/165 166/166 167/167 +f 167/167 168/168 169/169 +f 169/169 170/170 171/171 +f 171/171 172/172 173/173 +f 173/173 174/174 175/175 +f 175/175 176/176 177/177 +f 177/177 178/178 179/179 +f 179/179 180/180 181/181 +f 181/181 182/182 183/183 +f 183/183 184/184 185/185 +f 185/185 186/186 187/187 +f 187/187 188/188 189/189 +f 189/189 190/190 191/191 +f 191/191 192/192 193/193 +f 193/193 194/194 195/195 +f 195/195 196/196 197/197 +f 197/197 198/198 199/199 +f 199/199 200/200 201/201 +f 201/201 202/202 203/203 +f 203/203 204/204 205/205 +f 205/205 206/206 207/207 +f 207/207 208/208 209/209 +f 209/209 210/210 211/211 +f 211/211 212/212 213/213 +f 213/213 214/214 215/215 +f 215/215 216/216 217/217 +f 217/217 218/218 219/219 +f 219/219 220/220 221/221 +f 221/221 222/222 223/223 +f 223/223 224/224 225/225 +f 225/225 226/226 227/227 +f 227/227 228/228 229/229 +f 229/229 230/230 231/231 +f 231/231 232/232 233/233 +f 233/233 234/234 235/235 +f 235/235 236/236 237/237 +f 237/237 238/238 239/239 +f 239/239 240/240 241/241 +f 241/241 242/242 243/243 +f 243/243 244/244 245/245 +f 245/245 246/246 247/247 +f 247/247 248/248 249/249 +f 249/249 250/250 251/251 +f 251/251 252/252 253/253 +f 253/253 254/254 255/255 +f 255/255 256/256 257/257 +f 257/257 258/258 259/259 +f 259/259 260/260 261/261 +f 261/261 262/262 263/263 +f 263/263 264/264 265/265 +f 265/265 266/266 267/267 +f 267/267 268/268 269/269 +f 269/269 270/270 271/271 +f 271/271 272/272 273/273 +f 273/273 274/274 275/275 +f 275/275 276/276 277/277 +f 277/277 278/278 279/279 +f 279/279 280/280 281/281 +f 281/281 282/282 283/283 +f 283/283 284/284 285/285 +f 285/285 286/286 287/287 +f 287/287 288/288 289/289 +f 289/289 290/290 291/291 +f 291/291 292/292 293/293 +f 293/293 294/294 295/295 +f 295/295 296/296 297/297 +f 297/297 298/298 299/299 +f 299/299 300/300 301/301 +f 301/301 302/302 303/303 +f 303/303 304/304 305/305 +f 305/305 306/306 307/307 +f 307/307 308/308 309/309 +f 309/309 310/310 311/311 +f 311/311 312/312 313/313 +f 313/313 314/314 315/315 +f 315/315 316/316 317/317 +f 317/317 318/318 319/319 +f 319/319 320/320 321/321 +f 321/321 322/322 323/323 +f 323/323 324/324 325/325 +f 325/325 326/326 327/327 +f 327/327 328/328 329/329 +f 329/329 330/330 331/331 +f 331/331 332/332 333/333 +f 333/333 334/334 335/335 +f 335/335 336/336 337/337 +f 337/337 338/338 339/339 +f 339/339 340/340 341/341 +f 341/341 342/342 343/343 +f 343/343 344/344 345/345 +f 345/345 346/346 347/347 +f 347/347 348/348 349/349 +f 349/349 350/350 351/351 +f 351/351 352/352 353/353 +f 353/353 354/354 355/355 +f 355/355 356/356 357/357 +f 357/357 358/358 359/359 +f 359/359 360/360 361/361 +f 361/361 362/362 363/363 +f 363/363 364/364 365/365 +f 365/365 366/366 367/367 +f 367/367 368/368 369/369 +f 369/369 370/370 371/371 +f 371/371 372/372 373/373 +f 373/373 374/374 375/375 +f 375/375 376/376 377/377 +f 377/377 378/378 379/379 +f 379/379 380/380 381/381 +f 381/381 382/382 383/383 +f 383/383 384/384 385/385 +f 385/385 386/386 387/387 +f 387/387 388/388 389/389 +f 389/389 390/390 391/391 +f 391/391 392/392 393/393 +f 393/393 394/394 395/395 +f 395/395 396/396 397/397 +f 397/397 398/398 399/399 +f 399/399 400/400 401/401 +f 401/401 402/402 403/403 +f 403/403 404/404 405/405 +f 405/405 406/406 407/407 +f 407/407 408/408 409/409 +f 409/409 410/410 411/411 +f 411/411 412/412 413/413 +f 413/413 414/414 415/415 +f 415/415 416/416 417/417 +f 417/417 418/418 419/419 +f 419/419 420/420 421/421 +f 421/421 422/422 423/423 +f 423/423 424/424 425/425 +f 425/425 426/426 427/427 +f 427/427 428/428 429/429 +f 429/429 430/430 431/431 +f 431/431 432/432 433/433 +f 433/433 434/434 435/435 +f 435/435 436/436 437/437 +f 437/437 438/438 439/439 +f 439/439 440/440 441/441 +f 441/441 442/442 443/443 +f 443/443 444/444 445/445 +f 445/445 446/446 447/447 +f 447/447 448/448 449/449 +f 449/449 450/450 451/451 +f 451/451 452/452 453/453 +f 453/453 454/454 455/455 +f 455/455 456/456 457/457 +f 457/457 458/458 459/459 +f 459/459 460/460 461/461 +f 461/461 462/462 463/463 +f 463/463 464/464 465/465 +f 465/465 466/466 467/467 +f 467/467 468/468 469/469 +f 469/469 470/470 471/471 +f 471/471 472/472 473/473 +f 473/473 474/474 475/475 +f 475/475 476/476 477/477 +f 477/477 478/478 479/479 +f 479/479 480/480 481/481 +f 481/481 482/482 483/483 +f 483/483 484/484 485/485 +f 485/485 486/486 487/487 +f 487/487 488/488 489/489 +f 489/489 490/490 491/491 +f 491/491 492/492 493/493 +f 493/493 494/494 495/495 +f 495/495 496/496 497/497 +f 497/497 498/498 499/499 +f 499/499 500/500 501/501 +f 501/501 502/502 503/503 +f 503/503 504/504 505/505 +f 505/505 506/506 507/507 +f 507/507 508/508 509/509 +f 4/4 2/2 6/6 +f 511/510 512/511 1/1 +f 509/509 510/512 511/510 +f 1/1 3/3 511/510 +f 2/2 4/4 3/3 +f 4/4 6/6 5/5 +f 6/6 8/8 7/7 +f 8/8 10/10 9/9 +f 10/10 12/12 11/11 +f 12/12 14/14 13/13 +f 14/14 16/16 15/15 +f 16/16 18/18 17/17 +f 18/18 20/20 19/19 +f 20/20 22/22 21/21 +f 22/22 24/24 23/23 +f 24/24 26/26 25/25 +f 26/26 28/28 27/27 +f 28/28 30/30 29/29 +f 30/30 32/32 31/31 +f 32/32 34/34 33/33 +f 34/34 36/36 35/35 +f 36/36 38/38 37/37 +f 38/38 40/40 39/39 +f 40/40 42/42 41/41 +f 42/42 44/44 43/43 +f 44/44 46/46 45/45 +f 46/46 48/48 47/47 +f 48/48 50/50 49/49 +f 50/50 52/52 51/51 +f 52/52 54/54 53/53 +f 54/54 56/56 55/55 +f 56/56 58/58 57/57 +f 58/58 60/60 59/59 +f 60/60 62/62 61/61 +f 62/62 64/64 63/63 +f 64/64 66/66 65/65 +f 66/66 68/68 67/67 +f 68/68 70/70 69/69 +f 70/70 72/72 71/71 +f 72/72 74/74 73/73 +f 74/74 76/76 75/75 +f 76/76 78/78 77/77 +f 78/78 80/80 79/79 +f 80/80 82/82 81/81 +f 82/82 84/84 83/83 +f 84/84 86/86 85/85 +f 86/86 88/88 87/87 +f 88/88 90/90 89/89 +f 90/90 92/92 91/91 +f 92/92 94/94 93/93 +f 94/94 96/96 95/95 +f 96/96 98/98 97/97 +f 98/98 100/100 99/99 +f 100/100 102/102 101/101 +f 102/102 104/104 103/103 +f 104/104 106/106 105/105 +f 106/106 108/108 107/107 +f 108/108 110/110 109/109 +f 110/110 112/112 111/111 +f 112/112 114/114 113/113 +f 114/114 116/116 115/115 +f 116/116 118/118 117/117 +f 118/118 120/120 119/119 +f 120/120 122/122 121/121 +f 122/122 124/124 123/123 +f 124/124 126/126 125/125 +f 126/126 128/128 127/127 +f 128/128 130/130 129/129 +f 130/130 132/132 131/131 +f 132/132 134/134 133/133 +f 134/134 136/136 135/135 +f 136/136 138/138 137/137 +f 138/138 140/140 139/139 +f 140/140 142/142 141/141 +f 142/142 144/144 143/143 +f 144/144 146/146 145/145 +f 146/146 148/148 147/147 +f 148/148 150/150 149/149 +f 150/150 152/152 151/151 +f 152/152 154/154 153/153 +f 154/154 156/156 155/155 +f 156/156 158/158 157/157 +f 158/158 160/160 159/159 +f 160/160 162/162 161/161 +f 162/162 164/164 163/163 +f 164/164 166/166 165/165 +f 166/166 168/168 167/167 +f 168/168 170/170 169/169 +f 170/170 172/172 171/171 +f 172/172 174/174 173/173 +f 174/174 176/176 175/175 +f 176/176 178/178 177/177 +f 178/178 180/180 179/179 +f 180/180 182/182 181/181 +f 182/182 184/184 183/183 +f 184/184 186/186 185/185 +f 186/186 188/188 187/187 +f 188/188 190/190 189/189 +f 190/190 192/192 191/191 +f 192/192 194/194 193/193 +f 194/194 196/196 195/195 +f 196/196 198/198 197/197 +f 198/198 200/200 199/199 +f 200/200 202/202 201/201 +f 202/202 204/204 203/203 +f 204/204 206/206 205/205 +f 206/206 208/208 207/207 +f 208/208 210/210 209/209 +f 210/210 212/212 211/211 +f 212/212 214/214 213/213 +f 214/214 216/216 215/215 +f 216/216 218/218 217/217 +f 218/218 220/220 219/219 +f 220/220 222/222 221/221 +f 222/222 224/224 223/223 +f 224/224 226/226 225/225 +f 226/226 228/228 227/227 +f 228/228 230/230 229/229 +f 230/230 232/232 231/231 +f 232/232 234/234 233/233 +f 234/234 236/236 235/235 +f 236/236 238/238 237/237 +f 238/238 240/240 239/239 +f 240/240 242/242 241/241 +f 242/242 244/244 243/243 +f 244/244 246/246 245/245 +f 246/246 248/248 247/247 +f 248/248 250/250 249/249 +f 250/250 252/252 251/251 +f 252/252 254/254 253/253 +f 254/254 256/256 255/255 +f 256/256 258/258 257/257 +f 258/258 260/260 259/259 +f 260/260 262/262 261/261 +f 262/262 264/264 263/263 +f 264/264 266/266 265/265 +f 266/266 268/268 267/267 +f 268/268 270/270 269/269 +f 270/270 272/272 271/271 +f 272/272 274/274 273/273 +f 274/274 276/276 275/275 +f 276/276 278/278 277/277 +f 278/278 280/280 279/279 +f 280/280 282/282 281/281 +f 282/282 284/284 283/283 +f 284/284 286/286 285/285 +f 286/286 288/288 287/287 +f 288/288 290/290 289/289 +f 290/290 292/292 291/291 +f 292/292 294/294 293/293 +f 294/294 296/296 295/295 +f 296/296 298/298 297/297 +f 298/298 300/300 299/299 +f 300/300 302/302 301/301 +f 302/302 304/304 303/303 +f 304/304 306/306 305/305 +f 306/306 308/308 307/307 +f 308/308 310/310 309/309 +f 310/310 312/312 311/311 +f 312/312 314/314 313/313 +f 314/314 316/316 315/315 +f 316/316 318/318 317/317 +f 318/318 320/320 319/319 +f 320/320 322/322 321/321 +f 322/322 324/324 323/323 +f 324/324 326/326 325/325 +f 326/326 328/328 327/327 +f 328/328 330/330 329/329 +f 330/330 332/332 331/331 +f 332/332 334/334 333/333 +f 334/334 336/336 335/335 +f 336/336 338/338 337/337 +f 338/338 340/340 339/339 +f 340/340 342/342 341/341 +f 342/342 344/344 343/343 +f 344/344 346/346 345/345 +f 346/346 348/348 347/347 +f 348/348 350/350 349/349 +f 350/350 352/352 351/351 +f 352/352 354/354 353/353 +f 354/354 356/356 355/355 +f 356/356 358/358 357/357 +f 358/358 360/360 359/359 +f 360/360 362/362 361/361 +f 362/362 364/364 363/363 +f 364/364 366/366 365/365 +f 366/366 368/368 367/367 +f 368/368 370/370 369/369 +f 370/370 372/372 371/371 +f 372/372 374/374 373/373 +f 374/374 376/376 375/375 +f 376/376 378/378 377/377 +f 378/378 380/380 379/379 +f 380/380 382/382 381/381 +f 382/382 384/384 383/383 +f 384/384 386/386 385/385 +f 386/386 388/388 387/387 +f 388/388 390/390 389/389 +f 390/390 392/392 391/391 +f 392/392 394/394 393/393 +f 394/394 396/396 395/395 +f 396/396 398/398 397/397 +f 398/398 400/400 399/399 +f 400/400 402/402 401/401 +f 402/402 404/404 403/403 +f 404/404 406/406 405/405 +f 406/406 408/408 407/407 +f 408/408 410/410 409/409 +f 410/410 412/412 411/411 +f 412/412 414/414 413/413 +f 414/414 416/416 415/415 +f 416/416 418/418 417/417 +f 418/418 420/420 419/419 +f 420/420 422/422 421/421 +f 422/422 424/424 423/423 +f 424/424 426/426 425/425 +f 426/426 428/428 427/427 +f 428/428 430/430 429/429 +f 430/430 432/432 431/431 +f 432/432 434/434 433/433 +f 434/434 436/436 435/435 +f 436/436 438/438 437/437 +f 438/438 440/440 439/439 +f 440/440 442/442 441/441 +f 442/442 444/444 443/443 +f 444/444 446/446 445/445 +f 446/446 448/448 447/447 +f 448/448 450/450 449/449 +f 450/450 452/452 451/451 +f 452/452 454/454 453/453 +f 454/454 456/456 455/455 +f 456/456 458/458 457/457 +f 458/458 460/460 459/459 +f 460/460 462/462 461/461 +f 462/462 464/464 463/463 +f 464/464 466/466 465/465 +f 466/466 468/468 467/467 +f 468/468 470/470 469/469 +f 470/470 472/472 471/471 +f 472/472 474/474 473/473 +f 474/474 476/476 475/475 +f 476/476 478/478 477/477 +f 478/478 480/480 479/479 +f 480/480 482/482 481/481 +f 482/482 484/484 483/483 +f 484/484 486/486 485/485 +f 486/486 488/488 487/487 +f 488/488 490/490 489/489 +f 490/490 492/492 491/491 +f 492/492 494/494 493/493 +f 494/494 496/496 495/495 +f 496/496 498/498 497/497 +f 498/498 500/500 499/499 +f 500/500 502/502 501/501 +f 502/502 504/504 503/503 +f 504/504 506/506 505/505 +f 506/506 508/508 507/507 +f 508/508 510/512 509/509 +f 2/2 512/511 6/6 +f 512/511 510/512 6/6 +f 510/512 508/508 6/6 +f 508/508 506/506 6/6 +f 506/506 504/504 6/6 +f 504/504 502/502 6/6 +f 502/502 500/500 6/6 +f 500/500 498/498 6/6 +f 498/498 496/496 6/6 +f 496/496 494/494 6/6 +f 494/494 492/492 6/6 +f 492/492 490/490 6/6 +f 490/490 488/488 6/6 +f 488/488 486/486 6/6 +f 486/486 484/484 6/6 +f 484/484 482/482 6/6 +f 482/482 480/480 6/6 +f 480/480 478/478 6/6 +f 478/478 476/476 6/6 +f 476/476 474/474 6/6 +f 474/474 472/472 6/6 +f 472/472 470/470 6/6 +f 470/470 468/468 6/6 +f 468/468 466/466 6/6 +f 466/466 464/464 6/6 +f 464/464 462/462 6/6 +f 462/462 460/460 6/6 +f 460/460 458/458 6/6 +f 458/458 456/456 6/6 +f 456/456 454/454 6/6 +f 454/454 452/452 6/6 +f 452/452 450/450 6/6 +f 450/450 448/448 6/6 +f 448/448 446/446 6/6 +f 446/446 444/444 6/6 +f 444/444 442/442 6/6 +f 442/442 440/440 6/6 +f 440/440 438/438 6/6 +f 438/438 436/436 6/6 +f 436/436 434/434 6/6 +f 434/434 432/432 6/6 +f 432/432 430/430 6/6 +f 430/430 428/428 6/6 +f 428/428 426/426 6/6 +f 426/426 424/424 6/6 +f 424/424 422/422 6/6 +f 422/422 420/420 6/6 +f 420/420 418/418 6/6 +f 418/418 416/416 6/6 +f 416/416 414/414 6/6 +f 414/414 412/412 6/6 +f 412/412 410/410 6/6 +f 410/410 408/408 6/6 +f 408/408 406/406 6/6 +f 406/406 404/404 6/6 +f 404/404 402/402 6/6 +f 402/402 400/400 6/6 +f 400/400 398/398 6/6 +f 398/398 396/396 6/6 +f 396/396 394/394 6/6 +f 394/394 392/392 6/6 +f 392/392 390/390 6/6 +f 390/390 388/388 6/6 +f 388/388 386/386 6/6 +f 386/386 384/384 6/6 +f 384/384 382/382 6/6 +f 382/382 380/380 6/6 +f 380/380 378/378 6/6 +f 378/378 376/376 6/6 +f 376/376 374/374 6/6 +f 374/374 372/372 6/6 +f 372/372 370/370 6/6 +f 370/370 368/368 6/6 +f 368/368 366/366 6/6 +f 366/366 364/364 6/6 +f 364/364 362/362 6/6 +f 362/362 360/360 6/6 +f 360/360 358/358 6/6 +f 358/358 356/356 6/6 +f 356/356 354/354 6/6 +f 354/354 352/352 6/6 +f 352/352 350/350 6/6 +f 350/350 348/348 6/6 +f 348/348 346/346 6/6 +f 346/346 344/344 6/6 +f 344/344 342/342 6/6 +f 342/342 340/340 6/6 +f 340/340 338/338 6/6 +f 338/338 336/336 6/6 +f 336/336 334/334 6/6 +f 334/334 332/332 6/6 +f 332/332 330/330 6/6 +f 330/330 328/328 6/6 +f 328/328 326/326 6/6 +f 326/326 324/324 6/6 +f 324/324 322/322 6/6 +f 322/322 320/320 6/6 +f 320/320 318/318 6/6 +f 318/318 316/316 6/6 +f 316/316 314/314 6/6 +f 314/314 312/312 6/6 +f 312/312 310/310 6/6 +f 310/310 308/308 6/6 +f 308/308 306/306 6/6 +f 306/306 304/304 6/6 +f 304/304 302/302 6/6 +f 302/302 300/300 6/6 +f 300/300 298/298 6/6 +f 298/298 296/296 6/6 +f 296/296 294/294 6/6 +f 294/294 292/292 6/6 +f 292/292 290/290 6/6 +f 290/290 288/288 6/6 +f 288/288 286/286 6/6 +f 286/286 284/284 6/6 +f 284/284 282/282 6/6 +f 282/282 280/280 6/6 +f 280/280 278/278 6/6 +f 278/278 276/276 6/6 +f 276/276 274/274 6/6 +f 274/274 272/272 6/6 +f 272/272 270/270 6/6 +f 270/270 268/268 6/6 +f 268/268 266/266 6/6 +f 266/266 264/264 6/6 +f 264/264 262/262 6/6 +f 262/262 260/260 6/6 +f 260/260 258/258 6/6 +f 258/258 256/256 6/6 +f 256/256 254/254 6/6 +f 254/254 252/252 6/6 +f 252/252 250/250 6/6 +f 250/250 248/248 6/6 +f 248/248 246/246 6/6 +f 246/246 244/244 6/6 +f 244/244 242/242 6/6 +f 242/242 240/240 6/6 +f 240/240 238/238 6/6 +f 238/238 236/236 6/6 +f 236/236 234/234 6/6 +f 234/234 232/232 6/6 +f 232/232 230/230 6/6 +f 230/230 228/228 6/6 +f 228/228 226/226 6/6 +f 226/226 224/224 6/6 +f 224/224 222/222 6/6 +f 222/222 220/220 6/6 +f 220/220 218/218 6/6 +f 218/218 216/216 6/6 +f 216/216 214/214 6/6 +f 214/214 212/212 6/6 +f 212/212 210/210 6/6 +f 210/210 208/208 6/6 +f 208/208 206/206 6/6 +f 206/206 204/204 6/6 +f 204/204 202/202 6/6 +f 202/202 200/200 6/6 +f 200/200 198/198 6/6 +f 198/198 196/196 6/6 +f 196/196 194/194 6/6 +f 194/194 192/192 6/6 +f 192/192 190/190 6/6 +f 190/190 188/188 6/6 +f 188/188 186/186 6/6 +f 186/186 184/184 6/6 +f 184/184 182/182 6/6 +f 182/182 180/180 6/6 +f 180/180 178/178 6/6 +f 178/178 176/176 6/6 +f 176/176 174/174 6/6 +f 174/174 172/172 6/6 +f 172/172 170/170 6/6 +f 170/170 168/168 6/6 +f 168/168 166/166 6/6 +f 166/166 164/164 6/6 +f 164/164 162/162 6/6 +f 162/162 160/160 6/6 +f 160/160 158/158 6/6 +f 158/158 156/156 6/6 +f 156/156 154/154 6/6 +f 154/154 152/152 6/6 +f 152/152 150/150 6/6 +f 150/150 148/148 6/6 +f 148/148 146/146 6/6 +f 146/146 144/144 6/6 +f 144/144 142/142 6/6 +f 142/142 140/140 6/6 +f 140/140 138/138 6/6 +f 138/138 136/136 6/6 +f 136/136 134/134 6/6 +f 134/134 132/132 6/6 +f 132/132 130/130 6/6 +f 130/130 128/128 6/6 +f 128/128 126/126 6/6 +f 126/126 124/124 6/6 +f 124/124 122/122 6/6 +f 122/122 120/120 6/6 +f 120/120 118/118 6/6 +f 118/118 116/116 6/6 +f 116/116 114/114 6/6 +f 114/114 112/112 6/6 +f 112/112 110/110 6/6 +f 110/110 108/108 6/6 +f 108/108 106/106 6/6 +f 106/106 104/104 6/6 +f 104/104 102/102 6/6 +f 102/102 100/100 6/6 +f 100/100 98/98 6/6 +f 98/98 96/96 6/6 +f 96/96 94/94 6/6 +f 94/94 92/92 6/6 +f 92/92 90/90 6/6 +f 90/90 88/88 6/6 +f 88/88 86/86 6/6 +f 86/86 84/84 6/6 +f 84/84 82/82 6/6 +f 82/82 80/80 6/6 +f 80/80 78/78 6/6 +f 78/78 76/76 6/6 +f 76/76 74/74 6/6 +f 74/74 72/72 6/6 +f 72/72 70/70 6/6 +f 70/70 68/68 6/6 +f 68/68 66/66 6/6 +f 66/66 64/64 6/6 +f 64/64 62/62 6/6 +f 62/62 60/60 6/6 +f 60/60 58/58 6/6 +f 58/58 56/56 6/6 +f 56/56 54/54 6/6 +f 54/54 52/52 6/6 +f 52/52 50/50 6/6 +f 50/50 48/48 6/6 +f 48/48 46/46 6/6 +f 46/46 44/44 6/6 +f 44/44 42/42 6/6 +f 42/42 40/40 6/6 +f 40/40 38/38 6/6 +f 38/38 36/36 6/6 +f 36/36 34/34 6/6 +f 34/34 32/32 6/6 +f 32/32 30/30 6/6 +f 30/30 28/28 6/6 +f 28/28 26/26 6/6 +f 26/26 24/24 6/6 +f 24/24 22/22 6/6 +f 22/22 20/20 6/6 +f 20/20 18/18 6/6 +f 18/18 16/16 6/6 +f 16/16 14/14 6/6 +f 14/14 12/12 6/6 +f 12/12 10/10 6/6 +f 10/10 8/8 6/6 +f 512/511 2/2 1/1 +f 510/512 512/511 511/510 +f 3/3 5/5 511/510 +f 5/5 7/7 511/510 +f 7/7 9/9 511/510 +f 9/9 11/11 511/510 +f 11/11 13/13 511/510 +f 13/13 15/15 511/510 +f 15/15 17/17 511/510 +f 17/17 19/19 511/510 +f 19/19 21/21 511/510 +f 21/21 23/23 511/510 +f 23/23 25/25 511/510 +f 25/25 27/27 511/510 +f 27/27 29/29 511/510 +f 29/29 31/31 511/510 +f 31/31 33/33 511/510 +f 33/33 35/35 511/510 +f 35/35 37/37 511/510 +f 37/37 39/39 511/510 +f 39/39 41/41 511/510 +f 41/41 43/43 511/510 +f 43/43 45/45 511/510 +f 45/45 47/47 511/510 +f 47/47 49/49 511/510 +f 49/49 51/51 511/510 +f 51/51 53/53 511/510 +f 53/53 55/55 511/510 +f 55/55 57/57 511/510 +f 57/57 59/59 511/510 +f 59/59 61/61 511/510 +f 61/61 63/63 511/510 +f 63/63 65/65 511/510 +f 65/65 67/67 511/510 +f 67/67 69/69 511/510 +f 69/69 71/71 511/510 +f 71/71 73/73 511/510 +f 73/73 75/75 511/510 +f 75/75 77/77 511/510 +f 77/77 79/79 511/510 +f 79/79 81/81 511/510 +f 81/81 83/83 511/510 +f 83/83 85/85 511/510 +f 85/85 87/87 511/510 +f 87/87 89/89 511/510 +f 89/89 91/91 511/510 +f 91/91 93/93 511/510 +f 93/93 95/95 511/510 +f 95/95 97/97 511/510 +f 97/97 99/99 511/510 +f 99/99 101/101 511/510 +f 101/101 103/103 511/510 +f 103/103 105/105 511/510 +f 105/105 107/107 511/510 +f 107/107 109/109 511/510 +f 109/109 111/111 511/510 +f 111/111 113/113 511/510 +f 113/113 115/115 511/510 +f 115/115 117/117 511/510 +f 117/117 119/119 511/510 +f 119/119 121/121 511/510 +f 121/121 123/123 511/510 +f 123/123 125/125 511/510 +f 125/125 127/127 511/510 +f 127/127 129/129 511/510 +f 129/129 131/131 511/510 +f 131/131 133/133 511/510 +f 133/133 135/135 511/510 +f 135/135 137/137 511/510 +f 137/137 139/139 511/510 +f 139/139 141/141 511/510 +f 141/141 143/143 511/510 +f 143/143 145/145 511/510 +f 145/145 147/147 511/510 +f 147/147 149/149 511/510 +f 149/149 151/151 511/510 +f 151/151 153/153 511/510 +f 153/153 155/155 511/510 +f 155/155 157/157 511/510 +f 157/157 159/159 511/510 +f 159/159 161/161 511/510 +f 161/161 163/163 511/510 +f 163/163 165/165 511/510 +f 165/165 167/167 511/510 +f 167/167 169/169 511/510 +f 169/169 171/171 511/510 +f 171/171 173/173 511/510 +f 173/173 175/175 511/510 +f 175/175 177/177 511/510 +f 177/177 179/179 511/510 +f 179/179 181/181 511/510 +f 181/181 183/183 511/510 +f 183/183 185/185 511/510 +f 185/185 187/187 511/510 +f 187/187 189/189 511/510 +f 189/189 191/191 511/510 +f 191/191 193/193 511/510 +f 193/193 195/195 511/510 +f 195/195 197/197 511/510 +f 197/197 199/199 511/510 +f 199/199 201/201 511/510 +f 201/201 203/203 511/510 +f 203/203 205/205 511/510 +f 205/205 207/207 511/510 +f 207/207 209/209 511/510 +f 209/209 211/211 511/510 +f 211/211 213/213 511/510 +f 213/213 215/215 511/510 +f 215/215 217/217 511/510 +f 217/217 219/219 511/510 +f 219/219 221/221 511/510 +f 221/221 223/223 511/510 +f 223/223 225/225 511/510 +f 225/225 227/227 511/510 +f 227/227 229/229 511/510 +f 229/229 231/231 511/510 +f 231/231 233/233 511/510 +f 233/233 235/235 511/510 +f 235/235 237/237 511/510 +f 237/237 239/239 511/510 +f 239/239 241/241 511/510 +f 241/241 243/243 511/510 +f 243/243 245/245 511/510 +f 245/245 247/247 511/510 +f 247/247 249/249 511/510 +f 249/249 251/251 511/510 +f 251/251 253/253 511/510 +f 253/253 255/255 511/510 +f 255/255 257/257 511/510 +f 257/257 259/259 511/510 +f 259/259 261/261 511/510 +f 261/261 263/263 511/510 +f 263/263 265/265 511/510 +f 265/265 267/267 511/510 +f 267/267 269/269 511/510 +f 269/269 271/271 511/510 +f 271/271 273/273 511/510 +f 273/273 275/275 511/510 +f 275/275 277/277 511/510 +f 277/277 279/279 511/510 +f 279/279 281/281 511/510 +f 281/281 283/283 511/510 +f 283/283 285/285 511/510 +f 285/285 287/287 511/510 +f 287/287 289/289 511/510 +f 289/289 291/291 511/510 +f 291/291 293/293 511/510 +f 293/293 295/295 511/510 +f 295/295 297/297 511/510 +f 297/297 299/299 511/510 +f 299/299 301/301 511/510 +f 301/301 303/303 511/510 +f 303/303 305/305 511/510 +f 305/305 307/307 511/510 +f 307/307 309/309 511/510 +f 309/309 311/311 511/510 +f 311/311 313/313 511/510 +f 313/313 315/315 511/510 +f 315/315 317/317 511/510 +f 317/317 319/319 511/510 +f 319/319 321/321 511/510 +f 321/321 323/323 511/510 +f 323/323 325/325 511/510 +f 325/325 327/327 511/510 +f 327/327 329/329 511/510 +f 329/329 331/331 511/510 +f 331/331 333/333 511/510 +f 333/333 335/335 511/510 +f 335/335 337/337 511/510 +f 337/337 339/339 511/510 +f 339/339 341/341 511/510 +f 341/341 343/343 511/510 +f 343/343 345/345 511/510 +f 345/345 347/347 511/510 +f 347/347 349/349 511/510 +f 349/349 351/351 511/510 +f 351/351 353/353 511/510 +f 353/353 355/355 511/510 +f 355/355 357/357 511/510 +f 357/357 359/359 511/510 +f 359/359 361/361 511/510 +f 361/361 363/363 511/510 +f 363/363 365/365 511/510 +f 365/365 367/367 511/510 +f 367/367 369/369 511/510 +f 369/369 371/371 511/510 +f 371/371 373/373 511/510 +f 373/373 375/375 511/510 +f 375/375 377/377 511/510 +f 377/377 379/379 511/510 +f 379/379 381/381 511/510 +f 381/381 383/383 511/510 +f 383/383 385/385 511/510 +f 385/385 387/387 511/510 +f 387/387 389/389 511/510 +f 389/389 391/391 511/510 +f 391/391 393/393 511/510 +f 393/393 395/395 511/510 +f 395/395 397/397 511/510 +f 397/397 399/399 511/510 +f 399/399 401/401 511/510 +f 401/401 403/403 511/510 +f 403/403 405/405 511/510 +f 405/405 407/407 511/510 +f 407/407 409/409 511/510 +f 409/409 411/411 511/510 +f 411/411 413/413 511/510 +f 413/413 415/415 511/510 +f 415/415 417/417 511/510 +f 417/417 419/419 511/510 +f 419/419 421/421 511/510 +f 421/421 423/423 511/510 +f 423/423 425/425 511/510 +f 425/425 427/427 511/510 +f 427/427 429/429 511/510 +f 429/429 431/431 511/510 +f 431/431 433/433 511/510 +f 433/433 435/435 511/510 +f 435/435 437/437 511/510 +f 437/437 439/439 511/510 +f 439/439 441/441 511/510 +f 441/441 443/443 511/510 +f 443/443 445/445 511/510 +f 445/445 447/447 511/510 +f 447/447 449/449 511/510 +f 449/449 451/451 511/510 +f 451/451 453/453 511/510 +f 453/453 455/455 511/510 +f 455/455 457/457 511/510 +f 457/457 459/459 511/510 +f 459/459 461/461 511/510 +f 461/461 463/463 511/510 +f 463/463 465/465 511/510 +f 465/465 467/467 511/510 +f 467/467 469/469 511/510 +f 469/469 471/471 511/510 +f 471/471 473/473 511/510 +f 473/473 475/475 511/510 +f 475/475 477/477 511/510 +f 477/477 479/479 511/510 +f 479/479 481/481 511/510 +f 481/481 483/483 511/510 +f 483/483 485/485 511/510 +f 485/485 487/487 511/510 +f 487/487 489/489 511/510 +f 489/489 491/491 511/510 +f 491/491 493/493 511/510 +f 493/493 495/495 511/510 +f 495/495 497/497 511/510 +f 497/497 499/499 511/510 +f 499/499 501/501 511/510 +f 501/501 503/503 511/510 +f 503/503 505/505 511/510 +f 505/505 507/507 509/509 +f 511/510 505/505 509/509 diff --git a/data/table/table2.urdf b/data/table/table2.urdf new file mode 100644 index 000000000..b3134df15 --- /dev/null +++ b/data/table/table2.urdf @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/table/tabletop.jpg b/data/table/tabletop.jpg new file mode 100644 index 000000000..cf24dd71e Binary files /dev/null and b/data/table/tabletop.jpg differ diff --git a/data/tiles.jpg b/data/tiles.jpg new file mode 100644 index 000000000..6f013402b Binary files /dev/null and b/data/tiles.jpg differ diff --git a/examples/CommonInterfaces/CommonGUIHelperInterface.h b/examples/CommonInterfaces/CommonGUIHelperInterface.h index cbd52aa6f..d7c4f536c 100644 --- a/examples/CommonInterfaces/CommonGUIHelperInterface.h +++ b/examples/CommonInterfaces/CommonGUIHelperInterface.h @@ -99,7 +99,7 @@ struct GUIHelperInterface virtual void drawText3D( const char* txt, float posX, float posY, float posZ, float size){} virtual void drawText3D( const char* txt, float position[3], float orientation[4], float color[4], float size, int optionFlag){} - virtual int addUserDebugText3D( const char* txt, const double positionXYZ[3], const double orientation[4], const double textColorRGB[3], double size, double lifeTime, int trackingVisualShapeIndex, int optionFlags){return -1;} + virtual int addUserDebugText3D( const char* txt, const double positionXYZ[3], const double orientation[4], const double textColorRGB[3], double size, double lifeTime, int trackingVisualShapeIndex, int optionFlags, int replaceItemUid){return -1;} virtual int addUserDebugLine(const double debugLineFromXYZ[3], const double debugLineToXYZ[3], const double debugLineColorRGB[3], double lineWidth, double lifeTime , int trackingVisualShapeIndex){return -1;}; virtual int addUserDebugParameter(const char* txt, double rangeMin, double rangeMax, double startValue){return -1;}; virtual int readUserDebugParameter(int itemUniqueId, double* value) { return 0;} diff --git a/examples/ExampleBrowser/premake4.lua b/examples/ExampleBrowser/premake4.lua index 5aa3b15b5..0e77672a8 100644 --- a/examples/ExampleBrowser/premake4.lua +++ b/examples/ExampleBrowser/premake4.lua @@ -175,6 +175,11 @@ if (hasCL and findOpenGL3()) then "../OpenCL/rigidbody/GpuRigidBodyDemo.cpp", } end + +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Linux") then initX11() end diff --git a/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp b/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp index 4d5a54599..87495f8b9 100644 --- a/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp +++ b/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp @@ -8,14 +8,37 @@ #include "Bullet3Common/b3FileUtils.h" #include "stb_image/stb_image.h" #include "../ImportObjDemo/LoadMeshFromObj.h" +#include "Bullet3Common/b3HashMap.h" + + +struct CachedTextureResult +{ + std::string m_textureName; + + int m_width; + int m_height; + unsigned char* m_pixels; + CachedTextureResult() + :m_width(0), + m_height(0), + m_pixels(0) + { + } + + + +}; + +static b3HashMap gCachedTextureResults; + bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string& fileName, b3ImportMeshData& meshData) { B3_PROFILE("loadAndRegisterMeshFromFileInternal"); meshData.m_gfxShape = 0; - meshData.m_textureImage = 0; + meshData.m_textureImage1 = 0; meshData.m_textureHeight = 0; meshData.m_textureWidth = 0; - + meshData.m_isCached = false; char relativeFileName[1024]; if (b3ResourcePath::findResourcePath(fileName.c_str(), relativeFileName, 1024)) @@ -37,7 +60,7 @@ bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string& B3_PROFILE("Load Texture"); //int textureIndex = -1; //try to load some texture - for (int i = 0; meshData.m_textureImage == 0 && i < shapes.size(); i++) + for (int i = 0; meshData.m_textureImage1 == 0 && i < shapes.size(); i++) { const tinyobj::shape_t& shape = shapes[i]; if (shape.material.diffuse_texname.length() > 0) @@ -57,21 +80,51 @@ bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string& char relativeFileName2[1024]; if (b3ResourcePath::findResourcePath(relativeFileName, relativeFileName2, 1024)) { - image = stbi_load(relativeFileName, &width, &height, &n, 3); - meshData.m_textureImage = image; - if (image) + if (b3IsFileCachingEnabled()) { - meshData.m_textureWidth = width; - meshData.m_textureHeight = height; - } - else - { - b3Warning("Unsupported texture image format [%s]\n", relativeFileName); - meshData.m_textureWidth = 0; - meshData.m_textureHeight = 0; - break; + CachedTextureResult* texture = gCachedTextureResults[relativeFileName]; + if (texture) + { + image = texture->m_pixels; + width = texture->m_width; + height = texture->m_height; + meshData.m_textureWidth = width; + meshData.m_textureHeight = height; + meshData.m_textureImage1 = image; + meshData.m_isCached = true; + } } + if (image==0) + { + image = stbi_load(relativeFileName, &width, &height, &n, 3); + + meshData.m_textureImage1 = image; + + if (image) + { + meshData.m_textureWidth = width; + meshData.m_textureHeight = height; + + if (b3IsFileCachingEnabled()) + { + CachedTextureResult result; + result.m_textureName = relativeFileName; + result.m_width = width; + result.m_height = height; + result.m_pixels = image; + meshData.m_isCached = true; + gCachedTextureResults.insert(relativeFileName,result); + } + } + else + { + b3Warning("Unsupported texture image format [%s]\n", relativeFileName); + + break; + } + } + } else { diff --git a/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.h b/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.h index 7bf6af841..07017c59e 100644 --- a/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.h +++ b/examples/Importers/ImportMeshUtility/b3ImportMeshUtility.h @@ -7,7 +7,8 @@ struct b3ImportMeshData { struct GLInstanceGraphicsShape* m_gfxShape; - unsigned char* m_textureImage;//in 3 component 8-bit RGB data + unsigned char* m_textureImage1;//in 3 component 8-bit RGB data + bool m_isCached; int m_textureWidth; int m_textureHeight; }; diff --git a/examples/Importers/ImportObjDemo/ImportObjExample.cpp b/examples/Importers/ImportObjDemo/ImportObjExample.cpp index e049f5f0f..6c4ece7e2 100644 --- a/examples/Importers/ImportObjDemo/ImportObjExample.cpp +++ b/examples/Importers/ImportObjDemo/ImportObjExample.cpp @@ -65,9 +65,9 @@ int loadAndRegisterMeshFromFile2(const std::string& fileName, CommonRenderInterf { int textureIndex = -1; - if (meshData.m_textureImage) + if (meshData.m_textureImage1) { - textureIndex = renderer->registerTexture(meshData.m_textureImage,meshData.m_textureWidth,meshData.m_textureHeight); + textureIndex = renderer->registerTexture(meshData.m_textureImage1,meshData.m_textureWidth,meshData.m_textureHeight); } shapeId = renderer->registerShape(&meshData.m_gfxShape->m_vertices->at(0).xyzw[0], @@ -77,7 +77,10 @@ int loadAndRegisterMeshFromFile2(const std::string& fileName, CommonRenderInterf B3_GL_TRIANGLES, textureIndex); delete meshData.m_gfxShape; - delete meshData.m_textureImage; + if (!meshData.m_isCached) + { + delete meshData.m_textureImage1; + } } return shapeId; } diff --git a/examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp b/examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp index 6deb798f9..ecf175ca8 100644 --- a/examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp +++ b/examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp @@ -878,12 +878,13 @@ void BulletURDFImporter::convertURDFToVisualShapeInternal(const UrdfVisual* visu if (b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(visual->m_geometry.m_meshFileName, meshData)) { - if (meshData.m_textureImage) + if (meshData.m_textureImage1) { BulletURDFTexture texData; texData.m_width = meshData.m_textureWidth; texData.m_height = meshData.m_textureHeight; - texData.textureData = meshData.m_textureImage; + texData.textureData1 = meshData.m_textureImage1; + texData.m_isCached = meshData.m_isCached; texturesOut.push_back(texData); } glmesh = meshData.m_gfxShape; @@ -1137,7 +1138,7 @@ int BulletURDFImporter::convertLinkVisualShapes(int linkIndex, const char* pathP if (textures.size()) { - textureIndex = m_data->m_guiHelper->registerTexture(textures[0].textureData,textures[0].m_width,textures[0].m_height); + textureIndex = m_data->m_guiHelper->registerTexture(textures[0].textureData1,textures[0].m_width,textures[0].m_height); } { B3_PROFILE("registerGraphicsShape"); @@ -1151,7 +1152,10 @@ int BulletURDFImporter::convertLinkVisualShapes(int linkIndex, const char* pathP for (int i=0;igetRenderInterface()->registerTexture(meshData.m_textureImage,meshData.m_textureWidth,meshData.m_textureHeight); + textureIndex = m_guiHelper->getRenderInterface()->registerTexture(meshData.m_textureImage1,meshData.m_textureWidth,meshData.m_textureHeight); } shapeId = m_guiHelper->getRenderInterface()->registerShape(&meshData.m_gfxShape->m_vertices->at(0).xyzw[0], @@ -205,7 +205,7 @@ TinyRendererSetup::TinyRendererSetup(struct GUIHelperInterface* gui) ob->registerMeshShape(&meshData.m_gfxShape->m_vertices->at(0).xyzw[0], meshData.m_gfxShape->m_numvertices, indices, - meshData.m_gfxShape->m_numIndices,color, meshData.m_textureImage,meshData.m_textureWidth,meshData.m_textureHeight); + meshData.m_gfxShape->m_numIndices,color, meshData.m_textureImage1,meshData.m_textureWidth,meshData.m_textureHeight); ob->m_localScaling.setValue(scaling[0],scaling[1],scaling[2]); @@ -214,7 +214,10 @@ TinyRendererSetup::TinyRendererSetup(struct GUIHelperInterface* gui) delete meshData.m_gfxShape; - delete meshData.m_textureImage; + if (!meshData.m_isCached) + { + delete meshData.m_textureImage1; + } } } } diff --git a/examples/RenderingExamples/TinyVRGui.cpp b/examples/RenderingExamples/TinyVRGui.cpp index 8a6851895..368606bf0 100644 --- a/examples/RenderingExamples/TinyVRGui.cpp +++ b/examples/RenderingExamples/TinyVRGui.cpp @@ -168,7 +168,10 @@ bool TinyVRGui::init() delete meshData.m_gfxShape; - delete meshData.m_textureImage; + if (!meshData.m_isCached) + { + free(meshData.m_textureImage1); + } } diff --git a/examples/RobotSimulator/premake4.lua b/examples/RobotSimulator/premake4.lua index 368fefd1f..27a1a4e56 100644 --- a/examples/RobotSimulator/premake4.lua +++ b/examples/RobotSimulator/premake4.lua @@ -197,6 +197,11 @@ if not _OPTIONS["no-enet"] then "MinitaurSetup.h", myfiles } + +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Linux") then initX11() end @@ -280,6 +285,11 @@ project ("App_VRGloveHandSimulator") "b3RobotSimulatorClientAPI.h", myfiles } + +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Linux") then initX11() end diff --git a/examples/SharedMemory/PhysicsClientC_API.cpp b/examples/SharedMemory/PhysicsClientC_API.cpp index 90fcbea5f..7b685974f 100644 --- a/examples/SharedMemory/PhysicsClientC_API.cpp +++ b/examples/SharedMemory/PhysicsClientC_API.cpp @@ -2632,6 +2632,18 @@ B3_SHARED_API void b3UserDebugTextSetOrientation(b3SharedMemoryCommandHandle com } +B3_SHARED_API void b3UserDebugItemSetReplaceItemUniqueId(b3SharedMemoryCommandHandle commandHandle, int replaceItemUniqueId) +{ + struct SharedMemoryCommand* command = (struct SharedMemoryCommand*) commandHandle; + b3Assert(command); + b3Assert(command->m_type == CMD_USER_DEBUG_DRAW); + b3Assert(command->m_updateFlags & USER_DEBUG_HAS_TEXT); + command->m_userDebugDrawArgs.m_replaceItemUniqueId = replaceItemUniqueId; + command->m_updateFlags |= USER_DEBUG_HAS_REPLACE_ITEM_UNIQUE_ID; +} + + + B3_SHARED_API void b3UserDebugItemSetParentObject(b3SharedMemoryCommandHandle commandHandle, int objectUniqueId, int linkIndex) { diff --git a/examples/SharedMemory/PhysicsClientC_API.h b/examples/SharedMemory/PhysicsClientC_API.h index 942e07440..f3bef30e5 100644 --- a/examples/SharedMemory/PhysicsClientC_API.h +++ b/examples/SharedMemory/PhysicsClientC_API.h @@ -175,6 +175,8 @@ B3_SHARED_API b3SharedMemoryCommandHandle b3InitUserDebugDrawAddLine3D(b3Physics B3_SHARED_API b3SharedMemoryCommandHandle b3InitUserDebugDrawAddText3D(b3PhysicsClientHandle physClient, const char* txt, double positionXYZ[/*3*/], double colorRGB[/*3*/], double textSize, double lifeTime); B3_SHARED_API void b3UserDebugTextSetOptionFlags(b3SharedMemoryCommandHandle commandHandle, int optionFlags); B3_SHARED_API void b3UserDebugTextSetOrientation(b3SharedMemoryCommandHandle commandHandle, double orientation[/*4*/]); +B3_SHARED_API void b3UserDebugItemSetReplaceItemUniqueId(b3SharedMemoryCommandHandle commandHandle, int replaceItem); + B3_SHARED_API void b3UserDebugItemSetParentObject(b3SharedMemoryCommandHandle commandHandle, int objectUniqueId, int linkIndex); diff --git a/examples/SharedMemory/PhysicsClientSharedMemory.cpp b/examples/SharedMemory/PhysicsClientSharedMemory.cpp index 77182213f..771d1ba40 100644 --- a/examples/SharedMemory/PhysicsClientSharedMemory.cpp +++ b/examples/SharedMemory/PhysicsClientSharedMemory.cpp @@ -78,7 +78,7 @@ struct PhysicsClientSharedMemoryInternalData { m_hasLastServerStatus(false), m_sharedMemoryKey(SHARED_MEMORY_KEY), m_verboseOutput(false), - m_timeOutInSeconds(30) + m_timeOutInSeconds(1e30) {} void processServerStatus(); diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index 6341d42f9..f0de991dc 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -1,5 +1,4 @@ #include "PhysicsServerCommandProcessor.h" - #include "../CommonInterfaces/CommonRenderInterface.h" #include "../Importers/ImportURDFDemo/BulletUrdfImporter.h" @@ -4483,7 +4482,7 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm if (textures.size()) { - textureIndex = m_data->m_guiHelper->registerTexture(textures[0].textureData,textures[0].m_width,textures[0].m_height); + textureIndex = m_data->m_guiHelper->registerTexture(textures[0].textureData1,textures[0].m_width,textures[0].m_height); } int graphicsIndex = -1; { @@ -8223,27 +8222,35 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm if (clientCmd.m_userDebugDrawArgs.m_parentObjectUniqueId>=0) { InternalBodyHandle* bodyHandle = m_data->m_bodyHandles.getHandle(clientCmd.m_userDebugDrawArgs.m_parentObjectUniqueId); - if (bodyHandle && bodyHandle->m_multiBody) + if (bodyHandle) { - int linkIndex = clientCmd.m_userDebugDrawArgs.m_parentLinkIndex; - if (linkIndex ==-1) + int linkIndex = -1; + + if (bodyHandle->m_multiBody) { - if (bodyHandle->m_multiBody->getBaseCollider()) + int linkIndex = clientCmd.m_userDebugDrawArgs.m_parentLinkIndex; + if (linkIndex ==-1) { - trackingVisualShapeIndex = bodyHandle->m_multiBody->getBaseCollider()->getUserIndex(); - } - } else - { - if (linkIndex >=0 && linkIndex < bodyHandle->m_multiBody->getNumLinks()) - { - if (bodyHandle->m_multiBody->getLink(linkIndex).m_collider) + if (bodyHandle->m_multiBody->getBaseCollider()) { - trackingVisualShapeIndex = bodyHandle->m_multiBody->getLink(linkIndex).m_collider->getUserIndex(); + trackingVisualShapeIndex = bodyHandle->m_multiBody->getBaseCollider()->getUserIndex(); } + } else + { + if (linkIndex >=0 && linkIndex < bodyHandle->m_multiBody->getNumLinks()) + { + if (bodyHandle->m_multiBody->getLink(linkIndex).m_collider) + { + trackingVisualShapeIndex = bodyHandle->m_multiBody->getLink(linkIndex).m_collider->getUserIndex(); + } + } + } - } - + if (bodyHandle->m_rigidBody) + { + trackingVisualShapeIndex = bodyHandle->m_rigidBody->getUserIndex(); + } } } @@ -8329,7 +8336,11 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm } - + int replaceItemUniqueId = -1; + if ((clientCmd.m_updateFlags & USER_DEBUG_HAS_REPLACE_ITEM_UNIQUE_ID)!=0) + { + replaceItemUniqueId = clientCmd.m_userDebugDrawArgs.m_replaceItemUniqueId; + } int uid = m_data->m_guiHelper->addUserDebugText3D(clientCmd.m_userDebugDrawArgs.m_text, @@ -8339,7 +8350,8 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm clientCmd.m_userDebugDrawArgs.m_textSize, clientCmd.m_userDebugDrawArgs.m_lifeTime, trackingVisualShapeIndex, - optionFlags); + optionFlags, + replaceItemUniqueId); if (uid>=0) { diff --git a/examples/SharedMemory/PhysicsServerExample.cpp b/examples/SharedMemory/PhysicsServerExample.cpp index 342f32574..39766cc48 100644 --- a/examples/SharedMemory/PhysicsServerExample.cpp +++ b/examples/SharedMemory/PhysicsServerExample.cpp @@ -13,13 +13,14 @@ #include "../Utils/b3Clock.h" #include "../MultiThreading/b3ThreadSupportInterface.h" #include "SharedMemoryPublic.h" +//#define BT_ENABLE_VR #ifdef BT_ENABLE_VR #include "../RenderingExamples/TinyVRGui.h" #endif//BT_ENABLE_VR #include "../CommonInterfaces/CommonParameterInterface.h" - +#include "../Importers/ImportURDFDemo/urdfStringSplit.h" //@todo(erwincoumans) those globals are hacks for a VR demo, move this to Python/pybullet! bool gEnablePicking=true; @@ -36,9 +37,7 @@ static bool gEnableDefaultKeyboardShortcuts = true; static bool gEnableDefaultMousePicking = true; -//extern btVector3 gLastPickPos; -btVector3 gVRTeleportPosLocal(0,0,0); -btQuaternion gVRTeleportOrnLocal(0,0,0,1); + btScalar gVRTeleportRotZ = 0; @@ -1132,10 +1131,17 @@ public: UserDebugText m_tmpText; int m_resultUserDebugTextUid; - virtual int addUserDebugText3D( const char* txt, const double positionXYZ[3], const double orientation[4], const double textColorRGB[3], double size, double lifeTime, int trackingVisualShapeIndex, int optionFlags) + + virtual int addUserDebugText3D( const char* txt, const double positionXYZ[3], const double orientation[4], const double textColorRGB[3], double size, double lifeTime, int trackingVisualShapeIndex, int optionFlags, int replaceItemUid) { - m_tmpText.m_itemUniqueId = m_uidGenerator++; + if (replaceItemUid>=0) + { + m_tmpText.m_itemUniqueId = replaceItemUid; + } else + { + m_tmpText.m_itemUniqueId = m_uidGenerator++; + } m_tmpText.m_lifeTime = lifeTime; m_tmpText.textSize = size; //int len = strlen(txt); @@ -2171,10 +2177,26 @@ void PhysicsServerExample::updateGraphics() case eGUIUserDebugAddText: { B3_PROFILE("eGUIUserDebugAddText"); + + bool replaced = false; - m_multiThreadedHelper->m_userDebugText.push_back(m_multiThreadedHelper->m_tmpText); - m_multiThreadedHelper->m_resultUserDebugTextUid = m_multiThreadedHelper->m_userDebugText[m_multiThreadedHelper->m_userDebugText.size()-1].m_itemUniqueId; + for (int i=0;im_userDebugText.size();i++) + { + if (m_multiThreadedHelper->m_userDebugText[i].m_itemUniqueId == m_multiThreadedHelper->m_tmpText.m_itemUniqueId) + { + m_multiThreadedHelper->m_userDebugText[i] = m_multiThreadedHelper->m_tmpText; + m_multiThreadedHelper->m_resultUserDebugTextUid = m_multiThreadedHelper->m_tmpText.m_itemUniqueId; + replaced = true; + } + } + + if (!replaced) + { + m_multiThreadedHelper->m_userDebugText.push_back(m_multiThreadedHelper->m_tmpText); + m_multiThreadedHelper->m_resultUserDebugTextUid = m_multiThreadedHelper->m_userDebugText[m_multiThreadedHelper->m_userDebugText.size()-1].m_itemUniqueId; + } m_multiThreadedHelper->mainThreadRelease(); + break; } case eGUIUserDebugAddParameter: @@ -2503,10 +2525,35 @@ void PhysicsServerExample::drawUserDebugLines() } + { + btAlignedObjectArray pieces; + btAlignedObjectArray separators; + separators.push_back("\n"); + urdfStringSplit(pieces,m_multiThreadedHelper->m_userDebugText[i].m_text,separators); + + double sz = m_multiThreadedHelper->m_userDebugText[i].textSize; + + btTransform tr; + tr.setIdentity(); + tr.setOrigin(btVector3(pos[0],pos[1],pos[2])); + tr.setRotation(btQuaternion(orientation[0],orientation[1],orientation[2],orientation[3])); - m_guiHelper->getAppInterface()->drawText3D(m_multiThreadedHelper->m_userDebugText[i].m_text, - pos,orientation,colorRGBA, - m_multiThreadedHelper->m_userDebugText[i].textSize,optionFlag); + //float newpos[3]={pos[0]-float(t)*sz,pos[1],pos[2]}; + + for (int t=0;tgetAppInterface()->drawText3D(pieces[t].c_str(), + newpos,orientation,colorRGBA, + sz,optionFlag); + + } + } /*m_guiHelper->getAppInterface()->drawText3D(m_multiThreadedHelper->m_userDebugText[i].m_text, diff --git a/examples/SharedMemory/SharedMemoryCommands.h b/examples/SharedMemory/SharedMemoryCommands.h index 15449d2f0..33aac5e47 100644 --- a/examples/SharedMemory/SharedMemoryCommands.h +++ b/examples/SharedMemory/SharedMemoryCommands.h @@ -691,7 +691,7 @@ enum EnumUserDebugDrawFlags USER_DEBUG_HAS_OPTION_FLAGS=256, USER_DEBUG_HAS_TEXT_ORIENTATION = 512, USER_DEBUG_HAS_PARENT_OBJECT=1024, - + USER_DEBUG_HAS_REPLACE_ITEM_UNIQUE_ID=2048, }; struct UserDebugDrawArgs @@ -712,7 +712,7 @@ struct UserDebugDrawArgs double m_textColorRGB[3]; double m_textSize; int m_optionFlags; - + int m_replaceItemUniqueId; double m_rangeMin; double m_rangeMax; diff --git a/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp b/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp index b72f9ce82..e9ca947c7 100644 --- a/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp +++ b/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp @@ -38,9 +38,10 @@ subject to the following restrictions: struct MyTexture2 { - unsigned char* textureData; + unsigned char* textureData1; int m_width; int m_height; + bool m_isCached; }; struct TinyRendererObjectArray @@ -308,12 +309,13 @@ void convertURDFToVisualShape(const UrdfShape* visual, const char* urdfPathPrefi if (b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(visual->m_geometry.m_meshFileName, meshData)) { - if (meshData.m_textureImage) + if (meshData.m_textureImage1) { MyTexture2 texData; texData.m_width = meshData.m_textureWidth; texData.m_height = meshData.m_textureHeight; - texData.textureData = meshData.m_textureImage; + texData.textureData1 = meshData.m_textureImage1; + texData.m_isCached = meshData.m_isCached; texturesOut.push_back(texData); } glmesh = meshData.m_gfxShape; @@ -628,27 +630,32 @@ void TinyRendererVisualShapeConverter::convertVisualShapes( if (vertices.size() && indices.size()) { TinyRenderObjectData* tinyObj = new TinyRenderObjectData(m_data->m_rgbColorBuffer,m_data->m_depthBuffer, &m_data->m_shadowBuffer, &m_data->m_segmentationMaskBuffer, bodyUniqueId); - unsigned char* textureImage=0; + unsigned char* textureImage1=0; int textureWidth=0; int textureHeight=0; + bool isCached = false; if (textures.size()) { - textureImage = textures[0].textureData; + textureImage1 = textures[0].textureData1; textureWidth = textures[0].m_width; textureHeight = textures[0].m_height; + isCached = textures[0].m_isCached; } { B3_PROFILE("registerMeshShape"); tinyObj->registerMeshShape(&vertices[0].xyzw[0], vertices.size(), &indices[0], indices.size(), rgbaColor, - textureImage, textureWidth, textureHeight); + textureImage1, textureWidth, textureHeight); } visuals->m_renderObjects.push_back(tinyObj); } for (int i=0;im_textures.size();i++) { - free(m_data->m_textures[i].textureData); + if (!m_data->m_textures[i].m_isCached) + { + free(m_data->m_textures[i].textureData1); + } } m_data->m_textures.clear(); m_data->m_swRenderInstances.clear(); @@ -1117,7 +1127,7 @@ void TinyRendererVisualShapeConverter::activateShapeTexture(int objectUniqueId, TinyRenderObjectData* renderObj = visualArray->m_renderObjects[v]; if ((shapeIndex < 0) || (shapeIndex == v)) { - renderObj->m_model->setDiffuseTextureFromData(m_data->m_textures[textureUniqueId].textureData, m_data->m_textures[textureUniqueId].m_width, m_data->m_textures[textureUniqueId].m_height); + renderObj->m_model->setDiffuseTextureFromData(m_data->m_textures[textureUniqueId].textureData1, m_data->m_textures[textureUniqueId].m_width, m_data->m_textures[textureUniqueId].m_height); } } } @@ -1131,7 +1141,7 @@ int TinyRendererVisualShapeConverter::registerTexture(unsigned char* texels, int MyTexture2 texData; texData.m_width = width; texData.m_height = height; - texData.textureData = texels; + texData.textureData1 = texels; m_data->m_textures.push_back(texData); return m_data->m_textures.size()-1; } diff --git a/examples/SharedMemory/premake4.lua b/examples/SharedMemory/premake4.lua index f7c004b1e..add34d2fc 100644 --- a/examples/SharedMemory/premake4.lua +++ b/examples/SharedMemory/premake4.lua @@ -104,11 +104,16 @@ myfiles = } + files { myfiles, "main.cpp", } +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + files { "../MultiThreading/b3ThreadSupportInterface.cpp", @@ -202,6 +207,10 @@ files { "../ExampleBrowser/GL_ShapeDrawer.cpp", "../ExampleBrowser/CollisionShape2TriangleMesh.cpp", } +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Linux") then initX11() end @@ -353,6 +362,10 @@ if os.is("Windows") then "../ThirdPartyLibs/openvr/samples/shared/pathtools.h", "../ThirdPartyLibs/openvr/samples/shared/Vectors.h", } +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Windows") then configuration {"x32"} libdirs {"../ThirdPartyLibs/openvr/lib/win32"} diff --git a/examples/SimpleOpenGL3/main.cpp b/examples/SimpleOpenGL3/main.cpp index 0422c96cc..295c43521 100644 --- a/examples/SimpleOpenGL3/main.cpp +++ b/examples/SimpleOpenGL3/main.cpp @@ -1,14 +1,27 @@ +//#define USE_OPENGL2 +#ifdef USE_OPENGL2 +#include "OpenGLWindow/SimpleOpenGL2App.h" +typedef SimpleOpenGL2App SimpleOpenGLApp ; + +#else #include "OpenGLWindow/SimpleOpenGL3App.h" +typedef SimpleOpenGL3App SimpleOpenGLApp ; + +#endif //USE_OPENGL2 + + + + #include "Bullet3Common/b3Quaternion.h" #include "Bullet3Common/b3CommandLineArgs.h" #include "assert.h" #include -char* gVideoFileName = 0; -char* gPngFileName = 0; +static char* gVideoFileName = 0; +static char* gPngFileName = 0; static b3WheelCallback sOldWheelCB = 0; static b3ResizeCallback sOldResizeCB = 0; @@ -17,15 +30,15 @@ static b3MouseButtonCallback sOldMouseButtonCB = 0; static b3KeyboardCallback sOldKeyboardCB = 0; //static b3RenderCallback sOldRenderCB = 0; -float gWidth = 1024; -float gHeight = 768; +static float gWidth = 1024; +static float gHeight = 768; -void MyWheelCallback(float deltax, float deltay) +void MyWheelCallback2(float deltax, float deltay) { if (sOldWheelCB) sOldWheelCB(deltax,deltay); } -void MyResizeCallback( float width, float height) +void MyResizeCallback2( float width, float height) { gWidth = width; gHeight = height; @@ -33,21 +46,21 @@ void MyResizeCallback( float width, float height) if (sOldResizeCB) sOldResizeCB(width,height); } -void MyMouseMoveCallback( float x, float y) +void MyMouseMoveCallback2( float x, float y) { printf("Mouse Move: %f, %f\n", x,y); if (sOldMouseMoveCB) sOldMouseMoveCB(x,y); } -void MyMouseButtonCallback(int button, int state, float x, float y) +void MyMouseButtonCallback2(int button, int state, float x, float y) { if (sOldMouseButtonCB) sOldMouseButtonCB(button,state,x,y); } -void MyKeyboardCallback(int keycode, int state) +static void MyKeyboardCallback2(int keycode, int state) { //keycodes are in examples/CommonInterfaces/CommonWindowInterface.h //for example B3G_ESCAPE for escape key @@ -65,21 +78,21 @@ int main(int argc, char* argv[]) b3CommandLineArgs myArgs(argc, argv); - SimpleOpenGL3App* app = new SimpleOpenGL3App("SimpleOpenGL3App", gWidth, gHeight, true); + SimpleOpenGLApp* app = new SimpleOpenGLApp("SimpleOpenGL3App", gWidth, gHeight); - app->m_instancingRenderer->getActiveCamera()->setCameraDistance(13); - app->m_instancingRenderer->getActiveCamera()->setCameraPitch(0); - app->m_instancingRenderer->getActiveCamera()->setCameraTargetPosition(0, 0, 0); + app->m_renderer->getActiveCamera()->setCameraDistance(13); + app->m_renderer->getActiveCamera()->setCameraPitch(0); + app->m_renderer->getActiveCamera()->setCameraTargetPosition(0, 0, 0); sOldKeyboardCB = app->m_window->getKeyboardCallback(); - app->m_window->setKeyboardCallback(MyKeyboardCallback); + app->m_window->setKeyboardCallback(MyKeyboardCallback2); sOldMouseMoveCB = app->m_window->getMouseMoveCallback(); - app->m_window->setMouseMoveCallback(MyMouseMoveCallback); + app->m_window->setMouseMoveCallback(MyMouseMoveCallback2); sOldMouseButtonCB = app->m_window->getMouseButtonCallback(); - app->m_window->setMouseButtonCallback(MyMouseButtonCallback); + app->m_window->setMouseButtonCallback(MyMouseButtonCallback2); sOldWheelCB = app->m_window->getWheelCallback(); - app->m_window->setWheelCallback(MyWheelCallback); + app->m_window->setWheelCallback(MyWheelCallback2); sOldResizeCB = app->m_window->getResizeCallback(); - app->m_window->setResizeCallback(MyResizeCallback); + app->m_window->setResizeCallback(MyResizeCallback2); myArgs.GetCmdLineArgument("mp4_file", gVideoFileName); @@ -134,10 +147,12 @@ int main(int argc, char* argv[]) app->m_primRenderer->drawTexturedRect(100, 200, gWidth / 2 - 50, gHeight / 2 - 50, color, 0, 0, 1, 1, true); - app->m_instancingRenderer->init(); - app->m_instancingRenderer->updateCamera(); + app->m_renderer->init(); + int upAxis = 1; + app->m_renderer->updateCamera(upAxis); app->m_renderer->renderScene(); + app->drawGrid(); char bla[1024]; sprintf(bla, "2d text:%d", frameCount); diff --git a/examples/SimpleOpenGL3/main_imgui.cpp b/examples/SimpleOpenGL3/main_imgui.cpp index 998412c1a..1bd07f7d1 100644 --- a/examples/SimpleOpenGL3/main_imgui.cpp +++ b/examples/SimpleOpenGL3/main_imgui.cpp @@ -73,6 +73,7 @@ void ImGui_ImplBullet_CreateDeviceObjects() void ImGui_ImplBullet_RenderDrawLists(ImDrawData* draw_data) { + glEnable(GL_COLOR_MATERIAL); // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) ImGuiIO& io = ImGui::GetIO(); int fb_width = (int)(io.DisplaySize.x * io.DisplayFramebufferScale.x); @@ -96,7 +97,7 @@ void ImGui_ImplBullet_RenderDrawLists(ImDrawData* draw_data) glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glEnable(GL_TEXTURE_2D); - //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context + glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context // Setup viewport, orthographic projection matrix glViewport(0, 0, (GLsizei)fb_width, (GLsizei)fb_height); diff --git a/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py b/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py new file mode 100644 index 000000000..343115448 --- /dev/null +++ b/examples/pybullet/examples/vr_kitchen_setup_vrSyncPython.py @@ -0,0 +1,230 @@ +import pybullet as p +import time +#p.connect(p.UDP,"192.168.86.100") + + +cid = p.connect(p.SHARED_MEMORY) +if (cid<0): + p.connect(p.GUI) +p.resetSimulation() + + + + +meshScale = [.1,.1,.01] +shift = [0,0,0] + +visualShapeId = p.createVisualShape(shapeType=p.GEOM_MESH,fileName="marble_cube.obj", rgbaColor=[1,1,1,1], specularColor=[1,1,1], visualFramePosition=shift, meshScale=meshScale) +#collisionShapeId = p.createCollisionShape(shapeType=p.GEOM_MESH, fileName="textures/marble_cube.obj", collisionFramePosition=shift,meshScale=meshScale) +collisionShapeId = -1 +uiCube = p.createMultiBody(baseMass=0,baseInertialFramePosition=[0,0,0],baseCollisionShapeIndex=collisionShapeId, baseVisualShapeIndex = visualShapeId, basePosition = [0,1,0], useMaximalCoordinates=True) + +textOrn = p.getQuaternionFromEuler([0,0,-1.5707963]) +numLines = 1 +lines = [-1]*numLines + +p.stepSimulation() +#disable rendering during loading makes it much faster +p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 0) +#objects = [p.loadURDF("plane.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] +kitchenObj = p.loadSDF("kitchens/1.sdf") +#objects = [p.loadURDF("samurai.urdf", 0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] +objects = [p.loadURDF("pr2_gripper.urdf", 0.500000,0.300006,0.700000,-0.000000,-0.000000,-0.000031,1.000000)] +pr2_gripper = objects[0] +print ("pr2_gripper=") +print (pr2_gripper) + +jointPositions=[ 0.550569, 0.000000, 0.549657, 0.000000 ] +for jointIndex in range (p.getNumJoints(pr2_gripper)): + p.resetJointState(pr2_gripper,jointIndex,jointPositions[jointIndex]) + p.setJointMotorControl2(pr2_gripper,jointIndex,p.POSITION_CONTROL,targetPosition=0,force=0) + +pr2_cid = p.createConstraint(pr2_gripper,-1,-1,-1,p.JOINT_FIXED,[0,0,0],[0.2,0,0],[0.500000,0.300006,0.700000]) +print ("pr2_cid") +print (pr2_cid) + +pr2_cid2 = p.createConstraint(pr2_gripper,0,pr2_gripper,2,jointType=p.JOINT_GEAR,jointAxis =[0,1,0],parentFramePosition=[0,0,0],childFramePosition=[0,0,0]) +p.changeConstraint(pr2_cid2,gearRatio=1, erp=0.5, relativePositionTarget=0.5, maxForce=3) + + + +objects = [p.loadURDF("kuka_iiwa/model_vr_limits.urdf", 1.400000,-0.200000,0.600000,0.000000,0.000000,0.000000,1.000000)] +kuka = objects[0] +jointPositions=[ -0.000000, -0.000000, 0.000000, 1.570793, 0.000000, -1.036725, 0.000001 ] +for jointIndex in range (p.getNumJoints(kuka)): + p.resetJointState(kuka,jointIndex,jointPositions[jointIndex]) + p.setJointMotorControl2(kuka,jointIndex,p.POSITION_CONTROL,jointPositions[jointIndex],0) + +objects = [p.loadURDF("lego/lego.urdf", 1.000000,-0.200000,0.700000,0.000000,0.000000,0.000000,1.000000)] +objects = [p.loadURDF("lego/lego.urdf", 1.000000,-0.200000,0.800000,0.000000,0.000000,0.000000,1.000000)] +objects = [p.loadURDF("lego/lego.urdf", 1.000000,-0.200000,0.900000,0.000000,0.000000,0.000000,1.000000)] +objects = p.loadSDF("gripper/wsg50_one_motor_gripper_new_free_base.sdf") +kuka_gripper = objects[0] +print ("kuka gripper=") +print(kuka_gripper) + +p.resetBasePositionAndOrientation(kuka_gripper,[0.923103,-0.200000,1.250036],[-0.000000,0.964531,-0.000002,-0.263970]) +jointPositions=[ 0.000000, -0.011130, -0.206421, 0.205143, -0.009999, 0.000000, -0.010055, 0.000000 ] +for jointIndex in range (p.getNumJoints(kuka_gripper)): + p.resetJointState(kuka_gripper,jointIndex,jointPositions[jointIndex]) + p.setJointMotorControl2(kuka_gripper,jointIndex,p.POSITION_CONTROL,jointPositions[jointIndex],0) + + +kuka_cid = p.createConstraint(kuka, 6, kuka_gripper,0,p.JOINT_FIXED, [0,0,0], [0,0,0.05],[0,0,0]) + +objects = [p.loadURDF("table/table.urdf", 1.000000,-0.200000,0.000000,0.000000,0.000000,0.707107,0.707107)] +#objects = [p.loadURDF("textures/table2.urdf", 1.000000,-0.200000,0.000000,0.000000,0.000000,0.707107,0.707107)] + + + +objects = [p.loadURDF("jenga/jenga.urdf", 1.300000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] +objects = [p.loadURDF("jenga/jenga.urdf", 1.200000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] +objects = [p.loadURDF("jenga/jenga.urdf", 1.100000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] +objects = [p.loadURDF("jenga/jenga.urdf", 1.000000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] +objects = [p.loadURDF("jenga/jenga.urdf", 0.900000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] +objects = [p.loadURDF("jenga/jenga.urdf", 0.800000,-0.700000,0.750000,0.000000,0.707107,0.000000,0.707107)] + +#objects = [p.loadURDF("teddy_vhacd.urdf", 1.050000,-0.500000,0.700000,0.000000,0.000000,0.707107,0.707107)] +objects = [p.loadURDF("cube_small.urdf", 0.950000,-0.100000,0.700000,0.000000,0.000000,0.707107,0.707107)] +objects = [p.loadURDF("sphere_small.urdf", 0.850000,-0.400000,0.700000,0.000000,0.000000,0.707107,0.707107)] +objects = [p.loadURDF("duck_vhacd.urdf", 0.850000,-0.400000,0.900000,0.000000,0.000000,0.707107,0.707107)] +#bjects = p.loadSDF("kiva_shelf/model.sdf") +#ob = objects[0] +#p.resetBasePositionAndOrientation(ob,[0.000000,1.000000,1.204500],[0.000000,0.000000,0.000000,1.000000]) +#objects = [p.loadURDF("teddy_vhacd.urdf", -0.100000,0.600000,0.850000,0.000000,0.000000,0.000000,1.000000)] +#objects = [p.loadURDF("sphere_small.urdf", -0.100000,0.955006,1.169706,0.633232,-0.000000,-0.000000,0.773962)] +#objects = [p.loadURDF("cube_small.urdf", 0.300000,0.600000,0.850000,0.000000,0.000000,0.000000,1.000000)] +#objects = [p.loadURDF("table_square/table_square.urdf", -1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000)] +#ob = objects[0] +#jointPositions=[ 0.000000 ] +#for jointIndex in range (p.getNumJoints(ob)): +# p.resetJointState(ob,jointIndex,jointPositions[jointIndex]) + +#objects = [p.loadURDF("husky/husky.urdf", 2.000000,-5.000000,1.000000,0.000000,0.000000,0.000000,1.000000)] +#ob = objects[0] +#jointPositions=[ 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 ] +#for jointIndex in range (p.getNumJoints(ob)): +# p.resetJointState(ob,jointIndex,jointPositions[jointIndex]) + +p.configureDebugVisualizer(p.COV_ENABLE_RENDERING, 1) + + +p.setGravity(0,0,-10) + +##show this for 10 seconds +#now = time.time() +#while (time.time() < now+10): +# p.stepSimulation() +p.setRealTimeSimulation(1) + +CONTROLLER_ID = 0 +POSITION=1 +ORIENTATION=2 +ANALOG=3 +BUTTONS=6 + +uiControllerId = -1 + +print("waiting for VR UI controller trigger") +while (uiControllerId<0): + events = p.getVREvents() + for e in (events): + if (e[BUTTONS][33]==p.VR_BUTTON_IS_DOWN): + uiControllerId = e[CONTROLLER_ID] + if (e[BUTTONS][32]==p.VR_BUTTON_IS_DOWN): + uiControllerId = e[CONTROLLER_ID] + +print("Using uiControllerId="+str(uiControllerId)) + + + +controllerId = -1 + +print("waiting for VR picking controller trigger") +while (controllerId<0): + events = p.getVREvents() + for e in (events): + if (e[BUTTONS][33]==p.VR_BUTTON_IS_DOWN): + controllerId = e[CONTROLLER_ID] + if (e[BUTTONS][32]==p.VR_BUTTON_IS_DOWN): + controllerId = e[CONTROLLER_ID] + if (controllerId == uiControllerId): + controllerId = -1 + +print("Using controllerId="+str(controllerId)) + +once = 1 + +if (once): + logId = -1#p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "userDebugItems1.json") + print("logId userdebug") + print(logId) + + for i in range (numLines): + spacing = 0.01 + textPos = [.1-(i+1)*spacing,.1,0.011] + text = "ABCDEFGH\nIJKLMNOPQRSTUVWXYZ\n01234567890abcdefg\n"*10 + lines[i] = p.addUserDebugText(text,textColorRGB=[0,0,0], textSize = 0.01, textPosition = textPos,textOrientation = textOrn,parentObjectUniqueId=uiCube, parentLinkIndex = -1) + + if (once): + once = 0 + if (logId and logId>0): + p.stopStateLogging(logId) + +frameNr = 0 +objectInfo = "" +pointRay = -1 +rayLen = 100 +while (1): + + frameNr=frameNr+1 + + + for i in range (numLines): + spacing = 0.01 + textPos = [.1-(i+1)*spacing,.1,0.011] + text = "Frame:"+str(frameNr)+"\nObject UID:"+objectInfo + textUid = p.addUserDebugText(text,textColorRGB=[0,0,0], textSize = 0.02, textPosition = textPos,textOrientation = textOrn,parentObjectUniqueId=uiCube, parentLinkIndex = -1, replaceItemUniqueId = lines[i]) + lines[i] = textUid + + + #keep the gripper centered/symmetric + b = p.getJointState(pr2_gripper,2)[0] + p.setJointMotorControl2(pr2_gripper, 0, p.POSITION_CONTROL, targetPosition=b, force=3) + + events = p.getVREvents() + for e in (events): + if e[CONTROLLER_ID] == uiControllerId: + p.resetBasePositionAndOrientation(uiCube,e[POSITION], e[ORIENTATION]) + pos = e[POSITION] + orn = e[ORIENTATION] + lineFrom = pos + mat = p.getMatrixFromQuaternion(orn) + dir = [mat[0],mat[3],mat[6]] + to = [pos[0]+dir[0]*rayLen,pos[1]+dir[1]*rayLen,pos[2]+dir[2]*rayLen] + hit = p.rayTest(lineFrom,to) + oldRay = pointRay + color = [1,1,0] + width = 3 + #pointRay = p.addUserDebugLine(lineFrom,to,color,width,lifeTime=1) + #if (oldRay>=0): + # p.removeUserDebugItem(oldRay) + + if (hit): + #if (hit[0][0]>=0): + hitObjectUid = hit[0][0] + linkIndex = hit[0][1] + if (hitObjectUid>=0): + objectInfo = str(hitObjectUid)+" Link Index="+str(linkIndex)+"\nBase Name:"+p.getBodyInfo(hitObjectUid)[0].decode()+"\nBody Info:"+p.getBodyInfo(hitObjectUid)[1].decode() + else: + objectInfo="None" + + if e[CONTROLLER_ID] == controllerId: # To make sure we only get the value for one of the remotes + #sync the vr pr2 gripper with the vr controller position + p.changeConstraint(pr2_cid, e[POSITION], e[ORIENTATION], maxForce=500) + relPosTarget = 1 - e[ANALOG] + #open/close the gripper, based on analogue + p.changeConstraint(pr2_cid2,gearRatio=1, erp=1, relativePositionTarget=relPosTarget, maxForce=3) + + + \ No newline at end of file diff --git a/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py b/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py index 0085e52e4..4465a5324 100644 --- a/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py +++ b/examples/pybullet/examples/vr_kuka_setup_vrSyncPlugin.py @@ -117,8 +117,8 @@ while (controllerId<0): print("Using controllerId="+str(controllerId)) -plugin = p.loadPlugin("d:/develop/bullet3/bin/pybullet_vrSyncPlugin_vs2010_x64_release.dll","_vrSyncPlugin") -#plugin = p.loadPlugin("vrSyncPlugin") +#plugin = p.loadPlugin("d:/develop/bullet3/bin/pybullet_vrSyncPlugin_vs2010_x64_release.dll","_vrSyncPlugin") +plugin = p.loadPlugin("vrSyncPlugin") print("PluginId="+str(plugin)) p.executePluginCommand(plugin ,"bla", [controllerId,pr2_cid, pr2_cid2,pr2_gripper],[50,3]) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/__init__.py b/examples/pybullet/gym/pybullet_envs/bullet/__init__.py index 682266d85..8b1735fb1 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/__init__.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/__init__.py @@ -1,3 +1,4 @@ +from pybullet_envs.bullet.cartpole_bullet import CartPoleBulletEnv from pybullet_envs.bullet.minitaur_gym_env import MinitaurBulletEnv from pybullet_envs.bullet.racecarGymEnv import RacecarGymEnv from pybullet_envs.bullet.racecarZEDGymEnv import RacecarZEDGymEnv diff --git a/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py b/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py new file mode 100644 index 000000000..e28a9e962 --- /dev/null +++ b/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py @@ -0,0 +1,101 @@ +""" +Classic cart-pole system implemented by Rich Sutton et al. +Copied from https://webdocs.cs.ualberta.ca/~sutton/book/code/pole.c +""" +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) + +import logging +import math +import gym +from gym import spaces +from gym.utils import seeding +import numpy as np +import time +import subprocess +import pybullet as p +import pybullet_data + + +logger = logging.getLogger(__name__) + +class CartPoleBulletEnv(gym.Env): + metadata = { + 'render.modes': ['human', 'rgb_array'], + 'video.frames_per_second' : 50 + } + + def __init__(self, renders=True): + # start the bullet physics server + self._renders = renders + if (renders): + p.connect(p.GUI) + else: + p.connect(p.DIRECT) + + observation_high = np.array([ + np.finfo(np.float32).max, + np.finfo(np.float32).max, + np.finfo(np.float32).max, + np.finfo(np.float32).max]) + action_high = np.array([0.1]) + + self.action_space = spaces.Discrete(9) + self.observation_space = spaces.Box(-observation_high, observation_high) + + self.theta_threshold_radians = 1 + self.x_threshold = 2.4 + self._seed() +# self.reset() + self.viewer = None + self._configure() + + def _configure(self, display=None): + self.display = display + + def _seed(self, seed=None): + self.np_random, seed = seeding.np_random(seed) + return [seed] + + def _step(self, action): + p.stepSimulation() +# time.sleep(self.timeStep) + self.state = p.getJointState(self.cartpole, 1)[0:2] + p.getJointState(self.cartpole, 0)[0:2] + theta, theta_dot, x, x_dot = self.state + + dv = 0.1 + deltav = [-10.*dv,-5.*dv, -2.*dv, -0.1*dv, 0, 0.1*dv, 2.*dv,5.*dv, 10.*dv][action] + + p.setJointMotorControl2(self.cartpole, 0, p.VELOCITY_CONTROL, targetVelocity=(deltav + self.state[3])) + + done = x < -self.x_threshold \ + or x > self.x_threshold \ + or theta < -self.theta_threshold_radians \ + or theta > self.theta_threshold_radians + reward = 1.0 + + return np.array(self.state), reward, done, {} + + def _reset(self): +# print("-----------reset simulation---------------") + p.resetSimulation() + self.cartpole = p.loadURDF(os.path.join(pybullet_data.getDataPath(),"cartpole.urdf"),[0,0,0]) + self.timeStep = 0.01 + p.setJointMotorControl2(self.cartpole, 1, p.VELOCITY_CONTROL, force=0) + p.setGravity(0,0, -10) + p.setTimeStep(self.timeStep) + p.setRealTimeSimulation(0) + + initialCartPos = self.np_random.uniform(low=-0.5, high=0.5, size=(1,)) + initialAngle = self.np_random.uniform(low=-0.5, high=0.5, size=(1,)) + p.resetJointState(self.cartpole, 1, initialAngle) + p.resetJointState(self.cartpole, 0, initialCartPos) + + self.state = p.getJointState(self.cartpole, 1)[0:2] + p.getJointState(self.cartpole, 0)[0:2] + + return np.array(self.state) + + def _render(self, mode='human', close=False): + return diff --git a/examples/pybullet/premake4.lua b/examples/pybullet/premake4.lua index a67b7d8b8..69fe0abe7 100644 --- a/examples/pybullet/premake4.lua +++ b/examples/pybullet/premake4.lua @@ -155,6 +155,11 @@ if not _OPTIONS["no-enet"] then "../../examples/MultiThreading/b3Win32ThreadSupport.cpp", "../../examples/MultiThreading/b3ThreadSupportInterface.cpp", } + +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + includedirs { _OPTIONS["python_include_dir"], diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index a339e52c0..2ea7e23c1 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -3499,11 +3499,12 @@ static PyObject* pybullet_addUserDebugText(PyObject* self, PyObject* args, PyObj double lifeTime = 0.f; int physicsClientId = 0; int debugItemUniqueId = -1; + int replaceItemUniqueId = -1; b3PhysicsClientHandle sm = 0; - static char* kwlist[] = {"text", "textPosition", "textColorRGB", "textSize", "lifeTime", "textOrientation", "parentObjectUniqueId", "parentLinkIndex", "physicsClientId", NULL}; + static char* kwlist[] = {"text", "textPosition", "textColorRGB", "textSize", "lifeTime", "textOrientation", "parentObjectUniqueId", "parentLinkIndex", "replaceItemUniqueId", "physicsClientId", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, keywds, "sO|OddOiii", kwlist, &text, &textPositionObj, &textColorRGBObj, &textSize, &lifeTime, &textOrientationObj, &parentObjectUniqueId, &parentLinkIndex, &physicsClientId)) + if (!PyArg_ParseTupleAndKeywords(args, keywds, "sO|OddOiiii", kwlist, &text, &textPositionObj, &textColorRGBObj, &textSize, &lifeTime, &textOrientationObj, &parentObjectUniqueId, &parentLinkIndex, &replaceItemUniqueId, &physicsClientId)) { return NULL; } @@ -3550,6 +3551,11 @@ static PyObject* pybullet_addUserDebugText(PyObject* self, PyObject* args, PyObj } } + if (replaceItemUniqueId>=0) + { + b3UserDebugItemSetReplaceItemUniqueId(commandHandle,replaceItemUniqueId); + } + statusHandle = b3SubmitClientCommandAndWaitStatus(sm, commandHandle); statusType = b3GetStatusType(statusHandle); diff --git a/test/SharedMemory/premake4.lua b/test/SharedMemory/premake4.lua index 85b74ccfb..9eb1bb54c 100644 --- a/test/SharedMemory/premake4.lua +++ b/test/SharedMemory/premake4.lua @@ -226,6 +226,10 @@ project ("Test_PhysicsServerLoopBack") "../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp", "../../examples/ThirdPartyLibs/stb_image/stb_image.cpp", } + +if (_OPTIONS["enable_static_plugins"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end project ("Test_PhysicsServerDirect") @@ -306,7 +310,9 @@ project ("Test_PhysicsServerLoopBack") "../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp", "../../examples/ThirdPartyLibs/stb_image/stb_image.cpp", } - +if (_OPTIONS["enable_static_plugins"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end project ("Test_PhysicsServerInProcessExampleBrowser") @@ -414,6 +420,10 @@ project ("Test_PhysicsServerInProcessExampleBrowser") "../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp", "../../examples/ThirdPartyLibs/stb_image/stb_image.cpp", } +if (_OPTIONS["enable_static_vr_plugin"]) then + files {"../../examples/SharedMemory/plugins/vrSyncPlugin/vrSyncPlugin.cpp"} +end + if os.is("Linux") then initX11() end