You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(20) |
Feb
(11) |
Mar
(6) |
Apr
(5) |
May
(4) |
Jun
(7) |
Jul
(9) |
Aug
(11) |
Sep
|
Oct
(4) |
Nov
(13) |
Dec
(21) |
2010 |
Jan
(23) |
Feb
(32) |
Mar
(6) |
Apr
(2) |
May
(10) |
Jun
(15) |
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
(16) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(19) |
Apr
(13) |
May
(4) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
(8) |
Mar
(2) |
Apr
(6) |
May
(13) |
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(4) |
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(6) |
Jun
(6) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <a-...@us...> - 2010-01-13 06:29:03
|
Revision: 141 http://simspark.svn.sourceforge.net/simspark/?rev=141&view=rev Author: a-held Date: 2010-01-13 06:28:54 +0000 (Wed, 13 Jan 2010) Log Message: ----------- Copy changes from r139 and r140 to branch implemented bridge pattern for AngularMotor, started on ContactJointHandler modified rcsoccersim3d script to also start the hello world agent Modified Paths: -------------- branches/multiphys/rcssserver3d/CMakeLists.txt branches/multiphys/rcssserver3d/ChangeLog branches/multiphys/rcssserver3d/RELEASE branches/multiphys/rcssserver3d/data/models/leftgoal.obj branches/multiphys/rcssserver3d/data/models/rightgoal.obj branches/multiphys/rcssserver3d/rcssserver3d/CMakeLists.txt branches/multiphys/rcssserver3d/rcssserver3d/main.cpp branches/multiphys/spark/RELEASE branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/bodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/plugin/collisionperceptor/touchperceptorhandler.cpp Added Paths: ----------- branches/multiphys/rcssserver3d/rcssserver3d/ branches/multiphys/spark/lib/oxygen/physicsserver/int/contactjointhandlerint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeangularmotor.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecontactjointhandler.h Removed Paths: ------------- branches/multiphys/rcssserver3d/simspark/ Modified: branches/multiphys/rcssserver3d/CMakeLists.txt =================================================================== --- branches/multiphys/rcssserver3d/CMakeLists.txt 2010-01-10 23:45:10 UTC (rev 140) +++ branches/multiphys/rcssserver3d/CMakeLists.txt 2010-01-13 06:28:54 UTC (rev 141) @@ -76,7 +76,7 @@ add_subdirectory(plugin) add_subdirectory(rcssagent3d) add_subdirectory(rcssmonitor3d) -add_subdirectory(simspark) +add_subdirectory(rcssserver3d) ########### install files ############### Modified: branches/multiphys/rcssserver3d/ChangeLog =================================================================== --- branches/multiphys/rcssserver3d/ChangeLog 2010-01-10 23:45:10 UTC (rev 140) +++ branches/multiphys/rcssserver3d/ChangeLog 2010-01-13 06:28:54 UTC (rev 141) @@ -1,3 +1,25 @@ +2010-01-11 Hedayat Vatankhah <he...@gr...> + + * RELEASE: + - added some notes about the name change and also the new script + (rcsoccersim3d) + + * CMakeLists.txt: + * rcssserver3d/main.cpp: + * rcssserver3d/CMakeLists.txt: + - renamed simspark -> rcssserver3d. creating a simspark symbolic link for + backward compatibility + + * rcssserver3d/rcsoccersim3d.in: + - added rcsoccersim3d script to run both rcssserver3d (simspark) and + rcssmonitor3d, and terminate the simulator when the monitor stops + +2010-01-09 Hedayat Vatankhah <he...@gr...> + + * data/models/leftgoal.obj: + * data/models/rightgoal.obj: + - fixed net visualization in the new models + 2010-01-03 Hedayat Vatankhah <he...@gr...> * data/models/leftgoal.obj: Modified: branches/multiphys/rcssserver3d/RELEASE =================================================================== --- branches/multiphys/rcssserver3d/RELEASE 2010-01-10 23:45:10 UTC (rev 140) +++ branches/multiphys/rcssserver3d/RELEASE 2010-01-13 06:28:54 UTC (rev 141) @@ -1,7 +1,10 @@ RELEASE News of rcssserver3d-0.6.3 (In progress) * Most notable changes: - - No internal monitor by default. Run rcssmonitor3d separately to see the game. + - Name change: simspark -> rcssserver3d. To make the functionality more clear. + - No internal monitor by default. Run rcssmonitor3d separately to see the game. + As another option, you might run rcsoccersim3d which runs both + rcssserver3d (simspark) and rcssmonitor3d on the local machine. - Added HMDP effector/perceptor - Some compilation fixes - Improved Windows support Modified: branches/multiphys/rcssserver3d/data/models/leftgoal.obj =================================================================== --- branches/multiphys/rcssserver3d/data/models/leftgoal.obj 2010-01-10 23:45:10 UTC (rev 140) +++ branches/multiphys/rcssserver3d/data/models/leftgoal.obj 2010-01-13 06:28:54 UTC (rev 141) @@ -1,235 +1,247 @@ # Blender3D v249 OBJ File: # www.blender3d.org mtllib leftgoal.mtl -o leftgoal +o Cylinder +v -0.466661 -0.000000 -0.006727 +v -0.435928 0.000000 0.031272 +v -0.439036 0.000000 0.048194 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +v -0.463784 0.001554 -0.895139 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v 0.469231 0.001554 -0.881690 +v 0.467925 0.000247 -0.096621 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.466661 0.000000 0.006727 v 0.490346 -0.000000 -0.062326 v 0.494467 -0.000000 -0.047393 +v 0.466661 0.997179 0.006727 +v 0.494467 0.997179 -0.047393 +v 0.490346 0.997179 -0.062326 v 0.497519 -0.000000 -0.030383 +v 0.497519 0.997179 -0.030383 v 0.499385 -0.000000 -0.011947 +v 0.499385 0.997179 -0.011947 v 0.499994 0.000000 0.007207 +v 0.499994 0.997179 0.007207 v 0.499322 0.000000 0.026343 +v 0.499322 0.997179 0.026343 v 0.497394 0.000000 0.044726 +v 0.497394 0.997179 0.044726 v 0.494286 0.000000 0.061645 +v 0.494286 0.997179 0.061645 v 0.490116 0.000000 0.076457 +v 0.490116 0.997179 0.076457 v 0.485044 0.000000 0.088589 +v 0.485044 0.997179 0.088589 v 0.479266 0.000000 0.097575 +v 0.479266 0.997179 0.097575 v 0.473004 0.000000 0.103068 +v 0.473004 0.997179 0.103068 v 0.466498 0.000000 0.104861 +v 0.466498 0.997179 0.104861 v 0.459998 0.000000 0.102880 +v 0.459998 0.997179 0.102880 v 0.453754 0.000000 0.097207 +v 0.453754 0.997179 0.097207 v 0.448007 0.000000 0.088054 +v 0.448007 0.997179 0.088057 v 0.442976 0.000000 0.075777 +v 0.442976 0.997179 0.075777 v 0.438855 0.000000 0.060848 +v 0.438855 0.997179 0.060848 v 0.435803 0.000000 0.043837 +v 0.435803 0.997179 0.043837 v 0.433937 0.000000 0.025401 +v 0.433937 0.997179 0.025401 v 0.433328 0.000000 0.006247 +v 0.433328 0.997179 0.006247 v 0.434000 -0.000000 -0.012889 +v 0.434000 0.997179 -0.012889 v 0.435928 -0.000000 -0.031272 +v 0.435928 0.997179 -0.031272 v 0.439036 -0.000000 -0.048194 +v 0.439036 0.997179 -0.048194 v 0.443207 -0.000000 -0.063006 +v 0.443206 0.997179 -0.063003 v 0.448278 -0.000000 -0.075135 +v 0.448278 0.997179 -0.075135 v 0.454056 -0.000000 -0.084120 +v 0.454056 0.997179 -0.084120 v 0.460318 -0.000000 -0.089614 +v 0.460318 0.997179 -0.089614 v 0.466824 -0.000000 -0.091407 +v 0.466824 0.997179 -0.091407 v 0.473324 -0.000000 -0.089428 +v 0.473324 0.997179 -0.089429 v 0.479568 -0.000000 -0.083752 +v 0.479568 0.997179 -0.083752 v 0.485316 -0.000000 -0.074602 -v 0.490346 0.997179 -0.062326 -v 0.494467 0.997179 -0.047393 -v 0.497519 0.997179 -0.030383 -v 0.499385 0.997179 -0.011947 -v 0.499994 0.997179 0.007207 -v 0.499322 0.997179 0.026343 -v 0.497394 0.997179 0.044726 -v 0.494286 0.997179 0.061645 -v 0.490116 0.997179 0.076457 -v 0.485044 0.997179 0.088589 -v 0.479266 0.997179 0.097575 -v 0.473004 0.997179 0.103068 -v 0.466498 0.997179 0.104861 -v 0.459998 0.997179 0.102880 -v 0.453754 0.997179 0.097207 -v 0.448007 0.997179 0.088057 -v 0.442976 0.997179 0.075777 -v 0.438855 0.997179 0.060848 -v 0.435803 0.997179 0.043837 -v 0.433937 0.997179 0.025401 -v 0.433328 0.997179 0.006247 -v 0.434000 0.997179 -0.012889 -v 0.435928 0.997179 -0.031272 -v 0.439036 0.997179 -0.048194 -v 0.443206 0.997179 -0.063003 -v 0.448278 0.997179 -0.075135 -v 0.454056 0.997179 -0.084120 -v 0.460318 0.997179 -0.089614 -v 0.466824 0.997179 -0.091407 -v 0.473324 0.997179 -0.089429 -v 0.479568 0.997179 -0.083752 v 0.485315 0.997179 -0.074602 -v 0.466661 0.000000 0.006727 -v 0.466661 0.997179 0.006727 v -0.466661 0.997179 -0.006727 -v -0.466661 -0.000000 -0.006727 +v -0.442976 0.997179 -0.075777 v -0.448007 0.997179 -0.088057 +v -0.448007 -0.000000 -0.088054 +v -0.442976 -0.000000 -0.075777 v -0.453755 0.997179 -0.097207 +v -0.453754 -0.000000 -0.097207 v -0.459998 0.997179 -0.102883 +v -0.459998 -0.000000 -0.102880 v -0.466498 0.997179 -0.104861 +v -0.466498 -0.000000 -0.104861 v -0.473004 0.997179 -0.103068 +v -0.473004 -0.000000 -0.103068 v -0.479266 0.997179 -0.097575 +v -0.479266 -0.000000 -0.097575 v -0.485044 0.997179 -0.088589 +v -0.485044 -0.000000 -0.088589 v -0.490116 0.997179 -0.076457 +v -0.490116 -0.000000 -0.076457 v -0.494286 0.997179 -0.061646 +v -0.494286 -0.000000 -0.061645 v -0.497394 0.997179 -0.044723 +v -0.497394 -0.000000 -0.044726 v -0.499322 0.997179 -0.026343 +v -0.499322 -0.000000 -0.026343 v -0.499994 0.997179 -0.007207 +v -0.499994 -0.000000 -0.007207 v -0.499385 0.997179 0.011947 +v -0.499385 0.000000 0.011947 v -0.497519 0.997179 0.030383 +v -0.497519 0.000000 0.030383 v -0.494467 0.997179 0.047393 +v -0.494467 0.000000 0.047393 v -0.490346 0.997179 0.062326 +v -0.490346 0.000000 0.062326 v -0.485315 0.997179 0.074602 +v -0.485316 0.000000 0.074602 v -0.479568 0.997179 0.083752 +v -0.479568 0.000000 0.083752 v -0.473324 0.997179 0.089428 +v -0.473324 0.000000 0.089428 v -0.466824 0.997179 0.091407 +v -0.466824 0.000000 0.091407 v -0.460318 0.997179 0.089614 +v -0.460318 0.000000 0.089614 v -0.454056 0.997179 0.084120 +v -0.454056 0.000000 0.084120 v -0.448278 0.997179 0.075135 +v -0.448278 0.000000 0.075135 v -0.443207 0.997179 0.063006 +v -0.443207 0.000000 0.063006 v -0.439036 0.997179 0.048194 v -0.435928 0.997179 0.031272 v -0.434000 0.997179 0.012889 +v -0.434000 0.000000 0.012889 v -0.433328 0.997179 -0.006247 +v -0.433328 -0.000000 -0.006247 v -0.433937 0.997179 -0.025401 +v -0.433937 -0.000000 -0.025401 v -0.435803 0.997179 -0.043837 +v -0.435803 -0.000000 -0.043837 v -0.438855 0.997179 -0.060848 -v -0.442976 0.997179 -0.075777 -v -0.448007 -0.000000 -0.088054 -v -0.453754 -0.000000 -0.097207 -v -0.459998 -0.000000 -0.102880 -v -0.466498 -0.000000 -0.104861 -v -0.473004 -0.000000 -0.103068 -v -0.479266 -0.000000 -0.097575 -v -0.485044 -0.000000 -0.088589 -v -0.490116 -0.000000 -0.076457 -v -0.494286 -0.000000 -0.061645 -v -0.497394 -0.000000 -0.044726 -v -0.499322 -0.000000 -0.026343 -v -0.499994 -0.000000 -0.007207 -v -0.499385 0.000000 0.011947 -v -0.497519 0.000000 0.030383 -v -0.494467 0.000000 0.047393 -v -0.490346 0.000000 0.062326 -v -0.485316 0.000000 0.074602 -v -0.479568 0.000000 0.083752 -v -0.473324 0.000000 0.089428 -v -0.466824 0.000000 0.091407 -v -0.460318 0.000000 0.089614 -v -0.454056 0.000000 0.084120 -v -0.448278 0.000000 0.075135 -v -0.443207 0.000000 0.063006 -v -0.439036 0.000000 0.048194 -v -0.435928 0.000000 0.031272 -v -0.434000 0.000000 0.012889 -v -0.433328 -0.000000 -0.006247 -v -0.433937 -0.000000 -0.025401 -v -0.435803 -0.000000 -0.043837 v -0.438855 -0.000000 -0.060848 -v -0.442976 -0.000000 -0.075777 +v -0.465871 0.964236 -0.006715 v -0.465814 0.986271 -0.041411 v -0.465804 0.981550 -0.047514 +v 0.467451 0.964236 0.006739 +v 0.467519 0.981550 -0.034060 +v 0.467508 0.986271 -0.027957 v -0.465796 0.976161 -0.052048 +v 0.467526 0.976161 -0.038594 v -0.465791 0.970316 -0.054839 +v 0.467531 0.970316 -0.041385 v -0.465790 0.964236 -0.055781 +v 0.467532 0.964236 -0.042330 v -0.465791 0.958158 -0.054839 +v 0.467531 0.958158 -0.041385 v -0.465796 0.952311 -0.052048 +v 0.467526 0.952311 -0.038594 v -0.465804 0.946925 -0.047514 +v 0.467519 0.946925 -0.034060 v -0.465814 0.942202 -0.041411 +v 0.467508 0.942202 -0.027957 v -0.465826 0.938326 -0.033974 +v 0.467496 0.938326 -0.020523 v -0.465840 0.935446 -0.025493 +v 0.467482 0.935446 -0.012038 v -0.465855 0.933674 -0.016287 +v 0.467467 0.933674 -0.002835 v -0.465871 0.933074 -0.006715 +v 0.467451 0.933074 0.006739 v -0.465887 0.933674 0.002859 +v 0.467435 0.933674 0.016310 v -0.465903 0.935446 0.012062 +v 0.467420 0.935446 0.025516 v -0.465917 0.938326 0.020544 +v 0.467405 0.938326 0.033998 v -0.465929 0.942202 0.027980 +v 0.467393 0.942202 0.041435 v -0.465939 0.946925 0.034083 +v 0.467383 0.946925 0.047535 v -0.465947 0.952311 0.038617 +v 0.467375 0.952311 0.052071 v -0.465951 0.958158 0.041408 +v 0.467371 0.958158 0.054862 v -0.465953 0.964236 0.042353 +v 0.467369 0.964236 0.055804 v -0.465951 0.970316 0.041408 +v 0.467371 0.970316 0.054862 v -0.465947 0.976161 0.038617 +v 0.467375 0.976161 0.052071 v -0.465939 0.981550 0.034083 +v 0.467383 0.981550 0.047535 v -0.465929 0.986271 0.027980 +v 0.467393 0.986271 0.041435 v -0.465917 0.990147 0.020544 +v 0.467405 0.990147 0.033998 v -0.465903 0.993026 0.012062 +v 0.467420 0.993026 0.025516 v -0.465887 0.994800 0.002859 +v 0.467435 0.994800 0.016310 v -0.465871 0.995399 -0.006715 +v 0.467451 0.995399 0.006739 v -0.465855 0.994800 -0.016287 +v 0.467467 0.994800 -0.002835 v -0.465840 0.993026 -0.025493 +v 0.467482 0.993026 -0.012038 v -0.465826 0.990147 -0.033974 -v 0.467508 0.986271 -0.027957 -v 0.467519 0.981550 -0.034060 -v 0.467526 0.976161 -0.038594 -v 0.467531 0.970316 -0.041385 -v 0.467532 0.964236 -0.042330 -v 0.467531 0.958158 -0.041385 -v 0.467526 0.952311 -0.038594 -v 0.467519 0.946925 -0.034060 -v 0.467508 0.942202 -0.027957 -v 0.467496 0.938326 -0.020523 -v 0.467482 0.935446 -0.012038 -v 0.467467 0.933674 -0.002835 -v 0.467451 0.933074 0.006739 -v 0.467435 0.933674 0.016310 -v 0.467420 0.935446 0.025516 -v 0.467405 0.938326 0.033998 -v 0.467393 0.942202 0.041435 -v 0.467383 0.946925 0.047535 -v 0.467375 0.952311 0.052071 -v 0.467371 0.958158 0.054862 -v 0.467369 0.964236 0.055804 -v 0.467371 0.970316 0.054862 -v 0.467375 0.976161 0.052071 -v 0.467383 0.981550 0.047535 -v 0.467393 0.986271 0.041435 -v 0.467405 0.990147 0.033998 -v 0.467420 0.993026 0.025516 -v 0.467435 0.994800 0.016310 -v 0.467451 0.995399 0.006739 -v 0.467467 0.994800 -0.002835 -v 0.467482 0.993026 -0.012038 v 0.467496 0.990147 -0.020523 -v -0.465871 0.964236 -0.006715 -v 0.467451 0.964236 0.006739 +v -0.458524 0.001554 -0.890770 +v -0.459830 0.498835 -0.105700 v -0.459830 0.000247 -0.105700 -v -0.459830 0.498835 -0.105700 -v -0.458524 0.001554 -0.890770 -v 0.469231 0.001554 -0.881690 -v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 -v -0.463784 0.001554 -0.895139 -v -0.465090 1.000000 -0.110069 -v -0.465090 0.000247 -0.110069 -v -0.465090 1.000000 -0.110069 -v -0.463784 0.001554 -0.895139 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 -v -0.465090 0.000247 -0.110069 -v -0.465090 1.000000 -0.110069 -v -0.463784 0.001554 -0.895139 v -0.465191 0.001554 -0.890770 +v -0.466496 0.000247 -0.105700 v -0.466496 0.498835 -0.105700 -v -0.466496 0.000247 -0.105700 v 0.474809 0.001554 -0.890770 v 0.473504 0.498835 -0.105700 v 0.473504 0.000247 -0.105700 v 0.468143 0.001554 -0.890770 +v 0.466837 0.000247 -0.105700 v 0.466837 0.498835 -0.105700 -v 0.466837 0.000247 -0.105700 -v 0.469231 0.001554 -0.881690 -v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.478737 0.520656 +vt 0.239368 1.000000 +vt 0.239368 0.520028 +vt 0.239368 0.520656 +vt 0.000000 0.520028 +vt 0.812878 0.000000 +vt 0.812878 0.520028 +vt 0.000000 0.520027 +vt 1.000000 1.000000 vn -0.000000 -1.000000 0.000000 vn 0.999999 0.000000 0.001664 vn -0.999999 -0.000000 -0.001664 @@ -428,400 +440,400 @@ vn 0.963964 -0.000000 -0.266033 usemtl grey_naogoalnet.png s off -f 68//1 126//1 125//1 -f 206//2 205//2 204//2 -f 207//3 209//3 208//3 -f 216//2 215//2 214//2 -f 226//3 228//3 227//3 -f 213//4 212//4 210//4 -f 213//4 210//4 211//4 -f 202//5 207//5 208//5 -f 202//5 208//5 203//5 +f 1/1/1 2/2/1 3/3/1 +f 4/4/2 5/5/2 6/6/2 +f 7/7/3 8/8/3 9/1/3 +f 10/7/2 11/1/2 12/8/2 +f 13/4/3 14/6/3 15/5/3 +f 16/9/4 17/10/4 18/11/4 +f 16/9/4 18/11/4 19/2/4 +f 20/9/5 7/2/5 9/11/5 +f 20/9/5 9/11/5 21/10/5 usemtl yellow -f 65//1 1//1 2//1 -f 66//6 34//6 33//6 -f 65//1 2//1 3//1 -f 66//6 35//6 34//6 -f 65//1 3//1 4//1 -f 66//6 36//6 35//6 -f 65//1 4//1 5//1 -f 66//6 37//6 36//6 -f 65//1 5//1 6//1 -f 66//6 38//6 37//6 -f 65//1 6//1 7//1 -f 66//6 39//6 38//6 -f 65//1 7//1 8//1 -f 66//6 40//6 39//6 -f 65//1 8//1 9//1 -f 66//6 41//6 40//6 -f 65//1 9//1 10//1 -f 66//6 42//6 41//6 -f 65//1 10//1 11//1 -f 66//6 43//6 42//6 -f 65//1 11//1 12//1 -f 66//6 44//6 43//6 -f 65//1 12//1 13//1 -f 66//6 45//6 44//6 -f 65//1 13//1 14//1 -f 66//6 46//6 45//6 -f 65//1 14//1 15//1 -f 66//6 47//6 46//6 -f 65//1 15//1 16//1 -f 66//6 48//6 47//6 -f 65//1 16//1 17//1 -f 66//6 49//6 48//6 -f 65//1 17//1 18//1 -f 66//6 50//6 49//6 -f 65//1 18//1 19//1 -f 66//6 51//6 50//6 -f 65//1 19//1 20//1 -f 66//6 52//6 51//6 -f 65//1 20//1 21//1 -f 66//6 53//6 52//6 -f 65//1 21//1 22//1 -f 66//6 54//6 53//6 -f 65//1 22//1 23//1 -f 66//6 55//6 54//6 -f 65//1 23//1 24//1 -f 66//6 56//6 55//6 -f 65//1 24//1 25//1 -f 66//6 57//6 56//6 -f 65//1 25//1 26//1 -f 66//6 58//6 57//6 -f 65//1 26//1 27//1 -f 66//6 59//6 58//6 -f 65//1 27//1 28//1 -f 66//6 60//6 59//6 -f 65//1 28//1 29//1 -f 66//6 61//6 60//6 -f 65//1 29//1 30//1 -f 66//6 62//6 61//6 -f 65//1 30//1 31//1 -f 66//6 63//6 62//6 -f 65//1 31//1 32//1 -f 66//6 64//6 63//6 -f 32//1 1//1 65//1 -f 66//6 33//6 64//6 -f 67//6 100//6 69//6 -f 68//1 101//1 132//1 -f 67//6 69//6 70//6 -f 68//1 102//1 101//1 -f 67//6 70//6 71//6 -f 68//1 103//1 102//1 -f 67//6 71//6 72//6 -f 68//1 104//1 103//1 -f 67//6 72//6 73//6 -f 68//1 105//1 104//1 -f 67//6 73//6 74//6 -f 68//1 106//1 105//1 -f 67//6 74//6 75//6 -f 68//1 107//1 106//1 -f 67//6 75//6 76//6 -f 68//1 108//1 107//1 -f 67//6 76//6 77//6 -f 68//1 109//1 108//1 -f 67//6 77//6 78//6 -f 68//1 110//1 109//1 -f 67//6 78//6 79//6 -f 68//1 111//1 110//1 -f 67//6 79//6 80//6 -f 68//1 112//1 111//1 -f 67//6 80//6 81//6 -f 68//1 113//1 112//1 -f 67//6 81//6 82//6 -f 68//1 114//1 113//1 -f 67//6 82//6 83//6 -f 68//1 115//1 114//1 -f 67//6 83//6 84//6 -f 68//1 116//1 115//1 -f 67//6 84//6 85//6 -f 68//1 117//1 116//1 -f 67//6 85//6 86//6 -f 68//1 118//1 117//1 -f 67//6 86//6 87//6 -f 68//1 119//1 118//1 -f 67//6 87//6 88//6 -f 68//1 120//1 119//1 -f 67//6 88//6 89//6 -f 68//1 121//1 120//1 -f 67//6 89//6 90//6 -f 68//1 122//1 121//1 -f 67//6 90//6 91//6 -f 68//1 123//1 122//1 -f 67//6 91//6 92//6 -f 68//1 124//1 123//1 -f 67//6 92//6 93//6 -f 68//1 125//1 124//1 -f 67//6 93//6 94//6 -f 67//6 94//6 95//6 -f 68//1 127//1 126//1 -f 67//6 95//6 96//6 -f 68//1 128//1 127//1 -f 67//6 96//6 97//6 -f 68//1 129//1 128//1 -f 67//6 97//6 98//6 -f 68//1 130//1 129//1 -f 67//6 98//6 99//6 -f 68//1 131//1 130//1 -f 67//6 99//6 100//6 -f 68//1 132//1 131//1 -f 197//7 133//7 134//7 -f 198//8 166//8 165//8 -f 197//9 134//9 135//9 -f 198//10 167//10 166//10 -f 197//11 135//11 136//11 -f 198//12 168//12 167//12 -f 197//13 136//13 137//13 -f 198//14 169//14 168//14 -f 197//15 137//15 138//15 -f 198//16 170//16 169//16 -f 197//17 138//17 139//17 -f 198//18 171//18 170//18 -f 197//19 139//19 140//19 -f 198//20 172//20 171//20 -f 197//21 140//21 141//21 -f 198//22 173//22 172//22 -f 197//23 141//23 142//23 -f 198//24 174//24 173//24 -f 197//25 142//25 143//25 -f 198//26 175//26 174//26 -f 197//27 143//27 144//27 -f 198//28 176//28 175//28 -f 197//29 144//29 145//29 -f 198//30 177//30 176//30 -f 197//29 145//29 146//29 -f 198//30 178//30 177//30 -f 197//31 146//31 147//31 -f 198//32 179//32 178//32 -f 197//33 147//33 148//33 -f 198//34 180//34 179//34 -f 197//35 148//35 149//35 -f 198//36 181//36 180//36 -f 197//37 149//37 150//37 -f 198//38 182//38 181//38 -f 197//39 150//39 151//39 -f 198//40 183//40 182//40 -f 197//41 151//41 152//41 -f 198//42 184//42 183//42 -f 197//43 152//43 153//43 -f 198//44 185//44 184//44 -f 197//45 153//45 154//45 -f 198//46 186//46 185//46 -f 197//47 154//47 155//47 -f 198//48 187//48 186//48 -f 197//49 155//49 156//49 -f 198//50 188//50 187//50 -f 197//51 156//51 157//51 -f 198//52 189//52 188//52 -f 197//53 157//53 158//53 -f 198//54 190//54 189//54 -f 197//55 158//55 159//55 -f 198//56 191//56 190//56 -f 197//57 159//57 160//57 -f 198//28 192//28 191//28 -f 197//29 160//29 161//29 -f 198//30 193//30 192//30 -f 197//29 161//29 162//29 -f 198//30 194//30 193//30 -f 197//58 162//58 163//58 -f 198//32 195//32 194//32 -f 197//25 163//25 164//25 -f 198//26 196//26 195//26 -f 197//59 164//59 133//59 -f 198//60 165//60 196//60 -f 201//2 200//2 199//2 -f 217//61 219//61 218//61 -f 220//62 221//62 222//62 -f 223//3 225//3 224//3 -f 164//63 196//63 165//63 -f 164//64 165//64 133//64 -f 163//65 195//65 196//65 -f 163//66 196//66 164//66 -f 162//67 194//67 195//67 -f 162//68 195//68 163//68 -f 161//69 193//69 194//69 -f 161//70 194//70 162//70 -f 160//71 192//71 193//71 -f 160//72 193//72 161//72 -f 159//73 191//73 192//73 -f 159//74 192//74 160//74 -f 158//75 190//75 191//75 -f 158//76 191//76 159//76 -f 157//77 189//77 190//77 -f 157//78 190//78 158//78 -f 156//79 188//79 189//79 -f 156//80 189//80 157//80 -f 155//81 187//81 188//81 -f 155//82 188//82 156//82 -f 154//83 186//83 187//83 -f 154//84 187//84 155//84 -f 153//85 185//85 186//85 -f 153//86 186//86 154//86 -f 152//87 184//87 185//87 -f 152//88 185//88 153//88 -f 151//89 183//89 184//89 -f 151//89 184//89 152//89 -f 150//90 182//90 183//90 -f 150//91 183//91 151//91 -f 149//92 181//92 182//92 -f 149//93 182//93 150//93 -f 148//94 180//94 181//94 -f 148//94 181//94 149//94 -f 147//95 179//95 180//95 -f 147//96 180//96 148//96 -f 146//97 178//97 179//97 -f 146//98 179//98 147//98 -f 145//99 177//99 178//99 -f 145//100 178//100 146//100 -f 144//101 176//101 177//101 -f 144//102 177//102 145//102 -f 143//103 175//103 176//103 -f 143//104 176//104 144//104 -f 142//105 174//105 175//105 -f 142//106 175//106 143//106 -f 141//107 173//107 174//107 -f 141//108 174//108 142//108 -f 140//109 172//109 173//109 -f 140//110 173//110 141//110 -f 139//111 171//111 172//111 -f 139//112 172//112 140//112 -f 138//113 170//113 171//113 -f 138//114 171//114 139//114 -f 137//115 169//115 170//115 -f 137//116 170//116 138//116 -f 136//117 168//117 169//117 -f 136//118 169//118 137//118 -f 135//119 167//119 168//119 -f 135//120 168//120 136//120 -f 134//121 166//121 167//121 -f 134//122 167//122 135//122 -f 133//123 165//123 166//123 -f 133//124 166//124 134//124 -f 132//125 100//125 99//125 -f 132//125 99//125 131//125 -f 131//126 99//126 98//126 -f 131//126 98//126 130//126 -f 130//127 98//127 97//127 -f 130//127 97//127 129//127 -f 129//128 97//128 96//128 -f 129//128 96//128 128//128 -f 128//129 96//129 95//129 -f 128//129 95//129 127//129 -f 127//130 95//130 94//130 -f 127//130 94//130 126//130 -f 126//131 94//131 93//131 -f 126//131 93//131 125//131 -f 125//132 93//132 92//132 -f 125//132 92//132 124//132 -f 124//133 92//133 91//133 -f 124//133 91//133 123//133 -f 123//134 91//134 90//134 -f 123//134 90//134 122//134 -f 122//135 90//135 89//135 -f 122//135 89//135 121//135 -f 121//136 89//136 88//136 -f 121//136 88//136 120//136 -f 120//137 88//137 87//137 -f 120//137 87//137 119//137 -f 119//138 87//138 86//138 -f 119//138 86//138 118//138 -f 118//139 86//139 85//139 -f 118//140 85//140 117//140 -f 117//141 85//141 84//141 -f 117//142 84//142 116//142 -f 116//143 84//143 83//143 -f 116//143 83//143 115//143 -f 115//144 83//144 82//144 -f 115//144 82//144 114//144 -f 114//145 82//145 81//145 -f 114//145 81//145 113//145 -f 113//146 81//146 80//146 -f 113//146 80//146 112//146 -f 112//147 80//147 79//147 -f 112//147 79//147 111//147 -f 111//148 79//148 78//148 -f 111//149 78//149 110//149 -f 110//150 78//150 77//150 -f 110//151 77//151 109//151 -f 109//152 77//152 76//152 -f 109//152 76//152 108//152 -f 108//153 76//153 75//153 -f 108//153 75//153 107//153 -f 107//154 75//154 74//154 -f 107//154 74//154 106//154 -f 106//155 74//155 73//155 -f 106//155 73//155 105//155 -f 105//156 73//156 72//156 -f 105//156 72//156 104//156 -f 104//157 72//157 71//157 -f 104//158 71//158 103//158 -f 103//159 71//159 70//159 -f 103//160 70//160 102//160 -f 102//161 70//161 69//161 -f 102//162 69//162 101//162 -f 101//163 69//163 100//163 -f 101//164 100//164 132//164 -f 33//165 1//165 32//165 -f 33//166 32//166 64//166 -f 31//167 63//167 64//167 -f 31//168 64//168 32//168 -f 30//169 62//169 63//169 -f 30//169 63//169 31//169 -f 29//170 61//170 62//170 -f 29//170 62//170 30//170 -f 28//171 60//171 61//171 -f 28//171 61//171 29//171 -f 27//172 59//172 60//172 -f 27//172 60//172 28//172 -f 26//173 58//173 59//173 -f 26//173 59//173 27//173 -f 25//153 57//153 58//153 -f 25//174 58//174 26//174 -f 24//175 56//175 57//175 -f 24//176 57//176 25//176 -f 23//177 55//177 56//177 -f 23//177 56//177 24//177 -f 22//149 54//149 55//149 -f 22//149 55//149 23//149 -f 21//178 53//178 54//178 -f 21//178 54//178 22//178 -f 20//146 52//146 53//146 -f 20//146 53//146 21//146 -f 19//179 51//179 52//179 -f 19//180 52//180 20//180 -f 18//144 50//144 51//144 -f 18//144 51//144 19//144 -f 17//181 49//181 50//181 -f 17//181 50//181 18//181 -f 16//182 48//182 49//182 -f 16//183 49//183 17//183 -f 15//184 47//184 48//184 -f 15//185 48//185 16//185 -f 14//186 46//186 47//186 -f 14//186 47//186 15//186 -f 13//187 45//187 46//187 -f 13//187 46//187 14//187 -f 12//188 44//188 45//188 -f 12//188 45//188 13//188 -f 11//189 43//189 44//189 -f 11//189 44//189 12//189 -f 10//190 42//190 43//190 -f 10//190 43//190 11//190 -f 9//191 41//191 42//191 -f 9//191 42//191 10//191 -f 8//192 40//192 41//192 -f 8//192 41//192 9//192 -f 7//193 39//193 40//193 -f 7//193 40//193 8//193 -f 6//130 38//130 39//130 -f 6//130 39//130 7//130 -f 5//194 37//194 38//194 -f 5//194 38//194 6//194 -f 4//128 36//128 37//128 -f 4//128 37//128 5//128 -f 3//195 35//195 36//195 -f 3//195 36//195 4//195 -f 2//126 34//126 35//126 -f 2//126 35//126 3//126 -f 1//196 33//196 34//196 -f 1//196 34//196 2//196 +f 22/1/1 23/2/1 24/3/1 +f 25/1/6 26/2/6 27/3/6 +f 22/1/1 24/2/1 28/3/1 +f 25/1/6 29/2/6 26/3/6 +f 22/1/1 28/2/1 30/3/1 +f 25/1/6 31/2/6 29/3/6 +f 22/1/1 30/2/1 32/3/1 +f 25/1/6 33/2/6 31/3/6 +f 22/1/1 32/2/1 34/3/1 +f 25/1/6 35/2/6 33/3/6 +f 22/1/1 34/2/1 36/3/1 +f 25/1/6 37/2/6 35/3/6 +f 22/1/1 36/2/1 38/3/1 +f 25/1/6 39/2/6 37/3/6 +f 22/1/1 38/2/1 40/3/1 +f 25/1/6 41/2/6 39/3/6 +f 22/1/1 40/2/1 42/3/1 +f 25/1/6 43/2/6 41/3/6 +f 22/1/1 42/2/1 44/3/1 +f 25/1/6 45/2/6 43/3/6 +f 22/1/1 44/2/1 46/3/1 +f 25/1/6 47/2/6 45/3/6 +f 22/1/1 46/2/1 48/3/1 +f 25/1/6 49/2/6 47/3/6 +f 22/1/1 48/2/1 50/3/1 +f 25/1/6 51/2/6 49/3/6 +f 22/1/1 50/2/1 52/3/1 +f 25/1/6 53/2/6 51/3/6 +f 22/1/1 52/2/1 54/3/1 +f 25/1/6 55/2/6 53/3/6 +f 22/1/1 54/2/1 56/3/1 +f 25/1/6 57/2/6 55/3/6 +f 22/1/1 56/2/1 58/3/1 +f 25/1/6 59/2/6 57/3/6 +f 22/1/1 58/2/1 60/3/1 +f 25/1/6 61/2/6 59/3/6 +f 22/1/1 60/2/1 62/3/1 +f 25/1/6 63/2/6 61/3/6 +f 22/1/1 62/2/1 64/3/1 +f 25/1/6 65/2/6 63/3/6 +f 22/1/1 64/2/1 66/3/1 +f 25/1/6 67/2/6 65/3/6 +f 22/1/1 66/2/1 68/3/1 +f 25/1/6 69/2/6 67/3/6 +f 22/1/1 68/2/1 70/3/1 +f 25/1/6 71/2/6 69/3/6 +f 22/1/1 70/2/1 72/3/1 +f 25/1/6 73/2/6 71/3/6 +f 22/1/1 72/2/1 74/3/1 +f 25/1/6 75/2/6 73/3/6 +f 22/1/1 74/2/1 76/3/1 +f 25/1/6 77/2/6 75/3/6 +f 22/1/1 76/2/1 78/3/1 +f 25/1/6 79/2/6 77/3/6 +f 22/1/1 78/2/1 80/3/1 +f 25/1/6 81/2/6 79/3/6 +f 22/1/1 80/2/1 82/3/1 +f 25/1/6 83/2/6 81/3/6 +f 22/1/1 82/2/1 84/3/1 +f 25/1/6 85/2/6 83/3/6 +f 22/1/1 84/2/1 86/3/1 +f 25/1/6 87/2/6 85/3/6 +f 86/1/1 23/2/1 22/3/1 +f 25/1/6 27/2/6 87/3/6 +f 88/1/6 89/2/6 90/3/6 +f 1/1/1 91/2/1 92/3/1 +f 88/1/6 90/2/6 93/3/6 +f 1/1/1 94/2/1 91/3/1 +f 88/1/6 93/2/6 95/3/6 +f 1/1/1 96/2/1 94/3/1 +f 88/1/6 95/2/6 97/3/6 +f 1/1/1 98/2/1 96/3/1 +f 88/1/6 97/2/6 99/3/6 +f 1/1/1 100/2/1 98/3/1 +f 88/1/6 99/2/6 101/3/6 +f 1/1/1 102/2/1 100/3/1 +f 88/1/6 101/2/6 103/3/6 +f 1/1/1 104/2/1 102/3/1 +f 88/1/6 103/2/6 105/3/6 +f 1/1/1 106/2/1 104/3/1 +f 88/1/6 105/2/6 107/3/6 +f 1/1/1 108/2/1 106/3/1 +f 88/1/6 107/2/6 109/3/6 +f 1/1/1 110/2/1 108/3/1 +f 88/1/6 109/2/6 111/3/6 +f 1/1/1 112/2/1 110/3/1 +f 88/1/6 111/2/6 113/3/6 +f 1/1/1 114/2/1 112/3/1 +f 88/1/6 113/2/6 115/3/6 +f 1/1/1 116/2/1 114/3/1 +f 88/1/6 115/2/6 117/3/6 +f 1/1/1 118/2/1 116/3/1 +f 88/1/6 117/2/6 119/3/6 +f 1/1/1 120/2/1 118/3/1 +f 88/1/6 119/2/6 121/3/6 +f 1/1/1 122/2/1 120/3/1 +f 88/1/6 121/2/6 123/3/6 +f 1/1/1 124/2/1 122/3/1 +f 88/1/6 123/2/6 125/3/6 +f 1/1/1 126/2/1 124/3/1 +f 88/1/6 125/2/6 127/3/6 +f 1/1/1 128/2/1 126/3/1 +f 88/1/6 127/2/6 129/3/6 +f 1/1/1 130/2/1 128/3/1 +f 88/1/6 129/2/6 131/3/6 +f 1/1/1 132/2/1 130/3/1 +f 88/1/6 131/2/6 133/3/6 +f 1/1/1 134/2/1 132/3/1 +f 88/1/6 133/2/6 135/3/6 +f 1/1/1 136/2/1 134/3/1 +f 88/1/6 135/2/6 137/3/6 +f 1/1/1 138/2/1 136/3/1 +f 88/1/6 137/2/6 139/3/6 +f 1/1/1 3/2/1 138/3/1 +f 88/1/6 139/2/6 140/3/6 +f 88/1/6 140/2/6 141/3/6 +f 1/1/1 142/2/1 2/3/1 +f 88/1/6 141/2/6 143/3/6 +f 1/1/1 144/2/1 142/3/1 +f 88/1/6 143/2/6 145/3/6 +f 1/1/1 146/2/1 144/3/1 +f 88/1/6 145/2/6 147/3/6 +f 1/1/1 148/2/1 146/3/1 +f 88/1/6 147/2/6 149/3/6 +f 1/1/1 150/2/1 148/3/1 +f 88/1/6 149/2/6 89/3/6 +f 1/1/1 92/2/1 150/3/1 +f 151/1/7 152/2/7 153/3/7 +f 154/1/8 155/2/8 156/3/8 +f 151/1/9 153/2/9 157/3/9 +f 154/1/10 158/2/10 155/3/10 +f 151/1/11 157/2/11 159/3/11 +f 154/1/12 160/2/12 158/3/12 +f 151/1/13 159/2/13 161/3/13 +f 154/1/14 162/2/14 160/3/14 +f 151/1/15 161/2/15 163/3/15 +f 154/1/16 164/2/16 162/3/16 +f 151/1/17 163/2/17 165/3/17 +f 154/1/18 166/2/18 164/3/18 +f 151/1/19 165/2/19 167/3/19 +f 154/1/20 168/2/20 166/3/20 +f 151/1/21 167/2/21 169/3/21 +f 154/1/22 170/2/22 168/3/22 +f 151/1/23 169/2/23 171/3/23 +f 154/1/24 172/2/24 170/3/24 +f 151/1/25 171/2/25 173/3/25 +f 154/1/26 174/2/26 172/3/26 +f 151/1/27 173/2/27 175/3/27 +f 154/1/28 176/2/28 174/3/28 +f 151/1/29 175/2/29 177/3/29 +f 154/1/30 178/2/30 176/3/30 +f 151/1/29 177/2/29 179/3/29 +f 154/1/30 180/2/30 178/3/30 +f 151/1/31 179/2/31 181/3/31 +f 154/1/32 182/2/32 180/3/32 +f 151/1/33 181/2/33 183/3/33 +f 154/1/34 184/2/34 182/3/34 +f 151/1/35 183/2/35 185/3/35 +f 154/1/36 186/2/36 184/3/36 +f 151/1/37 185/2/37 187/3/37 +f 154/1/38 188/2/38 186/3/38 +f 151/1/39 187/2/39 189/3/39 +f 154/1/40 190/2/40 188/3/40 +f 151/1/41 189/2/41 191/3/41 +f 154/1/42 192/2/42 190/3/42 +f 151/1/43 191/2/43 193/3/43 +f 154/1/44 194/2/44 192/3/44 +f 151/1/45 193/2/45 195/3/45 +f 154/1/46 196/2/46 194/3/46 +f 151/1/47 195/2/47 197/3/47 +f 154/1/48 198/2/48 196/3/48 +f 151/1/49 197/2/49 199/3/49 +f 154/1/50 200/2/50 198/3/50 +f 151/1/51 199/2/51 201/3/51 +f 154/1/52 202/2/52 200/3/52 +f 151/1/53 201/2/53 203/3/53 +f 154/1/54 204/2/54 202/3/54 +f 151/1/55 203/2/55 205/3/55 +f 154/1/56 206/2/56 204/3/56 +f 151/1/57 205/2/57 207/3/57 +f 154/1/28 208/2/28 206/3/28 +f 151/1/29 207/2/29 209/3/29 +f 154/1/30 210/2/30 208/3/30 +f 151/1/29 209/2/29 211/3/29 +f 154/1/30 212/2/30 210/3/30 +f 151/1/58 211/2/58 213/3/58 +f 154/1/32 214/2/32 212/3/32 +f 151/1/25 213/2/25 215/3/25 +f 154/1/26 216/2/26 214/3/26 +f 151/1/59 215/2/59 152/3/59 +f 154/1/60 156/2/60 216/3/60 +f 217/1/2 218/2/2 219/3/2 +f 220/1/61 221/3/61 222/2/61 +f 223/1/62 224/2/62 225/3/62 +f 226/1/3 227/3/3 228/2/3 +f 215/1/63 216/2/63 156/3/63 +f 215/1/64 156/3/64 152/12/64 +f 213/1/65 214/2/65 216/3/65 +f 213/1/66 216/3/66 215/12/66 +f 211/1/67 212/2/67 214/3/67 +f 211/1/68 214/3/68 213/12/68 +f 209/1/69 210/2/69 212/3/69 +f 209/1/70 212/3/70 211/12/70 +f 207/1/71 208/2/71 210/3/71 +f 207/1/72 210/3/72 209/12/72 +f 205/1/73 206/2/73 208/3/73 +f 205/1/74 208/3/74 207/12/74 +f 203/1/75 204/2/75 206/3/75 +f 203/1/76 206/3/76 205/12/76 +f 201/1/77 202/2/77 204/3/77 +f 201/1/78 204/3/78 203/12/78 +f 199/1/79 200/2/79 202/3/79 +f 199/1/80 202/3/80 201/12/80 +f 197/1/81 198/2/81 200/3/81 +f 197/1/82 200/3/82 199/12/82 +f 195/1/83 196/2/83 198/3/83 +f 195/1/84 198/3/84 197/12/84 +f 193/1/85 194/2/85 196/3/85 +f 193/1/86 196/3/86 195/12/86 +f 191/1/87 192/2/87 194/3/87 +f 191/1/88 194/3/88 193/12/88 +f 189/1/89 190/2/89 192/3/89 +f 189/1/89 192/3/89 191/12/89 +f 187/1/90 188/2/90 190/3/90 +f 187/1/91 190/3/91 189/12/91 +f 185/1/92 186/2/92 188/3/92 +f 185/1/93 188/3/93 187/12/93 +f 183/1/94 184/2/94 186/3/94 +f 183/1/94 186/3/94 185/12/94 +f 181/1/95 182/2/95 184/3/95 +f 181/1/96 184/3/96 183/12/96 +f 179/1/97 180/2/97 182/3/97 +f 179/1/98 182/3/98 181/12/98 +f 177/1/99 178/2/99 180/3/99 +f 177/1/100 180/3/100 179/12/100 +f 175/1/101 176/2/101 178/3/101 +f 175/1/102 178/3/102 177/12/102 +f 173/1/103 174/2/103 176/3/103 +f 173/1/104 176/3/104 175/12/104 +f 171/1/105 172/2/105 174/3/105 +f 171/1/106 174/3/106 173/12/106 +f 169/1/107 170/2/107 172/3/107 +f 169/1/108 172/3/108 171/12/108 +f 167/1/109 168/2/109 170/3/109 +f 167/1/110 170/3/110 169/12/110 +f 165/1/111 166/2/111 168/3/111 +f 165/1/112 168/3/112 167/12/112 +f 163/1/113 164/2/113 166/3/113 +f 163/1/114 166/3/114 165/12/114 +f 161/1/115 162/2/115 164/3/115 +f 161/1/116 164/3/116 163/12/116 +f 159/1/117 160/2/117 162/3/117 +f 159/1/118 162/3/118 161/12/118 +f 157/1/119 158/2/119 160/3/119 +f 157/1/120 160/3/120 159/12/120 +f 153/1/121 155/2/121 158/3/121 +f 153/1/122 158/3/122 157/12/122 +f 152/1/123 156/2/123 155/3/123 +f 152/1/124 155/3/124 153/12/124 +f 92/1/125 89/2/125 149/3/125 +f 92/1/125 149/3/125 150/12/125 +f 150/1/126 149/2/126 147/3/126 +f 150/1/126 147/3/126 148/12/126 +f 148/1/127 147/2/127 145/3/127 +f 148/1/127 145/3/127 146/12/127 +f 146/1/128 145/2/128 143/3/128 +f 146/1/128 143/3/128 144/12/128 +f 144/1/129 143/2/129 141/3/129 +f 144/1/129 141/3/129 142/12/129 +f 142/1/130 141/2/130 140/3/130 +f 142/1/130 140/3/130 2/12/130 +f 2/1/131 140/2/131 139/3/131 +f 2/1/131 139/3/131 3/12/131 +f 3/1/132 139/2/132 137/3/132 +f 3/1/132 137/3/132 138/12/132 +f 138/1/133 137/2/133 135/3/133 +f 138/1/133 135/3/133 136/12/133 +f 136/1/134 135/2/134 133/3/134 +f 136/1/134 133/3/134 134/12/134 +f 134/1/135 133/2/135 131/3/135 +f 134/1/135 131/3/135 132/12/135 +f 132/1/136 131/2/136 129/3/136 +f 132/1/136 129/3/136 130/12/136 +f 130/1/137 129/2/137 127/3/137 +f 130/1/137 127/3/137 128/12/137 +f 128/1/138 127/2/138 125/3/138 +f 128/1/138 125/3/138 126/12/138 +f 126/1/139 125/2/139 123/3/139 +f 126/1/140 123/3/140 124/12/140 +f 124/1/141 123/2/141 121/3/141 +f 124/1/142 121/3/142 122/12/142 +f 122/1/143 121/2/143 119/3/143 +f 122/1/143 119/3/143 120/12/143 +f 120/1/144 119/2/144 117/3/144 +f 120/1/144 117/3/144 118/12/144 +f 118/1/145 117/2/145 115/3/145 +f 118/1/145 115/3/145 116/12/145 +f 116/1/146 115/2/146 113/3/146 +f 116/1/146 113/3/146 114/12/146 +f 114/1/147 113/2/147 111/3/147 +f 114/1/147 111/3/147 112/12/147 +f 112/1/148 111/2/148 109/3/148 +f 112/1/149 109/3/149 110/12/149 +f 110/1/150 109/2/150 107/3/150 +f 110/1/151 107/3/151 108/12/151 +f 108/1/152 107/2/152 105/3/152 +f 108/1/152 105/3/152 106/12/152 +f 106/1/153 105/2/153 103/3/153 +f 106/1/153 103/3/153 104/12/153 +f 104/1/154 103/2/154 101/3/154 +f 104/1/154 101/3/154 102/12/154 +f 102/1/155 101/2/155 99/3/155 +f 102/1/155 99/3/155 100/12/155 +f 100/1/156 99/2/156 97/3/156 +f 100/1/156 97/3/156 98/12/156 +f 98/1/157 97/2/157 95/3/157 +f 98/1/158 95/3/158 96/12/158 +f 96/1/159 95/2/159 93/3/159 +f 96/1/160 93/3/160 94/12/160 +f 94/1/161 93/2/161 90/3/161 +f 94/1/162 90/3/162 91/12/162 +f 91/1/163 90/2/163 89/3/163 +f 91/1/164 89/3/164 92/12/164 +f 27/1/165 23/2/165 86/3/165 +f 27/1/166 86/3/166 87/12/166 +f 84/1/167 85/2/167 87/3/167 +f 84/1/168 87/3/168 86/12/168 +f 82/1/169 83/2/169 85/3/169 +f 82/1/169 85/3/169 84/12/169 +f 80/1/170 81/2/170 83/3/170 +f 80/1/170 83/3/170 82/12/170 +f 78/1/171 79/2/171 81/3/171 +f 78/1/171 81/3/171 80/12/171 +f 76/1/172 77/2/172 79/3/172 +f 76/1/172 79/3/172 78/12/172 +f 74/1/173 75/2/173 77/3/173 +f 74/1/173 77/3/173 76/12/173 +f 72/1/153 73/2/153 75/3/153 +f 72/1/174 75/3/174 74/12/174 +f 70/1/175 71/2/175 73/3/175 +f 70/1/176 73/3/176 72/12/176 +f 68/1/177 69/2/177 71/3/177 +f 68/1/177 71/3/177 70/12/177 +f 66/1/149 67/2/149 69/3/149 +f 66/1/149 69/3/149 68/12/149 +f 64/1/178 65/2/178 67/3/178 +f 64/1/178 67/3/178 66/12/178 +f 62/1/146 63/2/146 65/3/146 +f 62/1/146 65/3/146 64/12/146 +f 60/1/179 61/2/179 63/3/179 +f 60/1/180 63/3/180 62/12/180 +f 58/1/144 59/2/144 61/3/144 +f 58/1/144 61/3/144 60/12/144 +f 56/1/181 57/2/181 59/3/181 +f 56/1/181 59/3/181 58/12/181 +f 54/1/182 55/2/182 57/3/182 +f 54/1/183 57/3/183 56/12/183 +f 52/1/184 53/2/184 55/3/184 +f 52/1/185 55/3/185 54/12/185 +f 50/1/186 51/2/186 53/3/186 +f 50/1/186 53/3/186 52/12/186 +f 48/1/187 49/2/187 51/3/187 +f 48/1/187 51/3/187 50/12/187 +f 46/1/188 47/2/188 49/3/188 +f 46/1/188 49/3/188 48/12/188 +f 44/1/189 45/2/189 47/3/189 +f 44/1/189 47/3/189 46/12/189 +f 42/1/190 43/2/190 45/3/190 +f 42/1/190 45/3/190 44/12/190 +f 40/1/191 41/2/191 43/3/191 +f 40/1/191 43/3/191 42/12/191 +f 38/1/192 39/2/192 41/3/192 +f 38/1/192 41/3/192 40/12/192 +f 36/1/193 37/2/193 39/3/193 +f 36/1/193 39/3/193 38/12/193 +f 34/1/130 35/2/130 37/3/130 +f 34/1/130 37/3/130 36/12/130 +f 32/1/194 33/2/194 35/3/194 +f 32/1/194 35/3/194 34/12/194 +f 30/1/128 31/2/128 33/3/128 +f 30/1/128 33/3/128 32/12/128 +f 28/1/195 29/2/195 31/3/195 +f 28/1/195 31/3/195 30/12/195 +f 24/1/126 26/2/126 29/3/126 +f 24/1/126 29/3/126 28/12/126 +f 23/1/196 27/2/196 26/3/196 +f 23/1/196 26/3/196 24/12/196 Modified: branches/multiphys/rcssserver3d/data/models/rightgoal.obj =================================================================== --- branches/multiphys/rcssserver3d/data/models/rightgoal.obj 2010-01-10 23:45:10 UTC (rev 140) +++ branches/multiphys/rcssserver3d/data/models/rightgoal.obj 2010-01-13 06:28:54 UTC (rev 141) @@ -1,235 +1,247 @@ # Blender3D v249 OBJ File: # www.blender3d.org mtllib rightgoal.mtl -o rightgoal +o Cylinder +v 0.466661 0.000000 0.006727 v 0.490346 -0.000000 -0.062326 v 0.494467 -0.000000 -0.047393 +v 0.466661 0.997179 0.006727 +v 0.494467 0.997179 -0.047393 +v 0.490346 0.997179 -0.062326 v 0.497519 -0.000000 -0.030383 +v 0.497519 0.997179 -0.030383 v 0.499385 -0.000000 -0.011947 +v 0.499385 0.997179 -0.011947 v 0.499994 0.000000 0.007207 +v 0.499994 0.997179 0.007207 v 0.499322 0.000000 0.026343 +v 0.499322 0.997179 0.026343 v 0.497394 0.000000 0.044726 +v 0.497394 0.997179 0.044726 v 0.494286 0.000000 0.061645 +v 0.494286 0.997179 0.061645 v 0.490116 0.000000 0.076457 +v 0.490116 0.997179 0.076457 v 0.485044 0.000000 0.088589 +v 0.485044 0.997179 0.088589 v 0.479266 0.000000 0.097575 +v 0.479266 0.997179 0.097575 v 0.473004 0.000000 0.103068 +v 0.473004 0.997179 0.103068 v 0.466498 0.000000 0.104861 +v 0.466498 0.997179 0.104861 v 0.459998 0.000000 0.102880 +v 0.459998 0.997179 0.102880 v 0.453754 0.000000 0.097207 +v 0.453754 0.997179 0.097207 v 0.448007 0.000000 0.088054 +v 0.448007 0.997179 0.088057 v 0.442976 0.000000 0.075777 +v 0.442976 0.997179 0.075777 v 0.438855 0.000000 0.060848 +v 0.438855 0.997179 0.060848 v 0.435803 0.000000 0.043837 +v 0.435803 0.997179 0.043837 v 0.433937 0.000000 0.025401 +v 0.433937 0.997179 0.025401 v 0.433328 0.000000 0.006247 +v 0.433328 0.997179 0.006247 v 0.434000 -0.000000 -0.012889 +v 0.434000 0.997179 -0.012889 v 0.435928 -0.000000 -0.031272 +v 0.435928 0.997179 -0.031272 v 0.439036 -0.000000 -0.048194 +v 0.439036 0.997179 -0.048194 v 0.443207 -0.000000 -0.063006 +v 0.443206 0.997179 -0.063003 v 0.448278 -0.000000 -0.075135 +v 0.448278 0.997179 -0.075135 v 0.454056 -0.000000 -0.084120 +v 0.454056 0.997179 -0.084120 v 0.460318 -0.000000 -0.089614 +v 0.460318 0.997179 -0.089614 v 0.466824 -0.000000 -0.091407 +v 0.466824 0.997179 -0.091407 v 0.473324 -0.000000 -0.089428 +v 0.473324 0.997179 -0.089429 v 0.479568 -0.000000 -0.083752 +v 0.479568 0.997179 -0.083752 v 0.485316 -0.000000 -0.074602 -v 0.490346 0.997179 -0.062326 -v 0.494467 0.997179 -0.047393 -v 0.497519 0.997179 -0.030383 -v 0.499385 0.997179 -0.011947 -v 0.499994 0.997179 0.007207 -v 0.499322 0.997179 0.026343 -v 0.497394 0.997179 0.044726 -v 0.494286 0.997179 0.061645 -v 0.490116 0.997179 0.076457 -v 0.485044 0.997179 0.088589 -v 0.479266 0.997179 0.097575 -v 0.473004 0.997179 0.103068 -v 0.466498 0.997179 0.104861 -v 0.459998 0.997179 0.102880 -v 0.453754 0.997179 0.097207 -v 0.448007 0.997179 0.088057 -v 0.442976 0.997179 0.075777 -v 0.438855 0.997179 0.060848 -v 0.435803 0.997179 0.043837 -v 0.433937 0.997179 0.025401 -v 0.433328 0.997179 0.006247 -v 0.434000 0.997179 -0.012889 -v 0.435928 0.997179 -0.031272 -v 0.439036 0.997179 -0.048194 -v 0.443206 0.997179 -0.063003 -v 0.448278 0.997179 -0.075135 -v 0.454056 0.997179 -0.084120 -v 0.460318 0.997179 -0.089614 -v 0.466824 0.997179 -0.091407 -v 0.473324 0.997179 -0.089429 -v 0.479568 0.997179 -0.083752 v 0.485315 0.997179 -0.074602 -v 0.466661 0.000000 0.006727 -v 0.466661 0.997179 0.006727 v -0.466661 0.997179 -0.006727 +v -0.442976 0.997179 -0.075777 +v -0.448007 0.997179 -0.088057 v -0.466661 -0.000000 -0.006727 -v -0.448007 0.997179 -0.088057 +v -0.448007 -0.000000 -0.088054 +v -0.442976 -0.000000 -0.075777 v -0.453755 0.997179 -0.097207 +v -0.453754 -0.000000 -0.097207 v -0.459998 0.997179 -0.102883 +v -0.459998 -0.000000 -0.102880 v -0.466498 0.997179 -0.104861 +v -0.466498 -0.000000 -0.104861 v -0.473004 0.997179 -0.103068 +v -0.473004 -0.000000 -0.103068 v -0.479266 0.997179 -0.097575 +v -0.479266 -0.000000 -0.097575 v -0.485044 0.997179 -0.088589 +v -0.485044 -0.000000 -0.088589 v -0.490116 0.997179 -0.076457 +v -0.490116 -0.000000 -0.076457 v -0.494286 0.997179 -0.061646 +v -0.494286 -0.000000 -0.061645 v -0.497394 0.997179 -0.044723 +v -0.497394 -0.000000 -0.044726 v -0.499322 0.997179 -0.026343 +v -0.499322 -0.000000 -0.026343 v -0.499994 0.997179 -0.007207 +v -0.499994 -0.000000 -0.007207 v -0.499385 0.997179 0.011947 +v -0.499385 0.000000 0.011947 v -0.497519 0.997179 0.030383 +v -0.497519 0.000000 0.030383 v -0.494467 0.997179 0.047393 +v -0.494467 0.000000 0.047393 v -0.490346 0.997179 0.062326 +v -0.490346 0.000000 0.062326 v -0.485315 0.997179 0.074602 +v -0.485316 0.000000 0.074602 v -0.479568 0.997179 0.083752 +v -0.479568 0.000000 0.083752 v -0.473324 0.997179 0.089428 +v -0.473324 0.000000 0.089428 v -0.466824 0.997179 0.091407 +v -0.466824 0.000000 0.091407 v -0.460318 0.997179 0.089614 +v -0.460318 0.000000 0.089614 v -0.454056 0.997179 0.084120 +v -0.454056 0.000000 0.084120 v -0.448278 0.997179 0.075135 +v -0.448278 0.000000 0.075135 v -0.443207 0.997179 0.063006 +v -0.443207 0.000000 0.063006 v -0.439036 0.997179 0.048194 +v -0.439036 0.000000 0.048194 v -0.435928 0.997179 0.031272 v -0.434000 0.997179 0.012889 +v -0.434000 0.000000 0.012889 +v -0.435928 0.000000 0.031272 v -0.433328 0.997179 -0.006247 +v -0.433328 -0.000000 -0.006247 v -0.433937 0.997179 -0.025401 +v -0.433937 -0.000000 -0.025401 v -0.435803 0.997179 -0.043837 +v -0.435803 -0.000000 -0.043837 v -0.438855 0.997179 -0.060848 -v -0.442976 0.997179 -0.075777 -v -0.448007 -0.000000 -0.088054 -v -0.453754 -0.000000 -0.097207 -v -0.459998 -0.000000 -0.102880 -v -0.466498 -0.000000 -0.104861 -v -0.473004 -0.000000 -0.103068 -v -0.479266 -0.000000 -0.097575 -v -0.485044 -0.000000 -0.088589 -v -0.490116 -0.000000 -0.076457 -v -0.494286 -0.000000 -0.061645 -v -0.497394 -0.000000 -0.044726 -v -0.499322 -0.000000 -0.026343 -v -0.499994 -0.000000 -0.007207 -v -0.499385 0.000000 0.011947 -v -0.497519 0.000000 0.030383 -v -0.494467 0.000000 0.047393 -v -0.490346 0.000000 0.062326 -v -0.485316 0.000000 0.074602 -v -0.479568 0.000000 0.083752 -v -0.473324 0.000000 0.089428 -v -0.466824 0.000000 0.091407 -v -0.460318 0.000000 0.089614 -v -0.454056 0.000000 0.084120 -v -0.448278 0.000000 0.075135 -v -0.443207 0.000000 0.063006 -v -0.439036 0.000000 0.048194 -v -0.435928 0.000000 0.031272 -v -0.434000 0.000000 0.012889 -v -0.433328 -0.000000 -0.006247 -v -0.433937 -0.000000 -0.025401 -v -0.435803 -0.000000 -0.043837 v -0.438855 -0.000000 -0.060848 -v -0.442976 -0.000000 -0.075777 +v -0.465871 0.964236 -0.006715 v -0.465814 0.986271 -0.041411 v -0.465804 0.981550 -0.047514 +v 0.467451 0.964236 0.006739 +v 0.467519 0.981550 -0.034060 +v 0.467508 0.986271 -0.027957 v -0.465796 0.976161 -0.052048 +v 0.467526 0.976161 -0.038594 v -0.465791 0.970316 -0.054839 +v 0.467531 0.970316 -0.041385 v -0.465790 0.964236 -0.055781 +v 0.467532 0.964236 -0.042330 v -0.465791 0.958158 -0.054839 +v 0.467531 0.958158 -0.041385 v -0.465796 0.952311 -0.052048 +v 0.467526 0.952311 -0.038594 v -0.465804 0.946925 -0.047514 +v 0.467519 0.946925 -0.034060 v -0.465814 0.942202 -0.041411 +v 0.467508 0.942202 -0.027957 v -0.465826 0.938326 -0.033974 +v 0.467496 0.938326 -0.020523 v -0.465840 0.935446 -0.025493 +v 0.467482 0.935446 -0.012038 v -0.465855 0.933674 -0.016287 +v 0.467467 0.933674 -0.002835 v -0.465871 0.933074 -0.006715 +v 0.467451 0.933074 0.006739 v -0.465887 0.933674 0.002859 +v 0.467435 0.933674 0.016310 v -0.465903 0.935446 0.012062 +v 0.467420 0.935446 0.025516 v -0.465917 0.938326 0.020544 +v 0.467405 0.938326 0.033998 v -0.465929 0.942202 0.027980 +v 0.467393 0.942202 0.041435 v -0.465939 0.946925 0.034083 +v 0.467383 0.946925 0.047535 v -0.465947 0.952311 0.038617 +v 0.467375 0.952311 0.052071 v -0.465951 0.958158 0.041408 +v 0.467371 0.958158 0.054862 v -0.465953 0.964236 0.042353 +v 0.467369 0.964236 0.055804 v -0.465951 0.970316 0.041408 +v 0.467371 0.970316 0.054862 v -0.465947 0.976161 0.038617 +v 0.467375 0.976161 0.052071 v -0.465939 0.981550 0.034083 +v 0.467383 0.981550 0.047535 v -0.465929 0.986271 0.027980 +v 0.467393 0.986271 0.041435 v -0.465917 0.990147 0.020544 +v 0.467405 0.990147 0.033998 v -0.465903 0.993026 0.012062 +v 0.467420 0.993026 0.025516 v -0.465887 0.994800 0.002859 +v 0.467435 0.994800 0.016310 v -0.465871 0.995399 -0.006715 +v 0.467451 0.995399 0.006739 v -0.465855 0.994800 -0.016287 +v 0.467467 0.994800 -0.002835 v -0.465840 0.993026 -0.025493 +v 0.467482 0.993026 -0.012038 v -0.465826 0.990147 -0.033974 -v 0.467508 0.986271 -0.027957 -v 0.467519 0.981550 -0.034060 -v 0.467526 0.976161 -0.038594 -v 0.467531 0.970316 -0.041385 -v 0.467532 0.964236 -0.042330 -v 0.467531 0.958158 -0.041385 -v 0.467526 0.952311 -0.038594 -v 0.467519 0.946925 -0.034060 -v 0.467508 0.942202 -0.027957 -v 0.467496 0.938326 -0.020523 -v 0.467482 0.935446 -0.012038 -v 0.467467 0.933674 -0.002835 -v 0.467451 0.933074 0.006739 -v 0.467435 0.933674 0.016310 -v 0.467420 0.935446 0.025516 -v 0.467405 0.938326 0.033998 -v 0.467393 0.942202 0.041435 -v 0.467383 0.946925 0.047535 -v 0.467375 0.952311 0.052071 -v 0.467371 0.958158 0.054862 -v 0.467369 0.964236 0.055804 -v 0.467371 0.970316 0.054862 -v 0.467375 0.976161 0.052071 -v 0.467383 0.981550 0.047535 -v 0.467393 0.986271 0.041435 -v 0.467405 0.990147 0.033998 -v 0.467420 0.993026 0.025516 -v 0.467435 0.994800 0.016310 -v 0.467451 0.995399 0.006739 -v 0.467467 0.994800 -0.002835 -v 0.467482 0.993026 -0.012038 v 0.467496 0.990147 -0.020523 -v -0.465871 0.964236 -0.006715 -v 0.467451 0.964236 0.006739 +v -0.458524 0.001554 -0.890770 +v -0.459830 0.498835 -0.105700 v -0.459830 0.000247 -0.105700 -v -0.459830 0.498835 -0.105700 -v -0.458524 0.001554 -0.890770 +v -0.465191 0.001554 -0.890770 +v -0.466496 0.000247 -0.105700 +v -0.466496 0.498835 -0.105700 +v 0.474809 0.001554 -0.890770 +v 0.473504 0.498835 -0.105700 +v 0.473504 0.000247 -0.105700 +v 0.468143 0.001554 -0.890770 +v 0.466837 0.000247 -0.105700 +v 0.466837 0.498835 -0.105700 v 0.469231 0.001554 -0.881690 v 0.467925 1.000000 -0.096621 v 0.467925 0.000247 -0.096621 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 v -0.463784 0.001554 -0.895139 -v -0.465090 1.000000 -0.110069 v -0.465090 0.000247 -0.110069 v -0.465090 1.000000 -0.110069 v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v 0.469231 0.001554 -0.881690 +v 0.467925 0.000247 -0.096621 v 0.467925 1.000000 -0.096621 v 0.469231 0.001554 -0.881690 -v -0.465090 0.000247 -0.110069 +v 0.467925 1.000000 -0.096621 v -0.465090 1.000000 -0.110069 v -0.463784 0.001554 -0.895139 -v -0.465191 0.001554 -0.890770 -v -0.466496 0.498835 -0.105700 -v -0.466496 0.000247 -0.105700 -v 0.474809 0.001554 -0.890770 -v 0.473504 0.498835 -0.105700 -v 0.473504 0.000247 -0.105700 -v 0.468143 0.001554 -0.890770 -v 0.466837 0.498835 -0.105700 -v 0.466837 0.000247 -0.105700 v 0.469231 0.001554 -0.881690 v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.478737 0.520656 +vt 0.239368 1.000000 +vt 0.239368 0.520028 +vt 0.239368 0.520656 +vt 0.000000 0.520028 +vt 0.812878 0.000000 +vt 0.812878 0.520028 +vt 0.000000 0.520027 +vt 1.000000 1.000000 vn -0.000000 -1.000000 0.000000 vn 0.999999 0.000000 0.001664 vn -0.999999 -0.000000 -0.001664 @@ -428,401 +440,401 @@ vn 0.963964 -0.000000 -0.266033 usemtl grey_naogoalnet.png s off -f 68//1 126//1 125//1 -f 206//2 205//2 204//2 -f 207//3 209//3 208//3 -f 216//2 215//2 214//2 -f 226//3 228//3 227//3 -f 213//4 212//4 210//4 -f 213//4 210//4 211//4 -f 202//5 207//5 208//5 -f 202//5 208//5 203//5 +f 70/1/1 124/2/1 120/3/1 +f 211/4/2 212/5/2 213/6/2 +f 214/7/3 215/8/3 216/1/3 +f 217/7/2 218/1/2 219/8/2 +f 220/4/3 221/6/3 222/5/3 +f 223/9/4 224/10/4 225/11/4 +f 223/9/4 225/11/4 226/2/4 +f 227/9/5 214/2/5 216/11/5 +f 227/9/5 216/11/5 228/10/5 usemtl white -f 201//2 200//2 199//2 -f 217//6 219//6 218//6 -f 220//7 221//7 222//7 -f 223//3 225//3 224//3 +f 199/1/2 200/2/2 201/3/2 +f 202/1/6 203/3/6 204/2/6 +f 205/1/7 206/2/7 207/3/7 +f 208/1/3 209/3/3 210/2/3 usemtl sky-blue -f 65//1 1//1 2//1 -f 66//8 34//8 33//8 -f 65//1 2//1 3//1 -f 66//8 35//8 34//8 -f 65//1 3//1 4//1 -f 66//8 36//8 35//8 -f 65//1 4//1 5//1 -f 66//8 37//8 36//8 -f 65//1 5//1 6//1 -f 66//8 38//8 37//8 -f 65//1 6//1 7//1 -f 66//8 39//8 38//8 -f 65//1 7//1 8//1 -f 66//8 40//8 39//8 -f 65//1 8//1 9//1 -f 66//8 41//8 40//8 -f 65//1 9//1 10//1 -f 66//8 42//8 41//8 -f 65//1 10//1 11//1 -f 66//8 43//8 42//8 -f 65//1 11//1 12//1 -f 66//8 44//8 43//8 -f 65//1 12//1 13//1 -f 66//8 45//8 44//8 -f 65//1 13//1 14//1 -f 66//8 46//8 45//8 -f 65//1 14//1 15//1 -f 66//8 47//8 46//8 -f 65//1 15//1 16//1 -f 66//8 48//8 47//8 -f 65//1 16//1 17//1 -f 66//8 49//8 48//8 -f 65//1 17//1 18//1 -f 66//8 50//8 49//8 -f 65//1 18//1 19//1 -f 66//8 51//8 50//8 -f 65//1 19//1 20//1 -f 66//8 52//8 51//8 -f 65//1 20//1 21//1 -f 66//8 53//8 52//8 -f 65//1 21//1 22//1 -f 66//8 54//8 53//8 -f 65//1 22//1 23//1 -f 66//8 55//8 54//8 -f 65//1 23//1 24//1 -f 66//8 56//8 55//8 -f 65//1 24//1 25//1 -f 66//8 57//8 56//8 -f 65//1 25//1 26//1 -f 66//8 58//8 57//8 -f 65//1 26//1 27//1 -f 66//8 59//8 58//8 -f 65//1 27//1 28//1 -f 66//8 60//8 59//8 -f 65//1 28//1 29//1 -f 66//8 61//8 60//8 -f 65//1 29//1 30//1 -f 66//8 62//8 61//8 -f 65//1 30//1 31//1 -f 66//8 63//8 62//8 -f 65//1 31//1 32//1 -f 66//8 64//8 63//8 -f 32//1 1//1 65//1 -f 66//8 33//8 64//8 -f 67//8 100//8 69//8 -f 68//1 101//1 132//1 -f 67//8 69//8 70//8 -f 68//1 102//1 101//1 -f 67//8 70//8 71//8 -f 68//1 103//1 102//1 -f 67//8 71//8 72//8 -f 68//1 104//1 103//1 -f 67//8 72//8 73//8 -f 68//1 105//1 104//1 -f 67//8 73//8 74//8 -f 68//1 106//1 105//1 -f 67//8 74//8 75//8 -f 68//1 107//1 106//1 -f 67//8 75//8 76//8 -f 68//1 108//1 107//1 -f 67//8 76//8 77//8 -f 68//1 109//1 108//1 -f 67//8 77//8 78//8 -f 68//1 110//1 109//1 -f 67//8 78//8 79//8 -f 68//1 111//1 110//1 -f 67//8 79//8 80//8 -f 68//1 112//1 111//1 -f 67//8 80//8 81//8 -f 68//1 113//1 112//1 -f 67//8 81//8 82//8 -f 68//1 114//1 113//1 -f 67//8 82//8 83//8 -f 68//1 115//1 114//1 -f 67//8 83//8 84//8 -f 68//1 116//1 115//1 -f 67//8 84//8 85//8 -f 68//1 117//1 116//1 -f 67//8 85//8 86//8 -f 68//1 118//1 117//1 -f 67//8 86//8 87//8 -f 68//1 119//1 118//1 -f 67//8 87//8 88//8 -f 68//1 120//1 119//1 -f 67//8 88//8 89//8 -f 68//1 121//1 120//1 -f 67//8 89//8 90//8 -f 68//1 122//1 121//1 -f 67//8 90//8 91//8 -f 68//1 123//1 122//1 -f 67//8 91//8 92//8 -f 68//1 124//1 123//1 -f 67//8 92//8 93//8 -f 68//1 125//1 124//1 -f 67//8 93//8 94//8 -f 67//8 94//8 95//8 -f 68//1 127//1 126//1 -f 67//8 95//8 96//8 -f 68//1 128//1 127//1 -f 67//8 96//8 97//8 -f 68//1 129//1 128//1 -f 67//8 97//8 98//8 -f 68//1 130//1 129//1 -f 67//8 98//8 99//8 -f 68//1 131//1 130//1 -f 67//8 99//8 100//8 -f 68//1 132//1 131//1 -f 197//9 133//9 134//9 -f 198//10 166//10 165//10 -f 197//11 134//11 135//11 -f 198//12 167//12 166//12 -f 197//13 135//13 136//13 -f 198//14 168//14 167//14 -f 197//15 136//15 137//15 -f 198//16 169//16 168//16 -f 197//17 137//17 138//17 -f 198//18 170//18 169//18 -f 197//19 138//19 139//19 -f 198//20 171//20 170//20 -f 197//21 139//21 140//21 -f 198//22 172//22 171//22 -f 197//23 140//23 141//23 -f 198//24 173//24 172//24 -f 197//25 141//25 142//25 -f 198//26 174//26 173//26 -f 197//27 142//27 143//27 -f 198//28 175//28 174//28 -f 197//29 143//29 144//29 -f 198//30 176//30 175//30 -f 197//31 144//31 145//31 -f 198//32 177//32 176//32 -f 197//31 145//31 146//31 -f 198//32 178//32 177//32 -f 197//33 146//33 147//33 -f 198//34 179//34 178//34 -f 197//35 147//35 148//35 -f 198//36 180//36 179//36 -f 197//37 148//37 149//37 -f 198//38 181//38 180//38 -f 197//39 149//39 150//39 -f 198//40 182//40 181//40 -f 197//41 150//41 151//41 -f 198//42 183//42 182//42 -f 197//43 151//43 152//43 -f 198//44 184//44 183//44 -f 197//45 152//45 153//45 -f 198//46 185//46 184//46 -f 197//47 153//47 154//47 -f 198//48 186//48 185//48 -f 197//49 154//49 155//49 -f 198//50 187//50 186//50 -f 197//51 155//51 156//51 -f 198//52 188//52 187//52 -f 197//53 156//53 157//53 -f 198//54 189//54 188//54 -f 197//55 157//55 158//55 -f 198//56 190//56 189//56 -f 197//57 158//57 159//57 -f 198//58 191//58 190//58 -f 197//59 159//59 160//59 -f 198//30 192//30 191//30 -f 197//31 160//31 161//31 -f 198//32 193//32 192//32 -f 197//31 161//31 162//31 -f 198//32 194//32 193//32 -f 197//60 162//60 163//60 -f 198//34 195//34 194//34 -f 197//27 163//27 164//27 -f 198//28 196//28 195//28 -f 197//61 164//61 133//61 -f 198//62 165//62 196//62 -f 164//63 196//63 165//63 -f 164//64 165//64 133//64 -f 163//65 195//65 196//65 -f 163//66 196//66 164//66 -f 162//67 194//67 195//67 -f 162//68 195//68 163//68 -f 161//69 193//69 194//69 -f 161//70 194//70 162//70 -f 160//71 192//71 193//71 -f 160//72 193//72 161//72 -f 159//73 191//73 192//73 -f 159//74 192//74 160//74 -f 158//75 190//75 191//75 -f 158//76 191//76 159//76 -f 157//77 189//77 190//77 -f 157//78 190//78 158//78 -f 156//79 188//79 189//79 -f 156//80 189//80 157//80 -f 155//81 187//81 188//81 -f 155//82 188//82 156//82 -f 154//83 186//83 187//83 -f 154//84 187//84 155//84 -f 153//85 185//85 186//85 -f 153//86 186//86 154//86 -f 152//87 184//87 185//87 -f 152//88 185//88 153//88 -f 151//89 183//89 184//89 -f 151//89 184//89 152//89 -f 150//90 182//90 183//90 -f 150//91 183//91 151//91 -f 149//92 181//92 182//92 -f 149//93 182//93 150//93 -f 148//94 180//94 181//94 -f 148//94 181//94 149//94 -f 147//95 179//95 180//95 -f 147//96 180//96 148//96 -f 146//97 178//97 179//97 -f 146//98 179//98 147//98 -f 145//99 177//99 178//99 -f 145//100 178//100 146//100 -f 144//101 176//101 177//101 -f 144//102 177//102 145//102 -f 143//103 175//103 176//103 -f 143//104 176//104 144//104 -f 142//105 174//105 175//105 -f 142//106 175//106 143//106 -f 141//107 173//107 174//107 -f 141//108 174//108 142//108 -f 140//109 172//109 173//109 -f 140//110 173//110 141//110 -f 139//111 171//111 172//111 -f 139//112 172//112 140//112 -f 138//113 170//113 171//113 -f 138//114 171//114 139//114 -f 137//115 169//115 170//115 -f 137//116 170//116 138//116 -f 136//117 168//117 169//117 -f 136//118 169//118 137//118 -f 135//119 167//119 168//119 -f 135//120 168//120 136//120 -f 134//121 166//121 167//121 -f 134//122 167//122 135//122 -f 133//123 165//123 166//123 -f 133//124 166//124 134//124 -f 132//125 100//125 99//125 -f 132//125 99//125 131//125 -f 131//126 99//126 98//126 -f 131//126 98//126 130//126 -f 130//127 98//127 97//127 -f 130//127 97//127 129//127 -f 129//128 97//128 96//128 -f 129//128 96//128 128//128 -f 128//129 96//129 95//129 -f 128//129 95//129 127//129 -f 127//130 95//130 94//130 -f 127//130 94//130 126//130 -f 126//131 94//131 93//131 -f 126//131 93//131 125//131 -f 125//132 93//132 92//132 -f 125//132 92//132 124//132 -f 124//133 92//133 91//133 -f 124//133 91//133 123//133 -f 123//134 91//134 90//134 -f 123//134 90//134 122//134 -f 122//135 90//135 89//135 -f 122//135 89//135 121//135 -f 121//136 89//136 88//136 -f 121//136 88//136 120//136 -f 120//137 88//137 87//137 -f 120//137 87//137 119//137 -f 119//138 87//138 86//138 -f 119//138 86//138 118//138 -f 118//139 86//139 85//139 -f 118//140 85//140 117//140 -f 117//141 85//141 84//141 -f 117//142 84//142 116//142 -f 116//143 84//143 83//143 -f 116//143 83//143 115//143 -f 115//144 83//144 82//144 -f 115//144 82//144 114//144 -f 114//145 82//145 81//145 -f 114//145 81//145 113//145 -f 113//146 81//146 80//146 -f 113//146 80//146 112//146 -f 112//147 80//147 79//147 -f 112//147 79//147 111//147 -f 111//148 79//148 78//148 -f 111//149 78//149 110//149 -f 110//150 78//150 77//150 -f 110//151 77//151 109//151 -f 109//152 77//152 76//152 -f 109//152 76//152 108//152 -f 108//153 76//153 75//153 -f 108//153 75//153 107//153 -f 107//154 75//154 74//154 -f 107//154 74//154 106//154 -f 106//155 74//155 73//155 -f 106//155 73//155 105//155 -f 105//156 73//156 72//156 -f 105//156 72//156 104//156 -f 104//157 72//157 71//157 -f 104//158 71//158 103//158 -f 103//159 71//159 70//159 -f 103//160 70//160 102//160 -f 102//161 70//161 69//161 -f 102//162 69//162 101//162 -f 101//163 69//163 100//163 -f 101//164 100//164 132//164 -f 33//165 1//165 32//165 -f 33//166 32//166 64//166 -f 31//167 63//167 64//167 -f 31//168 64//168 32//168 -f 30//169 62//169 63//169 -f 30//169 63//169 31//169 -f 29//170 61//170 62//170 -f 29//170 62//170 30//170 -f 28//171 60//171 61//171 -f 28//171 61//171 29//171 -f 27//172 59//172 60//172 -f 27//172 60//172 28//172 -f 26//173 58//173 59//173 -f 26//173 59//173 27//173 -f 25//153 57//153 58//153 -f 25//174 58//174 26//174 -f 24//175 56//175 57//175 -f 24//176 57//176 25//176 -f 23//177 55//177 56//177 -f 23//177 56//177 24//177 -f 22//149 54//149 55//149 -f 22//149 55//149 23//149 -f 21//178 53//178 54//178 -f 21//178 54//178 22//178 -f 20//146 52//146 53//146 -f 20//146 53//146 21//146 -f 19//179 51//179 52//179 -f 19//180 52//180 20//180 -f 18//144 50//144 51//144 -f 18//144 51//144 19//144 -f 17//181 49//181 50//181 -f 17//181 50//181 18//181 -f 16//182 48//182 49//182 -f 16//183 49//183 17//183 -f 15//184 47//184 48//184 -f 15//185 48//185 16//185 -f 14//186 46//186 47//186 -f 14//186 47//186 15//186 -f 13//187 45//187 46//187 -f 13//187 46//187 14//187 -f 12//188 44//188 45//188 -f 12//188 45//188 13//188 -f 11//189 43//189 44//189 -f 11//189 44//189 12//189 -f 10//190 42//190 43//190 -f 10//190 43//190 11//190 -f 9//191 41//191 42//191 -f 9//191 42//191 10//191 -f 8//192 40//192 41//192 -f 8//192 41//192 9//192 -f 7//193 39//193 40//193 -f 7//193 40//193 8//193 -f 6//130 38//130 39//130 -f 6//130 39//130 7//130 -f 5//194 37//194 38//194 -f 5//194 38//194 6//194 -f 4//128 36//128 37//128 -f 4//128 37//128 5//128 -f 3//195 35//195 36//195 -f 3//195 36//195 4//195 -f 2//126 34//126 35//126 -f 2//126 35//126 3//126 -f 1//196 33//196 34//196 -f 1//196 34//196 2//196 +f 1/1/1 2/2/1 3/3/1 +f 4/1/8 5/2/8 6/3/8 +f 1/1/1 3/2/1 7/3/1 +f 4/1/8 8/2/8 5/3/8 +f 1/1/1 7/2/1 9/3/1 +f 4/1/8 10/2/8 8/3/8 +f 1/1/1 9/2/1 11/3/1 +f 4/1/8 12/2/8 10/3/8 +f 1/1/1 11/2/1 13/3/1 +f 4/1/8 14/2/8 12/3/8 +f 1/1/1 13/2/1 15/3/1 +f 4/1/8 16/2/8 14/3/8 +f 1/1/1 15/2/1 17/3/1 +f 4/1/8 18/2/8 16/3/8 +f 1/1/1 17/2/1 19/3/1 +f 4/1/8 20/2/8 18/3/8 +f 1/1/1 19/2/1 21/3/1 +f 4/1/8 22/2/8 20/3/8 +f 1/1/1 21/2/1 23/3/1 +f 4/1/8 24/2/8 22/3/8 +f 1/1/1 23/2/1 25/3/1 +f 4/1/8 26/2/8 24/3/8 +f 1/1/1 25/2/1 27/3/1 +f 4/1/8 28/2/8 26/3/8 +f 1/1/1 27/2/1 29/3/1 +f 4/1/8 30/2/8 28/3/8 +f 1/1/1 29/2/1 31/3/1 +f 4/1/8 32/2/8 30/3/8 +f 1/1/1 31/2/1 33/3/1 +f 4/1/8 34/2/8 32/3/8 +f 1/1/1 33/2/1 35/3/1 +f 4... [truncated message content] |
From: <he...@us...> - 2010-01-10 23:45:17
|
Revision: 140 http://simspark.svn.sourceforge.net/simspark/?rev=140&view=rev Author: hedayat Date: 2010-01-10 23:45:10 +0000 (Sun, 10 Jan 2010) Log Message: ----------- Add a new script: rcsoccersim3d to run both a server and a monitor, and shut down the server when monitor quits renamed simspark to rcssserver3d Updates release notes Modified Paths: -------------- trunk/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/RELEASE trunk/rcssserver3d/rcssserver3d/CMakeLists.txt trunk/rcssserver3d/rcssserver3d/main.cpp Added Paths: ----------- trunk/rcssserver3d/rcssserver3d/ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb trunk/rcssserver3d/rcssserver3d/rcsoccersim3d.in Removed Paths: ------------- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb trunk/rcssserver3d/simspark/ Modified: trunk/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/CMakeLists.txt 2010-01-10 09:14:25 UTC (rev 139) +++ trunk/rcssserver3d/CMakeLists.txt 2010-01-10 23:45:10 UTC (rev 140) @@ -76,7 +76,7 @@ add_subdirectory(plugin) add_subdirectory(rcssagent3d) add_subdirectory(rcssmonitor3d) -add_subdirectory(simspark) +add_subdirectory(rcssserver3d) ########### install files ############### Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-10 09:14:25 UTC (rev 139) +++ trunk/rcssserver3d/ChangeLog 2010-01-10 23:45:10 UTC (rev 140) @@ -1,3 +1,19 @@ +2010-01-11 Hedayat Vatankhah <he...@gr...> + + * RELEASE: + - added some notes about the name change and also the new script + (rcsoccersim3d) + + * CMakeLists.txt: + * rcssserver3d/main.cpp: + * rcssserver3d/CMakeLists.txt: + - renamed simspark -> rcssserver3d. creating a simspark symbolic link for + backward compatibility + + * rcssserver3d/rcsoccersim3d.in: + - added rcsoccersim3d script to run both rcssserver3d (simspark) and + rcssmonitor3d, and terminate the simulator when the monitor stops + 2010-01-09 Hedayat Vatankhah <he...@gr...> * data/models/leftgoal.obj: Modified: trunk/rcssserver3d/RELEASE =================================================================== --- trunk/rcssserver3d/RELEASE 2010-01-10 09:14:25 UTC (rev 139) +++ trunk/rcssserver3d/RELEASE 2010-01-10 23:45:10 UTC (rev 140) @@ -1,7 +1,10 @@ RELEASE News of rcssserver3d-0.6.3 (In progress) * Most notable changes: - - No internal monitor by default. Run rcssmonitor3d separately to see the game. + - Name change: simspark -> rcssserver3d. To make the functionality more clear. + - No internal monitor by default. Run rcssmonitor3d separately to see the game. + As another option, you might run rcsoccersim3d which runs both + rcssserver3d (simspark) and rcssmonitor3d on the local machine. - Added HMDP effector/perceptor - Some compilation fixes - Improved Windows support Modified: trunk/rcssserver3d/rcssserver3d/CMakeLists.txt =================================================================== --- trunk/rcssserver3d/simspark/CMakeLists.txt 2009-12-18 13:01:31 UTC (rev 126) +++ trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2010-01-10 23:45:10 UTC (rev 140) @@ -1,10 +1,10 @@ ########### next target ############### -set(simspark_SRCS +set(rcssserver3d_SRCS main.cpp ) -add_executable(simspark ${simspark_SRCS}) +add_executable(rcssserver3d ${rcssserver3d_SRCS}) if (APPLE) set(SDL_LINK_LIBS ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) @@ -12,16 +12,27 @@ include_directories(${SDL_INCLUDE_DIR}) -target_link_libraries(simspark ${SPARK_LIBRARIES} ${SALT_LIBRARIES} +target_link_libraries(rcssserver3d ${SPARK_LIBRARIES} ${SALT_LIBRARIES} ${ZEITGEIST_LIBRARIES} ${OXYGEN_LIBRARIES} ${KEROSIN_LIBRARIES} ${SDL_LINK_LIBS} ${RCSSNET3D_LIBRARY}) -set_target_properties(simspark PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") -install(TARGETS simspark DESTINATION ${BINDIR}) +set_target_properties(rcssserver3d PROPERTIES INSTALL_RPATH "${RPATH_DIRECTORIES}") +install(TARGETS rcssserver3d DESTINATION ${BINDIR}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rcsoccersim3d.in + ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d) +execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink + ${CMAKE_INSTALL_PREFIX}/${BINDIR}/rcssserver3d + ${CMAKE_CURRENT_BINARY_DIR}/simspark) + ########### install files ############### install(FILES simspark.rb soccersim.rb naosoccersim.rb internalsoccermonitor.rb internalsoccerbindings.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rcsoccersim3d + ${CMAKE_CURRENT_BINARY_DIR}/simspark DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) Modified: trunk/rcssserver3d/rcssserver3d/main.cpp =================================================================== --- trunk/rcssserver3d/simspark/main.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ trunk/rcssserver3d/rcssserver3d/main.cpp 2010-01-10 23:45:10 UTC (rev 140) @@ -69,7 +69,7 @@ void SimSpark::PrintGreeting() { GetLog()->Normal() - << "simspark, a monolithic simulator 0.6.1\n" + << "rcssserver3d (formerly simspark), a monolithic simulator 0.6.1\n" << "Copyright (C) 2004 Markus Rollmann, \n" << "Universität Koblenz.\n" << "Copyright (C) 2004-2009, " @@ -80,7 +80,7 @@ void SimSpark::PrintHelp() { GetLog()->Normal() - << "\nusage: simspark [options] [script]\n" + << "\nusage: rcssserver3d [options] [script]\n" << "\noptions:\n" << " --help\t\t\t print this message.\n" << " --script-path PATH\t set the script path (simspark.rb path).\n" Deleted: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/simspark/naosoccersim.rb 2009-12-18 13:01:31 UTC (rev 126) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2010-01-10 23:45:10 UTC (rev 140) @@ -1,103 +0,0 @@ -# -# prepare soccer simulation -# - -# setup soccer specific materials -# run "scripts/rcs-materials.rb" -if ($enableInternalMonitor) - run "scripts/rcs-materials-textures.rb" - - material = sparkCreate('kerosin/Material2DTexture', $serverPath+'material/matGrass'); - material.setDiffuse(1.0,1.0,1.0,1.0) - material.setAmbient(0.5,0.5,0.5,1.0) - material.setDiffuseTexture('textures/rcs-naofield.png') -end - -importBundle "soccer" - -# soccer namespace -$soccerNameSpace = "Soccer" - -# register a variable in the soccer namespace -def addSoccerVar(name, value) - createVariable($soccerNameSpace, name, value) -end - -# helper to get the value of a variable in the soccer namespace -def getSoccerVar(name) - eval <<-EOS - #{$soccerNameSpace}.#{name} - EOS -end - -# set a random seed (a seed of 0 means: use a random random seed) -randomServer = get($serverPath+'random') -if (randomServer != nil) - randomServer.seed(0) -end - -# the soccer field dimensions in meters -addSoccerVar('FieldLength', 12.0) -addSoccerVar('FieldWidth', 8.0) -addSoccerVar('FieldHeight', 40.0) -addSoccerVar('GoalWidth', 1.4) -addSoccerVar('GoalDepth', 0.4) -addSoccerVar('GoalHeight', 0.8) -addSoccerVar('PenaltyLength',1.2) -addSoccerVar('PenaltyWidth',2.6) -addSoccerVar('FreeKickDistance', 1.3) -addSoccerVar('FreeKickMoveDist', 1.5) -addSoccerVar('GoalKickDist', 1.0) -addSoccerVar('AutomaticKickOff', false) -addSoccerVar('WaitBeforeKickOff', 2.0) - -# agent parameters -addSoccerVar('AgentRadius', 0.4) - -# ball parameters -addSoccerVar('BallRadius', 0.042) -addSoccerVar('BallMass',0.026) - -# soccer rule parameters -addSoccerVar('RuleGoalPauseTime',3.0) -addSoccerVar('RuleKickInPauseTime',1.0) -addSoccerVar('RuleHalfTime',5.0 * 60) -addSoccerVar('RuleDropBallTime',30) -addSoccerVar('SingleHalfTime', false) -addSoccerVar('UseOffside',false) - -# recorders -addSoccerVar('BallRecorder',"Ball/geometry/recorder") -addSoccerVar('LeftGoalRecorder',"leftgoal/GoalBox/BoxCollider/recorder") -addSoccerVar('RightGoalRecorder',"rightgoal/GoalBox/BoxCollider/recorder") - -# textures -createVariable('Nao', 'UseTexture', 'true') - -scene = get($scenePath) -if (scene != nil) - scene.importScene('rsg/agent/nao/soccer.rsg') -end - -# setup the GameControlServer -gameControlServer = get($serverPath+'gamecontrol') -if (gameControlServer != nil) - gameControlServer.initControlAspect('GameStateAspect') - gameControlServer.initControlAspect('BallStateAspect') - gameControlServer.initControlAspect('SoccerRuleAspect') - obj = get('/sys/server/gamecontrol/GameStateAspect') - if (obj != nil) - obj.setTime(0) - obj.setScores(0,0) - end -end - -# init monitorItems to transmit game state information -monitorServer = get($serverPath+'monitor') -if (monitorServer != nil) - monitorServer.registerMonitorItem('GameStateItem') -end - -# install the TrainerCommandParser to parse commands received from a -# monitor client -sparkRegisterMonitorCmdParser 'TrainerCommandParser' Copied: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb (from rev 130, trunk/rcssserver3d/simspark/naosoccersim.rb) =================================================================== --- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb (rev 0) +++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2010-01-10 23:45:10 UTC (rev 140) @@ -0,0 +1,103 @@ +# +# prepare soccer simulation +# + +# setup soccer specific materials +# run "scripts/rcs-materials.rb" +if ($enableInternalMonitor) + run "scripts/rcs-materials-textures.rb" + + material = sparkCreate('kerosin/Material2DTexture', $serverPath+'material/matGrass'); + material.setDiffuse(1.0,1.0,1.0,1.0) + material.setAmbient(0.5,0.5,0.5,1.0) + material.setDiffuseTexture('textures/rcs-naofield.png') +end + +importBundle "soccer" + +# soccer namespace +$soccerNameSpace = "Soccer" + +# register a variable in the soccer namespace +def addSoccerVar(name, value) + createVariable($soccerNameSpace, name, value) +end + +# helper to get the value of a variable in the soccer namespace +def getSoccerVar(name) + eval <<-EOS + #{$soccerNameSpace}.#{name} + EOS +end + +# set a random seed (a seed of 0 means: use a random random seed) +randomServer = get($serverPath+'random') +if (randomServer != nil) + randomServer.seed(0) +end + +# the soccer field dimensions in meters +addSoccerVar('FieldLength', 18.0) +addSoccerVar('FieldWidth', 12.0) +addSoccerVar('FieldHeight', 40.0) +addSoccerVar('GoalWidth', 2.1) +addSoccerVar('GoalDepth', 0.6) +addSoccerVar('GoalHeight', 0.8) +addSoccerVar('PenaltyLength',1.8) +addSoccerVar('PenaltyWidth',3.9) +addSoccerVar('FreeKickDistance', 1.3) +addSoccerVar('FreeKickMoveDist', 1.5) +addSoccerVar('GoalKickDist', 1.0) +addSoccerVar('AutomaticKickOff', false) +addSoccerVar('WaitBeforeKickOff', 2.0) + +# agent parameters +addSoccerVar('AgentRadius', 0.4) + +# ball parameters +addSoccerVar('BallRadius', 0.042) +addSoccerVar('BallMass',0.026) + +# soccer rule parameters +addSoccerVar('RuleGoalPauseTime',3.0) +addSoccerVar('RuleKickInPauseTime',1.0) +addSoccerVar('RuleHalfTime',5.0 * 60) +addSoccerVar('RuleDropBallTime',30) +addSoccerVar('SingleHalfTime', false) +addSoccerVar('UseOffside',false) + +# recorders +addSoccerVar('BallRecorder',"Ball/geometry/recorder") +addSoccerVar('LeftGoalRecorder',"leftgoal/GoalBox/BoxCollider/recorder") +addSoccerVar('RightGoalRecorder',"rightgoal/GoalBox/BoxCollider/recorder") + +# textures +createVariable('Nao', 'UseTexture', 'true') + +scene = get($scenePath) +if (scene != nil) + scene.importScene('rsg/agent/nao/soccer.rsg') +end + +# setup the GameControlServer +gameControlServer = get($serverPath+'gamecontrol') +if (gameControlServer != nil) + gameControlServer.initControlAspect('GameStateAspect') + gameControlServer.initControlAspect('BallStateAspect') + gameControlServer.initControlAspect('SoccerRuleAspect') + obj = get('/sys/server/gamecontrol/GameStateAspect') + if (obj != nil) + obj.setTime(0) + obj.setScores(0,0) + end +end + +# init monitorItems to transmit game state information +monitorServer = get($serverPath+'monitor') +if (monitorServer != nil) + monitorServer.registerMonitorItem('GameStateItem') +end + +# install the TrainerCommandParser to parse commands received from a +# monitor client +sparkRegisterMonitorCmdParser 'TrainerCommandParser' Added: trunk/rcssserver3d/rcssserver3d/rcsoccersim3d.in =================================================================== --- trunk/rcssserver3d/rcssserver3d/rcsoccersim3d.in (rev 0) +++ trunk/rcssserver3d/rcssserver3d/rcsoccersim3d.in 2010-01-10 23:45:10 UTC (rev 140) @@ -0,0 +1,65 @@ +#! /bin/sh + +bindir="@CMAKE_INSTALL_PREFIX@/@BINDIR@" +libdir="@CMAKE_INSTALL_PREFIX@/@LIBDIR@" + +LIBPATH="$libdir/simspark:$libdir/rcssserver3d" +if [ x"$LIBPATH" != x ] ; then + if [ x"$LD_LIBRARY_PATH" = x ] ; then + LD_LIBRARY_PATH=$LIBPATH + else + LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH + fi + export LD_LIBRARY_PATH +fi + +#-------------------------------------------------- +# option +# + +SERV="$bindir/rcssserver3d" +if [ ! -f $SERV ]; then + echo "Error: $SERV does not exist!" + echo "" + exit 1 +fi + +MON="$bindir/rcssmonitor3d" +if [ ! -f $MON ]; then + echo "Error: $MON does not exist!" + echo "" + exit 1 +fi + +#-------------------------------------------------- +# set handler +# + +trap kill_server INT + +#-------------------------------------------------- +# start server +# + +$SERV & +PID=$! + +#-------------------------------------------------- +# kill server +# +kill_server() +{ + kill -s INT $PID + echo "" + exit 0 +} + +#-------------------------------------------------- +# start monitor +# + +sleep 2 + +$MON + +kill_server Property changes on: trunk/rcssserver3d/rcssserver3d/rcsoccersim3d.in ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-01-10 09:14:41
|
Revision: 139 http://simspark.svn.sourceforge.net/simspark/?rev=139&view=rev Author: hedayat Date: 2010-01-10 09:14:25 +0000 (Sun, 10 Jan 2010) Log Message: ----------- Fixed goal net visualization introduced in the previous commit A small fix in the release notes remove eclipse project files from rsgedit which was accidently committed Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/models/leftgoal.obj trunk/rcssserver3d/data/models/rightgoal.obj trunk/spark/RELEASE Removed Paths: ------------- trunk/rsgedit/.cproject trunk/rsgedit/.project Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-08 07:35:25 UTC (rev 138) +++ trunk/rcssserver3d/ChangeLog 2010-01-10 09:14:25 UTC (rev 139) @@ -1,3 +1,9 @@ +2010-01-09 Hedayat Vatankhah <he...@gr...> + + * data/models/leftgoal.obj: + * data/models/rightgoal.obj: + - fixed net visualization in the new models + 2010-01-03 Hedayat Vatankhah <he...@gr...> * data/models/leftgoal.obj: Modified: trunk/rcssserver3d/data/models/leftgoal.obj =================================================================== --- trunk/rcssserver3d/data/models/leftgoal.obj 2010-01-08 07:35:25 UTC (rev 138) +++ trunk/rcssserver3d/data/models/leftgoal.obj 2010-01-10 09:14:25 UTC (rev 139) @@ -1,235 +1,247 @@ # Blender3D v249 OBJ File: # www.blender3d.org mtllib leftgoal.mtl -o leftgoal +o Cylinder +v -0.466661 -0.000000 -0.006727 +v -0.435928 0.000000 0.031272 +v -0.439036 0.000000 0.048194 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +v -0.463784 0.001554 -0.895139 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v 0.469231 0.001554 -0.881690 +v 0.467925 0.000247 -0.096621 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.466661 0.000000 0.006727 v 0.490346 -0.000000 -0.062326 v 0.494467 -0.000000 -0.047393 +v 0.466661 0.997179 0.006727 +v 0.494467 0.997179 -0.047393 +v 0.490346 0.997179 -0.062326 v 0.497519 -0.000000 -0.030383 +v 0.497519 0.997179 -0.030383 v 0.499385 -0.000000 -0.011947 +v 0.499385 0.997179 -0.011947 v 0.499994 0.000000 0.007207 +v 0.499994 0.997179 0.007207 v 0.499322 0.000000 0.026343 +v 0.499322 0.997179 0.026343 v 0.497394 0.000000 0.044726 +v 0.497394 0.997179 0.044726 v 0.494286 0.000000 0.061645 +v 0.494286 0.997179 0.061645 v 0.490116 0.000000 0.076457 +v 0.490116 0.997179 0.076457 v 0.485044 0.000000 0.088589 +v 0.485044 0.997179 0.088589 v 0.479266 0.000000 0.097575 +v 0.479266 0.997179 0.097575 v 0.473004 0.000000 0.103068 +v 0.473004 0.997179 0.103068 v 0.466498 0.000000 0.104861 +v 0.466498 0.997179 0.104861 v 0.459998 0.000000 0.102880 +v 0.459998 0.997179 0.102880 v 0.453754 0.000000 0.097207 +v 0.453754 0.997179 0.097207 v 0.448007 0.000000 0.088054 +v 0.448007 0.997179 0.088057 v 0.442976 0.000000 0.075777 +v 0.442976 0.997179 0.075777 v 0.438855 0.000000 0.060848 +v 0.438855 0.997179 0.060848 v 0.435803 0.000000 0.043837 +v 0.435803 0.997179 0.043837 v 0.433937 0.000000 0.025401 +v 0.433937 0.997179 0.025401 v 0.433328 0.000000 0.006247 +v 0.433328 0.997179 0.006247 v 0.434000 -0.000000 -0.012889 +v 0.434000 0.997179 -0.012889 v 0.435928 -0.000000 -0.031272 +v 0.435928 0.997179 -0.031272 v 0.439036 -0.000000 -0.048194 +v 0.439036 0.997179 -0.048194 v 0.443207 -0.000000 -0.063006 +v 0.443206 0.997179 -0.063003 v 0.448278 -0.000000 -0.075135 +v 0.448278 0.997179 -0.075135 v 0.454056 -0.000000 -0.084120 +v 0.454056 0.997179 -0.084120 v 0.460318 -0.000000 -0.089614 +v 0.460318 0.997179 -0.089614 v 0.466824 -0.000000 -0.091407 +v 0.466824 0.997179 -0.091407 v 0.473324 -0.000000 -0.089428 +v 0.473324 0.997179 -0.089429 v 0.479568 -0.000000 -0.083752 +v 0.479568 0.997179 -0.083752 v 0.485316 -0.000000 -0.074602 -v 0.490346 0.997179 -0.062326 -v 0.494467 0.997179 -0.047393 -v 0.497519 0.997179 -0.030383 -v 0.499385 0.997179 -0.011947 -v 0.499994 0.997179 0.007207 -v 0.499322 0.997179 0.026343 -v 0.497394 0.997179 0.044726 -v 0.494286 0.997179 0.061645 -v 0.490116 0.997179 0.076457 -v 0.485044 0.997179 0.088589 -v 0.479266 0.997179 0.097575 -v 0.473004 0.997179 0.103068 -v 0.466498 0.997179 0.104861 -v 0.459998 0.997179 0.102880 -v 0.453754 0.997179 0.097207 -v 0.448007 0.997179 0.088057 -v 0.442976 0.997179 0.075777 -v 0.438855 0.997179 0.060848 -v 0.435803 0.997179 0.043837 -v 0.433937 0.997179 0.025401 -v 0.433328 0.997179 0.006247 -v 0.434000 0.997179 -0.012889 -v 0.435928 0.997179 -0.031272 -v 0.439036 0.997179 -0.048194 -v 0.443206 0.997179 -0.063003 -v 0.448278 0.997179 -0.075135 -v 0.454056 0.997179 -0.084120 -v 0.460318 0.997179 -0.089614 -v 0.466824 0.997179 -0.091407 -v 0.473324 0.997179 -0.089429 -v 0.479568 0.997179 -0.083752 v 0.485315 0.997179 -0.074602 -v 0.466661 0.000000 0.006727 -v 0.466661 0.997179 0.006727 v -0.466661 0.997179 -0.006727 -v -0.466661 -0.000000 -0.006727 +v -0.442976 0.997179 -0.075777 v -0.448007 0.997179 -0.088057 +v -0.448007 -0.000000 -0.088054 +v -0.442976 -0.000000 -0.075777 v -0.453755 0.997179 -0.097207 +v -0.453754 -0.000000 -0.097207 v -0.459998 0.997179 -0.102883 +v -0.459998 -0.000000 -0.102880 v -0.466498 0.997179 -0.104861 +v -0.466498 -0.000000 -0.104861 v -0.473004 0.997179 -0.103068 +v -0.473004 -0.000000 -0.103068 v -0.479266 0.997179 -0.097575 +v -0.479266 -0.000000 -0.097575 v -0.485044 0.997179 -0.088589 +v -0.485044 -0.000000 -0.088589 v -0.490116 0.997179 -0.076457 +v -0.490116 -0.000000 -0.076457 v -0.494286 0.997179 -0.061646 +v -0.494286 -0.000000 -0.061645 v -0.497394 0.997179 -0.044723 +v -0.497394 -0.000000 -0.044726 v -0.499322 0.997179 -0.026343 +v -0.499322 -0.000000 -0.026343 v -0.499994 0.997179 -0.007207 +v -0.499994 -0.000000 -0.007207 v -0.499385 0.997179 0.011947 +v -0.499385 0.000000 0.011947 v -0.497519 0.997179 0.030383 +v -0.497519 0.000000 0.030383 v -0.494467 0.997179 0.047393 +v -0.494467 0.000000 0.047393 v -0.490346 0.997179 0.062326 +v -0.490346 0.000000 0.062326 v -0.485315 0.997179 0.074602 +v -0.485316 0.000000 0.074602 v -0.479568 0.997179 0.083752 +v -0.479568 0.000000 0.083752 v -0.473324 0.997179 0.089428 +v -0.473324 0.000000 0.089428 v -0.466824 0.997179 0.091407 +v -0.466824 0.000000 0.091407 v -0.460318 0.997179 0.089614 +v -0.460318 0.000000 0.089614 v -0.454056 0.997179 0.084120 +v -0.454056 0.000000 0.084120 v -0.448278 0.997179 0.075135 +v -0.448278 0.000000 0.075135 v -0.443207 0.997179 0.063006 +v -0.443207 0.000000 0.063006 v -0.439036 0.997179 0.048194 v -0.435928 0.997179 0.031272 v -0.434000 0.997179 0.012889 +v -0.434000 0.000000 0.012889 v -0.433328 0.997179 -0.006247 +v -0.433328 -0.000000 -0.006247 v -0.433937 0.997179 -0.025401 +v -0.433937 -0.000000 -0.025401 v -0.435803 0.997179 -0.043837 +v -0.435803 -0.000000 -0.043837 v -0.438855 0.997179 -0.060848 -v -0.442976 0.997179 -0.075777 -v -0.448007 -0.000000 -0.088054 -v -0.453754 -0.000000 -0.097207 -v -0.459998 -0.000000 -0.102880 -v -0.466498 -0.000000 -0.104861 -v -0.473004 -0.000000 -0.103068 -v -0.479266 -0.000000 -0.097575 -v -0.485044 -0.000000 -0.088589 -v -0.490116 -0.000000 -0.076457 -v -0.494286 -0.000000 -0.061645 -v -0.497394 -0.000000 -0.044726 -v -0.499322 -0.000000 -0.026343 -v -0.499994 -0.000000 -0.007207 -v -0.499385 0.000000 0.011947 -v -0.497519 0.000000 0.030383 -v -0.494467 0.000000 0.047393 -v -0.490346 0.000000 0.062326 -v -0.485316 0.000000 0.074602 -v -0.479568 0.000000 0.083752 -v -0.473324 0.000000 0.089428 -v -0.466824 0.000000 0.091407 -v -0.460318 0.000000 0.089614 -v -0.454056 0.000000 0.084120 -v -0.448278 0.000000 0.075135 -v -0.443207 0.000000 0.063006 -v -0.439036 0.000000 0.048194 -v -0.435928 0.000000 0.031272 -v -0.434000 0.000000 0.012889 -v -0.433328 -0.000000 -0.006247 -v -0.433937 -0.000000 -0.025401 -v -0.435803 -0.000000 -0.043837 v -0.438855 -0.000000 -0.060848 -v -0.442976 -0.000000 -0.075777 +v -0.465871 0.964236 -0.006715 v -0.465814 0.986271 -0.041411 v -0.465804 0.981550 -0.047514 +v 0.467451 0.964236 0.006739 +v 0.467519 0.981550 -0.034060 +v 0.467508 0.986271 -0.027957 v -0.465796 0.976161 -0.052048 +v 0.467526 0.976161 -0.038594 v -0.465791 0.970316 -0.054839 +v 0.467531 0.970316 -0.041385 v -0.465790 0.964236 -0.055781 +v 0.467532 0.964236 -0.042330 v -0.465791 0.958158 -0.054839 +v 0.467531 0.958158 -0.041385 v -0.465796 0.952311 -0.052048 +v 0.467526 0.952311 -0.038594 v -0.465804 0.946925 -0.047514 +v 0.467519 0.946925 -0.034060 v -0.465814 0.942202 -0.041411 +v 0.467508 0.942202 -0.027957 v -0.465826 0.938326 -0.033974 +v 0.467496 0.938326 -0.020523 v -0.465840 0.935446 -0.025493 +v 0.467482 0.935446 -0.012038 v -0.465855 0.933674 -0.016287 +v 0.467467 0.933674 -0.002835 v -0.465871 0.933074 -0.006715 +v 0.467451 0.933074 0.006739 v -0.465887 0.933674 0.002859 +v 0.467435 0.933674 0.016310 v -0.465903 0.935446 0.012062 +v 0.467420 0.935446 0.025516 v -0.465917 0.938326 0.020544 +v 0.467405 0.938326 0.033998 v -0.465929 0.942202 0.027980 +v 0.467393 0.942202 0.041435 v -0.465939 0.946925 0.034083 +v 0.467383 0.946925 0.047535 v -0.465947 0.952311 0.038617 +v 0.467375 0.952311 0.052071 v -0.465951 0.958158 0.041408 +v 0.467371 0.958158 0.054862 v -0.465953 0.964236 0.042353 +v 0.467369 0.964236 0.055804 v -0.465951 0.970316 0.041408 +v 0.467371 0.970316 0.054862 v -0.465947 0.976161 0.038617 +v 0.467375 0.976161 0.052071 v -0.465939 0.981550 0.034083 +v 0.467383 0.981550 0.047535 v -0.465929 0.986271 0.027980 +v 0.467393 0.986271 0.041435 v -0.465917 0.990147 0.020544 +v 0.467405 0.990147 0.033998 v -0.465903 0.993026 0.012062 +v 0.467420 0.993026 0.025516 v -0.465887 0.994800 0.002859 +v 0.467435 0.994800 0.016310 v -0.465871 0.995399 -0.006715 +v 0.467451 0.995399 0.006739 v -0.465855 0.994800 -0.016287 +v 0.467467 0.994800 -0.002835 v -0.465840 0.993026 -0.025493 +v 0.467482 0.993026 -0.012038 v -0.465826 0.990147 -0.033974 -v 0.467508 0.986271 -0.027957 -v 0.467519 0.981550 -0.034060 -v 0.467526 0.976161 -0.038594 -v 0.467531 0.970316 -0.041385 -v 0.467532 0.964236 -0.042330 -v 0.467531 0.958158 -0.041385 -v 0.467526 0.952311 -0.038594 -v 0.467519 0.946925 -0.034060 -v 0.467508 0.942202 -0.027957 -v 0.467496 0.938326 -0.020523 -v 0.467482 0.935446 -0.012038 -v 0.467467 0.933674 -0.002835 -v 0.467451 0.933074 0.006739 -v 0.467435 0.933674 0.016310 -v 0.467420 0.935446 0.025516 -v 0.467405 0.938326 0.033998 -v 0.467393 0.942202 0.041435 -v 0.467383 0.946925 0.047535 -v 0.467375 0.952311 0.052071 -v 0.467371 0.958158 0.054862 -v 0.467369 0.964236 0.055804 -v 0.467371 0.970316 0.054862 -v 0.467375 0.976161 0.052071 -v 0.467383 0.981550 0.047535 -v 0.467393 0.986271 0.041435 -v 0.467405 0.990147 0.033998 -v 0.467420 0.993026 0.025516 -v 0.467435 0.994800 0.016310 -v 0.467451 0.995399 0.006739 -v 0.467467 0.994800 -0.002835 -v 0.467482 0.993026 -0.012038 v 0.467496 0.990147 -0.020523 -v -0.465871 0.964236 -0.006715 -v 0.467451 0.964236 0.006739 +v -0.458524 0.001554 -0.890770 +v -0.459830 0.498835 -0.105700 v -0.459830 0.000247 -0.105700 -v -0.459830 0.498835 -0.105700 -v -0.458524 0.001554 -0.890770 -v 0.469231 0.001554 -0.881690 -v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 -v -0.463784 0.001554 -0.895139 -v -0.465090 1.000000 -0.110069 -v -0.465090 0.000247 -0.110069 -v -0.465090 1.000000 -0.110069 -v -0.463784 0.001554 -0.895139 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 -v -0.465090 0.000247 -0.110069 -v -0.465090 1.000000 -0.110069 -v -0.463784 0.001554 -0.895139 v -0.465191 0.001554 -0.890770 +v -0.466496 0.000247 -0.105700 v -0.466496 0.498835 -0.105700 -v -0.466496 0.000247 -0.105700 v 0.474809 0.001554 -0.890770 v 0.473504 0.498835 -0.105700 v 0.473504 0.000247 -0.105700 v 0.468143 0.001554 -0.890770 +v 0.466837 0.000247 -0.105700 v 0.466837 0.498835 -0.105700 -v 0.466837 0.000247 -0.105700 -v 0.469231 0.001554 -0.881690 -v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.478737 0.520656 +vt 0.239368 1.000000 +vt 0.239368 0.520028 +vt 0.239368 0.520656 +vt 0.000000 0.520028 +vt 0.812878 0.000000 +vt 0.812878 0.520028 +vt 0.000000 0.520027 +vt 1.000000 1.000000 vn -0.000000 -1.000000 0.000000 vn 0.999999 0.000000 0.001664 vn -0.999999 -0.000000 -0.001664 @@ -428,400 +440,400 @@ vn 0.963964 -0.000000 -0.266033 usemtl grey_naogoalnet.png s off -f 68//1 126//1 125//1 -f 206//2 205//2 204//2 -f 207//3 209//3 208//3 -f 216//2 215//2 214//2 -f 226//3 228//3 227//3 -f 213//4 212//4 210//4 -f 213//4 210//4 211//4 -f 202//5 207//5 208//5 -f 202//5 208//5 203//5 +f 1/1/1 2/2/1 3/3/1 +f 4/4/2 5/5/2 6/6/2 +f 7/7/3 8/8/3 9/1/3 +f 10/7/2 11/1/2 12/8/2 +f 13/4/3 14/6/3 15/5/3 +f 16/9/4 17/10/4 18/11/4 +f 16/9/4 18/11/4 19/2/4 +f 20/9/5 7/2/5 9/11/5 +f 20/9/5 9/11/5 21/10/5 usemtl yellow -f 65//1 1//1 2//1 -f 66//6 34//6 33//6 -f 65//1 2//1 3//1 -f 66//6 35//6 34//6 -f 65//1 3//1 4//1 -f 66//6 36//6 35//6 -f 65//1 4//1 5//1 -f 66//6 37//6 36//6 -f 65//1 5//1 6//1 -f 66//6 38//6 37//6 -f 65//1 6//1 7//1 -f 66//6 39//6 38//6 -f 65//1 7//1 8//1 -f 66//6 40//6 39//6 -f 65//1 8//1 9//1 -f 66//6 41//6 40//6 -f 65//1 9//1 10//1 -f 66//6 42//6 41//6 -f 65//1 10//1 11//1 -f 66//6 43//6 42//6 -f 65//1 11//1 12//1 -f 66//6 44//6 43//6 -f 65//1 12//1 13//1 -f 66//6 45//6 44//6 -f 65//1 13//1 14//1 -f 66//6 46//6 45//6 -f 65//1 14//1 15//1 -f 66//6 47//6 46//6 -f 65//1 15//1 16//1 -f 66//6 48//6 47//6 -f 65//1 16//1 17//1 -f 66//6 49//6 48//6 -f 65//1 17//1 18//1 -f 66//6 50//6 49//6 -f 65//1 18//1 19//1 -f 66//6 51//6 50//6 -f 65//1 19//1 20//1 -f 66//6 52//6 51//6 -f 65//1 20//1 21//1 -f 66//6 53//6 52//6 -f 65//1 21//1 22//1 -f 66//6 54//6 53//6 -f 65//1 22//1 23//1 -f 66//6 55//6 54//6 -f 65//1 23//1 24//1 -f 66//6 56//6 55//6 -f 65//1 24//1 25//1 -f 66//6 57//6 56//6 -f 65//1 25//1 26//1 -f 66//6 58//6 57//6 -f 65//1 26//1 27//1 -f 66//6 59//6 58//6 -f 65//1 27//1 28//1 -f 66//6 60//6 59//6 -f 65//1 28//1 29//1 -f 66//6 61//6 60//6 -f 65//1 29//1 30//1 -f 66//6 62//6 61//6 -f 65//1 30//1 31//1 -f 66//6 63//6 62//6 -f 65//1 31//1 32//1 -f 66//6 64//6 63//6 -f 32//1 1//1 65//1 -f 66//6 33//6 64//6 -f 67//6 100//6 69//6 -f 68//1 101//1 132//1 -f 67//6 69//6 70//6 -f 68//1 102//1 101//1 -f 67//6 70//6 71//6 -f 68//1 103//1 102//1 -f 67//6 71//6 72//6 -f 68//1 104//1 103//1 -f 67//6 72//6 73//6 -f 68//1 105//1 104//1 -f 67//6 73//6 74//6 -f 68//1 106//1 105//1 -f 67//6 74//6 75//6 -f 68//1 107//1 106//1 -f 67//6 75//6 76//6 -f 68//1 108//1 107//1 -f 67//6 76//6 77//6 -f 68//1 109//1 108//1 -f 67//6 77//6 78//6 -f 68//1 110//1 109//1 -f 67//6 78//6 79//6 -f 68//1 111//1 110//1 -f 67//6 79//6 80//6 -f 68//1 112//1 111//1 -f 67//6 80//6 81//6 -f 68//1 113//1 112//1 -f 67//6 81//6 82//6 -f 68//1 114//1 113//1 -f 67//6 82//6 83//6 -f 68//1 115//1 114//1 -f 67//6 83//6 84//6 -f 68//1 116//1 115//1 -f 67//6 84//6 85//6 -f 68//1 117//1 116//1 -f 67//6 85//6 86//6 -f 68//1 118//1 117//1 -f 67//6 86//6 87//6 -f 68//1 119//1 118//1 -f 67//6 87//6 88//6 -f 68//1 120//1 119//1 -f 67//6 88//6 89//6 -f 68//1 121//1 120//1 -f 67//6 89//6 90//6 -f 68//1 122//1 121//1 -f 67//6 90//6 91//6 -f 68//1 123//1 122//1 -f 67//6 91//6 92//6 -f 68//1 124//1 123//1 -f 67//6 92//6 93//6 -f 68//1 125//1 124//1 -f 67//6 93//6 94//6 -f 67//6 94//6 95//6 -f 68//1 127//1 126//1 -f 67//6 95//6 96//6 -f 68//1 128//1 127//1 -f 67//6 96//6 97//6 -f 68//1 129//1 128//1 -f 67//6 97//6 98//6 -f 68//1 130//1 129//1 -f 67//6 98//6 99//6 -f 68//1 131//1 130//1 -f 67//6 99//6 100//6 -f 68//1 132//1 131//1 -f 197//7 133//7 134//7 -f 198//8 166//8 165//8 -f 197//9 134//9 135//9 -f 198//10 167//10 166//10 -f 197//11 135//11 136//11 -f 198//12 168//12 167//12 -f 197//13 136//13 137//13 -f 198//14 169//14 168//14 -f 197//15 137//15 138//15 -f 198//16 170//16 169//16 -f 197//17 138//17 139//17 -f 198//18 171//18 170//18 -f 197//19 139//19 140//19 -f 198//20 172//20 171//20 -f 197//21 140//21 141//21 -f 198//22 173//22 172//22 -f 197//23 141//23 142//23 -f 198//24 174//24 173//24 -f 197//25 142//25 143//25 -f 198//26 175//26 174//26 -f 197//27 143//27 144//27 -f 198//28 176//28 175//28 -f 197//29 144//29 145//29 -f 198//30 177//30 176//30 -f 197//29 145//29 146//29 -f 198//30 178//30 177//30 -f 197//31 146//31 147//31 -f 198//32 179//32 178//32 -f 197//33 147//33 148//33 -f 198//34 180//34 179//34 -f 197//35 148//35 149//35 -f 198//36 181//36 180//36 -f 197//37 149//37 150//37 -f 198//38 182//38 181//38 -f 197//39 150//39 151//39 -f 198//40 183//40 182//40 -f 197//41 151//41 152//41 -f 198//42 184//42 183//42 -f 197//43 152//43 153//43 -f 198//44 185//44 184//44 -f 197//45 153//45 154//45 -f 198//46 186//46 185//46 -f 197//47 154//47 155//47 -f 198//48 187//48 186//48 -f 197//49 155//49 156//49 -f 198//50 188//50 187//50 -f 197//51 156//51 157//51 -f 198//52 189//52 188//52 -f 197//53 157//53 158//53 -f 198//54 190//54 189//54 -f 197//55 158//55 159//55 -f 198//56 191//56 190//56 -f 197//57 159//57 160//57 -f 198//28 192//28 191//28 -f 197//29 160//29 161//29 -f 198//30 193//30 192//30 -f 197//29 161//29 162//29 -f 198//30 194//30 193//30 -f 197//58 162//58 163//58 -f 198//32 195//32 194//32 -f 197//25 163//25 164//25 -f 198//26 196//26 195//26 -f 197//59 164//59 133//59 -f 198//60 165//60 196//60 -f 201//2 200//2 199//2 -f 217//61 219//61 218//61 -f 220//62 221//62 222//62 -f 223//3 225//3 224//3 -f 164//63 196//63 165//63 -f 164//64 165//64 133//64 -f 163//65 195//65 196//65 -f 163//66 196//66 164//66 -f 162//67 194//67 195//67 -f 162//68 195//68 163//68 -f 161//69 193//69 194//69 -f 161//70 194//70 162//70 -f 160//71 192//71 193//71 -f 160//72 193//72 161//72 -f 159//73 191//73 192//73 -f 159//74 192//74 160//74 -f 158//75 190//75 191//75 -f 158//76 191//76 159//76 -f 157//77 189//77 190//77 -f 157//78 190//78 158//78 -f 156//79 188//79 189//79 -f 156//80 189//80 157//80 -f 155//81 187//81 188//81 -f 155//82 188//82 156//82 -f 154//83 186//83 187//83 -f 154//84 187//84 155//84 -f 153//85 185//85 186//85 -f 153//86 186//86 154//86 -f 152//87 184//87 185//87 -f 152//88 185//88 153//88 -f 151//89 183//89 184//89 -f 151//89 184//89 152//89 -f 150//90 182//90 183//90 -f 150//91 183//91 151//91 -f 149//92 181//92 182//92 -f 149//93 182//93 150//93 -f 148//94 180//94 181//94 -f 148//94 181//94 149//94 -f 147//95 179//95 180//95 -f 147//96 180//96 148//96 -f 146//97 178//97 179//97 -f 146//98 179//98 147//98 -f 145//99 177//99 178//99 -f 145//100 178//100 146//100 -f 144//101 176//101 177//101 -f 144//102 177//102 145//102 -f 143//103 175//103 176//103 -f 143//104 176//104 144//104 -f 142//105 174//105 175//105 -f 142//106 175//106 143//106 -f 141//107 173//107 174//107 -f 141//108 174//108 142//108 -f 140//109 172//109 173//109 -f 140//110 173//110 141//110 -f 139//111 171//111 172//111 -f 139//112 172//112 140//112 -f 138//113 170//113 171//113 -f 138//114 171//114 139//114 -f 137//115 169//115 170//115 -f 137//116 170//116 138//116 -f 136//117 168//117 169//117 -f 136//118 169//118 137//118 -f 135//119 167//119 168//119 -f 135//120 168//120 136//120 -f 134//121 166//121 167//121 -f 134//122 167//122 135//122 -f 133//123 165//123 166//123 -f 133//124 166//124 134//124 -f 132//125 100//125 99//125 -f 132//125 99//125 131//125 -f 131//126 99//126 98//126 -f 131//126 98//126 130//126 -f 130//127 98//127 97//127 -f 130//127 97//127 129//127 -f 129//128 97//128 96//128 -f 129//128 96//128 128//128 -f 128//129 96//129 95//129 -f 128//129 95//129 127//129 -f 127//130 95//130 94//130 -f 127//130 94//130 126//130 -f 126//131 94//131 93//131 -f 126//131 93//131 125//131 -f 125//132 93//132 92//132 -f 125//132 92//132 124//132 -f 124//133 92//133 91//133 -f 124//133 91//133 123//133 -f 123//134 91//134 90//134 -f 123//134 90//134 122//134 -f 122//135 90//135 89//135 -f 122//135 89//135 121//135 -f 121//136 89//136 88//136 -f 121//136 88//136 120//136 -f 120//137 88//137 87//137 -f 120//137 87//137 119//137 -f 119//138 87//138 86//138 -f 119//138 86//138 118//138 -f 118//139 86//139 85//139 -f 118//140 85//140 117//140 -f 117//141 85//141 84//141 -f 117//142 84//142 116//142 -f 116//143 84//143 83//143 -f 116//143 83//143 115//143 -f 115//144 83//144 82//144 -f 115//144 82//144 114//144 -f 114//145 82//145 81//145 -f 114//145 81//145 113//145 -f 113//146 81//146 80//146 -f 113//146 80//146 112//146 -f 112//147 80//147 79//147 -f 112//147 79//147 111//147 -f 111//148 79//148 78//148 -f 111//149 78//149 110//149 -f 110//150 78//150 77//150 -f 110//151 77//151 109//151 -f 109//152 77//152 76//152 -f 109//152 76//152 108//152 -f 108//153 76//153 75//153 -f 108//153 75//153 107//153 -f 107//154 75//154 74//154 -f 107//154 74//154 106//154 -f 106//155 74//155 73//155 -f 106//155 73//155 105//155 -f 105//156 73//156 72//156 -f 105//156 72//156 104//156 -f 104//157 72//157 71//157 -f 104//158 71//158 103//158 -f 103//159 71//159 70//159 -f 103//160 70//160 102//160 -f 102//161 70//161 69//161 -f 102//162 69//162 101//162 -f 101//163 69//163 100//163 -f 101//164 100//164 132//164 -f 33//165 1//165 32//165 -f 33//166 32//166 64//166 -f 31//167 63//167 64//167 -f 31//168 64//168 32//168 -f 30//169 62//169 63//169 -f 30//169 63//169 31//169 -f 29//170 61//170 62//170 -f 29//170 62//170 30//170 -f 28//171 60//171 61//171 -f 28//171 61//171 29//171 -f 27//172 59//172 60//172 -f 27//172 60//172 28//172 -f 26//173 58//173 59//173 -f 26//173 59//173 27//173 -f 25//153 57//153 58//153 -f 25//174 58//174 26//174 -f 24//175 56//175 57//175 -f 24//176 57//176 25//176 -f 23//177 55//177 56//177 -f 23//177 56//177 24//177 -f 22//149 54//149 55//149 -f 22//149 55//149 23//149 -f 21//178 53//178 54//178 -f 21//178 54//178 22//178 -f 20//146 52//146 53//146 -f 20//146 53//146 21//146 -f 19//179 51//179 52//179 -f 19//180 52//180 20//180 -f 18//144 50//144 51//144 -f 18//144 51//144 19//144 -f 17//181 49//181 50//181 -f 17//181 50//181 18//181 -f 16//182 48//182 49//182 -f 16//183 49//183 17//183 -f 15//184 47//184 48//184 -f 15//185 48//185 16//185 -f 14//186 46//186 47//186 -f 14//186 47//186 15//186 -f 13//187 45//187 46//187 -f 13//187 46//187 14//187 -f 12//188 44//188 45//188 -f 12//188 45//188 13//188 -f 11//189 43//189 44//189 -f 11//189 44//189 12//189 -f 10//190 42//190 43//190 -f 10//190 43//190 11//190 -f 9//191 41//191 42//191 -f 9//191 42//191 10//191 -f 8//192 40//192 41//192 -f 8//192 41//192 9//192 -f 7//193 39//193 40//193 -f 7//193 40//193 8//193 -f 6//130 38//130 39//130 -f 6//130 39//130 7//130 -f 5//194 37//194 38//194 -f 5//194 38//194 6//194 -f 4//128 36//128 37//128 -f 4//128 37//128 5//128 -f 3//195 35//195 36//195 -f 3//195 36//195 4//195 -f 2//126 34//126 35//126 -f 2//126 35//126 3//126 -f 1//196 33//196 34//196 -f 1//196 34//196 2//196 +f 22/1/1 23/2/1 24/3/1 +f 25/1/6 26/2/6 27/3/6 +f 22/1/1 24/2/1 28/3/1 +f 25/1/6 29/2/6 26/3/6 +f 22/1/1 28/2/1 30/3/1 +f 25/1/6 31/2/6 29/3/6 +f 22/1/1 30/2/1 32/3/1 +f 25/1/6 33/2/6 31/3/6 +f 22/1/1 32/2/1 34/3/1 +f 25/1/6 35/2/6 33/3/6 +f 22/1/1 34/2/1 36/3/1 +f 25/1/6 37/2/6 35/3/6 +f 22/1/1 36/2/1 38/3/1 +f 25/1/6 39/2/6 37/3/6 +f 22/1/1 38/2/1 40/3/1 +f 25/1/6 41/2/6 39/3/6 +f 22/1/1 40/2/1 42/3/1 +f 25/1/6 43/2/6 41/3/6 +f 22/1/1 42/2/1 44/3/1 +f 25/1/6 45/2/6 43/3/6 +f 22/1/1 44/2/1 46/3/1 +f 25/1/6 47/2/6 45/3/6 +f 22/1/1 46/2/1 48/3/1 +f 25/1/6 49/2/6 47/3/6 +f 22/1/1 48/2/1 50/3/1 +f 25/1/6 51/2/6 49/3/6 +f 22/1/1 50/2/1 52/3/1 +f 25/1/6 53/2/6 51/3/6 +f 22/1/1 52/2/1 54/3/1 +f 25/1/6 55/2/6 53/3/6 +f 22/1/1 54/2/1 56/3/1 +f 25/1/6 57/2/6 55/3/6 +f 22/1/1 56/2/1 58/3/1 +f 25/1/6 59/2/6 57/3/6 +f 22/1/1 58/2/1 60/3/1 +f 25/1/6 61/2/6 59/3/6 +f 22/1/1 60/2/1 62/3/1 +f 25/1/6 63/2/6 61/3/6 +f 22/1/1 62/2/1 64/3/1 +f 25/1/6 65/2/6 63/3/6 +f 22/1/1 64/2/1 66/3/1 +f 25/1/6 67/2/6 65/3/6 +f 22/1/1 66/2/1 68/3/1 +f 25/1/6 69/2/6 67/3/6 +f 22/1/1 68/2/1 70/3/1 +f 25/1/6 71/2/6 69/3/6 +f 22/1/1 70/2/1 72/3/1 +f 25/1/6 73/2/6 71/3/6 +f 22/1/1 72/2/1 74/3/1 +f 25/1/6 75/2/6 73/3/6 +f 22/1/1 74/2/1 76/3/1 +f 25/1/6 77/2/6 75/3/6 +f 22/1/1 76/2/1 78/3/1 +f 25/1/6 79/2/6 77/3/6 +f 22/1/1 78/2/1 80/3/1 +f 25/1/6 81/2/6 79/3/6 +f 22/1/1 80/2/1 82/3/1 +f 25/1/6 83/2/6 81/3/6 +f 22/1/1 82/2/1 84/3/1 +f 25/1/6 85/2/6 83/3/6 +f 22/1/1 84/2/1 86/3/1 +f 25/1/6 87/2/6 85/3/6 +f 86/1/1 23/2/1 22/3/1 +f 25/1/6 27/2/6 87/3/6 +f 88/1/6 89/2/6 90/3/6 +f 1/1/1 91/2/1 92/3/1 +f 88/1/6 90/2/6 93/3/6 +f 1/1/1 94/2/1 91/3/1 +f 88/1/6 93/2/6 95/3/6 +f 1/1/1 96/2/1 94/3/1 +f 88/1/6 95/2/6 97/3/6 +f 1/1/1 98/2/1 96/3/1 +f 88/1/6 97/2/6 99/3/6 +f 1/1/1 100/2/1 98/3/1 +f 88/1/6 99/2/6 101/3/6 +f 1/1/1 102/2/1 100/3/1 +f 88/1/6 101/2/6 103/3/6 +f 1/1/1 104/2/1 102/3/1 +f 88/1/6 103/2/6 105/3/6 +f 1/1/1 106/2/1 104/3/1 +f 88/1/6 105/2/6 107/3/6 +f 1/1/1 108/2/1 106/3/1 +f 88/1/6 107/2/6 109/3/6 +f 1/1/1 110/2/1 108/3/1 +f 88/1/6 109/2/6 111/3/6 +f 1/1/1 112/2/1 110/3/1 +f 88/1/6 111/2/6 113/3/6 +f 1/1/1 114/2/1 112/3/1 +f 88/1/6 113/2/6 115/3/6 +f 1/1/1 116/2/1 114/3/1 +f 88/1/6 115/2/6 117/3/6 +f 1/1/1 118/2/1 116/3/1 +f 88/1/6 117/2/6 119/3/6 +f 1/1/1 120/2/1 118/3/1 +f 88/1/6 119/2/6 121/3/6 +f 1/1/1 122/2/1 120/3/1 +f 88/1/6 121/2/6 123/3/6 +f 1/1/1 124/2/1 122/3/1 +f 88/1/6 123/2/6 125/3/6 +f 1/1/1 126/2/1 124/3/1 +f 88/1/6 125/2/6 127/3/6 +f 1/1/1 128/2/1 126/3/1 +f 88/1/6 127/2/6 129/3/6 +f 1/1/1 130/2/1 128/3/1 +f 88/1/6 129/2/6 131/3/6 +f 1/1/1 132/2/1 130/3/1 +f 88/1/6 131/2/6 133/3/6 +f 1/1/1 134/2/1 132/3/1 +f 88/1/6 133/2/6 135/3/6 +f 1/1/1 136/2/1 134/3/1 +f 88/1/6 135/2/6 137/3/6 +f 1/1/1 138/2/1 136/3/1 +f 88/1/6 137/2/6 139/3/6 +f 1/1/1 3/2/1 138/3/1 +f 88/1/6 139/2/6 140/3/6 +f 88/1/6 140/2/6 141/3/6 +f 1/1/1 142/2/1 2/3/1 +f 88/1/6 141/2/6 143/3/6 +f 1/1/1 144/2/1 142/3/1 +f 88/1/6 143/2/6 145/3/6 +f 1/1/1 146/2/1 144/3/1 +f 88/1/6 145/2/6 147/3/6 +f 1/1/1 148/2/1 146/3/1 +f 88/1/6 147/2/6 149/3/6 +f 1/1/1 150/2/1 148/3/1 +f 88/1/6 149/2/6 89/3/6 +f 1/1/1 92/2/1 150/3/1 +f 151/1/7 152/2/7 153/3/7 +f 154/1/8 155/2/8 156/3/8 +f 151/1/9 153/2/9 157/3/9 +f 154/1/10 158/2/10 155/3/10 +f 151/1/11 157/2/11 159/3/11 +f 154/1/12 160/2/12 158/3/12 +f 151/1/13 159/2/13 161/3/13 +f 154/1/14 162/2/14 160/3/14 +f 151/1/15 161/2/15 163/3/15 +f 154/1/16 164/2/16 162/3/16 +f 151/1/17 163/2/17 165/3/17 +f 154/1/18 166/2/18 164/3/18 +f 151/1/19 165/2/19 167/3/19 +f 154/1/20 168/2/20 166/3/20 +f 151/1/21 167/2/21 169/3/21 +f 154/1/22 170/2/22 168/3/22 +f 151/1/23 169/2/23 171/3/23 +f 154/1/24 172/2/24 170/3/24 +f 151/1/25 171/2/25 173/3/25 +f 154/1/26 174/2/26 172/3/26 +f 151/1/27 173/2/27 175/3/27 +f 154/1/28 176/2/28 174/3/28 +f 151/1/29 175/2/29 177/3/29 +f 154/1/30 178/2/30 176/3/30 +f 151/1/29 177/2/29 179/3/29 +f 154/1/30 180/2/30 178/3/30 +f 151/1/31 179/2/31 181/3/31 +f 154/1/32 182/2/32 180/3/32 +f 151/1/33 181/2/33 183/3/33 +f 154/1/34 184/2/34 182/3/34 +f 151/1/35 183/2/35 185/3/35 +f 154/1/36 186/2/36 184/3/36 +f 151/1/37 185/2/37 187/3/37 +f 154/1/38 188/2/38 186/3/38 +f 151/1/39 187/2/39 189/3/39 +f 154/1/40 190/2/40 188/3/40 +f 151/1/41 189/2/41 191/3/41 +f 154/1/42 192/2/42 190/3/42 +f 151/1/43 191/2/43 193/3/43 +f 154/1/44 194/2/44 192/3/44 +f 151/1/45 193/2/45 195/3/45 +f 154/1/46 196/2/46 194/3/46 +f 151/1/47 195/2/47 197/3/47 +f 154/1/48 198/2/48 196/3/48 +f 151/1/49 197/2/49 199/3/49 +f 154/1/50 200/2/50 198/3/50 +f 151/1/51 199/2/51 201/3/51 +f 154/1/52 202/2/52 200/3/52 +f 151/1/53 201/2/53 203/3/53 +f 154/1/54 204/2/54 202/3/54 +f 151/1/55 203/2/55 205/3/55 +f 154/1/56 206/2/56 204/3/56 +f 151/1/57 205/2/57 207/3/57 +f 154/1/28 208/2/28 206/3/28 +f 151/1/29 207/2/29 209/3/29 +f 154/1/30 210/2/30 208/3/30 +f 151/1/29 209/2/29 211/3/29 +f 154/1/30 212/2/30 210/3/30 +f 151/1/58 211/2/58 213/3/58 +f 154/1/32 214/2/32 212/3/32 +f 151/1/25 213/2/25 215/3/25 +f 154/1/26 216/2/26 214/3/26 +f 151/1/59 215/2/59 152/3/59 +f 154/1/60 156/2/60 216/3/60 +f 217/1/2 218/2/2 219/3/2 +f 220/1/61 221/3/61 222/2/61 +f 223/1/62 224/2/62 225/3/62 +f 226/1/3 227/3/3 228/2/3 +f 215/1/63 216/2/63 156/3/63 +f 215/1/64 156/3/64 152/12/64 +f 213/1/65 214/2/65 216/3/65 +f 213/1/66 216/3/66 215/12/66 +f 211/1/67 212/2/67 214/3/67 +f 211/1/68 214/3/68 213/12/68 +f 209/1/69 210/2/69 212/3/69 +f 209/1/70 212/3/70 211/12/70 +f 207/1/71 208/2/71 210/3/71 +f 207/1/72 210/3/72 209/12/72 +f 205/1/73 206/2/73 208/3/73 +f 205/1/74 208/3/74 207/12/74 +f 203/1/75 204/2/75 206/3/75 +f 203/1/76 206/3/76 205/12/76 +f 201/1/77 202/2/77 204/3/77 +f 201/1/78 204/3/78 203/12/78 +f 199/1/79 200/2/79 202/3/79 +f 199/1/80 202/3/80 201/12/80 +f 197/1/81 198/2/81 200/3/81 +f 197/1/82 200/3/82 199/12/82 +f 195/1/83 196/2/83 198/3/83 +f 195/1/84 198/3/84 197/12/84 +f 193/1/85 194/2/85 196/3/85 +f 193/1/86 196/3/86 195/12/86 +f 191/1/87 192/2/87 194/3/87 +f 191/1/88 194/3/88 193/12/88 +f 189/1/89 190/2/89 192/3/89 +f 189/1/89 192/3/89 191/12/89 +f 187/1/90 188/2/90 190/3/90 +f 187/1/91 190/3/91 189/12/91 +f 185/1/92 186/2/92 188/3/92 +f 185/1/93 188/3/93 187/12/93 +f 183/1/94 184/2/94 186/3/94 +f 183/1/94 186/3/94 185/12/94 +f 181/1/95 182/2/95 184/3/95 +f 181/1/96 184/3/96 183/12/96 +f 179/1/97 180/2/97 182/3/97 +f 179/1/98 182/3/98 181/12/98 +f 177/1/99 178/2/99 180/3/99 +f 177/1/100 180/3/100 179/12/100 +f 175/1/101 176/2/101 178/3/101 +f 175/1/102 178/3/102 177/12/102 +f 173/1/103 174/2/103 176/3/103 +f 173/1/104 176/3/104 175/12/104 +f 171/1/105 172/2/105 174/3/105 +f 171/1/106 174/3/106 173/12/106 +f 169/1/107 170/2/107 172/3/107 +f 169/1/108 172/3/108 171/12/108 +f 167/1/109 168/2/109 170/3/109 +f 167/1/110 170/3/110 169/12/110 +f 165/1/111 166/2/111 168/3/111 +f 165/1/112 168/3/112 167/12/112 +f 163/1/113 164/2/113 166/3/113 +f 163/1/114 166/3/114 165/12/114 +f 161/1/115 162/2/115 164/3/115 +f 161/1/116 164/3/116 163/12/116 +f 159/1/117 160/2/117 162/3/117 +f 159/1/118 162/3/118 161/12/118 +f 157/1/119 158/2/119 160/3/119 +f 157/1/120 160/3/120 159/12/120 +f 153/1/121 155/2/121 158/3/121 +f 153/1/122 158/3/122 157/12/122 +f 152/1/123 156/2/123 155/3/123 +f 152/1/124 155/3/124 153/12/124 +f 92/1/125 89/2/125 149/3/125 +f 92/1/125 149/3/125 150/12/125 +f 150/1/126 149/2/126 147/3/126 +f 150/1/126 147/3/126 148/12/126 +f 148/1/127 147/2/127 145/3/127 +f 148/1/127 145/3/127 146/12/127 +f 146/1/128 145/2/128 143/3/128 +f 146/1/128 143/3/128 144/12/128 +f 144/1/129 143/2/129 141/3/129 +f 144/1/129 141/3/129 142/12/129 +f 142/1/130 141/2/130 140/3/130 +f 142/1/130 140/3/130 2/12/130 +f 2/1/131 140/2/131 139/3/131 +f 2/1/131 139/3/131 3/12/131 +f 3/1/132 139/2/132 137/3/132 +f 3/1/132 137/3/132 138/12/132 +f 138/1/133 137/2/133 135/3/133 +f 138/1/133 135/3/133 136/12/133 +f 136/1/134 135/2/134 133/3/134 +f 136/1/134 133/3/134 134/12/134 +f 134/1/135 133/2/135 131/3/135 +f 134/1/135 131/3/135 132/12/135 +f 132/1/136 131/2/136 129/3/136 +f 132/1/136 129/3/136 130/12/136 +f 130/1/137 129/2/137 127/3/137 +f 130/1/137 127/3/137 128/12/137 +f 128/1/138 127/2/138 125/3/138 +f 128/1/138 125/3/138 126/12/138 +f 126/1/139 125/2/139 123/3/139 +f 126/1/140 123/3/140 124/12/140 +f 124/1/141 123/2/141 121/3/141 +f 124/1/142 121/3/142 122/12/142 +f 122/1/143 121/2/143 119/3/143 +f 122/1/143 119/3/143 120/12/143 +f 120/1/144 119/2/144 117/3/144 +f 120/1/144 117/3/144 118/12/144 +f 118/1/145 117/2/145 115/3/145 +f 118/1/145 115/3/145 116/12/145 +f 116/1/146 115/2/146 113/3/146 +f 116/1/146 113/3/146 114/12/146 +f 114/1/147 113/2/147 111/3/147 +f 114/1/147 111/3/147 112/12/147 +f 112/1/148 111/2/148 109/3/148 +f 112/1/149 109/3/149 110/12/149 +f 110/1/150 109/2/150 107/3/150 +f 110/1/151 107/3/151 108/12/151 +f 108/1/152 107/2/152 105/3/152 +f 108/1/152 105/3/152 106/12/152 +f 106/1/153 105/2/153 103/3/153 +f 106/1/153 103/3/153 104/12/153 +f 104/1/154 103/2/154 101/3/154 +f 104/1/154 101/3/154 102/12/154 +f 102/1/155 101/2/155 99/3/155 +f 102/1/155 99/3/155 100/12/155 +f 100/1/156 99/2/156 97/3/156 +f 100/1/156 97/3/156 98/12/156 +f 98/1/157 97/2/157 95/3/157 +f 98/1/158 95/3/158 96/12/158 +f 96/1/159 95/2/159 93/3/159 +f 96/1/160 93/3/160 94/12/160 +f 94/1/161 93/2/161 90/3/161 +f 94/1/162 90/3/162 91/12/162 +f 91/1/163 90/2/163 89/3/163 +f 91/1/164 89/3/164 92/12/164 +f 27/1/165 23/2/165 86/3/165 +f 27/1/166 86/3/166 87/12/166 +f 84/1/167 85/2/167 87/3/167 +f 84/1/168 87/3/168 86/12/168 +f 82/1/169 83/2/169 85/3/169 +f 82/1/169 85/3/169 84/12/169 +f 80/1/170 81/2/170 83/3/170 +f 80/1/170 83/3/170 82/12/170 +f 78/1/171 79/2/171 81/3/171 +f 78/1/171 81/3/171 80/12/171 +f 76/1/172 77/2/172 79/3/172 +f 76/1/172 79/3/172 78/12/172 +f 74/1/173 75/2/173 77/3/173 +f 74/1/173 77/3/173 76/12/173 +f 72/1/153 73/2/153 75/3/153 +f 72/1/174 75/3/174 74/12/174 +f 70/1/175 71/2/175 73/3/175 +f 70/1/176 73/3/176 72/12/176 +f 68/1/177 69/2/177 71/3/177 +f 68/1/177 71/3/177 70/12/177 +f 66/1/149 67/2/149 69/3/149 +f 66/1/149 69/3/149 68/12/149 +f 64/1/178 65/2/178 67/3/178 +f 64/1/178 67/3/178 66/12/178 +f 62/1/146 63/2/146 65/3/146 +f 62/1/146 65/3/146 64/12/146 +f 60/1/179 61/2/179 63/3/179 +f 60/1/180 63/3/180 62/12/180 +f 58/1/144 59/2/144 61/3/144 +f 58/1/144 61/3/144 60/12/144 +f 56/1/181 57/2/181 59/3/181 +f 56/1/181 59/3/181 58/12/181 +f 54/1/182 55/2/182 57/3/182 +f 54/1/183 57/3/183 56/12/183 +f 52/1/184 53/2/184 55/3/184 +f 52/1/185 55/3/185 54/12/185 +f 50/1/186 51/2/186 53/3/186 +f 50/1/186 53/3/186 52/12/186 +f 48/1/187 49/2/187 51/3/187 +f 48/1/187 51/3/187 50/12/187 +f 46/1/188 47/2/188 49/3/188 +f 46/1/188 49/3/188 48/12/188 +f 44/1/189 45/2/189 47/3/189 +f 44/1/189 47/3/189 46/12/189 +f 42/1/190 43/2/190 45/3/190 +f 42/1/190 45/3/190 44/12/190 +f 40/1/191 41/2/191 43/3/191 +f 40/1/191 43/3/191 42/12/191 +f 38/1/192 39/2/192 41/3/192 +f 38/1/192 41/3/192 40/12/192 +f 36/1/193 37/2/193 39/3/193 +f 36/1/193 39/3/193 38/12/193 +f 34/1/130 35/2/130 37/3/130 +f 34/1/130 37/3/130 36/12/130 +f 32/1/194 33/2/194 35/3/194 +f 32/1/194 35/3/194 34/12/194 +f 30/1/128 31/2/128 33/3/128 +f 30/1/128 33/3/128 32/12/128 +f 28/1/195 29/2/195 31/3/195 +f 28/1/195 31/3/195 30/12/195 +f 24/1/126 26/2/126 29/3/126 +f 24/1/126 29/3/126 28/12/126 +f 23/1/196 27/2/196 26/3/196 +f 23/1/196 26/3/196 24/12/196 Modified: trunk/rcssserver3d/data/models/rightgoal.obj =================================================================== --- trunk/rcssserver3d/data/models/rightgoal.obj 2010-01-08 07:35:25 UTC (rev 138) +++ trunk/rcssserver3d/data/models/rightgoal.obj 2010-01-10 09:14:25 UTC (rev 139) @@ -1,235 +1,247 @@ # Blender3D v249 OBJ File: # www.blender3d.org mtllib rightgoal.mtl -o rightgoal +o Cylinder +v 0.466661 0.000000 0.006727 v 0.490346 -0.000000 -0.062326 v 0.494467 -0.000000 -0.047393 +v 0.466661 0.997179 0.006727 +v 0.494467 0.997179 -0.047393 +v 0.490346 0.997179 -0.062326 v 0.497519 -0.000000 -0.030383 +v 0.497519 0.997179 -0.030383 v 0.499385 -0.000000 -0.011947 +v 0.499385 0.997179 -0.011947 v 0.499994 0.000000 0.007207 +v 0.499994 0.997179 0.007207 v 0.499322 0.000000 0.026343 +v 0.499322 0.997179 0.026343 v 0.497394 0.000000 0.044726 +v 0.497394 0.997179 0.044726 v 0.494286 0.000000 0.061645 +v 0.494286 0.997179 0.061645 v 0.490116 0.000000 0.076457 +v 0.490116 0.997179 0.076457 v 0.485044 0.000000 0.088589 +v 0.485044 0.997179 0.088589 v 0.479266 0.000000 0.097575 +v 0.479266 0.997179 0.097575 v 0.473004 0.000000 0.103068 +v 0.473004 0.997179 0.103068 v 0.466498 0.000000 0.104861 +v 0.466498 0.997179 0.104861 v 0.459998 0.000000 0.102880 +v 0.459998 0.997179 0.102880 v 0.453754 0.000000 0.097207 +v 0.453754 0.997179 0.097207 v 0.448007 0.000000 0.088054 +v 0.448007 0.997179 0.088057 v 0.442976 0.000000 0.075777 +v 0.442976 0.997179 0.075777 v 0.438855 0.000000 0.060848 +v 0.438855 0.997179 0.060848 v 0.435803 0.000000 0.043837 +v 0.435803 0.997179 0.043837 v 0.433937 0.000000 0.025401 +v 0.433937 0.997179 0.025401 v 0.433328 0.000000 0.006247 +v 0.433328 0.997179 0.006247 v 0.434000 -0.000000 -0.012889 +v 0.434000 0.997179 -0.012889 v 0.435928 -0.000000 -0.031272 +v 0.435928 0.997179 -0.031272 v 0.439036 -0.000000 -0.048194 +v 0.439036 0.997179 -0.048194 v 0.443207 -0.000000 -0.063006 +v 0.443206 0.997179 -0.063003 v 0.448278 -0.000000 -0.075135 +v 0.448278 0.997179 -0.075135 v 0.454056 -0.000000 -0.084120 +v 0.454056 0.997179 -0.084120 v 0.460318 -0.000000 -0.089614 +v 0.460318 0.997179 -0.089614 v 0.466824 -0.000000 -0.091407 +v 0.466824 0.997179 -0.091407 v 0.473324 -0.000000 -0.089428 +v 0.473324 0.997179 -0.089429 v 0.479568 -0.000000 -0.083752 +v 0.479568 0.997179 -0.083752 v 0.485316 -0.000000 -0.074602 -v 0.490346 0.997179 -0.062326 -v 0.494467 0.997179 -0.047393 -v 0.497519 0.997179 -0.030383 -v 0.499385 0.997179 -0.011947 -v 0.499994 0.997179 0.007207 -v 0.499322 0.997179 0.026343 -v 0.497394 0.997179 0.044726 -v 0.494286 0.997179 0.061645 -v 0.490116 0.997179 0.076457 -v 0.485044 0.997179 0.088589 -v 0.479266 0.997179 0.097575 -v 0.473004 0.997179 0.103068 -v 0.466498 0.997179 0.104861 -v 0.459998 0.997179 0.102880 -v 0.453754 0.997179 0.097207 -v 0.448007 0.997179 0.088057 -v 0.442976 0.997179 0.075777 -v 0.438855 0.997179 0.060848 -v 0.435803 0.997179 0.043837 -v 0.433937 0.997179 0.025401 -v 0.433328 0.997179 0.006247 -v 0.434000 0.997179 -0.012889 -v 0.435928 0.997179 -0.031272 -v 0.439036 0.997179 -0.048194 -v 0.443206 0.997179 -0.063003 -v 0.448278 0.997179 -0.075135 -v 0.454056 0.997179 -0.084120 -v 0.460318 0.997179 -0.089614 -v 0.466824 0.997179 -0.091407 -v 0.473324 0.997179 -0.089429 -v 0.479568 0.997179 -0.083752 v 0.485315 0.997179 -0.074602 -v 0.466661 0.000000 0.006727 -v 0.466661 0.997179 0.006727 v -0.466661 0.997179 -0.006727 +v -0.442976 0.997179 -0.075777 +v -0.448007 0.997179 -0.088057 v -0.466661 -0.000000 -0.006727 -v -0.448007 0.997179 -0.088057 +v -0.448007 -0.000000 -0.088054 +v -0.442976 -0.000000 -0.075777 v -0.453755 0.997179 -0.097207 +v -0.453754 -0.000000 -0.097207 v -0.459998 0.997179 -0.102883 +v -0.459998 -0.000000 -0.102880 v -0.466498 0.997179 -0.104861 +v -0.466498 -0.000000 -0.104861 v -0.473004 0.997179 -0.103068 +v -0.473004 -0.000000 -0.103068 v -0.479266 0.997179 -0.097575 +v -0.479266 -0.000000 -0.097575 v -0.485044 0.997179 -0.088589 +v -0.485044 -0.000000 -0.088589 v -0.490116 0.997179 -0.076457 +v -0.490116 -0.000000 -0.076457 v -0.494286 0.997179 -0.061646 +v -0.494286 -0.000000 -0.061645 v -0.497394 0.997179 -0.044723 +v -0.497394 -0.000000 -0.044726 v -0.499322 0.997179 -0.026343 +v -0.499322 -0.000000 -0.026343 v -0.499994 0.997179 -0.007207 +v -0.499994 -0.000000 -0.007207 v -0.499385 0.997179 0.011947 +v -0.499385 0.000000 0.011947 v -0.497519 0.997179 0.030383 +v -0.497519 0.000000 0.030383 v -0.494467 0.997179 0.047393 +v -0.494467 0.000000 0.047393 v -0.490346 0.997179 0.062326 +v -0.490346 0.000000 0.062326 v -0.485315 0.997179 0.074602 +v -0.485316 0.000000 0.074602 v -0.479568 0.997179 0.083752 +v -0.479568 0.000000 0.083752 v -0.473324 0.997179 0.089428 +v -0.473324 0.000000 0.089428 v -0.466824 0.997179 0.091407 +v -0.466824 0.000000 0.091407 v -0.460318 0.997179 0.089614 +v -0.460318 0.000000 0.089614 v -0.454056 0.997179 0.084120 +v -0.454056 0.000000 0.084120 v -0.448278 0.997179 0.075135 +v -0.448278 0.000000 0.075135 v -0.443207 0.997179 0.063006 +v -0.443207 0.000000 0.063006 v -0.439036 0.997179 0.048194 +v -0.439036 0.000000 0.048194 v -0.435928 0.997179 0.031272 v -0.434000 0.997179 0.012889 +v -0.434000 0.000000 0.012889 +v -0.435928 0.000000 0.031272 v -0.433328 0.997179 -0.006247 +v -0.433328 -0.000000 -0.006247 v -0.433937 0.997179 -0.025401 +v -0.433937 -0.000000 -0.025401 v -0.435803 0.997179 -0.043837 +v -0.435803 -0.000000 -0.043837 v -0.438855 0.997179 -0.060848 -v -0.442976 0.997179 -0.075777 -v -0.448007 -0.000000 -0.088054 -v -0.453754 -0.000000 -0.097207 -v -0.459998 -0.000000 -0.102880 -v -0.466498 -0.000000 -0.104861 -v -0.473004 -0.000000 -0.103068 -v -0.479266 -0.000000 -0.097575 -v -0.485044 -0.000000 -0.088589 -v -0.490116 -0.000000 -0.076457 -v -0.494286 -0.000000 -0.061645 -v -0.497394 -0.000000 -0.044726 -v -0.499322 -0.000000 -0.026343 -v -0.499994 -0.000000 -0.007207 -v -0.499385 0.000000 0.011947 -v -0.497519 0.000000 0.030383 -v -0.494467 0.000000 0.047393 -v -0.490346 0.000000 0.062326 -v -0.485316 0.000000 0.074602 -v -0.479568 0.000000 0.083752 -v -0.473324 0.000000 0.089428 -v -0.466824 0.000000 0.091407 -v -0.460318 0.000000 0.089614 -v -0.454056 0.000000 0.084120 -v -0.448278 0.000000 0.075135 -v -0.443207 0.000000 0.063006 -v -0.439036 0.000000 0.048194 -v -0.435928 0.000000 0.031272 -v -0.434000 0.000000 0.012889 -v -0.433328 -0.000000 -0.006247 -v -0.433937 -0.000000 -0.025401 -v -0.435803 -0.000000 -0.043837 v -0.438855 -0.000000 -0.060848 -v -0.442976 -0.000000 -0.075777 +v -0.465871 0.964236 -0.006715 v -0.465814 0.986271 -0.041411 v -0.465804 0.981550 -0.047514 +v 0.467451 0.964236 0.006739 +v 0.467519 0.981550 -0.034060 +v 0.467508 0.986271 -0.027957 v -0.465796 0.976161 -0.052048 +v 0.467526 0.976161 -0.038594 v -0.465791 0.970316 -0.054839 +v 0.467531 0.970316 -0.041385 v -0.465790 0.964236 -0.055781 +v 0.467532 0.964236 -0.042330 v -0.465791 0.958158 -0.054839 +v 0.467531 0.958158 -0.041385 v -0.465796 0.952311 -0.052048 +v 0.467526 0.952311 -0.038594 v -0.465804 0.946925 -0.047514 +v 0.467519 0.946925 -0.034060 v -0.465814 0.942202 -0.041411 +v 0.467508 0.942202 -0.027957 v -0.465826 0.938326 -0.033974 +v 0.467496 0.938326 -0.020523 v -0.465840 0.935446 -0.025493 +v 0.467482 0.935446 -0.012038 v -0.465855 0.933674 -0.016287 +v 0.467467 0.933674 -0.002835 v -0.465871 0.933074 -0.006715 +v 0.467451 0.933074 0.006739 v -0.465887 0.933674 0.002859 +v 0.467435 0.933674 0.016310 v -0.465903 0.935446 0.012062 +v 0.467420 0.935446 0.025516 v -0.465917 0.938326 0.020544 +v 0.467405 0.938326 0.033998 v -0.465929 0.942202 0.027980 +v 0.467393 0.942202 0.041435 v -0.465939 0.946925 0.034083 +v 0.467383 0.946925 0.047535 v -0.465947 0.952311 0.038617 +v 0.467375 0.952311 0.052071 v -0.465951 0.958158 0.041408 +v 0.467371 0.958158 0.054862 v -0.465953 0.964236 0.042353 +v 0.467369 0.964236 0.055804 v -0.465951 0.970316 0.041408 +v 0.467371 0.970316 0.054862 v -0.465947 0.976161 0.038617 +v 0.467375 0.976161 0.052071 v -0.465939 0.981550 0.034083 +v 0.467383 0.981550 0.047535 v -0.465929 0.986271 0.027980 +v 0.467393 0.986271 0.041435 v -0.465917 0.990147 0.020544 +v 0.467405 0.990147 0.033998 v -0.465903 0.993026 0.012062 +v 0.467420 0.993026 0.025516 v -0.465887 0.994800 0.002859 +v 0.467435 0.994800 0.016310 v -0.465871 0.995399 -0.006715 +v 0.467451 0.995399 0.006739 v -0.465855 0.994800 -0.016287 +v 0.467467 0.994800 -0.002835 v -0.465840 0.993026 -0.025493 +v 0.467482 0.993026 -0.012038 v -0.465826 0.990147 -0.033974 -v 0.467508 0.986271 -0.027957 -v 0.467519 0.981550 -0.034060 -v 0.467526 0.976161 -0.038594 -v 0.467531 0.970316 -0.041385 -v 0.467532 0.964236 -0.042330 -v 0.467531 0.958158 -0.041385 -v 0.467526 0.952311 -0.038594 -v 0.467519 0.946925 -0.034060 -v 0.467508 0.942202 -0.027957 -v 0.467496 0.938326 -0.020523 -v 0.467482 0.935446 -0.012038 -v 0.467467 0.933674 -0.002835 -v 0.467451 0.933074 0.006739 -v 0.467435 0.933674 0.016310 -v 0.467420 0.935446 0.025516 -v 0.467405 0.938326 0.033998 -v 0.467393 0.942202 0.041435 -v 0.467383 0.946925 0.047535 -v 0.467375 0.952311 0.052071 -v 0.467371 0.958158 0.054862 -v 0.467369 0.964236 0.055804 -v 0.467371 0.970316 0.054862 -v 0.467375 0.976161 0.052071 -v 0.467383 0.981550 0.047535 -v 0.467393 0.986271 0.041435 -v 0.467405 0.990147 0.033998 -v 0.467420 0.993026 0.025516 -v 0.467435 0.994800 0.016310 -v 0.467451 0.995399 0.006739 -v 0.467467 0.994800 -0.002835 -v 0.467482 0.993026 -0.012038 v 0.467496 0.990147 -0.020523 -v -0.465871 0.964236 -0.006715 -v 0.467451 0.964236 0.006739 +v -0.458524 0.001554 -0.890770 +v -0.459830 0.498835 -0.105700 v -0.459830 0.000247 -0.105700 -v -0.459830 0.498835 -0.105700 -v -0.458524 0.001554 -0.890770 +v -0.465191 0.001554 -0.890770 +v -0.466496 0.000247 -0.105700 +v -0.466496 0.498835 -0.105700 +v 0.474809 0.001554 -0.890770 +v 0.473504 0.498835 -0.105700 +v 0.473504 0.000247 -0.105700 +v 0.468143 0.001554 -0.890770 +v 0.466837 0.000247 -0.105700 +v 0.466837 0.498835 -0.105700 v 0.469231 0.001554 -0.881690 v 0.467925 1.000000 -0.096621 v 0.467925 0.000247 -0.096621 -v 0.467925 1.000000 -0.096621 -v 0.469231 0.001554 -0.881690 v -0.463784 0.001554 -0.895139 -v -0.465090 1.000000 -0.110069 v -0.465090 0.000247 -0.110069 v -0.465090 1.000000 -0.110069 v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v 0.469231 0.001554 -0.881690 +v 0.467925 0.000247 -0.096621 v 0.467925 1.000000 -0.096621 v 0.469231 0.001554 -0.881690 -v -0.465090 0.000247 -0.110069 +v 0.467925 1.000000 -0.096621 v -0.465090 1.000000 -0.110069 v -0.463784 0.001554 -0.895139 -v -0.465191 0.001554 -0.890770 -v -0.466496 0.498835 -0.105700 -v -0.466496 0.000247 -0.105700 -v 0.474809 0.001554 -0.890770 -v 0.473504 0.498835 -0.105700 -v 0.473504 0.000247 -0.105700 -v 0.468143 0.001554 -0.890770 -v 0.466837 0.498835 -0.105700 -v 0.466837 0.000247 -0.105700 v 0.469231 0.001554 -0.881690 v 0.467925 1.000000 -0.096621 -v 0.467925 0.000247 -0.096621 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.478737 0.520656 +vt 0.239368 1.000000 +vt 0.239368 0.520028 +vt 0.239368 0.520656 +vt 0.000000 0.520028 +vt 0.812878 0.000000 +vt 0.812878 0.520028 +vt 0.000000 0.520027 +vt 1.000000 1.000000 vn -0.000000 -1.000000 0.000000 vn 0.999999 0.000000 0.001664 vn -0.999999 -0.000000 -0.001664 @@ -428,401 +440,401 @@ vn 0.963964 -0.000000 -0.266033 usemtl grey_naogoalnet.png s off -f 68//1 126//1 125//1 -f 206//2 205//2 204//2 -f 207//3 209//3 208//3 -f 216//2 215//2 214//2 -f 226//3 228//3 227//3 -f 213//4 212//4 210//4 -f 213//4 210//4 211//4 -f 202//5 207//5 208//5 -f 202//5 208//5 203//5 +f 70/1/1 124/2/1 120/3/1 +f 211/4/2 212/5/2 213/6/2 +f 214/7/3 215/8/3 216/1/3 +f 217/7/2 218/1/2 219/8/2 +f 220/4/3 221/6/3 222/5/3 +f 223/9/4 224/10/4 225/11/4 +f 223/9/4 225/11/4 226/2/4 +f 227/9/5 214/2/5 216/11/5 +f 227/9/5 216/11/5 228/10/5 usemtl white -f 201//2 200//2 199//2 -f 217//6 219//6 218//6 -f 220//7 221//7 222//7 -f 223//3 225//3 224//3 +f 199/1/2 200/2/2 201/3/2 +f 202/1/6 203/3/6 204/2/6 +f 205/1/7 206/2/7 207/3/7 +f 208/1/3 209/3/3 210/2/3 usemtl sky-blue -f 65//1 1//1 2//1 -f 66//8 34//8 33//8 -f 65//1 2//1 3//1 -f 66//8 35//8 34//8 -f 65//1 3//1 4//1 -f 66//8 36//8 35//8 -f 65//1 4//1 5//1 -f 66//8 37//8 36//8 -f 65//1 5//1 6//1 -f 66//8 38//8 37//8 -f 65//1 6//1 7//1 -f 66//8 39//8 38//8 -f 65//1 7//1 8//1 -f 66//8 40//8 39//8 -f 65//1 8//1 9//1 -f 66//8 41//8 40//8 -f 65//1 9//1 10//1 -f 66//8 42//8 41//8 -f 65//1 10//1 11//1 -f 66//8 43//8 42//8 -f 65//1 11//1 12//1 -f 66//8 44//8 43//8 -f 65//1 12//1 13//1 -f 66//8 45//8 44//8 -f 65//1 13//1 14//1 -f 66//8 46//8 45//8 -f 65//1 14//1 15//1 -f 66//8 47//8 46//8 -f 65//1 15//1 16//1 -f 66//8 48//8 47//8 -f 65//1 16//1 17//1 -f 66//8 49//8 48//8 -f 65//1 17//1 18//1 -f 66//8 50//8 49//8 -f 65//1 18//1 19//1 -f 66//8 51//8 50//8 -f 65//1 19//1 20//1 -f 66//8 52//8 51//8 -f 65//1 20//1 21//1 -f 66//8 53//8 52//8 -f 65//1 21//1 22//1 -f 66//8 54//8 53//8 -f 65//1 22//1 23//1 -f 66//8 55//8 54//8 -f 65//1 23//1 24//1 -f 66//8 56//8 55//8 -f 65//1 24//1 25//1 -f 66//8 57//8 56//8 -f 65//1 25//1 26//1 -f 66//8 58//8 57//8 -f 65//1 26//1 27//1 -f 66//8 59//8 58//8 -f 65//1 27//1 28//1 -f 66//8 60//8 59//8 -f 65//1 28//1 29//1 -f 66//8 61//8 60//8 -f 65//1 29//1 30//1 -f 66//8 62//8 61//8 -f 65//1 30//1 31//1 -f 66//8 63//8 62//8 -f 65//1 31//1 32//1 -f 66//8 64//8 63//8 -f 32//1 1//1 65//1 -f 66//8 33//8 64//8 -f 67//8 100//8 69//8 -f 68//1 101//1 132//1 -f 67//8 69//8 70//8 -f 68//1 102//1 101//1 -f 67//8 70//8 71//8 -f 68//1 103//1 102//1 -f 67//8 71//8 72//8 -f 68//1 104//1 103//1 -f 67//8 72//8 73//8 -f 68//1 105//1 104//1 -f 67//8 73//8 74//8 -f 68//1 106//1 105//1 -f 67//8 74//8 75//8 -f 68//1 107//1 106//1 -f 67//8 75//8 76//8 -f 68//1 108//1 107//1 -f 67//8 76//8 77//8 -f 68//1 109//1 108//1 -f 67//8 77//8 78//8 -f 68//1 110//1 109//1 -f 67//8 78//8 79//8 -f 68//1 111//1 110//1 -f 67//8 79//8 80//8 -f 68//1 112//1 111//1 -f 67//8 80//8 81//8 -f 68//1 113//1 112//1 -f 67//8 81//8 82//8 -f 68//1 114//1 113//1 -f 67//8 82//8 83//8 -f 68//1 115//1 114//1 -f 67//8 83//8 84//8 -f 68//1 116//1 115//1 -f 67//8 84//8 85//8 -f 68//1 117//1 116//1 -f 67//8 85//8 86//8 -f 68//1 118//1 117//1 -f 67//8 86//8 87//8 -f 68//1 119//1 118//1 -f 67//8 87//8 88//8 -f 68//1 120//1 119//1 -f 67//8 88//8 89//8 -f 68//1 121//1 120//1 -f 67//8 89//8 90//8 -f 68//1 122//1 121//1 -f 67//8 90//8 91//8 -f 68//1 123//1 122//1 -f 67//8 91//8 92//8 -f 68//1 124//1 123//1 -f 67//8 92//8 93//8 -f 68//1 125//1 124//1 -f 67//8 93//8 94//8 -f 67//8 94//8 95//8 -f 68//1 127//1 126//1 -f 67//8 95//8 96//8 -f 68//1 128//1 127//1 -f 67//8 96//8 97//8 -f 68//1 129//1 128//1 -f 67//8 97//8 98//8 -f 68//1 130//1 129//1 -f 67//8 98//8 99//8 -f 68//1 131//1 130//1 -f 67//8 99//8 100//8 -f 68//1 132//1 131//1 -f 197//9 133//9 134//9 -f 198//10 166//10 165//10 -f 197//11 134//11 135//11 -f 198//12 167//12 166//12 -f 197//13 135//13 136//13 -f 198//14 168//14 167//14 -f 197//15 136//15 137//15 -f 198//16 169//16 168//16 -f 197//17 137//17 138//17 -f 198//18 170//18 169//18 -f 197//19 138//19 139//19 -f 198//20 171//20 170//20 -f 197//21 139//21 140//21 -f 198//22 172//22 171//22 -f 197//23 140//23 141//23 -f 198//24 173//24 172//24 -f 197//25 141//25 142//25 -f 198//26 174//26 173//26 -f 197//27 142//27 143//27 -f 198//28 175//28 174//28 -f 197//29 143//29 144//29 -f 198//30 176//30 175//30 -f 197//31 144//31 145//31 -f 198//32 177//32 176//32 -f 197//31 145//31 146//31 -f 198//32 178//32 177//32 -f 197//33 146//33 147//33 -f 198//34 179//34 178//34 -f 197//35 147//35 148//35 -f 198//36 180//36 179//36 -f 197//37 148//37 149//37 -f 198//38 181//38 180//38 -f 197//39 149//39 150//39 -f 198//40 182//40 181//40 -f 197//41 150//41 151//41 -f 198//42 183//42 182//42 -f 197//43 151//43 152//43 -f 198//44 184//44 183//44 -f 197//45 152//45 153//45 -f 198//46 185//46 184//46 -f 197//47 153//47 154//47 -f 198//48 186//48 185//48 -f 197//49 154//49 155//49 -f 198//50 187//50 186//50 -f 197//51 155//51 156//51 -f 198//52 188//52 187//52 -f 197//53 156//53 157//53 -f 198//54 189//54 188//54 -f 197//55 157//55 158//55 -f 198//56 190//56 189//56 -f 197//57 158//57 159//57 -f 198//58 191//58 190//58 -f 197//59 159//59 160//59 -f 198//30 192//30 191//30 -f 197//31 160//31 161//31 -f 198//32 193//32 192//32 -f 197//31 161//31 162//31 -f 198//32 194//32 193//32 -f 197//60 162//60 163//60 -f 198//34 195//34 194//34 -f 197//27 163//27 164//27 -f 198//28 196//28 195//28 -f 197//61 164//61 133//61 -f 198//62 165//62 196//62 -f 164//63 196//63 165//63 -f 164//64 165//64 133//64 -f 163//65 195//65 196//65 -f 163//66 196//66 164//66 -f 162//67 194//67 195//67 -f 162//68 195//68 163//68 -f 161//69 193//69 194//69 -f 161//70 194//70 162//70 -f 160//71 192//71 193//71 -f 160//72 193//72 161//72 -f 159//73 191//73 192//73 -f 159//74 192//74 160//74 -f 158//75 190//75 191//75 -f 158//76 191//76 159//76 -f 157//77 189//77 190//77 -f 157//78 190//78 158//78 -f 156//79 188//79 189//79 -f 156//80 189//80 157//80 -f 155//81 187//81 188//81 -f 155//82 188//82 156//82 -f 154//83 186//83 187//83 -f 154//84 187//84 155//84 -f 153//85 185//85 186//85 -f 153//86 186//86 154//86 -f 152//87 184//87 185//87 -f 152//88 185//88 153//88 -f 151//89 183//89 184//89 -f 151//89 184//89 152//89 -f 150//90 182//90 183//90 -f 150//91 183//91 151//91 -f 149//92 181//92 182//92 -f 149//93 182//93 150//93 -f 148//94 180//94 181//94 -f 148//94 181//94 149//94 -f 147//95 179//95 180//95 -f 147//96 180//96 148//96 -f 146//97 178//97 179//97 -f 146//98 179//98 147//98 -f 145//99 177//99 178//99 -f 145//100 178//100 146//100 -f 144//101 176//101 177//101 -f 144//102 177//102 145//102 -f 143//103 175//103 176//103 -f 143//104 176//104 144//104 -f 142//105 174//105 175//105 -f 142//106 175//106 143//106 -f 141//107 173//107 174//107 -f 141//108 174//108 142//108 -f 140//109 172//109 173//109 -f 140//110 173//110 141//110 -f 139//111 171//111 172//111 -f 139//112 172//112 140//112 -f 138//113 170//113 171//113 -f 138//114 171//114 139//114 -f 137//115 169//115 170//115 -f 137//116 170//116 138//116 -f 136//117 168//117 169//117 -f 136//118 169//118 137//118 -f 135//119 167//119 168//119 -f 135//120 168//120 136//120 -f 134//121 166//121 167//121 -f 134//122 167//122 135//122 -f 133//123 165//123 166//123 -f 133//124 166//124 134//124 -f 132//125 100//125 99//125 -f 132//125 99//125 131//125 -f 131//126 99//126 98//126 -f 131//126 98//126 130//126 -f 130//127 98//127 97//127 -f 130//127 97//127 129//127 -f 129//128 97//128 96//128 -f 129//128 96//128 128//128 -f 128//129 96//129 95//129 -f 128//129 95//129 127//129 -f 127//130 95//130 94//130 -f 127//130 94//130 126//130 -f 126//131 94//131 93//131 -f 126//131 93//131 125//131 -f 125//132 93//132 92//132 -f 125//132 92//132 124//132 -f 124//133 92//133 91//133 -f 124//133 91//133 123//133 -f 123//134 91//134 90//134 -f 123//134 90//134 122//134 -f 122//135 90//135 89//135 -f 122//135 89//135 121//135 -f 121//136 89//136 88//136 -f 121//136 88//136 120//136 -f 120//137 88//137 87//137 -f 120//137 87//137 119//137 -f 119//138 87//138 86//138 -f 119//138 86//138 118//138 -f 118//139 86//139 85//139 -f 118//140 85//140 117//140 -f 117//141 85//141 84//141 -f 117//142 84//142 116//142 -f 116//143 84//143 83//143 -f 116//143 83//143 115//143 -f 115//144 83//144 82//144 -f 115//144 82//144 114//144 -f 114//145 82//145 81//145 -f 114//145 81//145 113//145 -f 113//146 81//146 80//146 -f 113//146 80//146 112//146 -f 112//147 80//147 79//147 -f 112//147 79//147 111//147 -f 111//148 79//148 78//148 -f 111//149 78//149 110//149 -f 110//150 78//150 77//150 -f 110//151 77//151 109//151 -f 109//152 77//152 76//152 -f 109//152 76//152 108//152 -f 108//153 76//153 75//153 -f 108//153 75//153 107//153 -f 107//154 75//154 74//154 -f 107//154 74//154 106//154 -f 106//155 74//155 73//155 -f 106//155 73//155 105//155 -f 105//156 73//156 72//156 -f 105//156 72//156 104//156 -f 104//157 72//157 71//157 -f 104//158 71//158 103//158 -f 103//159 71//159 70//159 -f 103//160 70//160 102//160 -f 102//161 70//161 69//161 -f 102//162 69//162 101//162 -f 101//163 69//163 100//163 -f 101//164 100//164 132//164 -f 33//165 1//165 32//165 -f 33//166 32//166 64//166 -f 31//167 63//167 64//167 -f 31//168 64//168 32//168 -f 30//169 62//169 63//169 -f 30//169 63//169 31//169 -f 29//170 61//170 62//170 -f 29//170 62//170 30//170 -f 28//171 60//171 61//171 -f 28//171 61//171 29//171 -f 27//172 59//172 60//172 -f 27//172 60//172 28//172 -f 26//173 58//173 59//173 -f 26//173 59//173 27//173 -f 25//153 57//153 58//153 -f 25//174 58//174 26//174 -f 24//175 56//175 57//175 -f 24//176 57//176 25//176 -f 23//177 55//177 56//177 -f 23//177 56//177 24//177 -f 22//149 54//149 55//149 -f 22//149 55//149 23//149 -f 21//178 53//178 54//178 -f 21//178 54//178 22//178 -f 20//146 52//146 53//146 -f 20//146 53//146 21//146 -f 19//179 51//179 52//179 -f 19//180 52//180 20//180 -f 18//144 50//144 51//144 -f 18//144 51//144 19//144 -f 17//181 49//181 50//181 -f 17//181 50//181 18//181 -f 16//182 48//182 49//182 -f 16//183 49//183 17//183 -f 15//184 47//184 48//184 -f 15//185 48//185 16//185 -f 14//186 46//186 47//186 -f 14//186 47//186 15//186 -f 13//187 45//187 46//187 -f 13//187 46//187 14//187 -f 12//188 44//188 45//188 -f 12//188 45//188 13//188 -f 11//189 43//189 44//189 -f 11//189 44//189 12//189 -f 10//190 42//190 43//190 -f 10//190 43//190 11//190 -f 9//191 41//191 42//191 -f 9//191 42//191 10//191 -f 8//192 40//192 41//192 -f 8//192 41//192 9//192 -f 7//193 39//193 40//193 -f 7//193 40//193 8//193 -f 6//130 38//130 39//130 -f 6//130 39//130 7//130 -f 5//194 37//194 38//194 -f 5//194 38//194 6//194 -f 4//128 36//128 37//128 -f 4//128 37//128 5//128 -f 3//195 35//195 36//195 -f 3//195 36//195 4//195 -f 2//126 34//126 35//126 -f 2//126 35//126 3//126 -f 1//196 33//196 34//196 -f 1//196 34//196 2//196 +f 1/1/1 2/2/1 3/3/1 +f 4/1/8 5/2/8 6/3/8 +f 1/1/1 3/2/1 7/3/1 +f 4/1/8 8/2/8 5/3/8 +f 1/1/1 7/2/1 9/3/1 +f 4/1/8 10/2/8 8/3/8 +f 1/1/1 9/2/1 11/3/1 +f 4/1/8 12/2/8 10/3/8 +f 1/1/1 11/2/1 13/3/1 +f 4/1/8 14/2/8 12/3/8 +f 1/1/1 13/2/1 15/3/1 +f 4/1/8 16/2/8 14/3/8 +f 1/1/1 15/2/1 17/3/1 +f 4/1/8 18/2/8 16/3/8 +f 1/1/1 17/2/1 19/3/1 +f 4/1/8 20/2/8 18/3/8 +f 1/1/1 19/2/1 21/3/1 +f 4/1/8 22/2/8 20/3/8 +f 1/1/1 21/2/1 23/3/1 +f 4/1/8 24/2/8 22/3/8 +f 1/1/1 23/2/1 25/3/1 +f 4/1/8 26/2/8 24/3/8 +f 1/1/1 25/2/1 27/3/1 +f 4/1/8 28/2/8 26/3/8 +f 1/1/1 27/2/1 29/3/1 +f 4/1/8 30/2/8 28/3/8 +f 1/1/1 29/2/1 31/3/1 +f 4/1/8 32/2/8 30/3/8 +f 1/1/1 31/2/1 33/3/1 +f 4/1/8 34/2/8 32/3/8 +f 1/1/1 33/2/1 35/3/1 +f 4/1/8 36/2/8 34/3/8 +f 1/1/1 35/2/1 37/3/1 +f 4/1/8 38/2/8 36/3/8 +f 1/1/1 37/2/1 39/3/1 +f 4/1/8 40/2/8 38/3/8 +f 1/1/1 39/2/1 41/3/1 +f 4/1/8 42/2/8 40/3/8 +f 1/1/1 41/2/1 43/3/1 +f 4/1/8 44/2/8 42/3/8 +f 1/1/1 43/2/1 45/3/1 +f 4/1/8 46/2/8 44/3/8 +f 1/1/1 45/2/1 47/3/1 +f 4/1/8 48/2/8 46/3/8 +f 1/1/1 47/2/1 49/3/1 +f 4/1/8 50/2/8 48/3/8 +f 1/1/1 49/2/1 51/3/1 +f 4/1/8 52/2/8 50/3/8 +f 1/1/1 51/2/1 53/3/1 +f 4/1/8 54/2/8 52/3/8 +f 1/1/1 53/2/1 55/3/1 +f 4/1/8 56/2/8 54/3/8 +f 1/1/1 55/2/1 57/3/1 +f 4/1/8 58/2/8 56/3/8 +f 1/1/1 57/2/1 59/3/1 +f 4/1/8 60/2/8 58/3/8 +f 1/1/1 59/2/1 61/3/1 +f 4/1/8 62/2/8 60/3/8 +f 1/1/1 61/2/1 63/3/1 +f 4/1/8 64/2/8 62/3/8 +f 1/1/1 63/2/1 65/3/1 +f 4/1/8 66/2/8 64/3/8 +f 2/2/1 1/3/1 65/1/1 +f 4/1/8 6/2/8 66/3/8 +f 67/1/8 68/2/8 69/3/8 +f 70/1/1 71/2/1 72/3/1 +f 67/1/8 69/2/8 73/3/8 +f 70/1/1 74/2/1 71/3/1 +f 67/1/8 73/2/8 75/3/8 +f 70/1/1 76/2/1 74/3/1 +f 67/1/8 75/2/8 77/3/8 +f 70/1/1 78/2/1 76/3/1 +f 67/1/8 77/2/8 79/3/8 +f 70/1/1 80/2/1 78/3/1 +f 67/1/8 79/2/8 81/3/8 +f 70/1/1 82/2/1 80/3/1 +f 67/1/8 81/2/8 83/3/8 +f 70/1/1 84/2/1 82/3/1 +f 67/1/8 83/2/8 85/3/8 +f 70/1/1 86/2/1 84/3/1 +f 67/1/8 85/2/8 87/3/8 +f 70/1/1 88/2/1 86/3/1 +f 67/1/8 87/2/8 89/3/8 +f 70/1/1 90/2/1 88/3/1 +f 67/1/8 89/2/8 91/3/8 +f 70/1/1 92/2/1 90/3/1 +f 67/1/8 91/2/8 93/3/8 +f 70/1/1 94/2/1 92/3/1 +f 67/1/8 93/2/8 95/3/8 +f 70/1/1 96/2/1 94/3/1 +f 67/1/8 95/2/8 97/3/8 +f 70/1/1 98/2/1 96/3/1 +f 67/1/8 97/2/8 99/3/8 +f 70/1/1 100/2/1 98/3/1 +f 67/1/8 99/2/8 101/3/8 +f 70/1/1 102/2/1 100/3/1 +f 67/1/8 101/2/8 103/3/8 +f 70/1/1 104/2/1 102/3/1 +f 67/1/8 103/2/8 105/3/8 +f 70/1/1 106/2/1 104/3/1 +f 67/1/8 105/2/8 107/3/8 +f 70/1/1 108/2/1 106/3/1 +f 67/1/8 107/2/8 109/3/8 +f 70/1/1 110/2/1 108/3/1 +f 67/1/8 109/2/8 111/3/8 +f 70/1/1 112/2/1 110/3/1 +f 67/1/8 111/2/8 113/3/8 +f 70/1/1 114/2/1 112/3/1 +f 67/1/8 113/2/8 115/3/8 +f 70/1/1 116/2/1 114/3/1 +f 67/1/8 115/2/8 117/3/8 +f 70/1/1 118/2/1 116/3/1 +f 67/1/8 117/2/8 119/3/8 +f 70/1/1 120/2/1 118/3/1 +f 67/1/8 119/2/8 121/3/8 +f 67/1/8 121/2/8 122/3/8 +f 70/1/1 123/2/1 124/3/1 +f 67/1/8 122/2/8 125/3/8 +f 70/1/1 126/2/1 123/3/1 +f 67/1/8 125/2/8 127/3/8 +f 70/1/1 128/2/1 126/3/1 +f 67/1/8 127/2/8 129/3/8 +f 70/1/1 130/2/1 128/3/1 +f 67/1/8 129/2/8 131/3/8 +f 70/1/1 132/2/1 130/3/1 +f 67/1/8 131/2/8 68/3/8 +f 70/1/1 72/2/1 132/3/1 +f 133/1/9 134/2/9 135/3/9 +f 136/1/10 137/2/10 138/3/10 +f 133/1/11 135/2/11 139/3/11 +f 136/1/12 140/2/12 137/3/12 +f 133/1/13 139/2/13 141/3/13 +f 136/1/14 142/2/14 140/3/14 +f 133/1/15 141/2/15 143/3/15 +f 136/1/16 144/2/16 142/3/16 +f 133/1/17 143/2/17 145/3/17 +f 136/1/18 146/2/18 144/3/18 +f 133/1/19 145/2/19 147/3/19 +f 136/1/20 148/2/20 146/3/20 +f 133/1/21 147/2/21 149/3/21 +f 136/1/22 150/2/22 148/3/22 +f 133/1/23 149/2/23 151/3/23 +f 136/1/24 152/2/24 150/3/24 +f 133/1/25 151/2/25 153/3/25 +f 136/1/26 154/2/26 152/3/26 +f 133/1/27 153/2/27 155/3/27 +f 136/1/28 156/2/28 154/3/28 +f 133/1/29 155/2/29 157/3/29 +f 136/1/30 158/2/30 156/3/30 +f 133/1/31 157/2/31 159/3/31 +f 136/1/32 160/2/32 158/3/32 +f 133/1/31 159/2/31 161/3/31 +f 136/1/32 162/2/32 160/3/32 +f 133/1/33 161/2/33 163/3/33 +f 136/1/34 164/2/34 162/3/34 +f 133/1/35 163/2/35 165/3/35 +f 136/1/36 166/2/36 164/3/36 +f 133/1/37 165/2/37 167/3/37 +f 136/1/38 168/2/38 166/3/38 +f 133/1/39 167/2/39 169/3/39 +f 136/1/40 170/2/40 168/3/40 +f 133/1/41 169/2/41 171/3/41 +f 136/1/42 172/2/42 170/3/42 +f 133/1/43 171/2/43 173/3/43 +f 136/1/44 174/2/44 172/3/44 +f 133/1/45 173/2/45 175/3/45 +f 136/1/46 176/2/46 174/3/46 +f 133/1/47 175/2/47 177/3/47 +f 136/1/48 178/2/48 176/3/48 +f 133/1/49 177/2/49 179/3/49 ... [truncated message content] |
From: <a-...@us...> - 2010-01-08 07:35:37
|
Revision: 138 http://simspark.svn.sourceforge.net/simspark/?rev=138&view=rev Author: a-held Date: 2010-01-08 07:35:25 +0000 (Fri, 08 Jan 2010) Log Message: ----------- Implemented bridge pattern for Joint superclass Created separate file for engine-specific static methods Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods.h branches/multiphys/spark/lib/oxygen/physicsserver/staticphysicsmethods_ode.cpp Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2010-01-08 07:35:25 UTC (rev 138) @@ -39,6 +39,7 @@ physicsserver/recorderhandler.h physicsserver/space.h physicsserver/spherecollider.h + physicsserver/staticphysicsmethods.h physicsserver/transformcollider.h physicsserver/world.h physicsserver/dragcontroller.h @@ -89,6 +90,7 @@ physicsserver/int/worldint.h #ode-specific files + physicsserver/staticphysicsmethods_ode.cpp physicsserver/ode/odeballjoint.h physicsserver/ode/odebody.h physicsserver/ode/odeboxcollider.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -77,15 +77,12 @@ return GetLocalPos(pos); } -void BallJoint::SetParameter(int /*parameter*/, float /*value*/) -{ - GetLog()->Error() << - "(BallJoint) WARNING: SetParameter function undefined for BallJoint, ignored\n"; +void BallJoint::SetParameter(int parameter, float value){ + GetLog()->Warning() + << "(BallJoint) WARNING: SetParameter undefined for BallJoint, call ignored"; } -float BallJoint::GetParameter(int /*parameter*/) const -{ - GetLog()->Error() << - "(BallJoint) WARNING: GetParameter function undefined for BallJoint, returned zero\n"; - return 0; +float BallJoint::GetParameter(int parameter) const{ + GetLog()->Warning() + << "(BallJoint) WARNING: SetParameter undefined for BallJoint, call ignored"; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -44,16 +44,16 @@ anchor point will be the same for both bodies. */ salt::Vector3f GetAnchor(EBodyIndex idx); + + /** sets a joint parameter value */ + virtual void SetParameter(int parameter, float value); + /** returns a joint parameter value */ + virtual float GetParameter(int parameter) const; + protected: /** creates a new contact joint */ virtual void OnLink(); - - /** sets a joint parameter value */ - virtual void SetParameter(int parameter, float value); - - /** returns a joint parameter value */ - virtual float GetParameter(int parameter) const; private: boost::shared_ptr<BallJointInt> mBallJointImp; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -23,6 +23,7 @@ #include <oxygen/physicsserver/ode/odecollider.h> #include <oxygen/physicsserver/collisionhandler.h> #include <oxygen/physicsserver/space.h> +#include <oxygen/physicsserver/staticphysicsmethods.h> #include <oxygen/physicsserver/transformcollider.h> #include <oxygen/physicsserver/rigidbody.h> #include <oxygen/sceneserver/scene.h> @@ -163,7 +164,7 @@ } Collider* collPtr = - ColliderInt::GetColliderPointer(geomID); + StaticPhysicsMethods::GetColliderPointer(geomID); if (collPtr == 0) { Modified: branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2010-01-08 07:35:25 UTC (rev 138) @@ -37,6 +37,7 @@ class OXYGEN_API GenericPhysicsMatrix{}; class OXYGEN_API GenericContact{}; class OXYGEN_API GenericMass{}; +class OXYGEN_API GenericJointFeedback{}; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -113,13 +113,3 @@ return 0; } } - -void Hinge2Joint::SetParameter(int parameter, float value) -{ - mHinge2JointImp->SetParameter(parameter, value, mJointID); -} - -float Hinge2Joint::GetParameter(int parameter) const -{ - return mHinge2JointImp->GetParameter(parameter, mJointID); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -57,12 +57,6 @@ protected: /** creates a new hinge2 joint */ virtual void OnLink(); - - /** sets a joint parameter value */ - virtual void SetParameter(int parameter, float value); - - /** returns a joint parameter value */ - virtual float GetParameter(int parameter) const; private: boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -125,12 +125,6 @@ return mHingeJointImp->GetAngleRate(mJointID); } -void HingeJoint::SetParameter(int parameter, float value) -{ - mHingeJointImp->SetParameter(parameter, value, mJointID); +void HingeJoint::SetParameter(int parameter, float value){ + mJointImp->SetParameter(parameter, value, mJointID); } - -float HingeJoint::GetParameter(int parameter) const -{ - return mHingeJointImp->GetParameter(parameter, mJointID); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -68,13 +68,10 @@ /** returns the time derivate of the hinge angle */ float GetAngleRate() const; + + /** Sets a parameter value of this joint*/ + void SetParameter(int parameter, float value); - /** sets a joint parameter value */ - virtual void SetParameter(int parameter, float value); - - /** returns a joint parameter value */ - virtual float GetParameter(int parameter) const; - protected: /** creates a new hingejoint joint */ virtual void OnLink(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -48,15 +48,6 @@ virtual void SetSpace(long spaceID, long geomID, Collider* collider) = 0; virtual void SetBody(long bodyID, long geomID) = 0; virtual void RemoveFromSpace(long geomID, long spaceID) = 0; - - // Here, we have to cheat with the preprocessor, since a static method - // is required, and the bridge pattern requires member variables to - // be used (so we cannot use the bridge pattern) - static Collider* GetColliderPointer(long geomID){ - #ifdef OXYGEN_ODEWRAPPER_H - return static_cast<Collider*>(dGeomGetData( (dGeomID) geomID)); - #endif - } }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -38,8 +38,6 @@ virtual float GetAngle(long jointID) = 0; virtual float GetAngleRate1(long jointID) = 0; virtual float GetAngleRate2(long jointID) = 0; - virtual void SetParameter(int parameter, float value, long jointID) = 0; - virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -36,8 +36,6 @@ virtual salt::Vector3f GetAxis(long jointID) = 0; virtual float GetAngle(long jointID) const = 0; virtual float GetAngleRate(long jointID) const = 0; - virtual void SetParameter(int parameter, float value, long jointID) = 0; - virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -23,6 +23,7 @@ #ifndef OXYGEN_JOINTINT_H #define OXYGEN_JOINTINT_H +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/ode/odewrapper.h> #include <boost/smart_ptr/shared_ptr.hpp> #include <salt/vector.h> @@ -36,89 +37,47 @@ class OXYGEN_API JointInt { -public: - enum EBodyIndex - { - BI_FIRST = 0, - BI_SECOND = 1 - }; - - enum EAxisIndex - { - AI_FIRST = 0, - AI_SECOND = 1, - AI_THIRD = 2 - }; - - static Joint* GetJoint(long jointID){ +public: - } - - static bool AreConnected(boost::shared_ptr<RigidBody> body1, - boost::shared_ptr<RigidBody> body2){ - - } - - static bool AreConnectedExcluding(boost::shared_ptr<RigidBody> body1, - boost::shared_ptr<RigidBody> body2, - int joint_type){ - - } - - virtual void DestroyJoint() = 0; - virtual void Attach(boost::shared_ptr<RigidBody> body1, - boost::shared_ptr<RigidBody> body2) = 0; - virtual void Attach(const std::string& path1, const std::string& path2) = 0; - virtual int GetType() const = 0; - virtual boost::shared_ptr<RigidBody> GetBody(EBodyIndex idx) = 0; - virtual void EnableFeedback(bool enable) = 0; - virtual bool FeedbackEnabled() const = 0; - virtual salt::Vector3f GetFeedbackForce(EBodyIndex idx) const = 0; - virtual salt::Vector3f GetFeedbackTorque(EBodyIndex idx) const = 0; - virtual void SetFudgeFactor(EAxisIndex idx, float fudge_factor) = 0; - virtual float GetFudgeFactor(EAxisIndex idx) const = 0; - virtual void SetBounce(EAxisIndex idx, float bounce) = 0; - virtual float GetBounce(EAxisIndex idx) const = 0; - virtual void SetLowStopDeg(EAxisIndex idx, float deg) = 0; - virtual float GetLowStopDeg(EAxisIndex idx) const = 0; - virtual void SetHighStopDeg(EAxisIndex idx, float deg) = 0; - virtual float GetHighStopDeg(EAxisIndex idx) const = 0; - virtual void SetLowStopPos(EAxisIndex idx, float deg) = 0; - virtual float GetLowStopPos(EAxisIndex idx) const = 0; - virtual void SetHighStopPos(EAxisIndex idx, float deg) = 0; - virtual float GetHighStopPos(EAxisIndex idx) const = 0; - virtual void SetCFM(EAxisIndex idx, float cfm) = 0; - virtual float GetCFM(EAxisIndex idx) const = 0; - virtual void SetStopCFM(EAxisIndex idx, float cfm) = 0; - virtual float GetStopCFM(EAxisIndex idx) const = 0; - virtual void SetStopERP(EAxisIndex idx, float erp) = 0; - virtual float GetStopERP(EAxisIndex idx) const = 0; - virtual void SetSuspensionERP(EAxisIndex idx, float erp) = 0; - virtual float GetSuspensionERP(EAxisIndex idx) const = 0; - virtual void SetSuspensionCFM(EAxisIndex idx, float cfm) = 0; - virtual float GetSuspensionCFM(EAxisIndex idx) const = 0; - virtual void SetLinearMotorVelocity(EAxisIndex idx, float vel) = 0; - virtual float GetLinearMotorVelocity(EAxisIndex idx) const = 0; - virtual void SetAngularMotorVelocity(EAxisIndex idx, float deg) = 0; - virtual float GetAngularMotorVelocity(EAxisIndex idx) const = 0; - virtual void SetMaxMotorForce(EAxisIndex idx, float f) = 0; - virtual float GetMaxMotorForce(EAxisIndex idx) const = 0; - virtual void SetParameter(int parameter, float value) = 0; - virtual float GetParameter(int parameter) const = 0; - virtual void SetJointMaxSpeed1(float rad) = 0; - virtual void SetJointMaxSpeed2(float rad) = 0; - virtual float GetJointMaxSpeed1() const = 0; - virtual float GetJointMaxSpeed2() const = 0; - virtual bool IsLimitJointMaxSpeed1() const = 0; - virtual bool IsLimitJointMaxSpeed2() const = 0; - virtual void OnLink() = 0; - -protected: - boost::shared_ptr<dJointFeedback> mFeedback; - float mJointMaxSpeed1; - bool mIsLimitJointMaxSpeed1; - float mJointMaxSpeed2; - bool mIsLimitJointMaxSpeed2; + virtual void DestroyJoint(long jointID) = 0; + virtual void Attach(long bodyID1, long bodiID2, long jointID) = 0; + virtual int GetType(long jointID) const = 0; + virtual long GetBodyID(int idx, long jointID) = 0; + virtual void EnableFeedback(bool enable, long jointID) = 0; + virtual bool FeedbackEnabled(long jointID) const = 0; + virtual salt::Vector3f GetFeedbackForce(int idx) const = 0; + virtual salt::Vector3f GetFeedbackTorque(int idx) const = 0; + virtual void SetFudgeFactor(int idx, float fudge_factor, long jointID) = 0; + virtual float GetFudgeFactor(int idx, long jointID) const = 0; + virtual void SetBounce(int idx, float bounce, long jointID) = 0; + virtual float GetBounce(int idx, long jointID) const = 0; + virtual void SetLowStopDeg(int idx, float deg, long jointID) = 0; + virtual float GetLowStopDeg(int idx, long jointID) const = 0; + virtual void SetHighStopDeg(int idx, float deg, long jointID) = 0; + virtual float GetHighStopDeg(int idx, long jointID) const = 0; + virtual void SetLowStopPos(int idx, float deg, long jointID) = 0; + virtual float GetLowStopPos(int idx, long jointID) const = 0; + virtual void SetHighStopPos(int idx, float deg, long jointID) = 0; + virtual float GetHighStopPos(int idx, long jointID) const = 0; + virtual void SetCFM(int idx, float cfm, long jointID) = 0; + virtual float GetCFM(int idx, long jointID) const = 0; + virtual void SetStopCFM(int idx, float cfm, long jointID) = 0; + virtual float GetStopCFM(int idx, long jointID) const = 0; + virtual void SetStopERP(int idx, float erp, long jointID) = 0; + virtual float GetStopERP(int idx, long jointID) const = 0; + virtual void SetSuspensionERP(int idx, float erp, long jointID) = 0; + virtual float GetSuspensionERP(int idx, long jointID) const = 0; + virtual void SetSuspensionCFM(int idx, float cfm, long jointID) = 0; + virtual float GetSuspensionCFM(int idx, long jointID) const = 0; + virtual void SetLinearMotorVelocity(int idx, float vel, long jointID) = 0; + virtual float GetLinearMotorVelocity(int idx, long jointID) const = 0; + virtual void SetAngularMotorVelocity(int idx, float deg, long jointID) = 0; + virtual float GetAngularMotorVelocity(int idx, long jointID) const = 0; + virtual void SetMaxMotorForce(int idx, float f, long jointID) = 0; + virtual float GetMaxMotorForce(int idx, long jointID) const = 0; + virtual void SetParameter(int parameter, float value, long jointID) = 0; + virtual float GetParameter(int parameter, long jointID) const = 0; + virtual void OnLink(long jointID, Joint* joint) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -81,17 +81,7 @@ virtual void DestroyPhysicsObject(long bodyID) = 0; virtual salt::Matrix GetSynchronisationMatrix(long bodyID) = 0; virtual void BodySetData(RigidBody* rb, long bodyID) = 0; - virtual RigidBody* BodyGetData(long bodyID) = 0; - - // Here, we have to cheat with the preprocessor, since a static method - // is required, and the bridge pattern requires member variables to - // be used (so we cannot use the bridge pattern) - static RigidBody* GetBodyPointer(long bodyID){ - #ifdef OXYGEN_ODEWRAPPER_H - return static_cast<RigidBody*>(dBodyGetData( (dBodyID) bodyID)); - #endif - } - + virtual RigidBody* BodyGetData(long bodyID) = 0; virtual long CreateBody(long world) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -37,8 +37,6 @@ virtual float GetPosition(long jointID) = 0; virtual float GetPositionRate(long jointID) = 0; virtual void SetSliderAxis(salt::Vector3f& up, long jointID) = 0; - virtual void SetParameter(int parameter, float value, long jointID) = 0; - virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -45,8 +45,6 @@ virtual float GetAngle2(long jointID) const = 0; virtual float GetAngleRate1(long jointID) const = 0; virtual float GetAngleRate2(long jointID) const = 0; - virtual void SetParameter(int parameter, float value, long jointID) = 0; - virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -19,6 +19,7 @@ */ #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/rigidbody.h> +#include <oxygen/physicsserver/staticphysicsmethods.h> #include <oxygen/physicsserver/ode/odejoint.h> #include <zeitgeist/logserver/logserver.h> @@ -46,7 +47,7 @@ return; } - dJointSetData( (dJointID) mJointID, this); + mJointImp->OnLink(mJointID, this); } shared_ptr<Joint> Joint::GetJoint(long jointID) @@ -56,8 +57,7 @@ return shared_ptr<Joint>(); } - Joint* jointPtr = - static_cast<Joint*>(dJointGetData((dJointID) jointID)); + Joint* jointPtr = StaticPhysicsMethods::GetJoint(jointID); if (jointPtr == 0) { @@ -117,7 +117,7 @@ GetLog()->Debug() << "(Joint) Attaching '" << path1 << "' to '" << path2 << '\n'; - dJointAttach( (dJointID) mJointID, (dBodyID) id1, (dBodyID) id2); + mJointImp->Attach(id1, id2, mJointID); } shared_ptr<RigidBody> Joint::GetBody(const std::string& path) @@ -162,16 +162,16 @@ int Joint::GetType() const { - return dJointGetType( (dJointID) mJointID); + return mJointImp->GetType(mJointID); } boost::shared_ptr<RigidBody> Joint::GetBody(EBodyIndex idx) { - long bodyID = (long) dJointGetBody( (dJointID) mJointID, idx); + long bodyID = mJointImp->GetBodyID(idx, mJointID); return RigidBody::GetBody(bodyID); } -bool Joint::AreConnected (shared_ptr<RigidBody> body1, shared_ptr<RigidBody> body2) +bool Joint::AreConnected(shared_ptr<RigidBody> body1, shared_ptr<RigidBody> body2) { if ( (body1.get() == 0) || @@ -181,9 +181,7 @@ return false; } - const bool connected = - (dAreConnected((dBodyID) body1->GetBodyID(), (dBodyID) body2->GetBodyID()) - == 1); + const bool connected = StaticPhysicsMethods::AreConnected(body1->GetBodyID(), body2->GetBodyID()); return connected; } @@ -200,238 +198,172 @@ return false; } - const bool connected = - (dAreConnectedExcluding((dBodyID) body1->GetBodyID(), - (dBodyID) body2->GetBodyID(), - joint_type - ) - == 1); + const bool connected = + StaticPhysicsMethods::AreConnectedExcluding(body1->GetBodyID(), + body2->GetBodyID(), + joint_type); return connected; } void Joint::EnableFeedback(bool enable) { - if (enable) - { - if (mFeedback.get() == 0) - { - mFeedback = shared_ptr<dJointFeedback>(new dJointFeedback()); - memset(mFeedback.get(),0,sizeof(dJointFeedback)); - } - } else - { - if (mFeedback.get() != 0) - { - mFeedback.reset(); - } - } - - dJointSetFeedback( (dJointID) mJointID,mFeedback.get()); + mJointImp->EnableFeedback(enable, mJointID); } bool Joint::FeedBackEnabled() const { - return (dJointGetFeedback( (dJointID) mJointID) != 0); + return mJointImp->FeedbackEnabled(mJointID); } Vector3f Joint::GetFeedbackForce(EBodyIndex idx) const { - dJointFeedback* fb = mFeedback.get(); - if (fb == 0) - { - return Vector3f(0,0,0); - } - - switch (idx) - { - case BI_FIRST : - return Vector3f( - fb->f1[0], - fb->f1[1], - fb->f1[2] - ); - - case BI_SECOND : - return Vector3f( - fb->f2[0], - fb->f2[1], - fb->f2[2] - ); - - default: - return Vector3f(0,0,0); - } + return mJointImp->GetFeedbackForce(idx); } Vector3f Joint::GetFeedbackTorque(EBodyIndex idx) const { - dJointFeedback* fb = mFeedback.get(); - if (fb == 0) - { - return Vector3f(0,0,0); - } - - switch (idx) - { - case BI_FIRST : - return Vector3f( - fb->t1[0], - fb->t1[1], - fb->t1[2] - ); - - case BI_SECOND : - return Vector3f( - fb->t2[0], - fb->t2[1], - fb->t2[2] - ); - - default: - return Vector3f(0,0,0); - } + return mJointImp->GetFeedbackTorque(idx); } void Joint::SetFudgeFactor(EAxisIndex idx, float fudge_factor) { - SetParameter(dParamFudgeFactor + (idx * dParamGroup), fudge_factor); + mJointImp->SetFudgeFactor(idx, fudge_factor, mJointID); } float Joint::GetFudgeFactor(EAxisIndex idx) const { - return GetParameter(dParamFudgeFactor + (idx * dParamGroup)); + return mJointImp->GetFudgeFactor(idx, mJointID); } - void Joint::SetBounce(EAxisIndex idx, float bounce) { - SetParameter(dParamBounce + (idx * dParamGroup),bounce); + mJointImp->SetBounce(idx, bounce, mJointID); } float Joint::GetBounce(EAxisIndex idx) const { - return GetParameter(dParamBounce + (idx * dParamGroup)); + return mJointImp->GetBounce(idx, mJointID); } void Joint::SetLowStopPos(EAxisIndex idx, float pos) { - SetParameter(dParamLoStop + (idx * dParamGroup), pos); + mJointImp->SetLowStopPos(idx, pos, mJointID); } float Joint::GetLowStopPos(EAxisIndex idx) const { - return GetParameter(dParamLoStop + (idx * dParamGroup)); + return mJointImp->GetLowStopPos(idx, mJointID); } void Joint::SetHighStopPos(EAxisIndex idx, float pos) { - SetParameter(dParamHiStop + (idx * dParamGroup), pos); + mJointImp->SetHighStopPos(idx, pos, mJointID); } float Joint::GetHighStopPos(EAxisIndex idx) const { - return GetParameter(dParamHiStop + (idx * dParamGroup)); + return mJointImp->GetHighStopPos(idx, mJointID); } void Joint::SetLowStopDeg(EAxisIndex idx, float deg) { - SetParameter(dParamLoStop + (idx * dParamGroup), gDegToRad(deg)); + mJointImp->SetLowStopDeg(idx, deg, mJointID); } float Joint::GetLowStopDeg(EAxisIndex idx) const { - return gRadToDeg(GetParameter(dParamLoStop + (idx * dParamGroup))); + return mJointImp->GetLowStopDeg(idx, mJointID); } void Joint::SetHighStopDeg(EAxisIndex idx, float deg) { - SetParameter(dParamHiStop + (idx * dParamGroup), gDegToRad(deg)); + mJointImp->SetHighStopDeg(idx, deg, mJointID); } float Joint::GetHighStopDeg(EAxisIndex idx) const { - return gRadToDeg(GetParameter(dParamHiStop + (idx * dParamGroup))); + return mJointImp->GetHighStopDeg(idx, mJointID); } void Joint::SetCFM(EAxisIndex idx, float cfm) { - SetParameter(dParamCFM + (idx * dParamGroup), cfm); + mJointImp->SetCFM(idx, cfm, mJointID); } float Joint::GetCFM(EAxisIndex idx) const { - return GetParameter(dParamCFM + (idx * dParamGroup)); + return mJointImp->GetCFM(idx, mJointID); } void Joint::SetStopCFM(EAxisIndex idx, float cfm) { - SetParameter(dParamStopCFM + (idx * dParamGroup), cfm); + mJointImp->SetStopCFM(idx, cfm, mJointID); } float Joint::GetStopCFM(EAxisIndex idx) const { - return GetParameter(dParamStopCFM + (idx * dParamGroup)); + return mJointImp->GetStopCFM(idx, mJointID); } void Joint::SetStopERP(EAxisIndex idx, float erp) { - SetParameter(dParamStopERP + (idx * dParamGroup), erp); + mJointImp->SetStopERP(idx, erp, mJointID); } float Joint::GetStopERP(EAxisIndex idx) const { - return GetParameter(dParamStopERP + (idx * dParamGroup)); + return mJointImp->GetStopERP(idx, mJointID); } void Joint::SetSuspensionERP(EAxisIndex idx, float erp) { - SetParameter(dParamSuspensionERP + (idx * dParamGroup), erp); + mJointImp->SetSuspensionERP(idx, erp, mJointID); } float Joint::GetSuspensionERP(EAxisIndex idx) const { - return GetParameter(dParamSuspensionERP + (idx * dParamGroup)); + return mJointImp->GetSuspensionERP(idx, mJointID); } void Joint::SetSuspensionCFM(EAxisIndex idx, float cfm) { - SetParameter(dParamSuspensionCFM + (idx * dParamGroup), cfm); + mJointImp->SetSuspensionCFM(idx, cfm, mJointID); } float Joint::GetSuspensionCFM(EAxisIndex idx) const { - return GetParameter(dParamSuspensionCFM + (idx * dParamGroup)); + return mJointImp->GetSuspensionCFM(idx, mJointID); } void Joint::SetLinearMotorVelocity(EAxisIndex idx, float vel) { - SetParameter(dParamVel + (idx * dParamGroup), vel); + mJointImp->SetLinearMotorVelocity(idx, vel, mJointID); } float Joint::GetLinearMotorVelocity(EAxisIndex idx) const { - return GetParameter(dParamVel + (idx * dParamGroup)); + return mJointImp->GetLinearMotorVelocity(idx, mJointID); } void Joint::SetAngularMotorVelocity(EAxisIndex idx, float deg) { - SetParameter(dParamVel + (idx * dParamGroup), gDegToRad(deg)); + mJointImp->SetAngularMotorVelocity(idx, deg, mJointID); } float Joint::GetAngularMotorVelocity(EAxisIndex idx) const { - return gRadToDeg(GetParameter(dParamVel + (idx * dParamGroup))); + return mJointImp->GetAngularMotorVelocity(idx, mJointID); } void Joint::SetMaxMotorForce(EAxisIndex idx, float f) { - SetParameter(dParamFMax + (idx * dParamGroup), f); + mJointImp->SetMaxMotorForce(idx, f, mJointID); } float Joint::GetMaxMotorForce(EAxisIndex idx) const { - return GetParameter(dParamFMax + (idx * dParamGroup)); + return mJointImp->GetMaxMotorForce(idx, mJointID); } void Joint::DestroyPhysicsObject() @@ -442,7 +374,7 @@ } EnableFeedback(false); - dJointDestroy( (dJointID) mJointID); + mJointImp->DestroyJoint(mJointID); mJointID = 0; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -25,6 +25,7 @@ #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/physicsobject.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { @@ -253,12 +254,6 @@ */ float GetMaxMotorForce(EAxisIndex idx) const; - /** sets a joint parameter value */ - virtual void SetParameter(int parameter, float value) = 0; - - /** returns a joint parameter value */ - virtual float GetParameter(int parameter) const = 0; - /** Set the maximum joint speed1, valid for both hingejoint and universaljoint */ virtual void SetJointMaxSpeed1(float rad); @@ -288,9 +283,6 @@ /** the ID of the managed joint */ long mJointID; - /** the allocated joint feedback structure */ - boost::shared_ptr<dJointFeedback> mFeedback; - protected: /** The maximum joint speed in rad, valid for both hingejoint and universaljoint */ float mJointMaxSpeed1; @@ -300,7 +292,6 @@ float mJointMaxSpeed2; bool mIsLimitJointMaxSpeed2; -private: boost::shared_ptr<JointInt> mJointImp; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -30,8 +30,8 @@ long ODEFixedJoint::CreateFixedJoint(long world) { dWorldID ODEworld = (dWorldID) world; - mODEJoint = dJointCreateFixed(ODEworld, 0); - return (long) mODEJoint; + dJointID ODEJoint = dJointCreateFixed(ODEworld, 0); + return (long) ODEJoint; } void ODEFixedJoint::SetFixed(long jointID) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -81,15 +81,3 @@ dJointID ODEJoint = (dJointID) jointID; return gRadToDeg(dJointGetHinge2Angle2Rate(ODEJoint)); } - -void ODEHinge2Joint::SetParameter(int parameter, float value, long jointID) -{ - dJointID ODEJoint = (dJointID) jointID; - dJointSetHinge2Param(ODEJoint, parameter, value); -} - -float ODEHinge2Joint::GetParameter(int parameter, long jointID) const -{ - dJointID ODEJoint = (dJointID) jointID; - return dJointGetHinge2Param(ODEJoint, parameter); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -40,8 +40,6 @@ float GetAngle(long jointID); float GetAngleRate1(long jointID); float GetAngleRate2(long jointID); - void SetParameter(int parameter, float value, long jointID); - float GetParameter(int parameter, long jointID) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -85,15 +85,3 @@ dJointID ODEJoint = (dJointID) jointID; return gRadToDeg(dJointGetHingeAngleRate(ODEJoint)); } - -void ODEHingeJoint::SetParameter(int parameter, float value, long jointID) -{ - dJointID ODEJoint = (dJointID) jointID; - dJointSetHingeParam(ODEJoint, parameter, value); -} - -float ODEHingeJoint::GetParameter(int parameter, long jointID) const -{ - dJointID ODEJoint = (dJointID) jointID; - return dJointGetHingeParam(ODEJoint, parameter); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -38,8 +38,6 @@ salt::Vector3f GetAxis(long jointID); float GetAngle(long jointID) const; float GetAngleRate(long jointID) const; - void SetParameter(int parameter, float value, long jointID); - float GetParameter(int parameter, long jointID) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -26,72 +26,41 @@ using namespace std; using namespace salt; -ODEJoint::ODEJoint() : ODEPhysicsObject(), mODEJoint(0) +ODEJoint::ODEJoint() : ODEPhysicsObject() { - mJointMaxSpeed1 = mJointMaxSpeed2 = 0.0; - mIsLimitJointMaxSpeed1 = mIsLimitJointMaxSpeed2 = false; } -void ODEJoint::OnLink() +void ODEJoint::OnLink(long jointID, Joint* joint) { - if (mODEJoint == 0) - { - return; - } - - dJointSetData(mODEJoint, this); + dJointID ODEJoint = (dJointID) jointID; + dJointSetData(ODEJoint, joint); } -void ODEJoint::Attach(shared_ptr<RigidBody> body1, shared_ptr<RigidBody> body2) +void ODEJoint::Attach(long bodyID1, long bodyID2, long jointID) { - string path1,path2; - long id1,id2; - - static const char strStaticEnv[] = "<static environment>"; - - if (body1.get() == 0) - { - id1 = 0; - path1 = strStaticEnv; - } else - { - id1 = body1->GetBodyID(); - path1 = body1->GetFullPath(); - } - - if (body2.get() == 0) - { - id2 = 0; - path2 = strStaticEnv; - } else - { - id2 = body2->GetBodyID(); - path2 = body2->GetFullPath(); - } - - dJointAttach(mODEJoint, (dBodyID) id1, (dBodyID) id2); + dBodyID ODEBody1 = (dBodyID) bodyID1; + dBodyID ODEBody2 = (dBodyID) bodyID2; + dJointID ODEJoint = (dJointID) jointID; + dJointAttach(ODEJoint, ODEBody1, ODEBody2); } -void ODEJoint::Attach(const std::string& path1, const std::string& path2) +int ODEJoint::GetType(long jointID) const { - shared_ptr<RigidBody> body1; - shared_ptr<RigidBody> body2; - Attach(body1,body2); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetType(ODEJoint); } -int ODEJoint::GetType() const +long ODEJoint::GetBodyID(int idx, long jointID) { - return dJointGetType(mODEJoint); + dJointID ODEJoint = (dJointID) jointID; + dBodyID ODEBodyID = dJointGetBody(ODEJoint, idx); + return (long) ODEBodyID; } -boost::shared_ptr<RigidBody> ODEJoint::GetBody(EBodyIndex idx) +void ODEJoint::EnableFeedback(bool enable, long jointID) { - long bodyID = (long) dJointGetBody(mODEJoint, idx); - return RigidBody::GetBody(bodyID); -} - -void ODEJoint::EnableFeedback(bool enable) -{ + dJointID ODEJoint = (dJointID) jointID; + if (enable) { if (mFeedback.get() == 0) @@ -107,15 +76,16 @@ } } - dJointSetFeedback(mODEJoint,mFeedback.get()); + dJointSetFeedback(ODEJoint,mFeedback.get()); } -bool ODEJoint::FeedbackEnabled() const +bool ODEJoint::FeedbackEnabled(long jointID) const { - return (dJointGetFeedback(mODEJoint) != 0); + dJointID ODEJoint = (dJointID) jointID; + return (dJointGetFeedback(ODEJoint) != 0); } -Vector3f ODEJoint::GetFeedbackForce(EBodyIndex idx) const +Vector3f ODEJoint::GetFeedbackForce(int idx) const { dJointFeedback* fb = mFeedback.get(); if (fb == 0) @@ -125,14 +95,14 @@ switch (idx) { - case BI_FIRST : + case 0 : return Vector3f( fb->f1[0], fb->f1[1], fb->f1[2] ); - case BI_SECOND : + case 1 : return Vector3f( fb->f2[0], fb->f2[1], @@ -144,7 +114,7 @@ } } -Vector3f ODEJoint::GetFeedbackTorque(EBodyIndex idx) const +Vector3f ODEJoint::GetFeedbackTorque(int idx) const { dJointFeedback* fb = mFeedback.get(); if (fb == 0) @@ -154,14 +124,14 @@ switch (idx) { - case BI_FIRST : + case 0 : return Vector3f( fb->t1[0], fb->t1[1], fb->t1[2] ); - case BI_SECOND : + case 1 : return Vector3f( fb->t2[0], fb->t2[1], @@ -173,192 +143,181 @@ } } -void ODEJoint::SetFudgeFactor(EAxisIndex idx, float fudge_factor) +void ODEJoint::SetFudgeFactor(int idx, float fudge_factor, long jointID) { - SetParameter(dParamFudgeFactor + (idx * dParamGroup), fudge_factor); + SetParameter(dParamFudgeFactor + (idx * dParamGroup), fudge_factor, jointID); } -float ODEJoint::GetFudgeFactor(EAxisIndex idx) const +float ODEJoint::GetFudgeFactor(int idx, long jointID) const { - return GetParameter(dParamFudgeFactor + (idx * dParamGroup)); + return GetParameter(dParamFudgeFactor + (idx * dParamGroup), jointID); } - -void ODEJoint::SetBounce(EAxisIndex idx, float bounce) +void ODEJoint::SetBounce(int idx, float bounce, long jointID) { - SetParameter(dParamBounce + (idx * dParamGroup),bounce); + SetParameter(dParamBounce + (idx * dParamGroup),bounce, jointID); } -float ODEJoint::GetBounce(EAxisIndex idx) const +float ODEJoint::GetBounce(int idx, long jointID) const { - return GetParameter(dParamBounce + (idx * dParamGroup)); + return GetParameter(dParamBounce + (idx * dParamGroup), jointID); } -void ODEJoint::SetLowStopPos(EAxisIndex idx, float pos) +void ODEJoint::SetLowStopPos(int idx, float pos, long jointID) { - SetParameter(dParamLoStop + (idx * dParamGroup), pos); + SetParameter(dParamLoStop + (idx * dParamGroup), pos, jointID); } -float ODEJoint::GetLowStopPos(EAxisIndex idx) const +float ODEJoint::GetLowStopPos(int idx, long jointID) const { - return GetParameter(dParamLoStop + (idx * dParamGroup)); + return GetParameter(dParamLoStop + (idx * dParamGroup), jointID); } -void ODEJoint::SetHighStopPos(EAxisIndex idx, float pos) +void ODEJoint::SetHighStopPos(int idx, float pos, long jointID) { - SetParameter(dParamHiStop + (idx * dParamGroup), pos); + SetParameter(dParamHiStop + (idx * dParamGroup), pos, jointID); } -float ODEJoint::GetHighStopPos(EAxisIndex idx) const +float ODEJoint::GetHighStopPos(int idx, long jointID) const { - return GetParameter(dParamHiStop + (idx * dParamGroup)); + return GetParameter(dParamHiStop + (idx * dParamGroup), jointID); } -void ODEJoint::SetLowStopDeg(EAxisIndex idx, float deg) +void ODEJoint::SetLowStopDeg(int idx, float deg, long jointID) { - SetParameter(dParamLoStop + (idx * dParamGroup), gDegToRad(deg)); + SetParameter(dParamLoStop + (idx * dParamGroup), gDegToRad(deg), jointID); } -float ODEJoint::GetLowStopDeg(EAxisIndex idx) const +float ODEJoint::GetLowStopDeg(int idx, long jointID) const { - return gRadToDeg(GetParameter(dParamLoStop + (idx * dParamGroup))); + return gRadToDeg(GetParameter(dParamLoStop + (idx * dParamGroup), jointID)); } -void ODEJoint::SetHighStopDeg(EAxisIndex idx, float deg) +void ODEJoint::SetHighStopDeg(int idx, float deg, long jointID) { - SetParameter(dParamHiStop + (idx * dParamGroup), gDegToRad(deg)); + SetParameter(dParamHiStop + (idx * dParamGroup), gDegToRad(deg), jointID); } -float ODEJoint::GetHighStopDeg(EAxisIndex idx) const +float ODEJoint::GetHighStopDeg(int idx, long jointID) const { - return gRadToDeg(GetParameter(dParamHiStop + (idx * dParamGroup))); + return gRadToDeg(GetParameter(dParamHiStop + (idx * dParamGroup), jointID)); } -void ODEJoint::SetCFM(EAxisIndex idx, float cfm) +void ODEJoint::SetCFM(int idx, float cfm, long jointID) { - SetParameter(dParamCFM + (idx * dParamGroup), cfm); + SetParameter(dParamCFM + (idx * dParamGroup), cfm, jointID); } -float ODEJoint::GetCFM(EAxisIndex idx) const +float ODEJoint::GetCFM(int idx, long jointID) const { - return GetParameter(dParamCFM + (idx * dParamGroup)); + return GetParameter(dParamCFM + (idx * dParamGroup), jointID); } -void ODEJoint::SetStopCFM(EAxisIndex idx, float cfm) +void ODEJoint::SetStopCFM(int idx, float cfm, long jointID) { - SetParameter(dParamStopCFM + (idx * dParamGroup), cfm); + SetParameter(dParamStopCFM + (idx * dParamGroup), cfm, jointID); } -float ODEJoint::GetStopCFM(EAxisIndex idx) const +float ODEJoint::GetStopCFM(int idx, long jointID) const { - return GetParameter(dParamStopCFM + (idx * dParamGroup)); + return GetParameter(dParamStopCFM + (idx * dParamGroup), jointID); } -void ODEJoint::SetStopERP(EAxisIndex idx, float erp) +void ODEJoint::SetStopERP(int idx, float erp, long jointID) { - SetParameter(dParamStopERP + (idx * dParamGroup), erp); + SetParameter(dParamStopERP + (idx * dParamGroup), erp, jointID); } -float ODEJoint::GetStopERP(EAxisIndex idx) const +float ODEJoint::GetStopERP(int idx, long jointID) const { - return GetParameter(dParamStopERP + (idx * dParamGroup)); + return GetParameter(dParamStopERP + (idx * dParamGroup), jointID); } -void ODEJoint::SetSuspensionERP(EAxisIndex idx, float erp) +void ODEJoint::SetSuspensionERP(int idx, float erp, long jointID) { - SetParameter(dParamSuspensionERP + (idx * dParamGroup), erp); + SetParameter(dParamSuspensionERP + (idx * dParamGroup), erp, jointID); } -float ODEJoint::GetSuspensionERP(EAxisIndex idx) const +float ODEJoint::GetSuspensionERP(int idx, long jointID) const { - return GetParameter(dParamSuspensionERP + (idx * dParamGroup)); + return GetParameter(dParamSuspensionERP + (idx * dParamGroup), jointID); } -void ODEJoint::SetSuspensionCFM(EAxisIndex idx, float cfm) +void ODEJoint::SetSuspensionCFM(int idx, float cfm, long jointID) { - SetParameter(dParamSuspensionCFM + (idx * dParamGroup), cfm); + SetParameter(dParamSuspensionCFM + (idx * dParamGroup), cfm, jointID); } -float ODEJoint::GetSuspensionCFM(EAxisIndex idx) const +float ODEJoint::GetSuspensionCFM(int idx, long jointID) const { - return GetParameter(dParamSuspensionCFM + (idx * dParamGroup)); + return GetParameter(dParamSuspensionCFM + (idx * dParamGroup), jointID); } -void ODEJoint::SetLinearMotorVelocity(EAxisIndex idx, float vel) +void ODEJoint::SetLinearMotorVelocity(int idx, float vel, long jointID) { - SetParameter(dParamVel + (idx * dParamGroup), vel); + SetParameter(dParamVel + (idx * dParamGroup), vel, jointID); } -float ODEJoint::GetLinearMotorVelocity(EAxisIndex idx) const +float ODEJoint::GetLinearMotorVelocity(int idx, long jointID) const { - return GetParameter(dParamVel + (idx * dParamGroup)); + return GetParameter(dParamVel + (idx * dParamGroup), jointID); } -void ODEJoint::SetAngularMotorVelocity(EAxisIndex idx, float deg) +void ODEJoint::SetAngularMotorVelocity(int idx, float deg, long jointID) { - SetParameter(dParamVel + (idx * dParamGroup), gDegToRad(deg)); + SetParameter(dParamVel + (idx * dParamGroup), gDegToRad(deg), jointID); } -float ODEJoint::GetAngularMotorVelocity(EAxisIndex idx) const +float ODEJoint::GetAngularMotorVelocity(int idx, long jointID) const { - return gRadToDeg(GetParameter(dParamVel + (idx * dParamGroup))); + return gRadToDeg(GetParameter(dParamVel + (idx * dParamGroup), jointID)); } -void ODEJoint::SetMaxMotorForce(EAxisIndex idx, float f) +void ODEJoint::SetMaxMotorForce(int idx, float f, long jointID) { - SetParameter(dParamFMax + (idx * dParamGroup), f); + SetParameter(dParamFMax + (idx * dParamGroup), f, jointID); } -float ODEJoint::GetMaxMotorForce(EAxisIndex idx) const +float ODEJoint::GetMaxMotorForce(int idx, long jointID) const { - return GetParameter(dParamFMax + (idx * dParamGroup)); + return GetParameter(dParamFMax + (idx * dParamGroup), jointID); } -void ODEJoint::DestroyJoint() +void ODEJoint::DestroyJoint(long jointID) { - if (! mODEJoint) - { - return; - } - - EnableFeedback(false); - dJointDestroy(mODEJoint); - mODEJoint = 0; + dJointID ODEJoint = (dJointID) jointID; + EnableFeedback(false, jointID); + dJointDestroy(ODEJoint); } -void ODEJoint::SetJointMaxSpeed1(float rad) -{ - mJointMaxSpeed1 = fabs(rad); - mIsLimitJointMaxSpeed1 = true; +void ODEJoint::SetParameter(int parameter, float value, long jointID){ + dJointID ODEJoint = (dJointID) jointID; + int jointType = dJointGetType(ODEJoint); + switch (jointType){ + case dJointTypeHinge: dJointSetHingeParam(ODEJoint, parameter, value); + break; + case dJointTypeHinge2: dJointSetHinge2Param(ODEJoint, parameter, value); + break; + case dJointTypeSlider: dJointSetSliderParam(ODEJoint, parameter, value); + break; + case dJointTypeUniversal: dJointSetUniversalParam(ODEJoint, parameter, value); + break; + default: return; + } } -void ODEJoint::SetJointMaxSpeed2(float rad) -{ - mJointMaxSpeed2 = fabs(rad); - mIsLimitJointMaxSpeed2 = true; +float ODEJoint::GetParameter(int parameter, long jointID) const{ + dJointID ODEJoint = (dJointID) jointID; + int jointType = dJointGetType(ODEJoint); + switch (jointType){ + case dJointTypeHinge: return dJointGetHingeParam(ODEJoint, parameter); + break; + case dJointTypeHinge2: return dJointGetHinge2Param(ODEJoint, parameter); + break; + case dJointTypeSlider: return dJointGetSliderParam(ODEJoint, parameter); + break; + case dJointTypeUniversal: return dJointGetUniversalParam(ODEJoint, parameter); + break; + default: return 0; + } } - -float ODEJoint::GetJointMaxSpeed1() const -{ - return mJointMaxSpeed1; -} - -float ODEJoint::GetJointMaxSpeed2() const -{ - return mJointMaxSpeed2; -} - -bool ODEJoint::IsLimitJointMaxSpeed1() const -{ - return mIsLimitJointMaxSpeed1; -} - -bool ODEJoint::IsLimitJointMaxSpeed2() const -{ - return mIsLimitJointMaxSpeed2; -} - -float ODEJoint::GetParameter(int parameter) const -{ - return 0.0; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -33,56 +33,50 @@ public: ODEJoint(); - virtual void DestroyJoint(); - virtual void Attach(boost::shared_ptr<RigidBody> body1, - boost::shared_ptr<RigidBody> body2); - void Attach(const std::string& path1, const std::string& path2); - int GetType() const; - boost::shared_ptr<RigidBody> GetBody(EBodyIndex idx); - void EnableFeedback(bool enable); - bool FeedbackEnabled() const; - salt::Vector3f GetFeedbackForce(EBodyIndex idx) const; - salt::Vector3f GetFeedbackTorque(EBodyIndex idx) const; - void SetFudgeFactor(EAxisIndex idx, float fudge_factor); - float GetFudgeFactor(EAxisIndex idx) const; - void SetBounce(EAxisIndex idx, float bounce); - float GetBounce(EAxisIndex idx) const; - void SetLowStopDeg(EAxisIndex idx, float deg); - float GetLowStopDeg(EAxisIndex idx) const; - void SetHighStopDeg(EAxisIndex idx, float deg); - float GetHighStopDeg(EAxisIndex idx) const; - void SetLowStopPos(EAxisIndex idx, float deg); - float GetLowStopPos(EAxisIndex idx) const; - void SetHighStopPos(EAxisIndex idx, float deg); - float GetHighStopPos(EAxisIndex idx) const; - void SetCFM(EAxisIndex idx, float cfm); - float GetCFM(EAxisIndex idx) const; - void SetStopCFM(EAxisIndex idx, float cfm); - float GetStopCFM(EAxisIndex idx) const; - void SetStopERP(EAxisIndex idx, float erp); - float GetStopERP(EAxisIndex idx) const; - void SetSuspensionERP(EAxisIndex idx, float erp); - float GetSuspensionERP(EAxisIndex idx) const; - void SetSuspensionCFM(EAxisIndex idx, float cfm); - float GetSuspensionCFM(EAxisIndex idx) const; - void SetLinearMotorVelocity(EAxisIndex idx, float vel); - float GetLinearMotorVelocity(EAxisIndex idx) const; - void SetAngularMotorVelocity(EAxisIndex idx, float deg); - float GetAngularMotorVelocity(EAxisIndex idx) const; - void SetMaxMotorForce(EAxisIndex idx, float f); - float GetMaxMotorForce(EAxisIndex idx) const; - virtual void SetParameter(int parameter, float value){}; - virtual float GetParameter(int parameter) const; - virtual void SetJointMaxSpeed1(float rad); - virtual void SetJointMaxSpeed2(float rad); - virtual float GetJointMaxSpeed1() const; - virtual float GetJointMaxSpeed2() const; - bool IsLimitJointMaxSpeed1() const; - bool IsLimitJointMaxSpeed2() const; - void OnLink(); + virtual void DestroyJoint(long jointID); + virtual void Attach(long bodyID1, long bodiID2, long jointID); + int GetType(long jointID) const; + long GetBodyID(int idx, long jointID); + void EnableFeedback(bool enable, long jointID); + bool FeedbackEnabled(long jointID) const; + salt::Vector3f GetFeedbackForce(int idx) const; + salt::Vector3f GetFeedbackTorque(int idx) const; + void SetFudgeFactor(int idx, float fudge_factor, long jointID); + float GetFudgeFactor(int idx, long jointID) const; + void SetBounce(int idx, float bounce, long jointID); + float GetBounce(int idx, long jointID) const; + void SetLowStopDeg(int idx, float deg, long jointID); + float GetLowStopDeg(int idx, long jointID) const; + void SetHighStopDeg(int idx, float deg, long jointID); + float GetHighStopDeg(int idx, long jointID) const; + void SetLowStopPos(int idx, float deg, long jointID); + float GetLowStopPos(int idx, long jointID) const; + void SetHighStopPos(int idx, float deg, long jointID); + float GetHighStopPos(int idx, long jointID) const; + void SetCFM(int idx, float cfm, long jointID); + float GetCFM(int idx, long jointID) const; + void SetStopCFM(int idx, float cfm, long jointID); + float GetStopCFM(int idx, long jointID) const; + void SetStopERP(int idx, float erp, long jointID); + float GetStopERP(int idx, long jointID) const; + void SetSuspensionERP(int idx, float erp, long jointID); + float GetSuspensionERP(int idx, long jointID) const; + void SetSuspensionCFM(int idx, float cfm, long jointID); + float GetSuspensionCFM(int idx, long jointID) const; + void SetLinearMotorVelocity(int idx, float vel, long jointID); + float GetLinearMotorVelocity(int idx, long jointID) const; + void SetAngularMotorVelocity(int idx, float deg, long jointID); + float GetAngularMotorVelocity(int idx, long jointID) const; + void SetMaxMotorForce(int idx, float f, long jointID); + float GetMaxMotorForce(int idx, long jointID) const; + virtual void SetParameter(int parameter, float value, long jointID); + virtual float GetParameter(int parameter, long jointID) const; + void OnLink(long jointID, Joint* joint); protected: - dJointID mODEJoint; + //It is encouraged to not store any member variables in the implementation. + //This can cause major problems. However, here, I found no way to avoid it. + boost::shared_ptr<dJointFeedback> mFeedback; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -51,15 +51,3 @@ dJointID ODEJoint = (dJointID) jointID; return dJointGetSliderPositionRate(ODEJoint); } - -void ODESliderJoint::SetParameter(int parameter, float value, long jointID) -{ - dJointID ODEJoint = (dJointID) jointID; - dJointSetSliderParam(ODEJoint, parameter, value); -} - -float ODESliderJoint::GetParameter(int parameter, long jointID) const -{ - dJointID ODEJoint = (dJointID) jointID; - return dJointGetSliderParam(ODEJoint, parameter); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -38,8 +38,6 @@ float GetPosition(long jointID); float GetPositionRate(long jointID); void SetSliderAxis(salt::Vector3f& up, long jointID); - void SetParameter(int parameter, float value, long jointID); - float GetParameter(int parameter, long jointID) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2010-01-08 07:35:25 UTC (rev 138) @@ -110,15 +110,3 @@ dJointID ODEJoint = (dJointID) jointID; return gRadToDeg(dJointGetUniversalAngle2Rate(ODEJoint)); } - -void ODEUniversalJoint::SetParameter(int parameter, float value, long jointID) -{ - dJointID ODEJoint = (dJointID) jointID; - dJointSetUniversalParam(ODEJoint, parameter, value); -} - -float ODEUniversalJoint::GetParameter(int parameter, long jointID) const -{ - dJointID ODEJoint = (dJointID) jointID; - return dJointGetUniversalParam(ODEJoint, parameter); -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2010-01-06 07:25:00 UTC (rev 137) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2010-01-08 07:35:25 UTC (rev 138) @@ -46,8 +46,6 @@ float GetAngle2(long jointID) const; float GetAngleRate1(long jointID) const; float GetAngleRat... [truncated message content] |
From: <a-...@us...> - 2010-01-06 07:25:08
|
Revision: 137 http://simspark.svn.sourceforge.net/simspark/?rev=137&view=rev Author: a-held Date: 2010-01-06 07:25:00 +0000 (Wed, 06 Jan 2010) Log Message: ----------- Don't store GeomIDs or JointIDs internally anymore Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -49,7 +49,7 @@ { // calculate anchor position in world coordinates Vector3f gAnchor = GetWorldTransform() * anchor; - mBallJointImp->SetAnchor(gAnchor); + mBallJointImp->SetAnchor(gAnchor, mJointID); } Vector3f BallJoint::GetAnchor(EBodyIndex idx) @@ -60,13 +60,13 @@ { case BI_FIRST: { - pos = mBallJointImp->GetAnchor1(); + pos = mBallJointImp->GetAnchor1(mJointID); break; } case BI_SECOND: { - pos = mBallJointImp->GetAnchor2(); + pos = mBallJointImp->GetAnchor2(mJointID); break; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -33,7 +33,7 @@ void BoxCollider::SetBoxLengths(const Vector3f& extents) { - mBoxColliderImp->SetBoxLengths(extents); + mBoxColliderImp->SetBoxLengths(extents, mGeomID); } bool BoxCollider::ConstructInternal() @@ -51,7 +51,7 @@ void BoxCollider::GetBoxLengths(Vector3f& extents) { - mBoxColliderImp->GetBoxLengths(extents); + mBoxColliderImp->GetBoxLengths(extents, mGeomID); } float BoxCollider::GetBoxLength(int axis) @@ -72,5 +72,5 @@ float BoxCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return mBoxColliderImp->GetPointDepth(worldPos); + return mBoxColliderImp->GetPointDepth(worldPos, mGeomID); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -32,32 +32,32 @@ void CapsuleCollider::SetParams(float radius, float length) { - mCapsuleColliderImp->SetParams(radius, length); + mCapsuleColliderImp->SetParams(radius, length, mGeomID); } void CapsuleCollider::SetRadius(float radius) { - mCapsuleColliderImp->SetRadius(radius); + mCapsuleColliderImp->SetRadius(radius, mGeomID); } void CapsuleCollider::SetLength(float length) { - mCapsuleColliderImp->SetLength(length); + mCapsuleColliderImp->SetLength(length, mGeomID); } void CapsuleCollider::GetParams(float& radius, float& length) { - mCapsuleColliderImp->GetParams(radius, length); + mCapsuleColliderImp->GetParams(radius, length, mGeomID); } float CapsuleCollider::GetRadius() { - return mCapsuleColliderImp->GetRadius(); + return mCapsuleColliderImp->GetRadius(mGeomID); } float CapsuleCollider::GetLength() { - return mCapsuleColliderImp->GetLength(); + return mCapsuleColliderImp->GetLength(mGeomID); } bool CapsuleCollider::ConstructInternal() @@ -75,5 +75,5 @@ float CapsuleCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return mCapsuleColliderImp->GetPointDepth(worldPos); + return mCapsuleColliderImp->GetPointDepth(worldPos, mGeomID); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -45,18 +45,18 @@ void FixedJoint::SetParameter(int /*parameter*/, float /*value*/) { - GetLog()->Error() << + GetLog()->Warning() << "(FixedJoint) WARNING: SetParameter function undefined for FixedJoint, ignored\n"; } float FixedJoint::GetParameter(int /*parameter*/) const { - GetLog()->Error() << + GetLog()->Warning() << "(FixedJoint) WARNING: GetParameter function undefined for FixedJoint, returned zero\n"; return 0; } void FixedJoint::SetFixed() { - mFixedJointImp->SetFixed(); + mFixedJointImp->SetFixed(mJointID); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -56,7 +56,7 @@ // relative universal hinge2 axis 2 points right Vector3f right(GetWorldTransform().Rotate(Vector3f(1,0,0))); - mHinge2JointImp->SetAnchor(gAnchor, up, right); + mHinge2JointImp->SetAnchor(gAnchor, up, right, mJointID); } Vector3f Hinge2Joint::GetAnchor(EBodyIndex idx) @@ -67,12 +67,12 @@ { case BI_FIRST: { - pos = mHinge2JointImp->GetAnchor1(); + pos = mHinge2JointImp->GetAnchor1(mJointID); } case BI_SECOND: { - pos = mHinge2JointImp->GetAnchor2(); + pos = mHinge2JointImp->GetAnchor2(mJointID); } default: @@ -87,10 +87,10 @@ switch (idx) { case AI_FIRST: - return mHinge2JointImp->GetAngle(); + return mHinge2JointImp->GetAngle(mJointID); case AI_SECOND: - GetLog()->Error() << + GetLog()->Warning() << "(Hinge2Joint) WARNING: GetAngle is undefined for EAxisIndex::AI_SECOND, returned zero\n"; return 0; @@ -104,10 +104,10 @@ switch (idx) { case AI_FIRST: - return mHinge2JointImp->GetAngleRate1(); + return mHinge2JointImp->GetAngleRate1(mJointID); case AI_SECOND: - return mHinge2JointImp->GetAngleRate2(); + return mHinge2JointImp->GetAngleRate2(mJointID); default: return 0; @@ -116,10 +116,10 @@ void Hinge2Joint::SetParameter(int parameter, float value) { - mHinge2JointImp->SetParameter(parameter, value); + mHinge2JointImp->SetParameter(parameter, value, mJointID); } float Hinge2Joint::GetParameter(int parameter) const { - return mHinge2JointImp->GetParameter(parameter); + return mHinge2JointImp->GetParameter(parameter, mJointID); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -49,7 +49,7 @@ { // calculate anchor position in world coordinates Vector3f gAnchor(GetWorldTransform() * anchor); - mHingeJointImp->SetAnchor(gAnchor); + mHingeJointImp->SetAnchor(gAnchor, mJointID); } Vector3f HingeJoint::GetAnchor(EBodyIndex idx) @@ -60,13 +60,13 @@ { case BI_FIRST: { - pos = mHingeJointImp->GetAnchor1(); + pos = mHingeJointImp->GetAnchor1(mJointID); break; } case BI_SECOND: { - pos = mHingeJointImp->GetAnchor2(); + pos = mHingeJointImp->GetAnchor2(mJointID); break; } @@ -107,30 +107,30 @@ void HingeJoint::SetAxis(const Vector3f& axis) { Vector3f absAxis(GetWorldTransform().Rotate(axis)); - mHingeJointImp->SetAxis(absAxis); + mHingeJointImp->SetAxis(absAxis, mJointID); } Vector3f HingeJoint::GetAxis() { - return mHingeJointImp->GetAxis(); + return mHingeJointImp->GetAxis(mJointID); } float HingeJoint::GetAngle() const { - return mHingeJointImp->GetAngle(); + return mHingeJointImp->GetAngle(mJointID); } float HingeJoint::GetAngleRate() const { - return mHingeJointImp->GetAngleRate(); + return mHingeJointImp->GetAngleRate(mJointID); } void HingeJoint::SetParameter(int parameter, float value) { - mHingeJointImp->SetParameter(parameter, value); + mHingeJointImp->SetParameter(parameter, value, mJointID); } float HingeJoint::GetParameter(int parameter) const { - return mHingeJointImp->GetParameter(parameter); + return mHingeJointImp->GetParameter(parameter, mJointID); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,9 +34,9 @@ class OXYGEN_API BallJointInt { public: - virtual void SetAnchor(const salt::Vector3f& anchor) = 0; - virtual salt::Vector3f GetAnchor1() = 0; - virtual salt::Vector3f GetAnchor2() = 0; + virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; + virtual salt::Vector3f GetAnchor1(long jointID) = 0; + virtual salt::Vector3f GetAnchor2(long jointID) = 0; virtual long CreateBallJoint(long world) = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -33,9 +33,9 @@ { public: - virtual void SetBoxLengths(const salt::Vector3f& extents) = 0; - virtual void GetBoxLengths(salt::Vector3f& extents) = 0; - virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void SetBoxLengths(const salt::Vector3f& extents, long geomID) = 0; + virtual void GetBoxLengths(salt::Vector3f& extents, long geomID) = 0; + virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; virtual long CreateBox() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -32,13 +32,13 @@ class OXYGEN_API CapsuleColliderInt { public: - virtual void SetParams(float radius, float length) = 0; - virtual void SetRadius(float radius) = 0; - virtual void SetLength(float length) = 0; - virtual void GetParams(float& radius, float& length) = 0; - virtual float GetRadius() = 0; - virtual float GetLength() = 0; - virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void SetParams(float radius, float length, long geomID) = 0; + virtual void SetRadius(float radius, long geomID) = 0; + virtual void SetLength(float length, long geomID) = 0; + virtual void GetParams(float& radius, float& length, long geomID) = 0; + virtual float GetRadius(long geomID) = 0; + virtual float GetLength(long geomID) = 0; + virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; virtual long CreateCapsule() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -28,7 +28,7 @@ public: virtual long CreateFixedJoint(long world) = 0; - virtual void SetFixed() = 0; + virtual void SetFixed(long jointID) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -31,14 +31,15 @@ virtual long CreateHinge2Joint(long world) = 0; virtual void SetAnchor(const salt::Vector3f& anchor, const salt::Vector3f& up, - const salt::Vector3f& right) = 0; - virtual salt::Vector3f GetAnchor1() = 0; - virtual salt::Vector3f GetAnchor2() = 0; - virtual float GetAngle() = 0; - virtual float GetAngleRate1() = 0; - virtual float GetAngleRate2() = 0; - virtual void SetParameter(int parameter, float value) = 0; - virtual float GetParameter(int parameter) const = 0; + const salt::Vector3f& right, + long jointID) = 0; + virtual salt::Vector3f GetAnchor1(long jointID) = 0; + virtual salt::Vector3f GetAnchor2(long jointID) = 0; + virtual float GetAngle(long jointID) = 0; + virtual float GetAngleRate1(long jointID) = 0; + virtual float GetAngleRate2(long jointID) = 0; + virtual void SetParameter(int parameter, float value, long jointID) = 0; + virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -29,15 +29,15 @@ public: virtual long CreateHingeJoint(long world) = 0; - virtual void SetAnchor(const salt::Vector3f& anchor) = 0; - virtual salt::Vector3f GetAnchor1() = 0; - virtual salt::Vector3f GetAnchor2() = 0; - virtual void SetAxis(const salt::Vector3f& axis) = 0; - virtual salt::Vector3f GetAxis() = 0; - virtual float GetAngle() const = 0; - virtual float GetAngleRate() const = 0; - virtual void SetParameter(int parameter, float value) = 0; - virtual float GetParameter(int parameter) const = 0; + virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; + virtual salt::Vector3f GetAnchor1(long jointID) = 0; + virtual salt::Vector3f GetAnchor2(long jointID) = 0; + virtual void SetAxis(const salt::Vector3f& axis, long jointID) = 0; + virtual salt::Vector3f GetAxis(long jointID) = 0; + virtual float GetAngle(long jointID) const = 0; + virtual float GetAngleRate(long jointID) const = 0; + virtual void SetParameter(int parameter, float value, long jointID) = 0; + virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -33,9 +33,9 @@ class OXYGEN_API PlaneColliderInt { public: - virtual void SetPlaneParams(float a, float b, float c, float d) = 0; - virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal) = 0; - virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void SetPlaneParams(float a, float b, float c, float d, long geomID) = 0; + virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal, long geomID) = 0; + virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; virtual long CreatePlane() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -32,7 +32,7 @@ class OXYGEN_API RayColliderInt { public: - virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length) = 0; + virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length, long geomID) = 0; virtual long CreateRay() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -42,21 +42,29 @@ virtual void SetMassParameters(const GenericMass& mass, long bodyID) = 0; virtual float GetMass(long bodyID) const = 0; virtual void SetSphere(float density, float radius, long bodyID) = 0; - virtual salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetSphereTotal(float total_mass, float radius, long bodyID) = 0; - virtual salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetBox(float density, const salt::Vector3f& size, long bodyID) = 0; - virtual salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID) = 0; - virtual salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetCylinder(float density, float radius, float length, long bodyID) = 0; - virtual salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetCylinderTotal(float total_mass, float radius, float length, long bodyID) = 0; - virtual salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetCapsule(float density, float radius, float length, long bodyID) = 0; - virtual salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID) = 0; - virtual salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID) = 0; virtual void TranslateMass(const salt::Vector3f& v, long bodyID) = 0; virtual salt::Vector3f GetVelocity(long bodyID) const = 0; virtual void SetVelocity(const salt::Vector3f& vel, long bodyID) = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,11 +34,11 @@ { public: virtual long CreateSliderJoint(long world) = 0; - virtual float GetPosition() = 0; - virtual float GetPositionRate() = 0; - virtual void SetSliderAxis(salt::Vector3f& up) = 0; - virtual void SetParameter(int parameter, float value) = 0; - virtual float GetParameter(int parameter) const = 0; + virtual float GetPosition(long jointID) = 0; + virtual float GetPositionRate(long jointID) = 0; + virtual void SetSliderAxis(salt::Vector3f& up, long jointID) = 0; + virtual void SetParameter(int parameter, float value, long jointID) = 0; + virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -33,9 +33,9 @@ { public: - virtual void SetRadius(float r) = 0; - virtual float GetRadius() const = 0; - virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void SetRadius(float r, long geomID) = 0; + virtual float GetRadius(long geomID) const = 0; + virtual float GetPointDepth(const salt::Vector3f& pos, long geomID) = 0; virtual long CreateSphere() = 0; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -36,7 +36,7 @@ public: virtual long CreateTransformCollider() = 0; - virtual void SetColliderParameters(int cleanup, int info) = 0; + virtual void SetColliderParameters(int cleanup, int info, long geomID) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,19 +34,19 @@ public: virtual long CreateUniversalJoint(long world) = 0; - virtual void SetAnchor(const salt::Vector3f& anchor) = 0; - virtual salt::Vector3f GetAnchor1() = 0; - virtual salt::Vector3f GetAnchor2() = 0; - virtual void SetAxis1(const salt::Vector3f& axis) = 0; - virtual void SetAxis2(const salt::Vector3f& axis) = 0; - virtual salt::Vector3f GetAxis1() const = 0; - virtual salt::Vector3f GetAxis2() const = 0; - virtual float GetAngle1() const = 0; - virtual float GetAngle2() const = 0; - virtual float GetAngleRate1() const = 0; - virtual float GetAngleRate2() const = 0; - virtual void SetParameter(int parameter, float value) = 0; - virtual float GetParameter(int parameter) const = 0; + virtual void SetAnchor(const salt::Vector3f& anchor, long jointID) = 0; + virtual salt::Vector3f GetAnchor1(long jointID) = 0; + virtual salt::Vector3f GetAnchor2(long jointID) = 0; + virtual void SetAxis1(const salt::Vector3f& axis, long jointID) = 0; + virtual void SetAxis2(const salt::Vector3f& axis, long jointID) = 0; + virtual salt::Vector3f GetAxis1(long jointID) const = 0; + virtual salt::Vector3f GetAxis2(long jointID) const = 0; + virtual float GetAngle1(long jointID) const = 0; + virtual float GetAngle2(long jointID) const = 0; + virtual float GetAngleRate1(long jointID) const = 0; + virtual float GetAngleRate2(long jointID) const = 0; + virtual void SetParameter(int parameter, float value, long jointID) = 0; + virtual float GetParameter(int parameter, long jointID) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -31,28 +31,31 @@ long ODEBallJoint::CreateBallJoint(long world) { dWorldID ODEWorld = (dWorldID) world; - mODEJoint = dJointCreateBall(ODEWorld, 0); - return (long) mODEJoint; + dJointID ODEJoint = dJointCreateBall(ODEWorld, 0); + return (long) ODEJoint; } -void ODEBallJoint::SetAnchor(const Vector3f& gAnchor) +void ODEBallJoint::SetAnchor(const Vector3f& gAnchor, long jointID) { - dJointSetBallAnchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); + dJointID ODEJoint = (dJointID) jointID; + dJointSetBallAnchor (ODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); } -Vector3f ODEBallJoint::GetAnchor1() +Vector3f ODEBallJoint::GetAnchor1(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetBallAnchor (mODEJoint, anchor); + dJointGetBallAnchor (ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } -Vector3f ODEBallJoint::GetAnchor2() +Vector3f ODEBallJoint::GetAnchor2(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetBallAnchor2(mODEJoint, anchor); + dJointGetBallAnchor2(ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,9 +34,9 @@ { public: ODEBallJoint(); - void SetAnchor(const salt::Vector3f& anchor); - salt::Vector3f GetAnchor1(); - salt::Vector3f GetAnchor2(); + void SetAnchor(const salt::Vector3f& anchor, long jointID); + salt::Vector3f GetAnchor1(long jointID); + salt::Vector3f GetAnchor2(long jointID); long CreateBallJoint(long world); }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -30,10 +30,11 @@ { } -void ODEBoxCollider::SetBoxLengths(const Vector3f& extents) +void ODEBoxCollider::SetBoxLengths(const Vector3f& extents, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; dGeomBoxSetLengths( - mODEGeom, + ODEGeom, extents[0], extents[1], extents[2] @@ -42,21 +43,23 @@ long ODEBoxCollider::CreateBox() { - mODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); - return (long) mODEGeom; + dGeomID ODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); + return (long) ODEGeom; } -void ODEBoxCollider::GetBoxLengths(Vector3f& extents) +void ODEBoxCollider::GetBoxLengths(Vector3f& extents, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; dVector3 lengths; - dGeomBoxGetLengths(mODEGeom,lengths); + dGeomBoxGetLengths(ODEGeom,lengths); extents[0] = lengths[0]; extents[1] = lengths[1]; extents[2] = lengths[2]; } -float ODEBoxCollider::GetPointDepth(const Vector3f& pos) +float ODEBoxCollider::GetPointDepth(const Vector3f& pos, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; return dGeomBoxPointDepth - (mODEGeom,pos[0],pos[1],pos[2]); + (ODEGeom,pos[0],pos[1],pos[2]); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,9 +34,9 @@ { public: ODEBoxCollider(); - void SetBoxLengths(const salt::Vector3f& extents); - void GetBoxLengths(salt::Vector3f& extents); - float GetPointDepth(const salt::Vector3f& pos); + void SetBoxLengths(const salt::Vector3f& extents, long geomID); + void GetBoxLengths(salt::Vector3f& extents, long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); long CreateBox(); }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -28,53 +28,56 @@ { } -void ODECapsuleCollider::SetParams(float radius, float length) +void ODECapsuleCollider::SetParams(float radius, float length, long geomID) { - dGeomCapsuleSetParams (mODEGeom, radius, length); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomCapsuleSetParams (ODEGeom, radius, length); } -void ODECapsuleCollider::SetRadius(float radius) +void ODECapsuleCollider::SetRadius(float radius, long geomID) { - SetParams(radius,GetLength()); + SetParams(radius, GetLength(geomID), geomID); } -void ODECapsuleCollider::SetLength(float length) +void ODECapsuleCollider::SetLength(float length, long geomID) { - SetParams(GetRadius(),length); + SetParams(GetRadius(geomID), length, geomID); } -void ODECapsuleCollider::GetParams(float& radius, float& length) +void ODECapsuleCollider::GetParams(float& radius, float& length, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; dReal r,l; - dGeomCapsuleGetParams(mODEGeom,&r,&l); + dGeomCapsuleGetParams(ODEGeom,&r,&l); radius = r; length = l; } -float ODECapsuleCollider::GetRadius() +float ODECapsuleCollider::GetRadius(long geomID) { float length; float radius; - GetParams(radius,length); + GetParams(radius, length, geomID); return radius; } -float ODECapsuleCollider::GetLength() +float ODECapsuleCollider::GetLength(long geomID) { float radius; float length; - GetParams(radius,length); + GetParams(radius, length, geomID); return length; } long ODECapsuleCollider::CreateCapsule() { - mODEGeom = dCreateCapsule(0, 1.0f, 1.0f); - return (long) mODEGeom; + dGeomID ODEGeom = dCreateCapsule(0, 1.0f, 1.0f); + return (long) ODEGeom; } -float ODECapsuleCollider::GetPointDepth(const Vector3f& pos) +float ODECapsuleCollider::GetPointDepth(const Vector3f& pos, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; return dGeomCapsulePointDepth - (mODEGeom,pos[0],pos[1],pos[2]); + (ODEGeom,pos[0],pos[1],pos[2]); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2010-01-06 07:25:00 UTC (rev 137) @@ -35,13 +35,13 @@ public: ODECapsuleCollider(); - void SetParams(float radius, float length); - void SetRadius(float radius); - void SetLength(float length); - void GetParams(float& radius, float& length); - float GetRadius(); - float GetLength(); - float GetPointDepth(const salt::Vector3f& pos); + void SetParams(float radius, float length, long geomID); + void SetRadius(float radius, long geomID); + void SetLength(float length, long geomID); + void GetParams(float& radius, float& length, long geomID); + float GetRadius(long geomID); + float GetLength(long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); long CreateCapsule(); }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -35,7 +35,7 @@ using namespace boost; using namespace std; -ODECollider::ODECollider() : ODEPhysicsObject(), mODEGeom(0) +ODECollider::ODECollider() : ODEPhysicsObject() { } @@ -95,7 +95,6 @@ { dGeomID ODEGeom = (dGeomID) geomID; dGeomDestroy(ODEGeom); - mODEGeom = 0; } void ODECollider::TransformSetGeom(long parentGeomID, long geomID){ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2010-01-06 07:25:00 UTC (rev 137) @@ -48,9 +48,6 @@ void SetSpace(long spaceID, long geomID, Collider* collider); void SetBody(long bodyID, long geomID); void RemoveFromSpace(long geomID, long spaceID); - -protected: - dGeomID mODEGeom; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -34,7 +34,8 @@ return (long) mODEJoint; } -void ODEFixedJoint::SetFixed() +void ODEFixedJoint::SetFixed(long jointID) { - dJointSetFixed(mODEJoint); + dJointID ODEJoint = (dJointID) jointID; + dJointSetFixed(ODEJoint); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -31,7 +31,7 @@ public: ODEFixedJoint(); long CreateFixedJoint(long world); - void SetFixed(); + void SetFixed(long jointID); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -31,56 +31,65 @@ long ODEHinge2Joint::CreateHinge2Joint(long world) { dWorldID ODEWorld = (dWorldID) world; - mODEJoint = dJointCreateHinge2(ODEWorld, 0); - return (long) mODEJoint; + dJointID ODEJoint = dJointCreateHinge2(ODEWorld, 0); + return (long) ODEJoint; } void ODEHinge2Joint::SetAnchor(const Vector3f& gAnchor, const Vector3f& up, - const Vector3f& right) + const Vector3f& right, + long jointID) { - dJointSetHinge2Anchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); - dJointSetHinge2Axis1(mODEJoint,up[0],up[1],up[2]); - dJointSetHinge2Axis2(mODEJoint,right[0],right[1],right[2]); + dJointID ODEJoint = (dJointID) jointID; + dJointSetHinge2Anchor (ODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); + dJointSetHinge2Axis1(ODEJoint,up[0],up[1],up[2]); + dJointSetHinge2Axis2(ODEJoint,right[0],right[1],right[2]); } -Vector3f ODEHinge2Joint::GetAnchor1() +Vector3f ODEHinge2Joint::GetAnchor1(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetHinge2Anchor (mODEJoint, anchor); + dJointGetHinge2Anchor (ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } -Vector3f ODEHinge2Joint::GetAnchor2() +Vector3f ODEHinge2Joint::GetAnchor2(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetHinge2Anchor2(mODEJoint, anchor); + dJointGetHinge2Anchor2(ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } -float ODEHinge2Joint::GetAngle() +float ODEHinge2Joint::GetAngle(long jointID) { - return gRadToDeg(dJointGetHinge2Angle1(mODEJoint)); + dJointID ODEJoint = (dJointID) jointID; + return gRadToDeg(dJointGetHinge2Angle1(ODEJoint)); } -float ODEHinge2Joint::GetAngleRate1() +float ODEHinge2Joint::GetAngleRate1(long jointID) { - return gRadToDeg(dJointGetHinge2Angle1Rate(mODEJoint)); + dJointID ODEJoint = (dJointID) jointID; + return gRadToDeg(dJointGetHinge2Angle1Rate(ODEJoint)); } -float ODEHinge2Joint::GetAngleRate2() +float ODEHinge2Joint::GetAngleRate2(long jointID) { - return gRadToDeg(dJointGetHinge2Angle2Rate(mODEJoint)); + dJointID ODEJoint = (dJointID) jointID; + return gRadToDeg(dJointGetHinge2Angle2Rate(ODEJoint)); } -void ODEHinge2Joint::SetParameter(int parameter, float value) +void ODEHinge2Joint::SetParameter(int parameter, float value, long jointID) { - dJointSetHinge2Param(mODEJoint, parameter, value); + dJointID ODEJoint = (dJointID) jointID; + dJointSetHinge2Param(ODEJoint, parameter, value); } -float ODEHinge2Joint::GetParameter(int parameter) const +float ODEHinge2Joint::GetParameter(int parameter, long jointID) const { - return dJointGetHinge2Param(mODEJoint, parameter); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetHinge2Param(ODEJoint, parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -33,14 +33,15 @@ long CreateHinge2Joint(long world); void SetAnchor(const salt::Vector3f& gAnchor, const salt::Vector3f& up, - const salt::Vector3f& right); - salt::Vector3f GetAnchor1(); - salt::Vector3f GetAnchor2(); - float GetAngle(); - float GetAngleRate1(); - float GetAngleRate2(); - void SetParameter(int parameter, float value); - float GetParameter(int parameter) const; + const salt::Vector3f& right, + long jointID); + salt::Vector3f GetAnchor1(long jointID); + salt::Vector3f GetAnchor2(long jointID); + float GetAngle(long jointID); + float GetAngleRate1(long jointID); + float GetAngleRate2(long jointID); + void SetParameter(int parameter, float value, long jointID); + float GetParameter(int parameter, long jointID) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -30,61 +30,70 @@ long ODEHingeJoint::CreateHingeJoint(long world) { dWorldID ODEWorld = (dWorldID) world; - mODEJoint = dJointCreateHinge(ODEWorld, 0); - return (long) mODEJoint; + dJointID ODEJoint = dJointCreateHinge(ODEWorld, 0); + return (long) ODEJoint; } -void ODEHingeJoint::SetAnchor(const Vector3f& anchor) +void ODEHingeJoint::SetAnchor(const Vector3f& anchor, long jointID) { - dJointSetHingeAnchor (mODEJoint, anchor[0], anchor[1], anchor[2]); + dJointID ODEJoint = (dJointID) jointID; + dJointSetHingeAnchor (ODEJoint, anchor[0], anchor[1], anchor[2]); } -Vector3f ODEHingeJoint::GetAnchor1() +Vector3f ODEHingeJoint::GetAnchor1(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetHingeAnchor (mODEJoint, anchor); + dJointGetHingeAnchor (ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } -Vector3f ODEHingeJoint::GetAnchor2() +Vector3f ODEHingeJoint::GetAnchor2(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal anchor[3]; - dJointGetHingeAnchor2(mODEJoint, anchor); + dJointGetHingeAnchor2(ODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } -void ODEHingeJoint::SetAxis(const Vector3f& axis) +void ODEHingeJoint::SetAxis(const Vector3f& axis, long jointID) { - dJointSetHingeAxis(mODEJoint, axis[0], axis[1], axis[2]); + dJointID ODEJoint = (dJointID) jointID; + dJointSetHingeAxis(ODEJoint, axis[0], axis[1], axis[2]); } -Vector3f ODEHingeJoint::GetAxis() +Vector3f ODEHingeJoint::GetAxis(long jointID) { + dJointID ODEJoint = (dJointID) jointID; dReal axis[3]; - dJointGetHingeAxis(mODEJoint, axis); + dJointGetHingeAxis(ODEJoint, axis); return Vector3f (axis[0], axis[1], axis[2]); } -float ODEHingeJoint::GetAngle() const +float ODEHingeJoint::GetAngle(long jointID) const { - return gRadToDeg(dJointGetHingeAngle(mODEJoint)); + dJointID ODEJoint = (dJointID) jointID; + return gRadToDeg(dJointGetHingeAngle(ODEJoint)); } -float ODEHingeJoint::GetAngleRate() const +float ODEHingeJoint::GetAngleRate(long jointID) const { - return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); + dJointID ODEJoint = (dJointID) jointID; + return gRadToDeg(dJointGetHingeAngleRate(ODEJoint)); } -void ODEHingeJoint::SetParameter(int parameter, float value) +void ODEHingeJoint::SetParameter(int parameter, float value, long jointID) { - dJointSetHingeParam(mODEJoint, parameter, value); + dJointID ODEJoint = (dJointID) jointID; + dJointSetHingeParam(ODEJoint, parameter, value); } -float ODEHingeJoint::GetParameter(int parameter) const +float ODEHingeJoint::GetParameter(int parameter, long jointID) const { - return dJointGetHingeParam(mODEJoint, parameter); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetHingeParam(ODEJoint, parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -31,15 +31,15 @@ public: ODEHingeJoint(); long CreateHingeJoint(long world); - void SetAnchor(const salt::Vector3f& anchor); - salt::Vector3f GetAnchor1(); - salt::Vector3f GetAnchor2(); - void SetAxis(const salt::Vector3f& axis); - salt::Vector3f GetAxis(); - float GetAngle() const; - float GetAngleRate() const; - void SetParameter(int parameter, float value); - float GetParameter(int parameter) const; + void SetAnchor(const salt::Vector3f& anchor, long jointID); + salt::Vector3f GetAnchor1(long jointID); + salt::Vector3f GetAnchor2(long jointID); + void SetAxis(const salt::Vector3f& axis, long jointID); + salt::Vector3f GetAxis(long jointID); + float GetAngle(long jointID) const; + float GetAngleRate(long jointID) const; + void SetParameter(int parameter, float value, long jointID); + float GetParameter(int parameter, long jointID) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -28,27 +28,30 @@ { } -void ODEPlaneCollider::SetPlaneParams(float a, float b, float c, float d) +void ODEPlaneCollider::SetPlaneParams(float a, float b, float c, float d, long geomID) { - dGeomPlaneSetParams(mODEGeom, a, b, c, d); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomPlaneSetParams(ODEGeom, a, b, c, d); } long ODEPlaneCollider::CreatePlane() { // a plane with normal pointing up, going through the origin - mODEGeom = dCreatePlane(0, 0, 1, 0, 0); - return (long) mODEGeom; + dGeomID ODEGeom = dCreatePlane(0, 0, 1, 0, 0); + return (long) ODEGeom; } -void ODEPlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) +void ODEPlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; normal.Normalize(); float d = pos.Dot(normal); - dGeomPlaneSetParams(mODEGeom, normal.x(), normal.y(), normal.z(), d); + dGeomPlaneSetParams(ODEGeom, normal.x(), normal.y(), normal.z(), d); } -float ODEPlaneCollider::GetPointDepth(const Vector3f& pos) +float ODEPlaneCollider::GetPointDepth(const Vector3f& pos, long geomID) { + dGeomID ODEGeom = (dGeomID) geomID; return dGeomPlanePointDepth - (mODEGeom,pos[0],pos[1],pos[2]); + (ODEGeom,pos[0],pos[1],pos[2]); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,9 +34,9 @@ { public: ODEPlaneCollider(); - void SetPlaneParams(float a, float b, float c, float d); - void SetParams(const salt::Vector3f& pos, salt::Vector3f normal); - float GetPointDepth(const salt::Vector3f& pos); + void SetPlaneParams(float a, float b, float c, float d, long geomID); + void SetParams(const salt::Vector3f& pos, salt::Vector3f normal, long geomID); + float GetPointDepth(const salt::Vector3f& pos, long geomID); long CreatePlane(); }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -28,14 +28,15 @@ } void ODERayCollider::SetParams(salt::Vector3f pos, - salt::Vector3f dir, float length) + salt::Vector3f dir, float length, long geomID) { - dGeomRaySet(mODEGeom, pos[0], pos[1], pos[2], dir[0], dir[1], dir[2]); - dGeomRaySetLength(mODEGeom, length); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomRaySet(ODEGeom, pos[0], pos[1], pos[2], dir[0], dir[1], dir[2]); + dGeomRaySetLength(ODEGeom, length); } long ODERayCollider::CreateRay() { - mODEGeom = dCreateRay(0, 1.0f); - return (long) mODEGeom; + dGeomID ODEGeom = dCreateRay(0, 1.0f); + return (long) ODEGeom; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h 2010-01-06 07:25:00 UTC (rev 137) @@ -34,7 +34,7 @@ { public: ODERayCollider(); - void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length); + void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length, long geomID); long CreateRay(); }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-01-06 07:25:00 UTC (rev 137) @@ -43,21 +43,29 @@ void SetMassParameters(const GenericMass& mass, long bodyID); float GetMass(long bodyID) const; void SetSphere(float density, float radius, long bodyID); - salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetSphereTotal(float total_mass, float radius, long bodyID); - salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetBox(float density, const salt::Vector3f& size, long bodyID); - salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID); - salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetCylinder(float density, float radius, float length, long bodyID); - salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetCylinderTotal(float total_mass, float radius, float length, long bodyID); - salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetCapsule(float density, float radius, float length, long bodyID); - salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID); - salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, + salt::Vector3f massTrans, long bodyID); void TranslateMass(const salt::Vector3f& v, long bodyID); salt::Vector3f GetVelocity(long bodyID) const; void SetVelocity(const salt::Vector3f& vel, long bodyID); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2010-01-06 07:25:00 UTC (rev 137) @@ -30,31 +30,36 @@ long ODESliderJoint::CreateSliderJoint(long world) { dWorldID ODEWorld = (dWorldID) world; - mODEJoint = dJointCreateSlider(ODEWorld, 0); - return (long) mODEJoint; + dJointID ODEJoint = dJointCreateSlider(ODEWorld, 0); + return (long) ODEJoint; } -void ODESliderJoint::SetSliderAxis(Vector3f& up) +void ODESliderJoint::SetSliderAxis(Vector3f& up, long jointID) { - dJointSetSliderAxis(mODEJoint,up[0],up[1],up[2]); + dJointID ODEJoint = (dJointID) jointID; + dJointSetSliderAxis(ODEJoint,up[0],up[1],up[2]); } -float ODESliderJoint::GetPosition() +float ODESliderJoint::GetPosition(long jointID) { - return dJointGetSliderPosition(mODEJoint); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetSliderPosition(ODEJoint); } -float ODESliderJoint::GetPositionRate() +float ODESliderJoint::GetPositionRate(long jointID) { - return dJointGetSliderPositionRate(mODEJoint); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetSliderPositionRate(ODEJoint); } -void ODESliderJoint::SetParameter(int parameter, float value) +void ODESliderJoint::SetParameter(int parameter, float value, long jointID) { - dJointSetSliderParam(mODEJoint, parameter, value); + dJointID ODEJoint = (dJointID) jointID; + dJointSetSliderParam(ODEJoint, parameter, value); } -float ODESliderJoint::GetParameter(int parameter) const +float ODESliderJoint::GetParameter(int parameter, long jointID) const { - return dJointGetSliderParam(mODEJoint, parameter); + dJointID ODEJoint = (dJointID) jointID; + return dJointGetSliderParam(ODEJoint, parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2010-01-05 07:22:17 UTC (rev 136) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2010-01-06 07:25:00 UTC (rev 137) @@ -35,11 +35,11 @@ public: O... [truncated message content] |
From: <a-...@us...> - 2010-01-05 07:22:30
|
Revision: 136 http://simspark.svn.sourceforge.net/simspark/?rev=136&view=rev Author: a-held Date: 2010-01-05 07:22:17 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Edited RigidBody class so that no variables are stored internally Added documentation of accelerometer in branch Modified Paths: -------------- branches/multiphys/rcssserver3d/doc/users/simspark.tex branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp Modified: branches/multiphys/rcssserver3d/doc/users/simspark.tex =================================================================== --- branches/multiphys/rcssserver3d/doc/users/simspark.tex 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/rcssserver3d/doc/users/simspark.tex 2010-01-05 07:22:17 UTC (rev 136) @@ -141,6 +141,17 @@ 13.07))} \end{itemize} +\subsubsection{Accelerometer} +This perceptor measures the proper acceleration it experiences +relative to free fall. As a consequence an accelerometer at rest +relative to the Earth's surface will indicate approximately 1 g +upwards. To obtain the acceleration due to motion with respect to the +earth, this ``gravity offset" should be subtracted. +\begin{itemize} + \item[Message format:] \texttt{(ACC (n <name>) (a <x> <y> <z>))} + \item[Example message:] \texttt{(ACC (n torso) (a 0.00 0.00 9.81))} +\end{itemize} + \subsection{Soccer Perceptors} \label{sec:soccerperceptors} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2010-01-05 07:22:17 UTC (rev 136) @@ -24,7 +24,9 @@ using namespace oxygen; -Body::Body() : PhysicsObject(), mBodyID(0){ +Body::Body() : PhysicsObject(), mBodyID(0), mMassTransformed(false), + mMassTrans(0,0,0) +{ mBodyImp = boost::shared_ptr<ODEBody>(new ODEBody()); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2010-01-05 07:22:17 UTC (rev 136) @@ -42,6 +42,8 @@ protected: long mBodyID; + bool mMassTransformed; + salt::Vector3f mMassTrans; private: boost::shared_ptr<BodyInt> mBodyImp; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2010-01-05 07:22:17 UTC (rev 136) @@ -33,52 +33,47 @@ { public: - virtual void Enable() = 0; - virtual void Disable() = 0; - virtual bool IsEnabled() const = 0; - virtual void UseGravity(bool f) = 0; - virtual bool UsesGravity() const = 0; - virtual long CreateBody(long world) = 0; - virtual void SetMass(float mass) = 0; - virtual void SetMassParameters(const GenericMass& mass) = 0; - virtual float GetMass() const = 0; - virtual void SetSphere(float density, float radius) = 0; - virtual void AddSphere(float density, float radius, const salt::Matrix& matrix) = 0; - virtual void SetSphereTotal(float total_mass, float radius) = 0; - virtual void AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix) = 0; - virtual void SetBox(float density, const salt::Vector3f& size) = 0; - virtual void AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix) = 0; - virtual void SetBoxTotal(float total_mass, const salt::Vector3f& size) = 0; - virtual void AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix) = 0; - virtual void SetCylinder(float density, float radius, float length) = 0; - virtual void AddCylinder(float density, float radius, float length, const salt::Matrix& matrix) = 0; - virtual void SetCylinderTotal(float total_mass, float radius, float length) = 0; - virtual void AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix) = 0; - virtual void SetCapsule(float density, float radius, float length) = 0; - virtual void AddCapsule(float density, float radius, float length, const salt::Matrix& matrix) = 0; - virtual void SetCapsuleTotal(float total_mass, float radius, float length) = 0; - virtual void AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix) = 0; - virtual void TranslateMass(const salt::Vector3f& v) = 0; - virtual salt::Vector3f GetVelocity() const = 0; - virtual void SetVelocity(const salt::Vector3f& vel) = 0; - virtual void SetRotation(const salt::Matrix& rot) = 0; - virtual salt::Matrix GetRotation() const = 0; - virtual salt::Vector3f GetLocalAngularVelocity() const = 0; - virtual salt::Vector3f GetAngularVelocity() const = 0; - virtual void SetAngularVelocity(const salt::Vector3f& vel) = 0; - virtual void AddForce(const salt::Vector3f& force) = 0; - virtual salt::Vector3f GetForce() const = 0; - virtual void AddTorque(const salt::Vector3f& torque) = 0; - virtual void SetPosition(const salt::Vector3f& pos) = 0; - virtual salt::Vector3f GetPosition() const = 0; - virtual void DestroyPhysicsObject() = 0; - virtual salt::Matrix GetSynchronisationMatrix() = 0; - virtual void BodySetData(RigidBody* rb) = 0; + virtual void Enable(long bodyID) = 0; + virtual void Disable(long bodyID) = 0; + virtual bool IsEnabled(long bodyID) const = 0; + virtual void UseGravity(bool f, long bodyID) = 0; + virtual bool UsesGravity(long bodyID) const = 0; + virtual void SetMass(float mass, long bodyID) = 0; + virtual void SetMassParameters(const GenericMass& mass, long bodyID) = 0; + virtual float GetMass(long bodyID) const = 0; + virtual void SetSphere(float density, float radius, long bodyID) = 0; + virtual salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetSphereTotal(float total_mass, float radius, long bodyID) = 0; + virtual salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetBox(float density, const salt::Vector3f& size, long bodyID) = 0; + virtual salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID) = 0; + virtual salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetCylinder(float density, float radius, float length, long bodyID) = 0; + virtual salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetCylinderTotal(float total_mass, float radius, float length, long bodyID) = 0; + virtual salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetCapsule(float density, float radius, float length, long bodyID) = 0; + virtual salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID) = 0; + virtual salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) = 0; + virtual void TranslateMass(const salt::Vector3f& v, long bodyID) = 0; + virtual salt::Vector3f GetVelocity(long bodyID) const = 0; + virtual void SetVelocity(const salt::Vector3f& vel, long bodyID) = 0; + virtual void SetRotation(const salt::Matrix& rot, long bodyID) = 0; + virtual salt::Matrix GetRotation(long bodyID) const = 0; + virtual salt::Vector3f GetLocalAngularVelocity(long bodyID) const = 0; + virtual salt::Vector3f GetAngularVelocity(long bodyID) const = 0; + virtual void SetAngularVelocity(const salt::Vector3f& vel, long bodyID) = 0; + virtual void AddForce(const salt::Vector3f& force, long bodyID) = 0; + virtual salt::Vector3f GetForce(long bodyID) const = 0; + virtual void AddTorque(const salt::Vector3f& torque, long bodyID) = 0; + virtual void SetPosition(const salt::Vector3f& pos, long bodyID) = 0; + virtual salt::Vector3f GetPosition(long bodyID) const = 0; + virtual void DestroyPhysicsObject(long bodyID) = 0; + virtual salt::Matrix GetSynchronisationMatrix(long bodyID) = 0; + virtual void BodySetData(RigidBody* rb, long bodyID) = 0; virtual RigidBody* BodyGetData(long bodyID) = 0; - virtual salt::Vector3f GetMassTrans() = 0; - virtual void SetMassTrans(salt::Vector3f massTrans) = 0; - virtual bool GetMassTransformed() = 0; - virtual void SetMassTransformed(bool f) = 0; // Here, we have to cheat with the preprocessor, since a static method // is required, and the bridge pattern requires member variables to @@ -89,9 +84,7 @@ #endif } -protected: - salt::Vector3f mMassTrans; - bool mMassTransformed; + virtual long CreateBody(long world) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2010-01-05 07:22:17 UTC (rev 136) @@ -23,6 +23,6 @@ using namespace oxygen; -ODEBody::ODEBody() : ODEPhysicsObject(), mODEBody(0){ +ODEBody::ODEBody() : ODEPhysicsObject(){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2010-01-05 07:22:17 UTC (rev 136) @@ -31,9 +31,6 @@ { public: ODEBody(); - -protected: - dBodyID mODEBody; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2010-01-05 07:22:17 UTC (rev 136) @@ -33,98 +33,85 @@ using namespace std; ODERigidBody::ODERigidBody() : ODEBody(){ - mMassTrans = Vector3f(0,0,0); - mMassTransformed = false; } -salt::Vector3f ODERigidBody::GetMassTrans(){ - return mMassTrans; -} - -void ODERigidBody::SetMassTrans(Vector3f massTrans){ - mMassTrans = massTrans; -} - -bool ODERigidBody::GetMassTransformed(){ - return mMassTransformed; -} - -void ODERigidBody::SetMassTransformed(bool f){ - mMassTransformed = f; -} - -void ODERigidBody::Enable() +void ODERigidBody::Enable(long bodyID) { - dBodyEnable(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + dBodyEnable(ODEBody); } -void ODERigidBody::Disable() +void ODERigidBody::Disable(long bodyID) { - dBodyDisable(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + dBodyDisable(ODEBody); } -bool ODERigidBody::IsEnabled() const +bool ODERigidBody::IsEnabled(long bodyID) const { - return (dBodyIsEnabled(mODEBody) != 0); + dBodyID ODEBody = (dBodyID) bodyID; + return (dBodyIsEnabled(ODEBody) != 0); } -void ODERigidBody::UseGravity(bool f) +void ODERigidBody::UseGravity(bool f, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; if (f == true) { // body is affected by gravity - dBodySetGravityMode(mODEBody, 1); + dBodySetGravityMode(ODEBody, 1); } else { // body is not affected by gravity - dBodySetGravityMode(mODEBody, 0); + dBodySetGravityMode(ODEBody, 0); } } -bool ODERigidBody::UsesGravity() const{ - return (dBodyGetGravityMode(mODEBody) != 0); +bool ODERigidBody::UsesGravity(long bodyID) const{ + dBodyID ODEBody = (dBodyID) bodyID; + return (dBodyGetGravityMode(ODEBody) != 0); } long ODERigidBody::CreateBody(long world) { // create the managed body - mODEBody = dBodyCreate((dWorldID) world); - return (long) mODEBody; + dBodyID ODEBody = dBodyCreate((dWorldID) world); + return (long) ODEBody; } -void ODERigidBody::DestroyPhysicsObject(){ - if (mODEBody == 0) - { - return; - } - - dBodyDestroy(mODEBody); - mODEBody = 0; +void ODERigidBody::DestroyPhysicsObject(long bodyID) +{ + dBodyID ODEBody = (dBodyID) bodyID; + dBodyDestroy(ODEBody); } -void ODERigidBody::BodySetData(RigidBody* rb) +void ODERigidBody::BodySetData(RigidBody* rb, long bodyID) { - dBodySetData(mODEBody, rb); + dBodyID ODEBody = (dBodyID) bodyID; + dBodySetData(ODEBody, rb); } -void ODERigidBody::SetMass(float mass) +void ODERigidBody::SetMass(float mass, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; - dBodyGetMass(mODEBody, &ODEMass); + dBodyGetMass(ODEBody, &ODEMass); dMassAdjust(&ODEMass, mass); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -float ODERigidBody::GetMass() const +float ODERigidBody::GetMass(long bodyID) const { + dBodyID ODEBody = (dBodyID) bodyID; dMass m; - dBodyGetMass(mODEBody, &m); + dBodyGetMass(ODEBody, &m); return m.mass; } -void ODERigidBody::AddMass(const dMass& ODEMass, const Matrix& matrix) +Vector3f ODERigidBody::AddMass(const dMass& ODEMass, const Matrix& matrix, Vector3f massTrans, const long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass transMass(ODEMass); dMatrix3 ODEMatrix; @@ -135,10 +122,10 @@ const Vector3f& trans(matrix.Pos()); dMassTranslate(&transMass,trans[0],trans[1],trans[2]); - dMassTranslate(&transMass,mMassTrans[0],mMassTrans[1],mMassTrans[2]); + dMassTranslate(&transMass,massTrans[0],massTrans[1],massTrans[2]); dMass bodyMass; - dBodyGetMass(mODEBody, &bodyMass); + dBodyGetMass(ODEBody, &bodyMass); dMassAdd(&bodyMass, &transMass); /** ODE currently requires that the center mass is always in the @@ -148,21 +135,20 @@ dMassTranslate(&bodyMass, -trans2[0], -trans2[1], -trans2[2]); bodyMass.c[0] = bodyMass.c[1] = bodyMass.c[2] = 0.0f; - dBodySetMass(mODEBody, (const dMass*)&bodyMass); + dBodySetMass(ODEBody, (const dMass*)&bodyMass); // Move body so mass is at right position again - SetPosition(GetPosition() + trans2); + SetPosition(GetPosition(bodyID) + trans2, bodyID); // Keep track of total translation of mass - mMassTrans = mMassTrans - trans2; - - mMassTransformed = true; + return massTrans - trans2; } -void ODERigidBody::SetMassParameters(const GenericMass& mass) +void ODERigidBody::SetMassParameters(const GenericMass& mass, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass& ODEMass = (dMass&) mass; - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } void ODERigidBody::PrepareSphere(dMass& mass, float density, float radius) const @@ -170,18 +156,19 @@ dMassSetSphere(&mass, density, radius); } -void ODERigidBody::SetSphere(float density, float radius) +void ODERigidBody::SetSphere(float density, float radius, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareSphere(ODEMass, density, radius); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddSphere(float density, float radius, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddSphere(float density, float radius, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareSphere(ODEMass, density, radius); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareSphereTotal(dMass& mass, float total_mass, float radius) const @@ -189,18 +176,19 @@ dMassSetSphereTotal(&mass, total_mass, radius); } -void ODERigidBody::SetSphereTotal(float total_mass, float radius) +void ODERigidBody::SetSphereTotal(float total_mass, float radius, long bodyID) { - dMass ODEMass;; + dBodyID ODEBody = (dBodyID) bodyID; + dMass ODEMass; PrepareSphereTotal(ODEMass, total_mass, radius); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddSphereTotal(float total_mass, float radius, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddSphereTotal(float total_mass, float radius, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareSphereTotal(ODEMass, total_mass, radius); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareBox(dMass& mass, float density, const Vector3f& size) const @@ -208,18 +196,19 @@ dMassSetBox(&mass, density, size[0], size[1], size[2]); } -void ODERigidBody::SetBox(float density, const Vector3f& size) +void ODERigidBody::SetBox(float density, const Vector3f& size, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareBox(ODEMass, density, size); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddBox(float density, const Vector3f& size, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddBox(float density, const Vector3f& size, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareBox(ODEMass, density, size); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareBoxTotal(dMass& mass, float total_mass, const Vector3f& size) const @@ -227,18 +216,19 @@ dMassSetBoxTotal(&mass, total_mass, size[0], size[1], size[2]); } -void ODERigidBody::SetBoxTotal(float total_mass, const Vector3f& size) +void ODERigidBody::SetBoxTotal(float total_mass, const Vector3f& size, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareBoxTotal(ODEMass, total_mass, size); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddBoxTotal(float total_mass, const Vector3f& size, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddBoxTotal(float total_mass, const Vector3f& size, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareBoxTotal(ODEMass, total_mass, size); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareCylinder (dMass& mass, float density, float radius, float length) const @@ -249,18 +239,19 @@ dMassSetCylinder (&mass, density, direction, radius, length); } -void ODERigidBody::SetCylinder (float density, float radius, float length) +void ODERigidBody::SetCylinder (float density, float radius, float length, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareCylinder(ODEMass, density, radius, length); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddCylinder (float density, float radius, float length, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddCylinder(float density, float radius, float length, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareCylinder(ODEMass, density, radius, length); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareCylinderTotal(dMass& mass, float total_mass, float radius, float length) const @@ -271,18 +262,19 @@ dMassSetCylinderTotal(&mass, total_mass, direction, radius, length); } -void ODERigidBody::SetCylinderTotal(float total_mass, float radius, float length) +void ODERigidBody::SetCylinderTotal(float total_mass, float radius, float length, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareCylinderTotal(ODEMass, total_mass, radius, length); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddCylinderTotal(float total_mass, float radius, float length, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddCylinderTotal(float total_mass, float radius, float length, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareCylinderTotal(ODEMass, total_mass, radius, length); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareCapsule (dMass& mass, float density, float radius, float length) const @@ -293,18 +285,19 @@ dMassSetCapsule (&mass, density, direction, radius, length); } -void ODERigidBody::SetCapsule (float density, float radius, float length) +void ODERigidBody::SetCapsule (float density, float radius, float length, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareCapsule(ODEMass, density, radius, length); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddCapsule (float density, float radius, float length, const Matrix& matrix) +salt::Vector3f ODERigidBody::AddCapsule (float density, float radius, float length, const Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareCapsule(ODEMass, density, radius, length); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } void ODERigidBody::PrepareCapsuleTotal(dMass& mass, float total_mass, float radius, float length) const @@ -315,71 +308,80 @@ dMassSetCapsuleTotal(&mass, total_mass, direction, radius, length); } -void ODERigidBody::SetCapsuleTotal(float total_mass, float radius, float length) +void ODERigidBody::SetCapsuleTotal(float total_mass, float radius, float length, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass ODEMass; PrepareCapsuleTotal(ODEMass, total_mass, radius, length); - dBodySetMass(mODEBody, &ODEMass); + dBodySetMass(ODEBody, &ODEMass); } -void ODERigidBody::AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix) +salt::Vector3f ODERigidBody::AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID) { dMass ODEMass; PrepareCapsuleTotal(ODEMass, total_mass, radius, length); - AddMass(ODEMass, matrix); + return AddMass(ODEMass, matrix, massTrans, bodyID); } -Vector3f ODERigidBody::GetVelocity() const +Vector3f ODERigidBody::GetVelocity(long bodyID) const { - const dReal* vel = dBodyGetLinearVel(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* vel = dBodyGetLinearVel(ODEBody); return Vector3f(vel[0], vel[1], vel[2]); } -void ODERigidBody::SetVelocity(const Vector3f& vel) +void ODERigidBody::SetVelocity(const Vector3f& vel, long bodyID) { - dBodySetLinearVel(mODEBody, vel[0], vel[1], vel[2]); + dBodyID ODEBody = (dBodyID) bodyID; + dBodySetLinearVel(ODEBody, vel[0], vel[1], vel[2]); } -void ODERigidBody::SetRotation(const Matrix& rot) +void ODERigidBody::SetRotation(const Matrix& rot, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMatrix3 ODEMatrix; GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; ConvertRotationMatrix(rot, matrixRef); - dBodySetRotation(mODEBody, ODEMatrix); + dBodySetRotation(ODEBody, ODEMatrix); } -salt::Matrix ODERigidBody::GetRotation() const +salt::Matrix ODERigidBody::GetRotation(long bodyID) const { - const dReal* ODEMatrix = dBodyGetRotation(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* ODEMatrix = dBodyGetRotation(ODEBody); GenericPhysicsMatrix* matrixPtr = (GenericPhysicsMatrix*) ODEMatrix; salt::Matrix rot; ConvertRotationMatrix(matrixPtr,rot); return rot; } -Vector3f ODERigidBody::GetLocalAngularVelocity() const +Vector3f ODERigidBody::GetLocalAngularVelocity(long bodyID) const { - const dReal* vel = dBodyGetAngularVel(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* vel = dBodyGetAngularVel(ODEBody); dReal w[3]; - dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], w); + dBodyVectorFromWorld(ODEBody, vel[0], vel[1], vel[2], w); return Vector3f(w[0], w[1], w[2]); } -Vector3f ODERigidBody::GetAngularVelocity() const +Vector3f ODERigidBody::GetAngularVelocity(long bodyID) const { - const dReal* vel = dBodyGetAngularVel(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* vel = dBodyGetAngularVel(ODEBody); return Vector3f(vel[0], vel[1], vel[2]); } -void ODERigidBody::SetAngularVelocity(const Vector3f& vel) +void ODERigidBody::SetAngularVelocity(const Vector3f& vel, long bodyID) { - dBodySetAngularVel(mODEBody, vel[0], vel[1], vel[2]); + dBodyID ODEBody = (dBodyID) bodyID; + dBodySetAngularVel(ODEBody, vel[0], vel[1], vel[2]); } -salt::Matrix ODERigidBody::GetSynchronisationMatrix() +salt::Matrix ODERigidBody::GetSynchronisationMatrix(long bodyID) { - const dReal* pos = dBodyGetPosition(mODEBody); - const dReal* rot = dBodyGetRotation(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* pos = dBodyGetPosition(ODEBody); + const dReal* rot = dBodyGetRotation(ODEBody); Matrix mat; mat.m[0] = rot[0]; @@ -404,44 +406,50 @@ RigidBody* ODERigidBody::BodyGetData(long bodyID) { - dBodyID ODEBodyID = (dBodyID) bodyID; + dBodyID ODEBody = (dBodyID) bodyID; RigidBody* bodyPtr = - static_cast<RigidBody*>(dBodyGetData(ODEBodyID)); + static_cast<RigidBody*>(dBodyGetData(ODEBody)); return bodyPtr; } -void ODERigidBody::AddForce(const Vector3f& force) +void ODERigidBody::AddForce(const Vector3f& force, long bodyID) { - dBodyAddForce(mODEBody, force.x(), force.y(), force.z()); + dBodyID ODEBody = (dBodyID) bodyID; + dBodyAddForce(ODEBody, force.x(), force.y(), force.z()); } -Vector3f ODERigidBody::GetForce() const +Vector3f ODERigidBody::GetForce(long bodyID) const { - const dReal* f = dBodyGetForce(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* f = dBodyGetForce(ODEBody); return Vector3f(f[0], f[1], f[2]); } -void ODERigidBody::AddTorque(const Vector3f& torque) +void ODERigidBody::AddTorque(const Vector3f& torque, long bodyID) { - dBodyAddTorque(mODEBody, torque.x(), torque.y(), torque.z()); + dBodyID ODEBody = (dBodyID) bodyID; + dBodyAddTorque(ODEBody, torque.x(), torque.y(), torque.z()); } -void ODERigidBody::SetPosition(const Vector3f& pos) +void ODERigidBody::SetPosition(const Vector3f& pos, long bodyID) { - dBodySetPosition(mODEBody, pos.x(), pos.y(), pos.z()); + dBodyID ODEBody = (dBodyID) bodyID; + dBodySetPosition(ODEBody, pos.x(), pos.y(), pos.z()); // the parent node will be updated in the next physics cycle } -Vector3f ODERigidBody::GetPosition() const +Vector3f ODERigidBody::GetPosition(long bodyID) const { - const dReal* pos = dBodyGetPosition(mODEBody); + dBodyID ODEBody = (dBodyID) bodyID; + const dReal* pos = dBodyGetPosition(ODEBody); return Vector3f(pos[0], pos[1], pos[2]); } -void ODERigidBody::TranslateMass(const Vector3f& v) +void ODERigidBody::TranslateMass(const Vector3f& v, long bodyID) { + dBodyID ODEBody = (dBodyID) bodyID; dMass m; - dBodyGetMass(mODEBody, &m); + dBodyGetMass(ODEBody, &m); dMassTranslate(&m,v[0],v[1],v[2]); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2010-01-05 07:22:17 UTC (rev 136) @@ -34,63 +34,53 @@ public: ODERigidBody(); - void Enable(); - void Disable(); - bool IsEnabled() const; - void UseGravity(bool f); - bool UsesGravity() const; - void SetMass(float mass); - void SetMassParameters(const GenericMass& mass); - float GetMass() const; - void SetSphere(float density, float radius); - void AddSphere(float density, float radius, const salt::Matrix& matrix); - void SetSphereTotal(float total_mass, float radius); - void AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix); - void SetBox(float density, const salt::Vector3f& size); - void AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix); - void SetBoxTotal(float total_mass, const salt::Vector3f& size); - void AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix); - void SetCylinder(float density, float radius, float length); - void AddCylinder(float density, float radius, float length, const salt::Matrix& matrix); - void SetCylinderTotal(float total_mass, float radius, float length); - void AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix); - void SetCapsule(float density, float radius, float length); - void AddCapsule(float density, float radius, float length, const salt::Matrix& matrix); - void SetCapsuleTotal(float total_mass, float radius, float length); - void AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix); - void TranslateMass(const salt::Vector3f& v); - salt::Vector3f GetVelocity() const; - void SetVelocity(const salt::Vector3f& vel); - void SetRotation(const salt::Matrix& rot); - salt::Matrix GetRotation() const; - salt::Vector3f GetLocalAngularVelocity() const; - salt::Vector3f GetAngularVelocity() const; - void SetAngularVelocity(const salt::Vector3f& vel); - void AddForce(const salt::Vector3f& force); - salt::Vector3f GetForce() const; - void AddTorque(const salt::Vector3f& torque); - void SetPosition(const salt::Vector3f& pos); - salt::Vector3f GetPosition() const; - void DestroyPhysicsObject(); - salt::Matrix GetSynchronisationMatrix(); - void BodySetData(RigidBody* rb); - RigidBody* BodyGetData(long bodyID); + void Enable(long bodyID); + void Disable(long bodyID); + bool IsEnabled(long bodyID) const; + void UseGravity(bool f, long bodyID); + bool UsesGravity(long bodyID) const; + void SetMass(float mass, long bodyID); + void SetMassParameters(const GenericMass& mass, long bodyID); + float GetMass(long bodyID) const; + void SetSphere(float density, float radius, long bodyID); + salt::Vector3f AddSphere(float density, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetSphereTotal(float total_mass, float radius, long bodyID); + salt::Vector3f AddSphereTotal(float total_mass, float radius, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetBox(float density, const salt::Vector3f& size, long bodyID); + salt::Vector3f AddBox(float density, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetBoxTotal(float total_mass, const salt::Vector3f& size, long bodyID); + salt::Vector3f AddBoxTotal(float total_mass, const salt::Vector3f& size, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetCylinder(float density, float radius, float length, long bodyID); + salt::Vector3f AddCylinder(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetCylinderTotal(float total_mass, float radius, float length, long bodyID); + salt::Vector3f AddCylinderTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetCapsule(float density, float radius, float length, long bodyID); + salt::Vector3f AddCapsule(float density, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void SetCapsuleTotal(float total_mass, float radius, float length, long bodyID); + salt::Vector3f AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix, salt::Vector3f massTrans, long bodyID); + void TranslateMass(const salt::Vector3f& v, long bodyID); + salt::Vector3f GetVelocity(long bodyID) const; + void SetVelocity(const salt::Vector3f& vel, long bodyID); + void SetRotation(const salt::Matrix& rot, long bodyID); + salt::Matrix GetRotation(long bodyID) const; + salt::Vector3f GetLocalAngularVelocity(long bodyID) const; + salt::Vector3f GetAngularVelocity(long bodyID) const; + void SetAngularVelocity(const salt::Vector3f& vel, long bodyID); + void AddForce(const salt::Vector3f& force, long bodyID); + salt::Vector3f GetForce(long bodyID) const; + void AddTorque(const salt::Vector3f& torque, long bodyID); + void SetPosition(const salt::Vector3f& pos, long bodyID); + salt::Vector3f GetPosition(long bodyID) const; + void DestroyPhysicsObject(long bodyID); + salt::Matrix GetSynchronisationMatrix(long bodyID); + void BodySetData(RigidBody* rb, long bodyID); + RigidBody* BodyGetData(long bodyID); + long CreateBody(long world); - long GetBodyID(); - salt::Vector3f GetMassTrans(); - void SetMassTrans(salt::Vector3f massTrans); - bool GetMassTransformed(); - void SetMassTransformed(bool f); - protected: - /**These methods are only called internally. - */ - void AddMass(const dMass& mass, const salt::Matrix& matrix); + //These methods are only called internally and are not declared in the interface. + salt::Vector3f AddMass(const dMass& mass, const salt::Matrix& matrix, salt::Vector3f massTrans, const long ODEBody); - /** creates an ODE body within the given world - */ - long CreateBody(long world); - /** sets up an ode mass struct representing a box of the given size and total_mass */ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-01-04 11:19:19 UTC (rev 135) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2010-01-05 07:22:17 UTC (rev 136) @@ -46,27 +46,27 @@ void RigidBody::Enable() { - mRigidBodyImp->Enable(); + mRigidBodyImp->Enable(mBodyID); } void RigidBody::Disable() { - mRigidBodyImp->Disable(); + mRigidBodyImp->Disable(mBodyID); } bool RigidBody::IsEnabled() const { - return mRigidBodyImp->IsEnabled(); + return mRigidBodyImp->IsEnabled(mBodyID); } void RigidBody::UseGravity(bool f) { - mRigidBodyImp->UseGravity(f); + mRigidBodyImp->UseGravity(f, mBodyID); } bool RigidBody::UsesGravity() const { - return mRigidBodyImp->UsesGravity(); + return mRigidBodyImp->UsesGravity(mBodyID); } bool RigidBody::CreateBody() @@ -96,7 +96,10 @@ void RigidBody::DestroyPhysicsObject() { - mRigidBodyImp->DestroyPhysicsObject(); + if (mBodyID == 0) return; + + mRigidBodyImp->DestroyPhysicsObject(mBodyID); + mBodyID = 0; } void RigidBody::OnLink() @@ -109,143 +112,152 @@ } // let the body, take on the world space position of the parent - mRigidBodyImp->BodySetData(this); + mRigidBodyImp->BodySetData(this, mBodyID); shared_ptr<BaseNode> baseNode = shared_static_cast<BaseNode> (GetParent().lock()); const Matrix& mat = baseNode->GetWorldTransform(); - mRigidBodyImp->SetRotation(mat); - mRigidBodyImp->SetPosition(mat.Pos()); + mRigidBodyImp->SetRotation(mat, mBodyID); + mRigidBodyImp->SetPosition(mat.Pos(), mBodyID); } void RigidBody::SetMass(float mass) { - mRigidBodyImp->SetMass(mass); + mRigidBodyImp->SetMass(mass, mBodyID); } float RigidBody::GetMass() const { - return mRigidBodyImp->GetMass(); + return mRigidBodyImp->GetMass(mBodyID); } -void RigidBody::SetMassParameters(const GenericMass& mass){ - mRigidBodyImp->SetMassParameters(mass); +void RigidBody::SetMassParameters(const GenericMass& mass) +{ + mRigidBodyImp->SetMassParameters(mass, mBodyID); } void RigidBody::SetSphere(float density, float radius) { - mRigidBodyImp->SetSphere(density, radius); + mRigidBodyImp->SetSphere(density, radius, mBodyID); } void RigidBody::AddSphere(float density, float radius, const Matrix& matrix) { - mRigidBodyImp->AddSphere(density, radius, matrix); + mMassTrans = mRigidBodyImp->AddSphere(density, radius, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetSphereTotal(float total_mass, float radius) { - mRigidBodyImp->SetSphereTotal(total_mass, radius); + mRigidBodyImp->SetSphereTotal(total_mass, radius, mBodyID); } void RigidBody::AddSphereTotal(float total_mass, float radius, const Matrix& matrix) { - mRigidBodyImp->AddSphereTotal(total_mass, radius, matrix); + mMassTrans = mRigidBodyImp->AddSphereTotal(total_mass, radius, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetBox(float density, const Vector3f& size) { - mRigidBodyImp->SetBox(density, size); + mRigidBodyImp->SetBox(density, size, mBodyID); } void RigidBody::AddBox(float density, const Vector3f& size, const Matrix& matrix) { - mRigidBodyImp->AddBox(density, size, matrix); + mMassTrans = mRigidBodyImp->AddBox(density, size, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetBoxTotal(float total_mass, const Vector3f& size) { - mRigidBodyImp->SetBoxTotal(total_mass, size); + mRigidBodyImp->SetBoxTotal(total_mass, size, mBodyID); } void RigidBody::AddBoxTotal(float total_mass, const Vector3f& size, const Matrix& matrix) { - mRigidBodyImp->AddBoxTotal(total_mass, size, matrix); + mMassTrans = mRigidBodyImp->AddBoxTotal(total_mass, size, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetCylinder (float density, float radius, float length) { - mRigidBodyImp->SetCylinder(density, radius, length); + mRigidBodyImp->SetCylinder(density, radius, length, mBodyID); } void RigidBody::AddCylinder (float density, float radius, float length, const Matrix& matrix) { - mRigidBodyImp->AddCylinder(density, radius, length, matrix); + mMassTrans = mRigidBodyImp->AddCylinder(density, radius, length, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetCylinderTotal(float total_mass, float radius, float length) { - mRigidBodyImp->SetCylinderTotal(total_mass, radius, length); + mRigidBodyImp->SetCylinderTotal(total_mass, radius, length, mBodyID); } void RigidBody::AddCylinderTotal(float total_mass, float radius, float length, const Matrix& matrix) { - mRigidBodyImp->AddCylinderTotal(total_mass, radius, length, matrix); + mMassTrans = mRigidBodyImp->AddCylinderTotal(total_mass, radius, length, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetCapsule (float density, float radius, float length) { - mRigidBodyImp->SetCapsule(density, radius, length); + mRigidBodyImp->SetCapsule(density, radius, length, mBodyID); } void RigidBody::AddCapsule (float density, float radius, float length, const Matrix& matrix) { - mRigidBodyImp->AddCapsule(density, radius, length, matrix); + mMassTrans = mRigidBodyImp->AddCapsule(density, radius, length, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } void RigidBody::SetCapsuleTotal(float total_mass, float radius, float length) { - mRigidBodyImp->SetCapsuleTotal(total_mass, radius, length); + mRigidBodyImp->SetCapsuleTotal(total_mass, radius, length, mBodyID); } void RigidBody::AddCapsuleTotal(float total_mass, float radius, float length, const salt::Matrix& matrix) { - mRigidBodyImp->AddCapsuleTotal(total_mass, radius, length, matrix); + mMassTrans = mRigidBodyImp->AddCapsuleTotal(total_mass, radius, length, matrix, mMassTrans, mBodyID); + mMassTransformed = true; } Vector3f RigidBody::GetVelocity() const { - return mRigidBodyImp->GetVelocity(); + return mRigidBodyImp->GetVelocity(mBodyID); } void RigidBody::SetVelocity(const Vector3f& vel) { - mRigidBodyImp->SetVelocity(vel); + mRigidBodyImp->SetVelocity(vel, mBodyID); } void RigidBody::SetRotation(const Matrix& rot) { - mRigidBodyImp->SetRotation(rot); + mRigidBodyImp->SetRotation(rot, mBodyID); } salt::Matrix RigidBody::GetRotation() const { - return mRigidBodyImp->GetRotation(); + return mRigidBodyImp->GetRotation(mBodyID); } Vector3f RigidBody::GetLocalAngularVelocity() const { - return mRigidBodyImp->GetLocalAngularVelocity(); + return mRigidBodyImp->GetLocalAngularVelocity(mBodyID); } Vector3f RigidBody::GetAngularVelocity() const { - return mRigidBodyImp->GetAngularVelocity(); + return mRigidBodyImp->GetAngularVelocity(mBodyID); } void RigidBody::SetAngularVelocity(const Vector3f& vel) { - mRigidBodyImp->SetAngularVelocity(vel); + mRigidBodyImp->SetAngularVelocity(vel, mBodyID); } void RigidBody::SynchronizeParent() const @@ -253,7 +265,7 @@ shared_ptr<BaseNode> baseNode = shared_static_cast<BaseNode> (GetParent().lock()); - Matrix mat = mRigidBodyImp->GetSynchronisationMatrix(); + Matrix mat = mRigidBodyImp->GetSynchronisationMatrix(mBodyID); baseNode->SetWorldTransform(mat); } @@ -261,9 +273,8 @@ void RigidBody::PrePhysicsUpdateInternal(float /*deltaTime*/) { // Check whether mass/body has been translated - if (mRigidBodyImp->GetMassTransformed()) + if (mMassTransformed) { - Vector3f massTrans = mRigidBodyImp->GetMassTrans(); weak_ptr<Node> parent = GetParent(); // Update colliders (only those encapsulated in transform colliders) @@ -277,7 +288,7 @@ if (collider.get()) { Vector3f pos = collider->GetPosition(); - pos = pos + massTrans; + pos = pos + mMassTrans; collider->SetLocalPosition(pos); } } @@ -289,12 +300,12 @@ { shared_ptr<Transform> transform = shared_dynamic_cast<Transform>(*iter); Matrix worldTransform = transform->GetWorldTransform(); - worldTransform.Pos() = worldTransform.Pos() + massTrans; + worldTransform.Pos() = worldTransform.Pos() + mMassTrans; transform->SetWorldTransform(worldTransform); } - mRigidBodyImp->SetMassTrans(Vector3f(0,0,0)); - mRigidBodyImp->SetMassTransformed(false); + mMassTrans = Vector3f(0,0,0); + mMassTransformed = false; } } @@ -337,30 +348,30 @@ void RigidBody::AddForce(const Vector3f& force) { - mRigidBodyImp->AddForce(force); + mRigidBodyImp->AddForce(force, mBodyID); } Vector3f RigidBody::GetForce() const { - return mRigidBodyImp->GetForce(); + return mRigidBodyImp->GetForce(mBodyID); } void RigidBody::AddTorque(const Vector3f& torque) { - mRigidBodyImp->AddTorque(torque); + mRigidBodyImp->AddTorque(torque, mBodyID); } void RigidBody::SetPosition(const Vector3f& pos) { - mRigidBodyImp->SetPosition(pos); + mRigidBodyImp->SetPosition(pos, mBodyID); } Vector3f RigidBody::GetPosition() const { - return mRigidBodyImp->GetPosition(); + return mRigidBodyImp->GetPosition(mBodyID); } void RigidBody::TranslateMass(const Vector3f& v) { - mRigidBodyImp->TranslateMass(v); + mRigidBodyImp->TranslateMass(v, mBodyID); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2010-01-04 11:19:27
|
Revision: 135 http://simspark.svn.sourceforge.net/simspark/?rev=135&view=rev Author: yxu Date: 2010-01-04 11:19:19 +0000 (Mon, 04 Jan 2010) Log Message: ----------- document for accelerometer Modified Paths: -------------- trunk/rcssserver3d/doc/users/simspark.tex Modified: trunk/rcssserver3d/doc/users/simspark.tex =================================================================== --- trunk/rcssserver3d/doc/users/simspark.tex 2010-01-04 04:51:19 UTC (rev 134) +++ trunk/rcssserver3d/doc/users/simspark.tex 2010-01-04 11:19:19 UTC (rev 135) @@ -141,6 +141,17 @@ 13.07))} \end{itemize} +\subsubsection{Accelerometer} +This perceptor measures the proper acceleration it experiences +relative to free fall. As a consequence an accelerometer at rest +relative to the Earth's surface will indicate approximately 1 g +upwards. To obtain the acceleration due to motion with respect to the +earth, this ``gravity offset" should be subtracted. +\begin{itemize} + \item[Message format:] \texttt{(ACC (n <name>) (a <x> <y> <z>))} + \item[Example message:] \texttt{(ACC (n torso) (a 0.00 0.00 9.81))} +\end{itemize} + \subsection{Soccer Perceptors} \label{sec:soccerperceptors} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2010-01-04 04:51:30
|
Revision: 134 http://simspark.svn.sourceforge.net/simspark/?rev=134&view=rev Author: a-held Date: 2010-01-04 04:51:19 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Added changes from revisions 128 to 133 into branch (probably not changes to svn props) commented out proxyserver from CMakeLists.txt because it causes a linker error on my computer Modified Paths: -------------- branches/multiphys/rcssserver3d/ChangeLog branches/multiphys/rcssserver3d/data/models/leftgoal.obj branches/multiphys/rcssserver3d/data/models/rightgoal.obj branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/multiphys/rcssserver3d/rcssmonitor3d/main.cpp branches/multiphys/rcssserver3d/simspark/naosoccersim.rb branches/multiphys/spark/ChangeLog branches/multiphys/spark/RELEASE branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/agentaspect/agentaspect.cpp branches/multiphys/spark/lib/oxygen/agentaspect/agentaspect.h branches/multiphys/spark/lib/oxygen/simulationserver/agentcontrol.cpp branches/multiphys/spark/lib/oxygen/simulationserver/agentcontrol.h branches/multiphys/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp branches/multiphys/spark/lib/oxygen/simulationserver/netcontrol.cpp branches/multiphys/spark/lib/oxygen/simulationserver/netcontrol.h branches/multiphys/spark/lib/oxygen/simulationserver/netmessage.cpp branches/multiphys/spark/lib/oxygen/simulationserver/simcontrolnode.h branches/multiphys/spark/lib/zeitgeist/fileserver/fileserver.cpp branches/multiphys/spark/lib/zeitgeist/scriptserver/scriptserver.cpp branches/multiphys/spark/lib/zeitgeist/scriptserver/scriptserver.h branches/multiphys/spark/lib/zeitgeist/zeitgeist.cpp branches/multiphys/spark/plugin/CMakeLists.txt branches/multiphys/spark/spark/spark.rb Added Paths: ----------- branches/multiphys/spark/lib/oxygen/proxyserver/ branches/multiphys/spark/lib/oxygen/proxyserver/agentproxy.cpp branches/multiphys/spark/lib/oxygen/proxyserver/agentproxy.h branches/multiphys/spark/lib/oxygen/proxyserver/agentproxy_c.cpp branches/multiphys/spark/lib/oxygen/proxyserver/proxyserver.cpp branches/multiphys/spark/lib/oxygen/proxyserver/proxyserver.h branches/multiphys/spark/lib/oxygen/proxyserver/proxyserver_c.cpp branches/multiphys/spark/plugin/agentsynceffector/ branches/multiphys/spark/plugin/agentsynceffector/CMakeLists.txt branches/multiphys/spark/plugin/agentsynceffector/agentsynceffector.cpp branches/multiphys/spark/plugin/agentsynceffector/agentsynceffector.h branches/multiphys/spark/plugin/agentsynceffector/agentsynceffector_c.cpp branches/multiphys/spark/plugin/agentsynceffector/export.cpp Modified: branches/multiphys/rcssserver3d/ChangeLog =================================================================== --- branches/multiphys/rcssserver3d/ChangeLog 2010-01-03 17:34:56 UTC (rev 133) +++ branches/multiphys/rcssserver3d/ChangeLog 2010-01-04 04:51:19 UTC (rev 134) @@ -1,3 +1,31 @@ +2010-01-03 Hedayat Vatankhah <he...@gr...> + + * data/models/leftgoal.obj: + * data/models/rightgoal.obj: + * data/rsg/agent/nao/goal.rsg: + - Fix visual goal object so that it'll follow server dimensions (GoalWidth, + GoalHeight and GoalDepth) + +2009-12-31 Hedayat Vatankhah <he...@gr...> + + * rcssmonitor3d/main.cpp: + - changed the name printed on execution + +2009-12-29 Hedayat Vatankhah <he...@gr...> + + * data/rsg/agent/nao/nao.rsg: + - added AgentSyncEffector + + * rcssmonitor3d/main.cpp: + - some cleanup + - added a new option to specify the server address: --server + +2009-12-28 Hedayat Vatankhah <he...@gr...> + + * simspark/naosoccersim.rb: + - added new field settings (field height/width, goal width/depth and penalty + area width/length multiplied by 1.5 + 2009-10-31 Hedayat Vatankhah <he...@gr...> * RELEASE: Modified: branches/multiphys/rcssserver3d/data/models/leftgoal.obj =================================================================== --- branches/multiphys/rcssserver3d/data/models/leftgoal.obj 2010-01-03 17:34:56 UTC (rev 133) +++ branches/multiphys/rcssserver3d/data/models/leftgoal.obj 2010-01-04 04:51:19 UTC (rev 134) @@ -1,1964 +1,827 @@ -# Blender3D v245 OBJ File: leftgoal.blend +# Blender3D v249 OBJ File: # www.blender3d.org mtllib leftgoal.mtl -o Cylinder -v 0.490346 -0.000000 -0.021170 -v 0.494467 -0.000000 -0.016098 -v 0.497519 -0.000000 -0.010320 -v 0.499385 -0.000000 -0.004058 -v 0.499994 0.000000 0.002448 -v 0.499322 0.000000 0.008948 -v 0.497394 0.000000 0.015192 -v 0.494286 0.000000 0.020939 -v 0.490116 0.000000 0.025970 -v 0.485044 0.000000 0.030091 -v 0.479266 0.000000 0.033143 -v 0.473004 0.000000 0.035009 -v 0.466498 0.000000 0.035618 -v 0.459998 0.000000 0.034945 -v 0.453754 0.000000 0.033018 -v 0.448007 0.000000 0.029909 -v 0.442976 0.000000 0.025739 -v 0.438855 0.000000 0.020668 -v 0.435803 0.000000 0.014890 -v 0.433937 0.000000 0.008628 -v 0.433328 0.000000 0.002122 -v 0.434000 -0.000000 -0.004378 -v 0.435928 -0.000000 -0.010622 -v 0.439036 -0.000000 -0.016370 -v 0.443207 -0.000000 -0.021401 -v 0.448278 -0.000000 -0.025521 -v 0.454056 -0.000000 -0.028573 -v 0.460318 -0.000000 -0.030439 -v 0.466824 -0.000000 -0.031048 -v 0.473324 -0.000000 -0.030376 -v 0.479568 -0.000000 -0.028448 -v 0.485316 -0.000000 -0.025340 -v 0.490346 0.533333 -0.021170 -v 0.494467 0.533333 -0.016098 -v 0.497519 0.533333 -0.010320 -v 0.499385 0.533333 -0.004058 -v 0.499994 0.533333 0.002448 -v 0.499322 0.533333 0.008948 -v 0.497394 0.533333 0.015192 -v 0.494286 0.533333 0.020939 -v 0.490116 0.533333 0.025970 -v 0.485044 0.533333 0.030091 -v 0.479266 0.533333 0.033143 -v 0.473004 0.533333 0.035009 -v 0.466498 0.533333 0.035618 -v 0.459998 0.533333 0.034945 -v 0.453754 0.533333 0.033018 -v 0.448007 0.533333 0.029910 -v 0.442976 0.533333 0.025739 -v 0.438855 0.533333 0.020668 -v 0.435803 0.533333 0.014890 -v 0.433937 0.533333 0.008628 -v 0.433328 0.533333 0.002122 -v 0.434000 0.533333 -0.004378 -v 0.435928 0.533333 -0.010622 -v 0.439036 0.533333 -0.016370 -v 0.443206 0.533333 -0.021400 -v 0.448278 0.533333 -0.025521 -v 0.454056 0.533333 -0.028573 -v 0.460318 0.533333 -0.030439 -v 0.466824 0.533333 -0.031048 -v 0.473324 0.533333 -0.030376 -v 0.479568 0.533333 -0.028448 -v 0.485315 0.533333 -0.025340 -v 0.466661 0.000000 0.002285 -v 0.466661 0.533333 0.002285 -v -0.466661 0.533333 -0.002285 -v -0.466661 -0.000000 -0.002285 -v -0.448007 0.533333 -0.029910 -v -0.453755 0.533333 -0.033018 -v -0.459998 0.533333 -0.034946 -v -0.466498 0.533333 -0.035618 -v -0.473004 0.533333 -0.035009 -v -0.479266 0.533333 -0.033143 -v -0.485044 0.533333 -0.030091 -v -0.490116 0.533333 -0.025970 -v -0.494286 0.533333 -0.020939 -v -0.497394 0.533333 -0.015191 -v -0.499322 0.533333 -0.008948 -v -0.499994 0.533333 -0.002448 -v -0.499385 0.533333 0.004058 -v -0.497519 0.533333 0.010320 -v -0.494467 0.533333 0.016098 -v -0.490346 0.533333 0.021170 -v -0.485315 0.533333 0.025340 -v -0.479568 0.533333 0.028448 -v -0.473324 0.533333 0.030376 -v -0.466824 0.533333 0.031048 -v -0.460318 0.533333 0.030439 -v -0.454056 0.533333 0.028573 -v -0.448278 0.533333 0.025521 -v -0.443207 0.533333 0.021401 -v -0.439036 0.533333 0.016370 -v -0.435928 0.533333 0.010622 -v -0.434000 0.533333 0.004378 -v -0.433328 0.533333 -0.002122 -v -0.433937 0.533333 -0.008628 -v -0.435803 0.533333 -0.014890 -v -0.438855 0.533333 -0.020668 -v -0.442976 0.533333 -0.025739 -v -0.448007 -0.000000 -0.029909 -v -0.453754 -0.000000 -0.033018 -v -0.459998 -0.000000 -0.034945 -v -0.466498 -0.000000 -0.035618 -v -0.473004 -0.000000 -0.035009 -v -0.479266 -0.000000 -0.033143 -v -0.485044 -0.000000 -0.030091 -v -0.490116 -0.000000 -0.025970 -v -0.494286 -0.000000 -0.020939 -v -0.497394 -0.000000 -0.015192 -v -0.499322 -0.000000 -0.008948 -v -0.499994 -0.000000 -0.002448 -v -0.499385 0.000000 0.004058 -v -0.497519 0.000000 0.010320 -v -0.494467 0.000000 0.016098 -v -0.490346 0.000000 0.021170 -v -0.485316 0.000000 0.025340 -v -0.479568 0.000000 0.028448 -v -0.473324 0.000000 0.030376 -v -0.466824 0.000000 0.031048 -v -0.460318 0.000000 0.030439 -v -0.454056 0.000000 0.028573 -v -0.448278 0.000000 0.025521 -v -0.443207 0.000000 0.021401 -v -0.439036 0.000000 0.016370 -v -0.435928 0.000000 0.010622 -v -0.434000 0.000000 0.004378 -v -0.433328 -0.000000 -0.002122 -v -0.433937 -0.000000 -0.008628 -v -0.435803 -0.000000 -0.014890 -v -0.438855 -0.000000 -0.020668 -v -0.442976 -0.000000 -0.025739 -v -0.465814 0.527499 -0.014066 -v -0.465804 0.524974 -0.016139 -v -0.465796 0.522092 -0.017679 -v -0.465791 0.518966 -0.018627 -v -0.465790 0.515714 -0.018947 -v -0.465791 0.512463 -0.018627 -v -0.465796 0.509336 -0.017679 -v -0.465804 0.506455 -0.016139 -v -0.465814 0.503929 -0.014066 -v -0.465826 0.501856 -0.011540 -v -0.465840 0.500316 -0.008659 -v -0.465855 0.499368 -0.005532 -v -0.465871 0.499047 -0.002281 -v -0.465887 0.499368 0.000971 -v -0.465903 0.500316 0.004097 -v -0.465917 0.501856 0.006978 -v -0.465929 0.503929 0.009504 -v -0.465939 0.506455 0.011577 -v -0.465947 0.509336 0.013117 -v -0.465951 0.512463 0.014065 -v -0.465953 0.515714 0.014386 -v -0.465951 0.518966 0.014065 -v -0.465947 0.522092 0.013117 -v -0.465939 0.524974 0.011577 -v -0.465929 0.527499 0.009504 -v -0.465917 0.529572 0.006978 -v -0.465903 0.531112 0.004097 -v -0.465887 0.532061 0.000971 -v -0.465871 0.532381 -0.002281 -v -0.465855 0.532061 -0.005532 -v -0.465840 0.531112 -0.008659 -v -0.465826 0.529572 -0.011540 -v 0.467508 0.527499 -0.009496 -v 0.467519 0.524974 -0.011569 -v 0.467526 0.522092 -0.013109 -v 0.467531 0.518966 -0.014057 -v 0.467532 0.515714 -0.014378 -v 0.467531 0.512463 -0.014057 -v 0.467526 0.509336 -0.013109 -v 0.467519 0.506455 -0.011569 -v 0.467508 0.503929 -0.009496 -v 0.467496 0.501856 -0.006971 -v 0.467482 0.500316 -0.004089 -v 0.467467 0.499368 -0.000963 -v 0.467451 0.499047 0.002289 -v 0.467435 0.499368 0.005540 -v 0.467420 0.500316 0.008667 -v 0.467405 0.501856 0.011548 -v 0.467393 0.503929 0.014074 -v 0.467383 0.506455 0.016146 -v 0.467375 0.509336 0.017687 -v 0.467371 0.512463 0.018635 -v 0.467369 0.515714 0.018955 -v 0.467371 0.518966 0.018635 -v 0.467375 0.522092 0.017687 -v 0.467383 0.524974 0.016146 -v 0.467393 0.527499 0.014074 -v 0.467405 0.529572 0.011548 -v 0.467420 0.531112 0.008667 -v 0.467435 0.532061 0.005540 -v 0.467451 0.532381 0.002289 -v 0.467467 0.532061 -0.000963 -v 0.467482 0.531112 -0.004089 -v 0.467496 0.529572 -0.006971 -v -0.465871 0.515714 -0.002281 -v 0.467451 0.515714 0.002289 -v -0.459830 0.000132 -0.035903 -v -0.459830 0.266798 -0.035903 -v -0.458524 0.000831 -0.302566 -v 0.469231 0.000831 -0.299482 -v 0.467925 0.534842 -0.032819 -v 0.467925 0.000132 -0.032819 -v 0.467925 0.534842 -0.032819 -v 0.469231 0.000831 -0.299482 -v -0.463784 0.000831 -0.304050 -v -0.465090 0.534842 -0.037387 -v -0.465090 0.000132 -0.037387 -v -0.465090 0.534842 -0.037387 -v -0.463784 0.000831 -0.304050 -v 0.467925 0.534842 -0.032819 -v 0.469231 0.000831 -0.299482 -v -0.465090 0.000132 -0.037387 -v -0.465090 0.534842 -0.037387 -v -0.463784 0.000831 -0.304050 -v -0.465191 0.000831 -0.302566 -v -0.466496 0.266798 -0.035903 -v -0.466496 0.000132 -0.035903 -v 0.474809 0.000831 -0.302566 -v 0.473504 0.266798 -0.035903 -v 0.473504 0.000132 -0.035903 -v 0.468143 0.000831 -0.302566 -v 0.466837 0.266798 -0.035903 -v 0.466837 0.000132 -0.035903 -v 0.469231 0.000831 -0.299482 -v 0.467925 0.534842 -0.032819 -v 0.467925 0.000132 -0.032819 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.478737 0.520656 0.0 -vt 0.239368 1.000000 0.0 -vt 0.239368 0.520028 0.0 -vt 0.239368 0.520656 0.0 -vt 0.000000 0.520028 0.0 -vt 0.000000 1.000000 0.0 -vt 0.239368 0.520656 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.520028 0.0 -vt 0.478737 0.520656 0.0 -vt 0.239368 0.520028 0.0 -vt 0.239368 1.000000 0.0 -vt 0.812878 0.000000 0.0 -vt 0.812878 0.520028 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.000000 0.000000 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.520028 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vn 0.000000 -1.000000 0.000000 -vn 0.685934 -0.668203 0.288064 -vn 0.616535 -0.668203 0.416333 -vn 0.999969 0.000000 0.004883 -vn -0.703970 0.315897 -0.636067 -vn -0.999969 0.000000 -0.004883 -vn -0.004364 -0.446730 0.894620 -vn 0.004364 0.446730 -0.894620 -vn 0.528642 -0.668203 -0.523484 -vn 0.620594 -0.668203 -0.410291 +o leftgoal +v 0.490346 -0.000000 -0.062326 +v 0.494467 -0.000000 -0.047393 +v 0.497519 -0.000000 -0.030383 +v 0.499385 -0.000000 -0.011947 +v 0.499994 0.000000 0.007207 +v 0.499322 0.000000 0.026343 +v 0.497394 0.000000 0.044726 +v 0.494286 0.000000 0.061645 +v 0.490116 0.000000 0.076457 +v 0.485044 0.000000 0.088589 +v 0.479266 0.000000 0.097575 +v 0.473004 0.000000 0.103068 +v 0.466498 0.000000 0.104861 +v 0.459998 0.000000 0.102880 +v 0.453754 0.000000 0.097207 +v 0.448007 0.000000 0.088054 +v 0.442976 0.000000 0.075777 +v 0.438855 0.000000 0.060848 +v 0.435803 0.000000 0.043837 +v 0.433937 0.000000 0.025401 +v 0.433328 0.000000 0.006247 +v 0.434000 -0.000000 -0.012889 +v 0.435928 -0.000000 -0.031272 +v 0.439036 -0.000000 -0.048194 +v 0.443207 -0.000000 -0.063006 +v 0.448278 -0.000000 -0.075135 +v 0.454056 -0.000000 -0.084120 +v 0.460318 -0.000000 -0.089614 +v 0.466824 -0.000000 -0.091407 +v 0.473324 -0.000000 -0.089428 +v 0.479568 -0.000000 -0.083752 +v 0.485316 -0.000000 -0.074602 +v 0.490346 0.997179 -0.062326 +v 0.494467 0.997179 -0.047393 +v 0.497519 0.997179 -0.030383 +v 0.499385 0.997179 -0.011947 +v 0.499994 0.997179 0.007207 +v 0.499322 0.997179 0.026343 +v 0.497394 0.997179 0.044726 +v 0.494286 0.997179 0.061645 +v 0.490116 0.997179 0.076457 +v 0.485044 0.997179 0.088589 +v 0.479266 0.997179 0.097575 +v 0.473004 0.997179 0.103068 +v 0.466498 0.997179 0.104861 +v 0.459998 0.997179 0.102880 +v 0.453754 0.997179 0.097207 +v 0.448007 0.997179 0.088057 +v 0.442976 0.997179 0.075777 +v 0.438855 0.997179 0.060848 +v 0.435803 0.997179 0.043837 +v 0.433937 0.997179 0.025401 +v 0.433328 0.997179 0.006247 +v 0.434000 0.997179 -0.012889 +v 0.435928 0.997179 -0.031272 +v 0.439036 0.997179 -0.048194 +v 0.443206 0.997179 -0.063003 +v 0.448278 0.997179 -0.075135 +v 0.454056 0.997179 -0.084120 +v 0.460318 0.997179 -0.089614 +v 0.466824 0.997179 -0.091407 +v 0.473324 0.997179 -0.089429 +v 0.479568 0.997179 -0.083752 +v 0.485315 0.997179 -0.074602 +v 0.466661 0.000000 0.006727 +v 0.466661 0.997179 0.006727 +v -0.466661 0.997179 -0.006727 +v -0.466661 -0.000000 -0.006727 +v -0.448007 0.997179 -0.088057 +v -0.453755 0.997179 -0.097207 +v -0.459998 0.997179 -0.102883 +v -0.466498 0.997179 -0.104861 +v -0.473004 0.997179 -0.103068 +v -0.479266 0.997179 -0.097575 +v -0.485044 0.997179 -0.088589 +v -0.490116 0.997179 -0.076457 +v -0.494286 0.997179 -0.061646 +v -0.497394 0.997179 -0.044723 +v -0.499322 0.997179 -0.026343 +v -0.499994 0.997179 -0.007207 +v -0.499385 0.997179 0.011947 +v -0.497519 0.997179 0.030383 +v -0.494467 0.997179 0.047393 +v -0.490346 0.997179 0.062326 +v -0.485315 0.997179 0.074602 +v -0.479568 0.997179 0.083752 +v -0.473324 0.997179 0.089428 +v -0.466824 0.997179 0.091407 +v -0.460318 0.997179 0.089614 +v -0.454056 0.997179 0.084120 +v -0.448278 0.997179 0.075135 +v -0.443207 0.997179 0.063006 +v -0.439036 0.997179 0.048194 +v -0.435928 0.997179 0.031272 +v -0.434000 0.997179 0.012889 +v -0.433328 0.997179 -0.006247 +v -0.433937 0.997179 -0.025401 +v -0.435803 0.997179 -0.043837 +v -0.438855 0.997179 -0.060848 +v -0.442976 0.997179 -0.075777 +v -0.448007 -0.000000 -0.088054 +v -0.453754 -0.000000 -0.097207 +v -0.459998 -0.000000 -0.102880 +v -0.466498 -0.000000 -0.104861 +v -0.473004 -0.000000 -0.103068 +v -0.479266 -0.000000 -0.097575 +v -0.485044 -0.000000 -0.088589 +v -0.490116 -0.000000 -0.076457 +v -0.494286 -0.000000 -0.061645 +v -0.497394 -0.000000 -0.044726 +v -0.499322 -0.000000 -0.026343 +v -0.499994 -0.000000 -0.007207 +v -0.499385 0.000000 0.011947 +v -0.497519 0.000000 0.030383 +v -0.494467 0.000000 0.047393 +v -0.490346 0.000000 0.062326 +v -0.485316 0.000000 0.074602 +v -0.479568 0.000000 0.083752 +v -0.473324 0.000000 0.089428 +v -0.466824 0.000000 0.091407 +v -0.460318 0.000000 0.089614 +v -0.454056 0.000000 0.084120 +v -0.448278 0.000000 0.075135 +v -0.443207 0.000000 0.063006 +v -0.439036 0.000000 0.048194 +v -0.435928 0.000000 0.031272 +v -0.434000 0.000000 0.012889 +v -0.433328 -0.000000 -0.006247 +v -0.433937 -0.000000 -0.025401 +v -0.435803 -0.000000 -0.043837 +v -0.438855 -0.000000 -0.060848 +v -0.442976 -0.000000 -0.075777 +v -0.465814 0.986271 -0.041411 +v -0.465804 0.981550 -0.047514 +v -0.465796 0.976161 -0.052048 +v -0.465791 0.970316 -0.054839 +v -0.465790 0.964236 -0.055781 +v -0.465791 0.958158 -0.054839 +v -0.465796 0.952311 -0.052048 +v -0.465804 0.946925 -0.047514 +v -0.465814 0.942202 -0.041411 +v -0.465826 0.938326 -0.033974 +v -0.465840 0.935446 -0.025493 +v -0.465855 0.933674 -0.016287 +v -0.465871 0.933074 -0.006715 +v -0.465887 0.933674 0.002859 +v -0.465903 0.935446 0.012062 +v -0.465917 0.938326 0.020544 +v -0.465929 0.942202 0.027980 +v -0.465939 0.946925 0.034083 +v -0.465947 0.952311 0.038617 +v -0.465951 0.958158 0.041408 +v -0.465953 0.964236 0.042353 +v -0.465951 0.970316 0.041408 +v -0.465947 0.976161 0.038617 +v -0.465939 0.981550 0.034083 +v -0.465929 0.986271 0.027980 +v -0.465917 0.990147 0.020544 +v -0.465903 0.993026 0.012062 +v -0.465887 0.994800 0.002859 +v -0.465871 0.995399 -0.006715 +v -0.465855 0.994800 -0.016287 +v -0.465840 0.993026 -0.025493 +v -0.465826 0.990147 -0.033974 +v 0.467508 0.986271 -0.027957 +v 0.467519 0.981550 -0.034060 +v 0.467526 0.976161 -0.038594 +v 0.467531 0.970316 -0.041385 +v 0.467532 0.964236 -0.042330 +v 0.467531 0.958158 -0.041385 +v 0.467526 0.952311 -0.038594 +v 0.467519 0.946925 -0.034060 +v 0.467508 0.942202 -0.027957 +v 0.467496 0.938326 -0.020523 +v 0.467482 0.935446 -0.012038 +v 0.467467 0.933674 -0.002835 +v 0.467451 0.933074 0.006739 +v 0.467435 0.933674 0.016310 +v 0.467420 0.935446 0.025516 +v 0.467405 0.938326 0.033998 +v 0.467393 0.942202 0.041435 +v 0.467383 0.946925 0.047535 +v 0.467375 0.952311 0.052071 +v 0.467371 0.958158 0.054862 +v 0.467369 0.964236 0.055804 +v 0.467371 0.970316 0.054862 +v 0.467375 0.976161 0.052071 +v 0.467383 0.981550 0.047535 +v 0.467393 0.986271 0.041435 +v 0.467405 0.990147 0.033998 +v 0.467420 0.993026 0.025516 +v 0.467435 0.994800 0.016310 +v 0.467451 0.995399 0.006739 +v 0.467467 0.994800 -0.002835 +v 0.467482 0.993026 -0.012038 +v 0.467496 0.990147 -0.020523 +v -0.465871 0.964236 -0.006715 +v 0.467451 0.964236 0.006739 +v -0.459830 0.000247 -0.105700 +v -0.459830 0.498835 -0.105700 +v -0.458524 0.001554 -0.890770 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v -0.465191 0.001554 -0.890770 +v -0.466496 0.498835 -0.105700 +v -0.466496 0.000247 -0.105700 +v 0.474809 0.001554 -0.890770 +v 0.473504 0.498835 -0.105700 +v 0.473504 0.000247 -0.105700 +v 0.468143 0.001554 -0.890770 +v 0.466837 0.498835 -0.105700 +v 0.466837 0.000247 -0.105700 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +vn -0.000000 -1.000000 0.000000 +vn 0.999999 0.000000 0.001664 +vn -0.999999 -0.000000 -0.001664 +vn -0.011330 -0.618071 0.786040 +vn 0.011330 0.618071 -0.786040 vn 0.000000 1.000000 0.000000 -vn 0.620594 0.668203 -0.410291 -vn 0.528642 0.668203 -0.523484 -vn 0.688711 -0.668203 -0.281320 -vn 0.688711 0.668203 -0.281320 -vn 0.730369 -0.668203 -0.141545 -vn 0.730369 0.668203 -0.141545 -vn 0.743950 -0.668203 0.003632 -vn 0.743950 0.668203 0.003632 -vn 0.728935 -0.668203 0.148686 -vn 0.728935 0.668203 0.148686 -vn 0.685934 0.668203 0.288064 -vn 0.616535 0.668203 0.416333 -vn 0.523484 -0.668203 0.528611 -vn 0.523484 0.668203 0.528642 -vn 0.410291 -0.668203 0.620594 -vn 0.410291 0.668203 0.620594 -vn 0.281320 -0.668203 0.688711 -vn 0.281320 0.668203 0.688711 -vn 0.141514 -0.666372 0.732047 -vn 0.141545 0.668203 0.730369 -vn -0.003632 -0.668203 0.743950 -vn -0.003265 0.666372 0.745598 -vn -0.148686 -0.668203 0.728935 -vn -0.148686 0.668203 0.728935 -vn -0.288064 -0.668203 0.685934 -vn -0.288064 0.668203 0.685934 -vn -0.416333 -0.668203 0.616535 -vn -0.416333 0.668203 0.616535 -vn -0.528642 -0.668203 0.523484 -vn -0.528611 0.668203 0.523484 -vn -0.620594 -0.668203 0.410291 -vn -0.620594 0.668203 0.410291 -vn -0.688711 -0.668203 0.281320 -vn -0.688711 0.668203 0.281320 -vn -0.730369 -0.668203 0.141545 -vn -0.730369 0.668203 0.141545 -vn -0.743950 -0.668203 -0.003632 -vn -0.743950 0.668203 -0.003632 -vn -0.728935 -0.668203 -0.148686 -vn -0.728935 0.668203 -0.148686 -vn -0.685934 -0.668203 -0.288064 -vn -0.685934 0.668203 -0.288064 -vn -0.616535 -0.668203 -0.416333 -vn -0.616565 0.668203 -0.416333 -vn -0.523484 -0.668203 -0.528642 -vn -0.523484 0.668203 -0.528611 -vn -0.410291 -0.668203 -0.620594 -vn -0.410291 0.668203 -0.620594 -vn -0.281320 -0.668203 -0.688711 -vn -0.281320 0.668203 -0.688711 -vn -0.141545 -0.668203 -0.730369 -vn -0.141545 0.668203 -0.730369 -vn 0.003632 -0.668203 -0.743950 -vn 0.003632 0.668203 -0.743950 -vn 0.148686 -0.668203 -0.728935 -vn 0.148686 0.668203 -0.728935 -vn 0.288064 -0.668203 -0.685934 -vn 0.288034 0.668203 -0.685934 -vn 0.416333 -0.668203 -0.616535 -vn 0.416333 0.668203 -0.616565 -vn 0.528611 0.668203 -0.523484 -vn 0.528611 -0.668203 -0.523484 -vn 0.288064 0.668203 -0.685934 -vn -0.411481 0.666372 -0.621754 -vn -0.524369 -0.666372 -0.530045 -vn -0.003632 0.668203 0.743950 -vn 0.141545 -0.668203 0.730369 -vn 0.523484 0.668203 0.528611 -vn 0.743950 0.668172 0.003632 -vn 0.730369 -0.668172 -0.141545 -vn -0.663533 0.527360 -0.530625 -vn -0.663106 0.414319 -0.623371 -vn 0.669179 0.414319 -0.616840 -vn 0.668722 0.527360 -0.524094 -vn -0.662770 0.285409 -0.692282 -vn 0.669515 0.285409 -0.685751 -vn -0.662557 0.145482 -0.734733 -vn 0.669698 0.145482 -0.728202 -vn -0.662496 0.000000 -0.749046 -vn 0.669790 0.000000 -0.742515 -vn -0.662557 -0.145482 -0.734733 -vn 0.669698 -0.145482 -0.728202 -vn -0.662770 -0.285409 -0.692282 -vn 0.669515 -0.285409 -0.685751 -vn -0.663106 -0.414350 -0.623371 -vn 0.669179 -0.414350 -0.616840 -vn -0.663564 -0.527360 -0.530625 -vn 0.668722 -0.527360 -0.524094 -vn -0.664113 -0.620106 -0.417585 -vn 0.668142 -0.620106 -0.411084 -vn -0.664724 -0.689016 -0.288644 -vn 0.667531 -0.689016 -0.282113 -vn -0.665426 -0.731468 -0.148747 -vn 0.666860 -0.731468 -0.142216 -vn -0.668172 -0.743950 -0.003265 -vn 0.666128 -0.745781 0.003235 -vn -0.666829 -0.731468 0.142216 -vn 0.665426 -0.731468 0.148747 -vn -0.667531 -0.689016 0.282144 -vn 0.664724 -0.689016 0.288644 -vn -0.666341 -0.621265 0.412275 -vn 0.664113 -0.620106 0.417585 -vn -0.668722 -0.527360 0.524094 -vn 0.661733 -0.528764 0.531480 -vn -0.669179 -0.414350 0.616840 -vn 0.663106 -0.414350 0.623371 -vn -0.669515 -0.285409 0.685751 -vn 0.662770 -0.285409 0.692282 -vn -0.669729 -0.145482 0.728202 -vn 0.662557 -0.145482 0.734733 -vn -0.669790 0.000000 0.742515 -vn 0.662465 0.000000 0.749046 -vn -0.669729 0.145482 0.728202 -vn 0.662557 0.145482 0.734733 -vn -0.669515 0.285409 0.685751 -vn 0.662770 0.285379 0.692282 -vn -0.669179 0.414350 0.616840 -vn 0.663106 0.414350 0.623371 -vn -0.668722 0.527360 0.524094 -vn 0.663564 0.527360 0.530625 -vn -0.668172 0.620106 0.411084 -vn 0.664113 0.620106 0.417615 -vn -0.667531 0.689016 0.282144 -vn 0.664724 0.689016 0.288675 -vn -0.666829 0.731468 0.142216 -vn 0.665426 0.731468 0.148747 -vn -0.668172 0.743950 -0.003265 -vn 0.666128 0.745781 0.003235 -vn -0.665426 0.731468 -0.148747 -vn 0.666829 0.731468 -0.142216 -vn -0.664724 0.689016 -0.288644 -vn 0.667531 0.689016 -0.282113 -vn -0.664113 0.620106 -0.417585 -vn 0.668142 0.620106 -0.411054 +vn -0.999999 0.000005 -0.001640 +vn 0.999999 0.000113 0.001714 +vn -0.999999 -0.000078 -0.001675 +vn 0.999999 -0.000075 0.001634 +vn -0.999999 -0.000059 -0.001670 +vn 0.999999 0.000059 0.001670 +vn -0.999999 0.000094 -0.001651 +vn 0.999999 -0.000090 0.001651 +vn -0.999999 -0.000094 -0.001651 +vn 0.999999 0.000090 0.001651 +vn -0.999999 0.000059 -0.001670 +vn 0.999999 -0.000059 0.001670 +vn -0.999999 0.000078 -0.001675 +vn 0.999999 0.000075 0.001634 +vn -0.999999 -0.000005 -0.001640 +vn 0.999999 -0.000113 0.001714 +vn -0.999999 -0.000024 -0.001628 +vn 0.999999 0.000027 0.001625 +vn -0.999999 0.000000 -0.001651 +vn 0.999999 -0.000000 0.001651 +vn -0.999999 -0.000013 -0.001631 +vn 0.999999 0.000013 0.001631 +vn -0.999999 -0.000000 -0.001672 +vn 0.999999 0.000000 0.001672 +vn -0.999999 -0.000020 -0.001735 +vn 0.999999 -0.000013 0.001631 +vn -0.999999 0.000030 -0.001658 +vn 0.999998 0.000064 0.001749 +vn -0.999999 0.000049 -0.001640 +vn 0.999999 -0.000052 0.001638 +vn -0.999999 0.000025 -0.001655 +vn 0.999999 -0.000021 0.001658 +vn -0.999999 -0.000063 -0.001693 +vn 0.999999 0.000058 0.001692 +vn -0.999999 0.000104 -0.001649 +vn 0.999999 -0.000100 0.001650 +vn -0.999999 -0.000069 -0.001671 +vn 0.999999 0.000069 0.001672 +vn -0.999999 0.000069 -0.001671 +vn 0.999999 -0.000069 0.001672 +vn -0.999999 -0.000104 -0.001649 +vn 0.999999 0.000100 0.001650 +vn -0.999999 0.000063 -0.001693 +vn 0.999999 -0.000058 0.001692 +vn -0.999999 -0.000025 -0.001655 +vn 0.999999 0.000021 0.001658 +vn -0.999999 -0.000049 -0.001640 +vn 0.999999 0.000052 0.001638 +vn -0.999999 -0.000030 -0.001658 +vn 0.999999 -0.000064 0.001749 +vn -0.999998 0.000020 -0.001735 +vn -0.999999 0.000013 -0.001631 +vn -0.999999 0.000024 -0.001628 +vn 0.999999 -0.000027 0.001625 +vn -0.999999 -0.000000 -0.001662 +vn 0.999999 0.000000 0.001662 +vn 0.006663 0.886695 -0.462308 +vn 0.006662 0.886770 -0.462164 +vn 0.004632 0.946950 -0.321349 +vn 0.004633 0.946916 -0.321448 +vn 0.002728 0.981916 -0.189298 +vn 0.002728 0.981927 -0.189239 +vn 0.000899 0.998052 -0.062376 +vn 0.000899 0.998051 -0.062395 +vn -0.000899 0.998051 0.062395 +vn -0.000899 0.998052 0.062376 +vn -0.002728 0.981927 0.189239 +vn -0.002728 0.981916 0.189297 +vn -0.004634 0.946916 0.321448 +vn -0.004634 0.946916 0.321449 +vn -0.006662 0.886769 0.462164 +vn -0.006662 0.886770 0.462164 +vn -0.008821 0.790800 0.612011 +vn -0.008820 0.790943 0.611827 +vn -0.011027 0.644028 0.764923 +vn -0.011027 0.643783 0.765128 +vn -0.013007 0.430884 0.902314 +vn -0.013007 0.430884 0.902313 +vn -0.014241 0.153104 0.988107 +vn -0.014243 0.153571 0.988035 +vn -0.014244 -0.153150 0.988100 +vn -0.014240 -0.153617 0.988028 +vn -0.013008 -0.430773 0.902366 +vn -0.011023 -0.644161 0.764811 +vn -0.011028 -0.643916 0.765016 +vn -0.008825 -0.790688 0.612156 +vn -0.008820 -0.790831 0.611971 +vn -0.006662 -0.886770 0.462164 +vn -0.004634 -0.946916 0.321448 +vn -0.004634 -0.946916 0.321449 +vn -0.002725 -0.981961 0.189061 +vn -0.002726 -0.981950 0.189119 +vn -0.000902 -0.998039 0.062581 +vn -0.000902 -0.998041 0.062562 +vn 0.000902 -0.998041 -0.062562 +vn 0.000902 -0.998039 -0.062581 +vn 0.002726 -0.981950 -0.189120 +vn 0.002725 -0.981961 -0.189061 +vn 0.004631 -0.946950 -0.321349 +vn 0.004634 -0.946916 -0.321449 +vn 0.006664 -0.886694 -0.462308 +vn 0.006661 -0.886769 -0.462164 +vn 0.008822 -0.790831 -0.611970 +vn 0.008822 -0.790831 -0.611971 +vn 0.011028 -0.643915 -0.765018 +vn 0.011028 -0.643916 -0.765017 +vn 0.013008 -0.430776 -0.902365 +vn 0.013008 -0.430775 -0.902365 +vn 0.014240 -0.153614 -0.988028 +vn 0.014244 -0.153147 -0.988101 +vn 0.014243 0.153568 -0.988035 +vn 0.014241 0.153102 -0.988108 +vn 0.013007 0.430887 -0.902312 +vn 0.013007 0.430886 -0.902312 +vn 0.011030 0.643781 -0.765130 +vn 0.011030 0.643782 -0.765129 +vn 0.008820 0.790944 -0.611825 +vn 0.008820 0.790943 -0.611826 +vn 0.963950 -0.000000 -0.266084 +vn 0.984283 -0.000000 -0.176596 +vn 0.994917 -0.000000 -0.100701 +vn 0.999495 -0.000000 -0.031779 +vn 0.999384 0.000000 0.035094 +vn 0.994545 0.000000 0.104309 +vn 0.983549 0.000000 0.180642 +vn 0.962562 0.000000 0.271061 +vn 0.922616 0.000000 0.385721 +vn 0.841104 0.000000 0.540874 +vn 0.659480 0.000000 0.751722 +vn 0.265676 0.000000 0.964062 +vn -0.291181 0.000000 0.956668 +vn -0.672657 0.000000 0.739954 +vn -0.846824 0.000000 0.531873 +vn -0.846782 0.000001 0.531940 +vn -0.925316 0.000001 0.379197 +vn -0.925343 0.000000 0.379131 +vn -0.963964 0.000000 0.266033 +vn -0.984283 0.000000 0.176596 +vn -0.994917 0.000000 0.100703 +vn -0.999495 0.000000 0.031779 +vn -0.999384 -0.000000 -0.035095 +vn -0.994543 -0.000000 -0.104326 +vn -0.994545 0.000000 -0.104309 +vn -0.983549 0.000001 -0.180640 +vn -0.983544 -0.000000 -0.180671 +vn -0.962579 -0.000000 -0.271002 +vn -0.922622 -0.000000 -0.385705 +vn -0.841102 -0.000000 -0.540876 +vn -0.659481 -0.000000 -0.751721 +vn -0.265675 -0.000000 -0.964063 +vn 0.291182 -0.000000 -0.956668 +vn 0.291577 -0.000003 -0.956547 +vn 0.672715 -0.000002 -0.739902 +vn 0.672466 0.000001 -0.740128 +vn 0.846782 0.000001 -0.531939 +vn 0.846900 -0.000002 -0.531752 +vn 0.925349 -0.000001 -0.379117 +vn 0.925317 -0.000000 -0.379195 +vn 0.925343 -0.000000 -0.379131 +vn 0.925316 0.000001 -0.379197 +vn 0.846824 -0.000000 -0.531873 +vn 0.846782 0.000001 -0.531940 +vn 0.672657 -0.000000 -0.739954 +vn 0.291181 -0.000000 -0.956668 +vn -0.265676 -0.000000 -0.964062 +vn -0.659480 -0.000000 -0.751722 +vn -0.841104 -0.000000 -0.540874 +vn -0.922616 -0.000000 -0.385721 +vn -0.962565 -0.000000 -0.271052 +vn -0.962562 -0.000000 -0.271061 +vn -0.983549 -0.000000 -0.180642 +vn -0.999384 -0.000000 -0.035094 +vn -0.994917 0.000000 0.100702 +vn -0.994917 0.000000 0.100701 +vn -0.963950 0.000000 0.266084 +vn -0.925349 -0.000001 0.379117 +vn -0.925317 0.000000 0.379195 +vn -0.846823 0.000000 0.531874 +vn -0.846900 -0.000002 0.531752 +vn -0.672466 0.000000 0.740128 +vn -0.291577 0.000000 0.956547 +vn 0.265675 0.000000 0.964063 +vn 0.659481 0.000000 0.751721 +vn 0.841102 0.000000 0.540876 +vn 0.922622 0.000000 0.385705 +vn 0.962579 0.000000 0.271002 +vn 0.983544 0.000000 0.180671 +vn 0.999384 0.000000 0.035095 +vn 0.994916 -0.000000 -0... [truncated message content] |
From: <he...@us...> - 2010-01-03 17:35:07
|
Revision: 133 http://simspark.svn.sourceforge.net/simspark/?rev=133&view=rev Author: hedayat Date: 2010-01-03 17:34:56 +0000 (Sun, 03 Jan 2010) Log Message: ----------- Now visual goal object follows server goal parameters Fixed rcssmonitor3d so that it prints correct name when run Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/models/leftgoal.obj trunk/rcssserver3d/data/models/rightgoal.obj trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg trunk/rcssserver3d/rcssmonitor3d/main.cpp Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2010-01-01 22:01:05 UTC (rev 132) +++ trunk/rcssserver3d/ChangeLog 2010-01-03 17:34:56 UTC (rev 133) @@ -1,3 +1,16 @@ +2010-01-03 Hedayat Vatankhah <he...@gr...> + + * data/models/leftgoal.obj: + * data/models/rightgoal.obj: + * data/rsg/agent/nao/goal.rsg: + - Fix visual goal object so that it'll follow server dimensions (GoalWidth, + GoalHeight and GoalDepth) + +2009-12-31 Hedayat Vatankhah <he...@gr...> + + * rcssmonitor3d/main.cpp: + - changed the name printed on execution + 2009-12-29 Hedayat Vatankhah <he...@gr...> * data/rsg/agent/nao/nao.rsg: Modified: trunk/rcssserver3d/data/models/leftgoal.obj =================================================================== --- trunk/rcssserver3d/data/models/leftgoal.obj 2010-01-01 22:01:05 UTC (rev 132) +++ trunk/rcssserver3d/data/models/leftgoal.obj 2010-01-03 17:34:56 UTC (rev 133) @@ -1,1964 +1,827 @@ -# Blender3D v245 OBJ File: leftgoal.blend +# Blender3D v249 OBJ File: # www.blender3d.org mtllib leftgoal.mtl -o Cylinder -v 0.490346 -0.000000 -0.021170 -v 0.494467 -0.000000 -0.016098 -v 0.497519 -0.000000 -0.010320 -v 0.499385 -0.000000 -0.004058 -v 0.499994 0.000000 0.002448 -v 0.499322 0.000000 0.008948 -v 0.497394 0.000000 0.015192 -v 0.494286 0.000000 0.020939 -v 0.490116 0.000000 0.025970 -v 0.485044 0.000000 0.030091 -v 0.479266 0.000000 0.033143 -v 0.473004 0.000000 0.035009 -v 0.466498 0.000000 0.035618 -v 0.459998 0.000000 0.034945 -v 0.453754 0.000000 0.033018 -v 0.448007 0.000000 0.029909 -v 0.442976 0.000000 0.025739 -v 0.438855 0.000000 0.020668 -v 0.435803 0.000000 0.014890 -v 0.433937 0.000000 0.008628 -v 0.433328 0.000000 0.002122 -v 0.434000 -0.000000 -0.004378 -v 0.435928 -0.000000 -0.010622 -v 0.439036 -0.000000 -0.016370 -v 0.443207 -0.000000 -0.021401 -v 0.448278 -0.000000 -0.025521 -v 0.454056 -0.000000 -0.028573 -v 0.460318 -0.000000 -0.030439 -v 0.466824 -0.000000 -0.031048 -v 0.473324 -0.000000 -0.030376 -v 0.479568 -0.000000 -0.028448 -v 0.485316 -0.000000 -0.025340 -v 0.490346 0.533333 -0.021170 -v 0.494467 0.533333 -0.016098 -v 0.497519 0.533333 -0.010320 -v 0.499385 0.533333 -0.004058 -v 0.499994 0.533333 0.002448 -v 0.499322 0.533333 0.008948 -v 0.497394 0.533333 0.015192 -v 0.494286 0.533333 0.020939 -v 0.490116 0.533333 0.025970 -v 0.485044 0.533333 0.030091 -v 0.479266 0.533333 0.033143 -v 0.473004 0.533333 0.035009 -v 0.466498 0.533333 0.035618 -v 0.459998 0.533333 0.034945 -v 0.453754 0.533333 0.033018 -v 0.448007 0.533333 0.029910 -v 0.442976 0.533333 0.025739 -v 0.438855 0.533333 0.020668 -v 0.435803 0.533333 0.014890 -v 0.433937 0.533333 0.008628 -v 0.433328 0.533333 0.002122 -v 0.434000 0.533333 -0.004378 -v 0.435928 0.533333 -0.010622 -v 0.439036 0.533333 -0.016370 -v 0.443206 0.533333 -0.021400 -v 0.448278 0.533333 -0.025521 -v 0.454056 0.533333 -0.028573 -v 0.460318 0.533333 -0.030439 -v 0.466824 0.533333 -0.031048 -v 0.473324 0.533333 -0.030376 -v 0.479568 0.533333 -0.028448 -v 0.485315 0.533333 -0.025340 -v 0.466661 0.000000 0.002285 -v 0.466661 0.533333 0.002285 -v -0.466661 0.533333 -0.002285 -v -0.466661 -0.000000 -0.002285 -v -0.448007 0.533333 -0.029910 -v -0.453755 0.533333 -0.033018 -v -0.459998 0.533333 -0.034946 -v -0.466498 0.533333 -0.035618 -v -0.473004 0.533333 -0.035009 -v -0.479266 0.533333 -0.033143 -v -0.485044 0.533333 -0.030091 -v -0.490116 0.533333 -0.025970 -v -0.494286 0.533333 -0.020939 -v -0.497394 0.533333 -0.015191 -v -0.499322 0.533333 -0.008948 -v -0.499994 0.533333 -0.002448 -v -0.499385 0.533333 0.004058 -v -0.497519 0.533333 0.010320 -v -0.494467 0.533333 0.016098 -v -0.490346 0.533333 0.021170 -v -0.485315 0.533333 0.025340 -v -0.479568 0.533333 0.028448 -v -0.473324 0.533333 0.030376 -v -0.466824 0.533333 0.031048 -v -0.460318 0.533333 0.030439 -v -0.454056 0.533333 0.028573 -v -0.448278 0.533333 0.025521 -v -0.443207 0.533333 0.021401 -v -0.439036 0.533333 0.016370 -v -0.435928 0.533333 0.010622 -v -0.434000 0.533333 0.004378 -v -0.433328 0.533333 -0.002122 -v -0.433937 0.533333 -0.008628 -v -0.435803 0.533333 -0.014890 -v -0.438855 0.533333 -0.020668 -v -0.442976 0.533333 -0.025739 -v -0.448007 -0.000000 -0.029909 -v -0.453754 -0.000000 -0.033018 -v -0.459998 -0.000000 -0.034945 -v -0.466498 -0.000000 -0.035618 -v -0.473004 -0.000000 -0.035009 -v -0.479266 -0.000000 -0.033143 -v -0.485044 -0.000000 -0.030091 -v -0.490116 -0.000000 -0.025970 -v -0.494286 -0.000000 -0.020939 -v -0.497394 -0.000000 -0.015192 -v -0.499322 -0.000000 -0.008948 -v -0.499994 -0.000000 -0.002448 -v -0.499385 0.000000 0.004058 -v -0.497519 0.000000 0.010320 -v -0.494467 0.000000 0.016098 -v -0.490346 0.000000 0.021170 -v -0.485316 0.000000 0.025340 -v -0.479568 0.000000 0.028448 -v -0.473324 0.000000 0.030376 -v -0.466824 0.000000 0.031048 -v -0.460318 0.000000 0.030439 -v -0.454056 0.000000 0.028573 -v -0.448278 0.000000 0.025521 -v -0.443207 0.000000 0.021401 -v -0.439036 0.000000 0.016370 -v -0.435928 0.000000 0.010622 -v -0.434000 0.000000 0.004378 -v -0.433328 -0.000000 -0.002122 -v -0.433937 -0.000000 -0.008628 -v -0.435803 -0.000000 -0.014890 -v -0.438855 -0.000000 -0.020668 -v -0.442976 -0.000000 -0.025739 -v -0.465814 0.527499 -0.014066 -v -0.465804 0.524974 -0.016139 -v -0.465796 0.522092 -0.017679 -v -0.465791 0.518966 -0.018627 -v -0.465790 0.515714 -0.018947 -v -0.465791 0.512463 -0.018627 -v -0.465796 0.509336 -0.017679 -v -0.465804 0.506455 -0.016139 -v -0.465814 0.503929 -0.014066 -v -0.465826 0.501856 -0.011540 -v -0.465840 0.500316 -0.008659 -v -0.465855 0.499368 -0.005532 -v -0.465871 0.499047 -0.002281 -v -0.465887 0.499368 0.000971 -v -0.465903 0.500316 0.004097 -v -0.465917 0.501856 0.006978 -v -0.465929 0.503929 0.009504 -v -0.465939 0.506455 0.011577 -v -0.465947 0.509336 0.013117 -v -0.465951 0.512463 0.014065 -v -0.465953 0.515714 0.014386 -v -0.465951 0.518966 0.014065 -v -0.465947 0.522092 0.013117 -v -0.465939 0.524974 0.011577 -v -0.465929 0.527499 0.009504 -v -0.465917 0.529572 0.006978 -v -0.465903 0.531112 0.004097 -v -0.465887 0.532061 0.000971 -v -0.465871 0.532381 -0.002281 -v -0.465855 0.532061 -0.005532 -v -0.465840 0.531112 -0.008659 -v -0.465826 0.529572 -0.011540 -v 0.467508 0.527499 -0.009496 -v 0.467519 0.524974 -0.011569 -v 0.467526 0.522092 -0.013109 -v 0.467531 0.518966 -0.014057 -v 0.467532 0.515714 -0.014378 -v 0.467531 0.512463 -0.014057 -v 0.467526 0.509336 -0.013109 -v 0.467519 0.506455 -0.011569 -v 0.467508 0.503929 -0.009496 -v 0.467496 0.501856 -0.006971 -v 0.467482 0.500316 -0.004089 -v 0.467467 0.499368 -0.000963 -v 0.467451 0.499047 0.002289 -v 0.467435 0.499368 0.005540 -v 0.467420 0.500316 0.008667 -v 0.467405 0.501856 0.011548 -v 0.467393 0.503929 0.014074 -v 0.467383 0.506455 0.016146 -v 0.467375 0.509336 0.017687 -v 0.467371 0.512463 0.018635 -v 0.467369 0.515714 0.018955 -v 0.467371 0.518966 0.018635 -v 0.467375 0.522092 0.017687 -v 0.467383 0.524974 0.016146 -v 0.467393 0.527499 0.014074 -v 0.467405 0.529572 0.011548 -v 0.467420 0.531112 0.008667 -v 0.467435 0.532061 0.005540 -v 0.467451 0.532381 0.002289 -v 0.467467 0.532061 -0.000963 -v 0.467482 0.531112 -0.004089 -v 0.467496 0.529572 -0.006971 -v -0.465871 0.515714 -0.002281 -v 0.467451 0.515714 0.002289 -v -0.459830 0.000132 -0.035903 -v -0.459830 0.266798 -0.035903 -v -0.458524 0.000831 -0.302566 -v 0.469231 0.000831 -0.299482 -v 0.467925 0.534842 -0.032819 -v 0.467925 0.000132 -0.032819 -v 0.467925 0.534842 -0.032819 -v 0.469231 0.000831 -0.299482 -v -0.463784 0.000831 -0.304050 -v -0.465090 0.534842 -0.037387 -v -0.465090 0.000132 -0.037387 -v -0.465090 0.534842 -0.037387 -v -0.463784 0.000831 -0.304050 -v 0.467925 0.534842 -0.032819 -v 0.469231 0.000831 -0.299482 -v -0.465090 0.000132 -0.037387 -v -0.465090 0.534842 -0.037387 -v -0.463784 0.000831 -0.304050 -v -0.465191 0.000831 -0.302566 -v -0.466496 0.266798 -0.035903 -v -0.466496 0.000132 -0.035903 -v 0.474809 0.000831 -0.302566 -v 0.473504 0.266798 -0.035903 -v 0.473504 0.000132 -0.035903 -v 0.468143 0.000831 -0.302566 -v 0.466837 0.266798 -0.035903 -v 0.466837 0.000132 -0.035903 -v 0.469231 0.000831 -0.299482 -v 0.467925 0.534842 -0.032819 -v 0.467925 0.000132 -0.032819 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.478737 0.520656 0.0 -vt 0.239368 1.000000 0.0 -vt 0.239368 0.520028 0.0 -vt 0.239368 0.520656 0.0 -vt 0.000000 0.520028 0.0 -vt 0.000000 1.000000 0.0 -vt 0.239368 0.520656 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.520028 0.0 -vt 0.478737 0.520656 0.0 -vt 0.239368 0.520028 0.0 -vt 0.239368 1.000000 0.0 -vt 0.812878 0.000000 0.0 -vt 0.812878 0.520028 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.000000 0.000000 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.000000 0.0 -vt 0.000000 0.520027 0.0 -vt 0.812878 0.520028 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 0.000000 0.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 0.000000 1.000000 0.0 -vt 1.000000 0.000000 0.0 -vt 1.000000 1.000000 0.0 -vn 0.000000 -1.000000 0.000000 -vn 0.685934 -0.668203 0.288064 -vn 0.616535 -0.668203 0.416333 -vn 0.999969 0.000000 0.004883 -vn -0.703970 0.315897 -0.636067 -vn -0.999969 0.000000 -0.004883 -vn -0.004364 -0.446730 0.894620 -vn 0.004364 0.446730 -0.894620 -vn 0.528642 -0.668203 -0.523484 -vn 0.620594 -0.668203 -0.410291 +o leftgoal +v 0.490346 -0.000000 -0.062326 +v 0.494467 -0.000000 -0.047393 +v 0.497519 -0.000000 -0.030383 +v 0.499385 -0.000000 -0.011947 +v 0.499994 0.000000 0.007207 +v 0.499322 0.000000 0.026343 +v 0.497394 0.000000 0.044726 +v 0.494286 0.000000 0.061645 +v 0.490116 0.000000 0.076457 +v 0.485044 0.000000 0.088589 +v 0.479266 0.000000 0.097575 +v 0.473004 0.000000 0.103068 +v 0.466498 0.000000 0.104861 +v 0.459998 0.000000 0.102880 +v 0.453754 0.000000 0.097207 +v 0.448007 0.000000 0.088054 +v 0.442976 0.000000 0.075777 +v 0.438855 0.000000 0.060848 +v 0.435803 0.000000 0.043837 +v 0.433937 0.000000 0.025401 +v 0.433328 0.000000 0.006247 +v 0.434000 -0.000000 -0.012889 +v 0.435928 -0.000000 -0.031272 +v 0.439036 -0.000000 -0.048194 +v 0.443207 -0.000000 -0.063006 +v 0.448278 -0.000000 -0.075135 +v 0.454056 -0.000000 -0.084120 +v 0.460318 -0.000000 -0.089614 +v 0.466824 -0.000000 -0.091407 +v 0.473324 -0.000000 -0.089428 +v 0.479568 -0.000000 -0.083752 +v 0.485316 -0.000000 -0.074602 +v 0.490346 0.997179 -0.062326 +v 0.494467 0.997179 -0.047393 +v 0.497519 0.997179 -0.030383 +v 0.499385 0.997179 -0.011947 +v 0.499994 0.997179 0.007207 +v 0.499322 0.997179 0.026343 +v 0.497394 0.997179 0.044726 +v 0.494286 0.997179 0.061645 +v 0.490116 0.997179 0.076457 +v 0.485044 0.997179 0.088589 +v 0.479266 0.997179 0.097575 +v 0.473004 0.997179 0.103068 +v 0.466498 0.997179 0.104861 +v 0.459998 0.997179 0.102880 +v 0.453754 0.997179 0.097207 +v 0.448007 0.997179 0.088057 +v 0.442976 0.997179 0.075777 +v 0.438855 0.997179 0.060848 +v 0.435803 0.997179 0.043837 +v 0.433937 0.997179 0.025401 +v 0.433328 0.997179 0.006247 +v 0.434000 0.997179 -0.012889 +v 0.435928 0.997179 -0.031272 +v 0.439036 0.997179 -0.048194 +v 0.443206 0.997179 -0.063003 +v 0.448278 0.997179 -0.075135 +v 0.454056 0.997179 -0.084120 +v 0.460318 0.997179 -0.089614 +v 0.466824 0.997179 -0.091407 +v 0.473324 0.997179 -0.089429 +v 0.479568 0.997179 -0.083752 +v 0.485315 0.997179 -0.074602 +v 0.466661 0.000000 0.006727 +v 0.466661 0.997179 0.006727 +v -0.466661 0.997179 -0.006727 +v -0.466661 -0.000000 -0.006727 +v -0.448007 0.997179 -0.088057 +v -0.453755 0.997179 -0.097207 +v -0.459998 0.997179 -0.102883 +v -0.466498 0.997179 -0.104861 +v -0.473004 0.997179 -0.103068 +v -0.479266 0.997179 -0.097575 +v -0.485044 0.997179 -0.088589 +v -0.490116 0.997179 -0.076457 +v -0.494286 0.997179 -0.061646 +v -0.497394 0.997179 -0.044723 +v -0.499322 0.997179 -0.026343 +v -0.499994 0.997179 -0.007207 +v -0.499385 0.997179 0.011947 +v -0.497519 0.997179 0.030383 +v -0.494467 0.997179 0.047393 +v -0.490346 0.997179 0.062326 +v -0.485315 0.997179 0.074602 +v -0.479568 0.997179 0.083752 +v -0.473324 0.997179 0.089428 +v -0.466824 0.997179 0.091407 +v -0.460318 0.997179 0.089614 +v -0.454056 0.997179 0.084120 +v -0.448278 0.997179 0.075135 +v -0.443207 0.997179 0.063006 +v -0.439036 0.997179 0.048194 +v -0.435928 0.997179 0.031272 +v -0.434000 0.997179 0.012889 +v -0.433328 0.997179 -0.006247 +v -0.433937 0.997179 -0.025401 +v -0.435803 0.997179 -0.043837 +v -0.438855 0.997179 -0.060848 +v -0.442976 0.997179 -0.075777 +v -0.448007 -0.000000 -0.088054 +v -0.453754 -0.000000 -0.097207 +v -0.459998 -0.000000 -0.102880 +v -0.466498 -0.000000 -0.104861 +v -0.473004 -0.000000 -0.103068 +v -0.479266 -0.000000 -0.097575 +v -0.485044 -0.000000 -0.088589 +v -0.490116 -0.000000 -0.076457 +v -0.494286 -0.000000 -0.061645 +v -0.497394 -0.000000 -0.044726 +v -0.499322 -0.000000 -0.026343 +v -0.499994 -0.000000 -0.007207 +v -0.499385 0.000000 0.011947 +v -0.497519 0.000000 0.030383 +v -0.494467 0.000000 0.047393 +v -0.490346 0.000000 0.062326 +v -0.485316 0.000000 0.074602 +v -0.479568 0.000000 0.083752 +v -0.473324 0.000000 0.089428 +v -0.466824 0.000000 0.091407 +v -0.460318 0.000000 0.089614 +v -0.454056 0.000000 0.084120 +v -0.448278 0.000000 0.075135 +v -0.443207 0.000000 0.063006 +v -0.439036 0.000000 0.048194 +v -0.435928 0.000000 0.031272 +v -0.434000 0.000000 0.012889 +v -0.433328 -0.000000 -0.006247 +v -0.433937 -0.000000 -0.025401 +v -0.435803 -0.000000 -0.043837 +v -0.438855 -0.000000 -0.060848 +v -0.442976 -0.000000 -0.075777 +v -0.465814 0.986271 -0.041411 +v -0.465804 0.981550 -0.047514 +v -0.465796 0.976161 -0.052048 +v -0.465791 0.970316 -0.054839 +v -0.465790 0.964236 -0.055781 +v -0.465791 0.958158 -0.054839 +v -0.465796 0.952311 -0.052048 +v -0.465804 0.946925 -0.047514 +v -0.465814 0.942202 -0.041411 +v -0.465826 0.938326 -0.033974 +v -0.465840 0.935446 -0.025493 +v -0.465855 0.933674 -0.016287 +v -0.465871 0.933074 -0.006715 +v -0.465887 0.933674 0.002859 +v -0.465903 0.935446 0.012062 +v -0.465917 0.938326 0.020544 +v -0.465929 0.942202 0.027980 +v -0.465939 0.946925 0.034083 +v -0.465947 0.952311 0.038617 +v -0.465951 0.958158 0.041408 +v -0.465953 0.964236 0.042353 +v -0.465951 0.970316 0.041408 +v -0.465947 0.976161 0.038617 +v -0.465939 0.981550 0.034083 +v -0.465929 0.986271 0.027980 +v -0.465917 0.990147 0.020544 +v -0.465903 0.993026 0.012062 +v -0.465887 0.994800 0.002859 +v -0.465871 0.995399 -0.006715 +v -0.465855 0.994800 -0.016287 +v -0.465840 0.993026 -0.025493 +v -0.465826 0.990147 -0.033974 +v 0.467508 0.986271 -0.027957 +v 0.467519 0.981550 -0.034060 +v 0.467526 0.976161 -0.038594 +v 0.467531 0.970316 -0.041385 +v 0.467532 0.964236 -0.042330 +v 0.467531 0.958158 -0.041385 +v 0.467526 0.952311 -0.038594 +v 0.467519 0.946925 -0.034060 +v 0.467508 0.942202 -0.027957 +v 0.467496 0.938326 -0.020523 +v 0.467482 0.935446 -0.012038 +v 0.467467 0.933674 -0.002835 +v 0.467451 0.933074 0.006739 +v 0.467435 0.933674 0.016310 +v 0.467420 0.935446 0.025516 +v 0.467405 0.938326 0.033998 +v 0.467393 0.942202 0.041435 +v 0.467383 0.946925 0.047535 +v 0.467375 0.952311 0.052071 +v 0.467371 0.958158 0.054862 +v 0.467369 0.964236 0.055804 +v 0.467371 0.970316 0.054862 +v 0.467375 0.976161 0.052071 +v 0.467383 0.981550 0.047535 +v 0.467393 0.986271 0.041435 +v 0.467405 0.990147 0.033998 +v 0.467420 0.993026 0.025516 +v 0.467435 0.994800 0.016310 +v 0.467451 0.995399 0.006739 +v 0.467467 0.994800 -0.002835 +v 0.467482 0.993026 -0.012038 +v 0.467496 0.990147 -0.020523 +v -0.465871 0.964236 -0.006715 +v 0.467451 0.964236 0.006739 +v -0.459830 0.000247 -0.105700 +v -0.459830 0.498835 -0.105700 +v -0.458524 0.001554 -0.890770 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v -0.463784 0.001554 -0.895139 +v -0.465090 1.000000 -0.110069 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v 0.467925 1.000000 -0.096621 +v 0.469231 0.001554 -0.881690 +v -0.465090 0.000247 -0.110069 +v -0.465090 1.000000 -0.110069 +v -0.463784 0.001554 -0.895139 +v -0.465191 0.001554 -0.890770 +v -0.466496 0.498835 -0.105700 +v -0.466496 0.000247 -0.105700 +v 0.474809 0.001554 -0.890770 +v 0.473504 0.498835 -0.105700 +v 0.473504 0.000247 -0.105700 +v 0.468143 0.001554 -0.890770 +v 0.466837 0.498835 -0.105700 +v 0.466837 0.000247 -0.105700 +v 0.469231 0.001554 -0.881690 +v 0.467925 1.000000 -0.096621 +v 0.467925 0.000247 -0.096621 +vn -0.000000 -1.000000 0.000000 +vn 0.999999 0.000000 0.001664 +vn -0.999999 -0.000000 -0.001664 +vn -0.011330 -0.618071 0.786040 +vn 0.011330 0.618071 -0.786040 vn 0.000000 1.000000 0.000000 -vn 0.620594 0.668203 -0.410291 -vn 0.528642 0.668203 -0.523484 -vn 0.688711 -0.668203 -0.281320 -vn 0.688711 0.668203 -0.281320 -vn 0.730369 -0.668203 -0.141545 -vn 0.730369 0.668203 -0.141545 -vn 0.743950 -0.668203 0.003632 -vn 0.743950 0.668203 0.003632 -vn 0.728935 -0.668203 0.148686 -vn 0.728935 0.668203 0.148686 -vn 0.685934 0.668203 0.288064 -vn 0.616535 0.668203 0.416333 -vn 0.523484 -0.668203 0.528611 -vn 0.523484 0.668203 0.528642 -vn 0.410291 -0.668203 0.620594 -vn 0.410291 0.668203 0.620594 -vn 0.281320 -0.668203 0.688711 -vn 0.281320 0.668203 0.688711 -vn 0.141514 -0.666372 0.732047 -vn 0.141545 0.668203 0.730369 -vn -0.003632 -0.668203 0.743950 -vn -0.003265 0.666372 0.745598 -vn -0.148686 -0.668203 0.728935 -vn -0.148686 0.668203 0.728935 -vn -0.288064 -0.668203 0.685934 -vn -0.288064 0.668203 0.685934 -vn -0.416333 -0.668203 0.616535 -vn -0.416333 0.668203 0.616535 -vn -0.528642 -0.668203 0.523484 -vn -0.528611 0.668203 0.523484 -vn -0.620594 -0.668203 0.410291 -vn -0.620594 0.668203 0.410291 -vn -0.688711 -0.668203 0.281320 -vn -0.688711 0.668203 0.281320 -vn -0.730369 -0.668203 0.141545 -vn -0.730369 0.668203 0.141545 -vn -0.743950 -0.668203 -0.003632 -vn -0.743950 0.668203 -0.003632 -vn -0.728935 -0.668203 -0.148686 -vn -0.728935 0.668203 -0.148686 -vn -0.685934 -0.668203 -0.288064 -vn -0.685934 0.668203 -0.288064 -vn -0.616535 -0.668203 -0.416333 -vn -0.616565 0.668203 -0.416333 -vn -0.523484 -0.668203 -0.528642 -vn -0.523484 0.668203 -0.528611 -vn -0.410291 -0.668203 -0.620594 -vn -0.410291 0.668203 -0.620594 -vn -0.281320 -0.668203 -0.688711 -vn -0.281320 0.668203 -0.688711 -vn -0.141545 -0.668203 -0.730369 -vn -0.141545 0.668203 -0.730369 -vn 0.003632 -0.668203 -0.743950 -vn 0.003632 0.668203 -0.743950 -vn 0.148686 -0.668203 -0.728935 -vn 0.148686 0.668203 -0.728935 -vn 0.288064 -0.668203 -0.685934 -vn 0.288034 0.668203 -0.685934 -vn 0.416333 -0.668203 -0.616535 -vn 0.416333 0.668203 -0.616565 -vn 0.528611 0.668203 -0.523484 -vn 0.528611 -0.668203 -0.523484 -vn 0.288064 0.668203 -0.685934 -vn -0.411481 0.666372 -0.621754 -vn -0.524369 -0.666372 -0.530045 -vn -0.003632 0.668203 0.743950 -vn 0.141545 -0.668203 0.730369 -vn 0.523484 0.668203 0.528611 -vn 0.743950 0.668172 0.003632 -vn 0.730369 -0.668172 -0.141545 -vn -0.663533 0.527360 -0.530625 -vn -0.663106 0.414319 -0.623371 -vn 0.669179 0.414319 -0.616840 -vn 0.668722 0.527360 -0.524094 -vn -0.662770 0.285409 -0.692282 -vn 0.669515 0.285409 -0.685751 -vn -0.662557 0.145482 -0.734733 -vn 0.669698 0.145482 -0.728202 -vn -0.662496 0.000000 -0.749046 -vn 0.669790 0.000000 -0.742515 -vn -0.662557 -0.145482 -0.734733 -vn 0.669698 -0.145482 -0.728202 -vn -0.662770 -0.285409 -0.692282 -vn 0.669515 -0.285409 -0.685751 -vn -0.663106 -0.414350 -0.623371 -vn 0.669179 -0.414350 -0.616840 -vn -0.663564 -0.527360 -0.530625 -vn 0.668722 -0.527360 -0.524094 -vn -0.664113 -0.620106 -0.417585 -vn 0.668142 -0.620106 -0.411084 -vn -0.664724 -0.689016 -0.288644 -vn 0.667531 -0.689016 -0.282113 -vn -0.665426 -0.731468 -0.148747 -vn 0.666860 -0.731468 -0.142216 -vn -0.668172 -0.743950 -0.003265 -vn 0.666128 -0.745781 0.003235 -vn -0.666829 -0.731468 0.142216 -vn 0.665426 -0.731468 0.148747 -vn -0.667531 -0.689016 0.282144 -vn 0.664724 -0.689016 0.288644 -vn -0.666341 -0.621265 0.412275 -vn 0.664113 -0.620106 0.417585 -vn -0.668722 -0.527360 0.524094 -vn 0.661733 -0.528764 0.531480 -vn -0.669179 -0.414350 0.616840 -vn 0.663106 -0.414350 0.623371 -vn -0.669515 -0.285409 0.685751 -vn 0.662770 -0.285409 0.692282 -vn -0.669729 -0.145482 0.728202 -vn 0.662557 -0.145482 0.734733 -vn -0.669790 0.000000 0.742515 -vn 0.662465 0.000000 0.749046 -vn -0.669729 0.145482 0.728202 -vn 0.662557 0.145482 0.734733 -vn -0.669515 0.285409 0.685751 -vn 0.662770 0.285379 0.692282 -vn -0.669179 0.414350 0.616840 -vn 0.663106 0.414350 0.623371 -vn -0.668722 0.527360 0.524094 -vn 0.663564 0.527360 0.530625 -vn -0.668172 0.620106 0.411084 -vn 0.664113 0.620106 0.417615 -vn -0.667531 0.689016 0.282144 -vn 0.664724 0.689016 0.288675 -vn -0.666829 0.731468 0.142216 -vn 0.665426 0.731468 0.148747 -vn -0.668172 0.743950 -0.003265 -vn 0.666128 0.745781 0.003235 -vn -0.665426 0.731468 -0.148747 -vn 0.666829 0.731468 -0.142216 -vn -0.664724 0.689016 -0.288644 -vn 0.667531 0.689016 -0.282113 -vn -0.664113 0.620106 -0.417585 -vn 0.668142 0.620106 -0.411054 +vn -0.999999 0.000005 -0.001640 +vn 0.999999 0.000113 0.001714 +vn -0.999999 -0.000078 -0.001675 +vn 0.999999 -0.000075 0.001634 +vn -0.999999 -0.000059 -0.001670 +vn 0.999999 0.000059 0.001670 +vn -0.999999 0.000094 -0.001651 +vn 0.999999 -0.000090 0.001651 +vn -0.999999 -0.000094 -0.001651 +vn 0.999999 0.000090 0.001651 +vn -0.999999 0.000059 -0.001670 +vn 0.999999 -0.000059 0.001670 +vn -0.999999 0.000078 -0.001675 +vn 0.999999 0.000075 0.001634 +vn -0.999999 -0.000005 -0.001640 +vn 0.999999 -0.000113 0.001714 +vn -0.999999 -0.000024 -0.001628 +vn 0.999999 0.000027 0.001625 +vn -0.999999 0.000000 -0.001651 +vn 0.999999 -0.000000 0.001651 +vn -0.999999 -0.000013 -0.001631 +vn 0.999999 0.000013 0.001631 +vn -0.999999 -0.000000 -0.001672 +vn 0.999999 0.000000 0.001672 +vn -0.999999 -0.000020 -0.001735 +vn 0.999999 -0.000013 0.001631 +vn -0.999999 0.000030 -0.001658 +vn 0.999998 0.000064 0.001749 +vn -0.999999 0.000049 -0.001640 +vn 0.999999 -0.000052 0.001638 +vn -0.999999 0.000025 -0.001655 +vn 0.999999 -0.000021 0.001658 +vn -0.999999 -0.000063 -0.001693 +vn 0.999999 0.000058 0.001692 +vn -0.999999 0.000104 -0.001649 +vn 0.999999 -0.000100 0.001650 +vn -0.999999 -0.000069 -0.001671 +vn 0.999999 0.000069 0.001672 +vn -0.999999 0.000069 -0.001671 +vn 0.999999 -0.000069 0.001672 +vn -0.999999 -0.000104 -0.001649 +vn 0.999999 0.000100 0.001650 +vn -0.999999 0.000063 -0.001693 +vn 0.999999 -0.000058 0.001692 +vn -0.999999 -0.000025 -0.001655 +vn 0.999999 0.000021 0.001658 +vn -0.999999 -0.000049 -0.001640 +vn 0.999999 0.000052 0.001638 +vn -0.999999 -0.000030 -0.001658 +vn 0.999999 -0.000064 0.001749 +vn -0.999998 0.000020 -0.001735 +vn -0.999999 0.000013 -0.001631 +vn -0.999999 0.000024 -0.001628 +vn 0.999999 -0.000027 0.001625 +vn -0.999999 -0.000000 -0.001662 +vn 0.999999 0.000000 0.001662 +vn 0.006663 0.886695 -0.462308 +vn 0.006662 0.886770 -0.462164 +vn 0.004632 0.946950 -0.321349 +vn 0.004633 0.946916 -0.321448 +vn 0.002728 0.981916 -0.189298 +vn 0.002728 0.981927 -0.189239 +vn 0.000899 0.998052 -0.062376 +vn 0.000899 0.998051 -0.062395 +vn -0.000899 0.998051 0.062395 +vn -0.000899 0.998052 0.062376 +vn -0.002728 0.981927 0.189239 +vn -0.002728 0.981916 0.189297 +vn -0.004634 0.946916 0.321448 +vn -0.004634 0.946916 0.321449 +vn -0.006662 0.886769 0.462164 +vn -0.006662 0.886770 0.462164 +vn -0.008821 0.790800 0.612011 +vn -0.008820 0.790943 0.611827 +vn -0.011027 0.644028 0.764923 +vn -0.011027 0.643783 0.765128 +vn -0.013007 0.430884 0.902314 +vn -0.013007 0.430884 0.902313 +vn -0.014241 0.153104 0.988107 +vn -0.014243 0.153571 0.988035 +vn -0.014244 -0.153150 0.988100 +vn -0.014240 -0.153617 0.988028 +vn -0.013008 -0.430773 0.902366 +vn -0.011023 -0.644161 0.764811 +vn -0.011028 -0.643916 0.765016 +vn -0.008825 -0.790688 0.612156 +vn -0.008820 -0.790831 0.611971 +vn -0.006662 -0.886770 0.462164 +vn -0.004634 -0.946916 0.321448 +vn -0.004634 -0.946916 0.321449 +vn -0.002725 -0.981961 0.189061 +vn -0.002726 -0.981950 0.189119 +vn -0.000902 -0.998039 0.062581 +vn -0.000902 -0.998041 0.062562 +vn 0.000902 -0.998041 -0.062562 +vn 0.000902 -0.998039 -0.062581 +vn 0.002726 -0.981950 -0.189120 +vn 0.002725 -0.981961 -0.189061 +vn 0.004631 -0.946950 -0.321349 +vn 0.004634 -0.946916 -0.321449 +vn 0.006664 -0.886694 -0.462308 +vn 0.006661 -0.886769 -0.462164 +vn 0.008822 -0.790831 -0.611970 +vn 0.008822 -0.790831 -0.611971 +vn 0.011028 -0.643915 -0.765018 +vn 0.011028 -0.643916 -0.765017 +vn 0.013008 -0.430776 -0.902365 +vn 0.013008 -0.430775 -0.902365 +vn 0.014240 -0.153614 -0.988028 +vn 0.014244 -0.153147 -0.988101 +vn 0.014243 0.153568 -0.988035 +vn 0.014241 0.153102 -0.988108 +vn 0.013007 0.430887 -0.902312 +vn 0.013007 0.430886 -0.902312 +vn 0.011030 0.643781 -0.765130 +vn 0.011030 0.643782 -0.765129 +vn 0.008820 0.790944 -0.611825 +vn 0.008820 0.790943 -0.611826 +vn 0.963950 -0.000000 -0.266084 +vn 0.984283 -0.000000 -0.176596 +vn 0.994917 -0.000000 -0.100701 +vn 0.999495 -0.000000 -0.031779 +vn 0.999384 0.000000 0.035094 +vn 0.994545 0.000000 0.104309 +vn 0.983549 0.000000 0.180642 +vn 0.962562 0.000000 0.271061 +vn 0.922616 0.000000 0.385721 +vn 0.841104 0.000000 0.540874 +vn 0.659480 0.000000 0.751722 +vn 0.265676 0.000000 0.964062 +vn -0.291181 0.000000 0.956668 +vn -0.672657 0.000000 0.739954 +vn -0.846824 0.000000 0.531873 +vn -0.846782 0.000001 0.531940 +vn -0.925316 0.000001 0.379197 +vn -0.925343 0.000000 0.379131 +vn -0.963964 0.000000 0.266033 +vn -0.984283 0.000000 0.176596 +vn -0.994917 0.000000 0.100703 +vn -0.999495 0.000000 0.031779 +vn -0.999384 -0.000000 -0.035095 +vn -0.994543 -0.000000 -0.104326 +vn -0.994545 0.000000 -0.104309 +vn -0.983549 0.000001 -0.180640 +vn -0.983544 -0.000000 -0.180671 +vn -0.962579 -0.000000 -0.271002 +vn -0.922622 -0.000000 -0.385705 +vn -0.841102 -0.000000 -0.540876 +vn -0.659481 -0.000000 -0.751721 +vn -0.265675 -0.000000 -0.964063 +vn 0.291182 -0.000000 -0.956668 +vn 0.291577 -0.000003 -0.956547 +vn 0.672715 -0.000002 -0.739902 +vn 0.672466 0.000001 -0.740128 +vn 0.846782 0.000001 -0.531939 +vn 0.846900 -0.000002 -0.531752 +vn 0.925349 -0.000001 -0.379117 +vn 0.925317 -0.000000 -0.379195 +vn 0.925343 -0.000000 -0.379131 +vn 0.925316 0.000001 -0.379197 +vn 0.846824 -0.000000 -0.531873 +vn 0.846782 0.000001 -0.531940 +vn 0.672657 -0.000000 -0.739954 +vn 0.291181 -0.000000 -0.956668 +vn -0.265676 -0.000000 -0.964062 +vn -0.659480 -0.000000 -0.751722 +vn -0.841104 -0.000000 -0.540874 +vn -0.922616 -0.000000 -0.385721 +vn -0.962565 -0.000000 -0.271052 +vn -0.962562 -0.000000 -0.271061 +vn -0.983549 -0.000000 -0.180642 +vn -0.999384 -0.000000 -0.035094 +vn -0.994917 0.000000 0.100702 +vn -0.994917 0.000000 0.100701 +vn -0.963950 0.000000 0.266084 +vn -0.925349 -0.000001 0.379117 +vn -0.925317 0.000000 0.379195 +vn -0.846823 0.000000 0.531874 +vn -0.846900 -0.000002 0.531752 +vn -0.672466 0.000000 0.740128 +vn -0.291577 0.000000 0.956547 +vn 0.265675 0.000000 0.964063 +vn 0.659481 0.000000 0.751721 +vn 0.841102 0.000000 0.540876 +vn 0.922622 0.000000 0.385705 +vn 0.962579 0.000000 0.271002 +vn 0.983544 0.000000 0.180671 +vn 0.999384 0.000000 0.035095 +vn 0.994916 -0.000000 -0.100703 +vn 0.963964 -0.000000 -0.266033 usemtl grey_naogoalnet.png -s 1 -f 68/1/1 126/2/2 125/3/3 -f 206/4/4 205/5/4 204/6/4 -f 207/7/5 209/8/6 208/9/5 -f 216/10/4 215/11/4 214/12/4 -f 226/13/6 228/14/6 227/15/6 -f 213/16/7 212/17/7 210/18/7 -f 213/19/7 210/20/7 211/21/7 -f 202/22/8 207/23/5 208/24/5 -f 202/25/8 208/26/5 203/27/8 +s off +f 68//1 126//1 125//1 +f 206//2 205//2 204//2 +f 207//3 209//3 208//3 +f 216//2 215//2 214//2 +f 226//3 228//3 227//3 +f 213//4 212//4 210//4 +f 213//4 210//4 211//4 +f 202//5 207//5 208//5 +f 202//5 208//5 203//5 usemtl yellow -f 65/28/1 1/29/9 2/30/10 -f 66/31/11 34/32/12 33/33/13 -f 65/34/1 2/35/10 3/36/14 -f 66/37/11 35/38/15 34/39/12 -f 65/40/1 3/41/14 4/42/16 -f 66/43/11 36/44/17 35/45/15 -f 65/46/1 4/47/16 5/48/18 -f 66/49/11 37/50/19 36/51/17 -f 65/52/1 5/53/18 6/54/20 -f 66/55/11 38/56/21 37/57/19 -f 65/58/1 6/59/20 7/60/2 -f 66/61/11 39/62/22 38/63/21 -f 65/64/1 7/65/2 8/66/3 -f 66/67/11 40/68/23 39/69/22 -f 65/70/1 8/71/3 9/72/24 -f 66/73/11 41/74/25 40/75/23 -f 65/76/1 9/77/24 10/78/26 -f 66/79/11 42/80/27 41/81/25 -f 65/82/1 10/83/26 11/84/28 -f 66/85/11 43/86/29 42/87/27 -f 65/88/1 11/89/28 12/90/30 -f 66/91/11 44/92/31 43/93/29 -f 65/94/1 12/95/30 13/96/32 -f 66/97/11 45/98/33 44/99/31 -f 65/100/1 13/101/32 14/102/34 -f 66/103/11 46/104/35 45/105/33 -f 65/106/1 14/107/34 15/108/36 -f 66/109/11 47/110/37 46/111/35 -f 65/112/1 15/113/36 16/114/38 -f 66/115/11 48/116/39 47/117/37 -f 65/118/1 16/119/38 17/120/40 -f 66/121/11 49/122/41 48/123/39 -f 65/124/1 17/125/40 18/126/42 -f 66/127/11 50/128/43 49/129/41 -f 65/130/1 18/131/42 19/132/44 -f 66/133/11 51/134/45 50/135/43 -f 65/136/1 19/137/44 20/138/46 -f 66/139/11 52/140/47 51/141/45 -f 65/142/1 20/143/46 21/144/48 -f 66/145/11 53/146/49 52/147/47 -f 65/148/1 21/149/48 22/150/50 -f 66/151/11 54/152/51 53/153/49 -f 65/154/1 22/155/50 23/156/52 -f 66/157/11 55/158/53 54/159/51 -f 65/160/1 23/161/52 24/162/54 -f 66/163/11 56/164/55 55/165/53 -f 65/166/1 24/167/54 25/168/56 -f 66/169/11 57/170/57 56/171/55 -f 65/172/1 25/173/56 26/174/58 -f 66/175/11 58/176/59 57/177/57 -f 65/178/1 26/179/58 27/180/60 -f 66/181/11 59/182/61 58/183/59 -f 65/184/1 27/185/60 28/186/62 -f 66/187/11 60/188/63 59/189/61 -f 65/190/1 28/191/62 29/192/64 -f 66/193/11 61/194/65 60/195/63 -f 65/196/1 29/197/64 30/198/66 -f 66/199/11 62/200/67 61/201/65 -f 65/202/1 30/203/66 31/204/68 -f 66/205/11 63/206/69 62/207/67 -f 65/208/1 31/209/68 32/210/70 -f 66/211/11 64/212/71 63/213/69 -f 32/214/70 1/215/9 65/216/1 -f 66/217/11 33/218/13 64/219/71 -f 67/220/11 100/221/72 69/222/71 -f 68/223/1 101/224/70 132/225/73 -f 67/226/11 69/227/71 70/228/74 -f 68/229/1 102/230/68 101/231/70 -f 67/232/11 70/233/74 71/234/67 -f 68/235/1 103/236/66 102/237/68 -f 67/238/11 71/239/67 72/240/65 -f 68/241/1 104/242/64 103/243/66 -f 67/244/11 72/245/65 73/246/63 -f 68/... [truncated message content] |
From: <he...@us...> - 2010-01-01 22:01:12
|
Revision: 132 http://simspark.svn.sourceforge.net/simspark/?rev=132&view=rev Author: hedayat Date: 2010-01-01 22:01:05 +0000 (Fri, 01 Jan 2010) Log Message: ----------- Fixed 32bit-64bit compatibility issue. Message length is always transmitted in 4bytes. Some code cleanup Put ~/.simspark as the first resource location to be searched Add ProxyServer classes (to be used as a syncronization proxy between agents and server) Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/oxygen/simulationserver/netmessage.cpp trunk/spark/lib/oxygen/simulationserver/simcontrolnode.h trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp trunk/spark/lib/zeitgeist/zeitgeist.cpp Added Paths: ----------- trunk/spark/lib/oxygen/proxyserver/ trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp trunk/spark/lib/oxygen/proxyserver/agentproxy.h trunk/spark/lib/oxygen/proxyserver/agentproxy_c.cpp trunk/spark/lib/oxygen/proxyserver/proxyserver.cpp trunk/spark/lib/oxygen/proxyserver/proxyserver.h trunk/spark/lib/oxygen/proxyserver/proxyserver_c.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/ChangeLog 2010-01-01 22:01:05 UTC (rev 132) @@ -1,3 +1,27 @@ +2010-01-01 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/proxyserver/proxyserver.h: + * lib/oxygen/proxyserver/proxyserver.cpp: + * lib/oxygen/proxyserver/proxyserver_c.cpp: + * lib/oxygen/proxyserver/agentproxy.h: + * lib/oxygen/proxyserver/agentproxy.cpp: + * lib/oxygen/proxyserver/agentproxy_c.cpp: + - starting the proxy server implementation + +2009-12-31 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/netmessage.cpp: + - payload length is now always 32bit on all platforms, to make the + protocol platform independent (fixed 32bit/64bit compatibility issue) + + * lib/zeitgeist/fileserver/fileserver.cpp: + * lib/zeitgeist/zeitgeist.cpp (Zeitgeist::RunInitScript): + - add ~/.simspark as the first resource location, so that it is the first + address examined after the current directory + + * lib/oxygen/simulationserver/simcontrolnode.h: + - remove unused mCond member variable + 2009-12-29 Hedayat Vatankhah <he...@gr...> * lib/zeitgeist/zeitgeist.cpp (Zeitgeist::RunInitScript): Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2010-01-01 22:01:05 UTC (rev 132) @@ -71,6 +71,8 @@ monitorserver/monitoritem.h monitorserver/custommonitor.h monitorserver/monitorcmdparser.h + proxyserver/agentproxy.h + proxyserver/proxyserver.h ) if(SPADES_FOUND) set(oxygen_LIB_HDRS @@ -204,6 +206,10 @@ monitorserver/custommonitor_c.cpp monitorserver/monitorcmdparser.cpp monitorserver/monitorcmdparser_c.cpp + proxyserver/agentproxy.cpp + proxyserver/agentproxy_c.cpp + proxyserver/proxyserver.cpp + proxyserver/proxyserver_c.cpp ) if(SPADES_FOUND) set(oxygen_LIB_SRCS Added: trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,189 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "agentproxy.h" +#include <rcssnet/exception.hpp> +#include <zeitgeist/logserver/logserver.h> +#include <oxygen/simulationserver/netcontrol.h> + +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + +using namespace oxygen; +using namespace zeitgeist; +using namespace std; +using namespace rcss::net; +using boost::shared_ptr; + +AgentProxy::AgentProxy(int cycleMillisecs) : Node(), + mCycleMillisecs(cycleMillisecs), mFinished(false), + mAgentBuffer(new NetBuffer) +{ +} + +AgentProxy::~AgentProxy() +{ +} + +void AgentProxy::Start(boost::shared_ptr<rcss::net::Socket> agentSocket, + rcss::net::Addr serverAddress) +{ + try + { + mAgentSocket = agentSocket; + mServerSocket = NetControl::CreateSocket(NetControl::ST_TCP); + if (!mServerSocket) + { + mFinished = true; + return; + } + GetLog()->Normal() << "(AgentProxy) '" << GetName() << "'connecting to " + << serverAddress << "\n"; + mServerSocket->connect(serverAddress); + if (mServerSocket->isConnected()) + { + cout << "(AgentProxy) '" << GetName() << "' connected successfully" + << endl; + } + + // assure that a NetMessage object is registered + mNetMessage = FindChildSupportingClass<NetMessage>(); + if (mNetMessage.get() == 0) + { + mNetMessage = shared_ptr<NetMessage>(new NetMessage()); + } + + mAgentConnectionThread = boost::thread( + &AgentProxy::AgentConnectionHandler, this); + mServerConnectionThread = boost::thread( + &AgentProxy::ServerConnectionHandler, this); + return; + } + catch (BindErr error) + { + GetLog()->Error() << "(AgentProxy) '" << GetName() + << "' failed to bind socket with '" << error.what() << "'" + << endl; + } + catch (ConnectErr error) + { + GetLog()->Error() << "(AgentProxy) '" << GetName() + << "' connection failed with: '" << error.what() << "'" << endl; + } + + // executed on error + mServerSocket->close(); + mFinished = true; +} + +void AgentProxy::Stop() +{ + mFinished = true; + mServerConnectionThread.join(); +} + +void AgentProxy::ServerConnectionHandler() +{ + string syncMsg("(sync)"); + string servermsg, agentmsg; + boost::system_time cycleFinishTime = boost::get_system_time() + + boost::posix_time::milliseconds(mCycleMillisecs); + shared_ptr<NetBuffer> netbuf(new NetBuffer); + TRawBuffer recvbuf; + + mNetMessage->PrepareToSend(syncMsg); + while (!mFinished) + { + try + { + servermsg.clear(); + boost::thread::sleep(cycleFinishTime); + + boost::mutex::scoped_lock agentBufLock(mAgentBufferMutex); + while (!mAgentBuffer->IsEmpty() && + mNetMessage->Extract(mAgentBuffer, agentmsg)) + { + mServerSocket->send(agentmsg.data(), agentmsg.size()); + } + agentBufLock.unlock(); + + mServerSocket->send(syncMsg.data(), syncMsg.size()); + do + { + int retval = mServerSocket->recv(mCycleMillisecs, + recvbuf.data(), recvbuf.size()); + if (retval > 0) + netbuf->AddFragment(string(recvbuf.data(), recvbuf.size())); + else if (retval < 0 && errno == EAGAIN) + break; + else + { + GetLog()->Error() + << "(AgentProxy) ERROR: '" << GetName() + << "' recv returned error on a client socket '" + << strerror(errno) << "' " << endl; + mFinished = true; + break; + } + } while (!mNetMessage->Extract(netbuf, servermsg)); + + if (!servermsg.empty()) + { + mNetMessage->PrepareToSend(servermsg); + mAgentSocket->send(servermsg.data(), servermsg.size(), + MSG_DONTWAIT, Socket::DONT_CHECK); + + cycleFinishTime = boost::get_system_time() + + boost::posix_time::milliseconds(mCycleMillisecs); + } + } + catch (boost::thread_interrupted e) + { + } + } + mServerSocket->close(); + mFinished = true; + mAgentConnectionThread.join(); +} + +void AgentProxy::AgentConnectionHandler() +{ + TRawBuffer recvbuf; + + while (!mFinished) + { + int retval = mAgentSocket->recv(mCycleMillisecs * 4, + recvbuf.data(), recvbuf.size()); + if (retval > 0) + { + boost::mutex::scoped_lock agentBufLock(mAgentBufferMutex); + mAgentBuffer->AddFragment(string(recvbuf.data(), recvbuf.size())); + } + else if (retval <= 0 && errno != EAGAIN) + { + GetLog()->Error() << "(AgentProxy) ERROR: '" << GetName() + << "' recv returned error on a client socket '" + << strerror(errno) << "' " << endl; + mFinished = true; + } + } +} Property changes on: trunk/spark/lib/oxygen/proxyserver/agentproxy.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Added: trunk/spark/lib/oxygen/proxyserver/agentproxy.h =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy.h (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy.h 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,85 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_AGENTPROXY_H +#define OXYGEN_AGENTPROXY_H + +#include <boost/array.hpp> +#include <boost/thread/thread.hpp> +#include <boost/thread/mutex.hpp> +#include <oxygen/oxygen_defines.h> +#include <zeitgeist/class.h> +#include <zeitgeist/node.h> +#include <rcssnet/addr.hpp> +#include <rcssnet/socket.hpp> +#include <oxygen/simulationserver/netbuffer.h> +#include <oxygen/simulationserver/netmessage.h> + +namespace oxygen +{ + +/** \class AgentProxy TODO: add description + */ +class OXYGEN_API AgentProxy: public zeitgeist::Node +{ +private: + typedef boost::array<char, 32 * 1024> TRawBuffer; + +public: + AgentProxy(int cycleMillisecs = 0); + virtual ~AgentProxy(); + + /** starts the proxy for a single agent */ + void Start(boost::shared_ptr<rcss::net::Socket> agentSocket, + rcss::net::Addr serverAddress); + + /** does the agent connection terminated so not */ + bool IsFinished() { return mFinished; } + + /** stops the current running proxy (if running!) */ + void Stop(); + +private: + /** manages server connection */ + void ServerConnectionHandler(); + + /** manages agent connection */ + void AgentConnectionHandler(); + +private: + const int mCycleMillisecs; + + /** shows if the proxy execution is finished */ + bool mFinished; + boost::shared_ptr<NetMessage> mNetMessage; + boost::shared_ptr<rcss::net::Socket> mServerSocket; + boost::shared_ptr<rcss::net::Socket> mAgentSocket; + boost::shared_ptr<NetBuffer> mAgentBuffer; + boost::thread mServerConnectionThread; + boost::thread mAgentConnectionThread; + boost::mutex mAgentBufferMutex; +}; + +DECLARE_CLASS(AgentProxy); + +} // namespace oxygen + +#endif // OXYGEN_AGENTPROXY_H Property changes on: trunk/spark/lib/oxygen/proxyserver/agentproxy.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Added: trunk/spark/lib/oxygen/proxyserver/agentproxy_c.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/agentproxy_c.cpp (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/agentproxy_c.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,30 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "agentproxy.h" + +using namespace oxygen; +using namespace std; + +void CLASS(AgentProxy)::DefineClass() +{ + DEFINE_BASECLASS(zeitgeist/Node); +} Property changes on: trunk/spark/lib/oxygen/proxyserver/agentproxy_c.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Added: trunk/spark/lib/oxygen/proxyserver/proxyserver.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/proxyserver.cpp (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/proxyserver.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,146 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "proxyserver.h" +#include <zeitgeist/logserver/logserver.h> +#include <oxygen/simulationserver/netcontrol.h> +#include <rcssnet/exception.hpp> +#include "agentproxy.h" + +using namespace oxygen; +using namespace zeitgeist; +using namespace std; +using namespace rcss::net; + +ProxyServer::ProxyServer() : Leaf(), + mRunning(false), + mCycleMillisecs(0), + mLocalAddr(0, Addr::ANY), + mServerAddr(0, Addr::ANY), + mSocket(NetControl::CreateSocket(NetControl::ST_TCP)) +{ +} + +ProxyServer::~ProxyServer() +{ +} + +void ProxyServer::SetProxyPort(Addr::PortType port) +{ + mLocalAddr.setPort(port); +} + +Addr::PortType ProxyServer::GetProxyPort() const +{ + return mLocalAddr.getPort(); +} + +void ProxyServer::SetServerAddress(const rcss::net::Addr &serverAddress) +{ + mServerAddr = serverAddress; +} + +void ProxyServer::SetCycleLength(int millisecs) +{ + mCycleMillisecs = millisecs; +} + +bool ProxyServer::Run() +{ + bool success = false; + + if (mLocalAddr.getPort() == 0) + { + GetLog()->Error() + << "(ProxyServer) ERROR: local port has no been set in '" + << GetClass()->GetName() << "'\n"; + return false; + } + if (mServerAddr.getPort() == 0) + { + GetLog()->Error() + << "(ProxyServer) ERROR: server address has no been set in '" + << GetClass()->GetName() << "'\n"; + return false; + } + if (!mSocket) + { + GetLog()->Error() + << "(ProxyServer) ERROR: No valid socket has been created.\n"; + return false; + } + if (mCycleMillisecs == 0) + { + GetLog()->Error() + << "(ProxyServer) ERROR: Cycle length not set.\n"; + return false; + } + + int ret = mSocket->setReuseAddr(true); + if (ret < 0) + { + GetLog()->Warning() + << "(ProxyServer) failed to enable reuse of server socket " + << "with '" << strerror(errno) << "'\n"; + } + + try + { + mSocket->bind(mLocalAddr); + mSocket->listen(50); + mRunning = true; + + do + { + Addr addr; + boost::shared_ptr<Socket> socket(mSocket->accept(addr)); + if (socket) + { + GetLog()->Normal() << "(ProxyServer) accepted a new connection" + << " from " << socket->getPeer() << '\n'; + + AgentProxy *agentProxy = new AgentProxy(mCycleMillisecs); + agentProxy->Start(socket, mServerAddr); + mClientProxyList.push_back(agentProxy); + } + } while (mRunning); + success = true; + } + catch (BindErr error) + { + GetLog()->Error() << "(ProxyServer) failed to bind socket with '" + << error.what() << "'" << endl; + } + catch (ListenErr error) + { + GetLog()->Error() << "(ProxyServer) failed to listen on socket with '" + << error.what() << "'" << endl; + } + catch (AcceptErr error) + { + GetLog()->Error() << "(ProxyServer) '" << GetName() + << "' failed to accept TCP connection with '" << error.what() + << endl; + } + + mSocket->close(); + return success; +} Property changes on: trunk/spark/lib/oxygen/proxyserver/proxyserver.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Added: trunk/spark/lib/oxygen/proxyserver/proxyserver.h =================================================================== --- trunk/spark/lib/oxygen/proxyserver/proxyserver.h (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/proxyserver.h 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,81 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_PROXYSERVER_H +#define OXYGEN_PROXYSERVER_H + +#include <boost/ptr_container/ptr_list.hpp> +#include <oxygen/oxygen_defines.h> +#include <zeitgeist/class.h> +#include <zeitgeist/leaf.h> +#include <rcssnet/addr.hpp> +#include <rcssnet/socket.hpp> + +namespace oxygen +{ + +class AgentProxy; + +/** \class ProxyServer TODO: Add description + */ +class OXYGEN_API ProxyServer: public zeitgeist::Leaf +{ +public: + ProxyServer(); + virtual ~ProxyServer(); + + /** sets the local port, on which connections are accepted */ + void SetProxyPort(rcss::net::Addr::PortType port); + + /** returns the local port, on which connections are accepted */ + rcss::net::Addr::PortType GetProxyPort() const; + + /** sets the server address to connect to */ + void SetServerAddress(const rcss::net::Addr &serverAddress); + + /** sets the length of a cycle in milli seconds */ + void SetCycleLength(int millisecs); + + /** starts the run loop of the proxy server, wait for incomming connection + * requests */ + bool Run(); + +private: + bool mRunning; + int mCycleMillisecs; + + /** the local port, on which connections are accepted */ + rcss::net::Addr mLocalAddr; + + /** the server address to which we should connect */ + rcss::net::Addr mServerAddr; + + /** the socket used to accept connections */ + boost::shared_ptr<rcss::net::Socket> mSocket; + + boost::ptr_list<AgentProxy> mClientProxyList; +}; + +DECLARE_CLASS(ProxyServer); + +} // namespace oxygen + +#endif // OXYGEN_PROXYSERVER_H Property changes on: trunk/spark/lib/oxygen/proxyserver/proxyserver.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Added: trunk/spark/lib/oxygen/proxyserver/proxyserver_c.cpp =================================================================== --- trunk/spark/lib/oxygen/proxyserver/proxyserver_c.cpp (rev 0) +++ trunk/spark/lib/oxygen/proxyserver/proxyserver_c.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -0,0 +1,47 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Thu Dec 31 2009 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2004-2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "proxyserver.h" + +using namespace oxygen; +using namespace std; + +FUNCTION(ProxyServer, setCycleLength) +{ + unsigned int inMillisecs; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in.begin(), inMillisecs)) + ) + { + return false; + } + + obj->SetCycleLength(inMillisecs); + return true; +} + +void CLASS(ProxyServer)::DefineClass() +{ + DEFINE_BASECLASS(zeitgeist/Leaf); + DEFINE_FUNCTION(setCycleLength); +} Property changes on: trunk/spark/lib/oxygen/proxyserver/proxyserver_c.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Modified: trunk/spark/lib/oxygen/simulationserver/netmessage.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netmessage.cpp 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/lib/oxygen/simulationserver/netmessage.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -19,6 +19,7 @@ */ #include "netmessage.h" #include "netbuffer.h" +#include <boost/cstdint.hpp> #include <rcssnet/socket.hpp> #ifndef WIN32 @@ -44,8 +45,8 @@ void NetMessage::PrepareToSend(std::string& msg) { // prefix the message with it's payload length - unsigned int len = htonl(static_cast<u_long>(msg.size())); - string prefix((const char*)&len,sizeof(unsigned int)); + boost::uint32_t len = htonl(static_cast<u_long>(msg.size())); + string prefix((const char*) &len, sizeof(len)); msg = prefix + msg; } @@ -57,7 +58,7 @@ } // a message is prefixed with it's payload length - const unsigned int preSz = sizeof(unsigned int); + const unsigned int preSz = sizeof(boost::uint32_t); string& data = buffer->GetData(); @@ -66,7 +67,8 @@ return false; } - unsigned int msgLen = ntohl((*(unsigned int*)data.data())); + unsigned int msgLen = + ntohl((*reinterpret_cast<const boost::uint32_t*>(data.data()))); if (data.size() < (msgLen + preSz)) { Modified: trunk/spark/lib/oxygen/simulationserver/simcontrolnode.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simcontrolnode.h 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/lib/oxygen/simulationserver/simcontrolnode.h 2010-01-01 22:01:05 UTC (rev 132) @@ -84,8 +84,6 @@ float mTime; float mStep; - - boost::condition mCond; }; DECLARE_CLASS(SimControlNode); Modified: trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -31,7 +31,6 @@ FileServer::FileServer() : Node(), mNextHandle(1) { - mResourceLocations.push_back(salt::RFile::BundlePath()); } FileServer::~FileServer() Modified: trunk/spark/lib/zeitgeist/zeitgeist.cpp =================================================================== --- trunk/spark/lib/zeitgeist/zeitgeist.cpp 2009-12-29 19:52:44 UTC (rev 131) +++ trunk/spark/lib/zeitgeist/zeitgeist.cpp 2010-01-01 22:01:05 UTC (rev 132) @@ -21,6 +21,8 @@ #include "zeitgeist.h" #include <iostream> #include <sstream> +#include <salt/fileclasses.h> +#include "fileserver/fileserver.h" using namespace std; using namespace zeitgeist; @@ -73,6 +75,7 @@ // setup the dot directory in the script server mCore->GetScriptServer()->SetDotName(dotName); mCore->GetScriptServer()->SetupDotDir(); + mCore->GetFileServer()->AddResourceLocation(salt::RFile::BundlePath()); // run the zeitgeist init script mCore->GetScriptServer()->RunInitScript This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-12-29 19:52:53
|
Revision: 131 http://simspark.svn.sourceforge.net/simspark/?rev=131&view=rev Author: hedayat Date: 2009-12-29 19:52:44 +0000 (Tue, 29 Dec 2009) Log Message: ----------- Set SVN properties for new files Modified Paths: -------------- trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp Property Changed: ---------------- trunk/spark/plugin/accelerometer/CMakeLists.txt trunk/spark/plugin/accelerometer/accelerometer.cpp trunk/spark/plugin/accelerometer/accelerometer.h trunk/spark/plugin/accelerometer/accelerometer_c.cpp trunk/spark/plugin/accelerometer/export.cpp trunk/spark/plugin/agentsynceffector/CMakeLists.txt trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp trunk/spark/plugin/agentsynceffector/agentsynceffector.h trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp trunk/spark/plugin/agentsynceffector/export.cpp Property changes on: trunk/spark/plugin/accelerometer/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/accelerometer/accelerometer.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/accelerometer/accelerometer.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/accelerometer/accelerometer_c.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/accelerometer/export.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/agentsynceffector/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Modified: trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp =================================================================== --- trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp 2009-12-29 19:10:45 UTC (rev 130) +++ trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp 2009-12-29 19:52:44 UTC (rev 131) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: forceeffector.cpp 19 2008-12-19 18:12:56Z hedayat $ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Property changes on: trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/agentsynceffector/agentsynceffector.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Property changes on: trunk/spark/plugin/agentsynceffector/export.cpp ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-12-29 19:10:52
|
Revision: 130 http://simspark.svn.sourceforge.net/simspark/?rev=130&view=rev Author: hedayat Date: 2009-12-29 19:10:45 +0000 (Tue, 29 Dec 2009) Log Message: ----------- New field dimensions Added "--server" option to rcssmonitor3d to specify the server to connect to Added AgentSyncEffector to NAO Modified Paths: -------------- trunk/rcssserver3d/ChangeLog trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg trunk/rcssserver3d/rcssmonitor3d/main.cpp trunk/rcssserver3d/simspark/naosoccersim.rb Modified: trunk/rcssserver3d/ChangeLog =================================================================== --- trunk/rcssserver3d/ChangeLog 2009-12-29 19:07:35 UTC (rev 129) +++ trunk/rcssserver3d/ChangeLog 2009-12-29 19:10:45 UTC (rev 130) @@ -1,3 +1,18 @@ +2009-12-29 Hedayat Vatankhah <he...@gr...> + + * data/rsg/agent/nao/nao.rsg: + - added AgentSyncEffector + + * rcssmonitor3d/main.cpp: + - some cleanup + - added a new option to specify the server address: --server + +2009-12-28 Hedayat Vatankhah <he...@gr...> + + * simspark/naosoccersim.rb: + - added new field settings (field height/width, goal width/depth and penalty + area width/length multiplied by 1.5 + 2009-10-31 Hedayat Vatankhah <he...@gr...> * RELEASE: Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-29 19:07:35 UTC (rev 129) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-29 19:10:45 UTC (rev 130) @@ -85,6 +85,8 @@ ; (setStaticSenseAxis false) ; (addNoise false)) + (nd AgentSyncEffector) + );end of AgentAspect Modified: trunk/rcssserver3d/rcssmonitor3d/main.cpp =================================================================== --- trunk/rcssserver3d/rcssmonitor3d/main.cpp 2009-12-29 19:07:35 UTC (rev 129) +++ trunk/rcssserver3d/rcssmonitor3d/main.cpp 2009-12-29 19:10:45 UTC (rev 130) @@ -79,26 +79,51 @@ << "\noptions:\n" << " --help\t print this message.\n" << " --logfile\t logfilename\t plays the log file.\n" + << " --server\t server_addr\t connects to the specified server.\n" << "\n"; } bool MonitorSpark::ProcessCmdLine(int argc, char* argv[]) { - for( int i = 0; i < argc; i++) + for (int i = 0; i < argc; i++) { - if( strcmp( argv[i], "--help" ) == 0 ) + if (strcmp(argv[i], "--help") == 0) { - PrintHelp(); - return false; + PrintHelp(); + return false; } - else if( strcmp( argv[i], "--logfile" ) == 0 && (i+1 == argc) ) + else if (strcmp(argv[i], "--logfile") == 0) { - PrintHelp(); - return false; + if (i + 1 == argc) + { + PrintHelp(); + return false; + } + else + { + string fileStr = string("$logPlayerFile = \"") + argv[i + 1] + + "\""; + GetScriptServer()->Eval("$logPlayerMode = true"); + GetScriptServer()->Eval(fileStr); + } } + else if (strcmp(argv[i], "--server") == 0) + { + if (i + 1 == argc) + { + PrintHelp(); + return false; + } + else + { + string serverIPStr = string("$monitorServer = \"") + + argv[i + 1] + "\""; + GetScriptServer()->Eval(serverIPStr); + } + } } - return true; + return true; } bool MonitorSpark::InitApp(int argc, char** argv) @@ -114,20 +139,8 @@ } // run initialization scripts + GetScriptServer()->Run("rcssmonitor3d.rb"); - if(argc == 3 && strcmp( argv[1], "--logfile" ) == 0) - { - GetScriptServer()->Eval("$logPlayerMode = true"); - - char fileStr[80]; - strcpy(fileStr, "$logPlayerFile = \""); - strcat(fileStr, argv[2]); - strcat(fileStr, "\""); - GetScriptServer()->Eval(fileStr); - } - - GetScriptServer()->Run("rcssmonitor3d.rb"); - // tell the inputControl node the loaction of our camera shared_ptr<InputControl> inputCtr = GetInputControl(); if (inputCtr.get() != 0) Modified: trunk/rcssserver3d/simspark/naosoccersim.rb =================================================================== --- trunk/rcssserver3d/simspark/naosoccersim.rb 2009-12-29 19:07:35 UTC (rev 129) +++ trunk/rcssserver3d/simspark/naosoccersim.rb 2009-12-29 19:10:45 UTC (rev 130) @@ -37,14 +37,14 @@ end # the soccer field dimensions in meters -addSoccerVar('FieldLength', 12.0) -addSoccerVar('FieldWidth', 8.0) +addSoccerVar('FieldLength', 18.0) +addSoccerVar('FieldWidth', 12.0) addSoccerVar('FieldHeight', 40.0) -addSoccerVar('GoalWidth', 1.4) -addSoccerVar('GoalDepth', 0.4) +addSoccerVar('GoalWidth', 2.1) +addSoccerVar('GoalDepth', 0.6) addSoccerVar('GoalHeight', 0.8) -addSoccerVar('PenaltyLength',1.2) -addSoccerVar('PenaltyWidth',2.6) +addSoccerVar('PenaltyLength',1.8) +addSoccerVar('PenaltyWidth',3.9) addSoccerVar('FreeKickDistance', 1.3) addSoccerVar('FreeKickMoveDist', 1.5) addSoccerVar('GoalKickDist', 1.0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-12-29 19:07:44
|
Revision: 129 http://simspark.svn.sourceforge.net/simspark/?rev=129&view=rev Author: hedayat Date: 2009-12-29 19:07:35 +0000 (Tue, 29 Dec 2009) Log Message: ----------- Add ~/.simspark directory to resource search path Added new effector: AgentSyncEffector (syn command) Added Sync Mode to the simulator Added an option to run the server in simulation time mode instead of real time mode Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/RELEASE trunk/spark/lib/oxygen/agentaspect/agentaspect.cpp trunk/spark/lib/oxygen/agentaspect/agentaspect.h trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp trunk/spark/lib/oxygen/simulationserver/agentcontrol.h trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp trunk/spark/lib/oxygen/simulationserver/netcontrol.h trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp trunk/spark/lib/zeitgeist/scriptserver/scriptserver.h trunk/spark/lib/zeitgeist/zeitgeist.cpp trunk/spark/plugin/CMakeLists.txt trunk/spark/spark/spark.rb Added Paths: ----------- trunk/spark/plugin/agentsynceffector/ trunk/spark/plugin/agentsynceffector/CMakeLists.txt trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp trunk/spark/plugin/agentsynceffector/agentsynceffector.h trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp trunk/spark/plugin/agentsynceffector/export.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/ChangeLog 2009-12-29 19:07:35 UTC (rev 129) @@ -1,3 +1,46 @@ +2009-12-29 Hedayat Vatankhah <he...@gr...> + + * lib/zeitgeist/zeitgeist.cpp (Zeitgeist::RunInitScript): + - call SetupDotDir() so that ~/.simspark directory will be searched for + resource files (e.g. scripts) + + * lib/zeitgeist/scriptserver/scriptserver.h: + * lib/zeitgeist/scriptserver/scriptserver.cpp: + - added SetupDotDir() function to create dot dir and add it to resource + search locations + + * lib/oxygen/simulationserver/netcontrol.h: + * lib/oxygen/simulationserver/netcontrol.cpp: + - added the option to block for awhile (1 second) in ReadMessages if no + messages are available + + * spark/spark.rb: + - added new option useRealTime to select between running in real time and + simulation time running modes + - added new option agentSyncMode which can be set to run in sync mode + - loading agentsynceffector module + + * lib/oxygen/simulationserver/agentcontrol.h: + * lib/oxygen/simulationserver/agentcontrol.cpp: + * lib/oxygen/simulationserver/agentcontrol_c.cpp: + - added "Sync mode" in which agentcontrol will block until all connected + agents tell it to proceed + + * plugin/agentsynceffector/CMakeLists.txt: + * plugin/agentsynceffector/export.cpp: + * plugin/agentsynceffector/agentsynceffector.h: + * plugin/agentsynceffector/agentsynceffector.cpp: + * plugin/agentsynceffector/agentsynceffector_c.cpp: + * plugin/CMakeLists.txt: + - a new effector: AgentSyncEffector + + * lib/oxygen/agentaspect/agentaspect.h: + * lib/oxygen/agentaspect/agentaspect.cpp: + - added mIsSynced property to show if the agent is synced with the server + + * RELEASE: + - some new release notes + 2009-10-31 Hedayat Vatankhah <he...@gr...> * lib/oxygen/simulationserver/simulationserver.h: Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/RELEASE 2009-12-29 19:07:35 UTC (rev 129) @@ -11,7 +11,19 @@ sense data of the last cycle. So, any commands which is sent by agents after receiving new sense data will be executed in the next cycle, not the current one. This results in a more deterministic behavior, and agents' - efficiency should not change between remote and local runs considerably. + efficiency should not change between remote and local runs considerably. + - An Accelerometer sensor + - Fixed some rendering bugs (agents not visible through goals) + - A "Sync Mode" operation is introduced. In this mode, the server will not + advance to the next cycle untill all connected agents send a "syn" command + to the server. You can use this mode by setting "agentSyncMode" to true in + simspark.rb (or spark.rb) + - Simulator will run in simulation time mode instead of real time + if "useRealTime" variable is set to false in simspark.rb (or spark.rb) + - To make changes to most of the resource files (e.g. simspark.rb), you can + create a copy in ~/.simspark directory and make desired changes there. The + directory structure of the original files should be preserved (e.g. + rsg/agent/nao/nao.rgs) You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/spark/lib/oxygen/agentaspect/agentaspect.cpp =================================================================== --- trunk/spark/lib/oxygen/agentaspect/agentaspect.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/agentaspect/agentaspect.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -27,7 +27,7 @@ using namespace salt; using namespace std; -AgentAspect::AgentAspect() : Transform() +AgentAspect::AgentAspect() : Transform(), mIsSynced(true) { SetName("agentAspect"); mID = -1; @@ -168,3 +168,8 @@ return added; } + +bool AgentAspect::IsSynced() const +{ + return mIsSynced || mPerceptorCycle < 5; +} Modified: trunk/spark/lib/oxygen/agentaspect/agentaspect.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/agentaspect.h 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/agentaspect/agentaspect.h 2009-12-29 19:07:35 UTC (rev 129) @@ -68,6 +68,12 @@ //! @return the unique ID for the agent aspect inline int ID() const { return mID; } + /** @return if the agent is in sync with the server in Sync mode*/ + bool IsSynced() const; + + /** sets the synchronization status of the agent */ + void SetSynced(bool synced) { mIsSynced = synced; } + protected: typedef std::map<std::string, boost::shared_ptr<Effector> > TEffectorMap; @@ -76,9 +82,12 @@ private: int mID; + /** indicates how many times the QueryPerceptors be called */ unsigned int mPerceptorCycle; + /** show if the agent is in sync with the server (in Sync mode) */ + bool mIsSynced; }; DECLARE_CLASS(AgentAspect); Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -20,6 +20,7 @@ #include "agentcontrol.h" #include "simulationserver.h" #include "netmessage.h" +#include <set> #include <zeitgeist/logserver/logserver.h> #include <oxygen/agentaspect/agentaspect.h> @@ -28,7 +29,7 @@ using namespace boost; using namespace std; -AgentControl::AgentControl() : NetControl() +AgentControl::AgentControl() : NetControl(), mSyncMode(false) { mLocalAddr.setPort(3100); } @@ -77,57 +78,60 @@ void AgentControl::StartCycle() { - NetControl::StartCycle(); + do + { + NetControl::StartCycle(); - if ( - (mGameControlServer.get() == 0) || - (mNetMessage.get() == 0) - ) - { - return; - } + if ( + (mGameControlServer.get() == 0) || + (mNetMessage.get() == 0) + ) + { + return; + } - // pass all received messages on to the GameControlServer - for ( - TBufferMap::iterator iter = mBuffers.begin(); - iter != mBuffers.end(); - ++iter - ) - { - shared_ptr<NetBuffer>& netBuff = (*iter).second; - if ( - (netBuff.get() == 0) || - (netBuff->IsEmpty()) - ) - { - continue; - } + // pass all received messages on to the GameControlServer + for ( + TBufferMap::iterator iter = mBuffers.begin(); + iter != mBuffers.end(); + ++iter + ) + { + shared_ptr<NetBuffer>& netBuff = (*iter).second; + if ( + (netBuff.get() == 0) || + (netBuff->IsEmpty()) + ) + { + continue; + } - // lookup the client entry corresponding for the buffer - // entry - TAddrMap::iterator clientIter = mClients.find(netBuff->GetAddr()); - if (clientIter == mClients.end()) - { - continue; - } - shared_ptr<Client>& client = (*clientIter).second; + // lookup the client entry corresponding for the buffer + // entry + TAddrMap::iterator clientIter = mClients.find(netBuff->GetAddr()); + if (clientIter == mClients.end()) + { + continue; + } + shared_ptr<Client>& client = (*clientIter).second; - // lookup the AgentAspect node correspoding to the client - shared_ptr<AgentAspect> agent = - mGameControlServer->GetAgentAspect(client->id); - if (agent.get() == 0) - { - continue; - } + // lookup the AgentAspect node correspoding to the client + shared_ptr<AgentAspect> agent = + mGameControlServer->GetAgentAspect(client->id); + if (agent.get() == 0) + { + continue; + } - // parse and immediately realize the action - string message; - while (mNetMessage->Extract(netBuff,message)) - { - agent->RealizeActions - (mGameControlServer->Parse(client->id,message)); - } - } + // parse and immediately realize the action + string message; + while (mNetMessage->Extract(netBuff,message)) + { + agent->RealizeActions + (mGameControlServer->Parse(client->id,message)); + } + } + } while (!AgentsAreSynced()); } void AgentControl::SenseAgent() @@ -184,6 +188,10 @@ { continue; } + if (mSyncMode) + { + agent->SetSynced(false); + } shared_ptr<PredicateList> senseList = agent->QueryPerceptors(); mClientSenses[client->id] = parser->Generate(senseList); @@ -195,3 +203,47 @@ mNetMessage->PrepareToSend(mClientSenses[client->id]); } } + +void AgentControl::SetSyncMode(bool syncMode) +{ + mSyncMode = syncMode; + if (mSyncMode) + { + BlockOnReadMessages(true); + GetLog()->Normal() + << "(AgentControl) Running in sync mode.\n"; + } + else + { + BlockOnReadMessages(false); + GetLog()->Normal() + << "(AgentControl) Running in normal mode.\n"; + } +} + +bool AgentControl::AgentsAreSynced() +{ + if (mSyncMode) + { + set<rcss::net::Addr> closedClients(mCloseClients.begin(), + mCloseClients.end()); + + for ( + TAddrMap::const_iterator iter = mClients.begin(); + iter != mClients.end(); + ++iter + ) + { + if (closedClients.find(iter->first) != closedClients.end()) + continue; + + shared_ptr<AgentAspect> agent = + mGameControlServer->GetAgentAspect(iter->second->id); + if (agent && !agent->IsSynced()) + { + return false; + } + } + } + return true; +} Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2009-12-29 19:07:35 UTC (rev 129) @@ -53,14 +53,28 @@ /** generates sense updates for all connected agents */ virtual void EndCycle(); + /** sets the AgentControl's sync mode */ + void SetSyncMode(bool syncMode); + protected: virtual void OnLink(); + /** returns if the agents are synced with the srever */ + bool AgentsAreSynced(); + protected: /** cached reference to the GameControlServer */ CachedPath<GameControlServer> mGameControlServer; + /** stores sense information to be sent to the clients after receiving + * their commands + */ std::vector<std::string> mClientSenses; + + /** indicates if we should wait for the agents to let the simulation + * proceed to the next cycle + */ + bool mSyncMode; }; DECLARE_CLASS(AgentControl); Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol_c.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -22,7 +22,21 @@ using namespace oxygen; using namespace std; +FUNCTION(AgentControl, setSyncMode) +{ + bool inSet; + + if ((in.GetSize() != 1) || (!in.GetValue(in[0], inSet))) + { + return false; + } + + obj->SetSyncMode(inSet); + return true; +} + void CLASS(AgentControl)::DefineClass() { DEFINE_BASECLASS(oxygen/NetControl); + DEFINE_FUNCTION(setSyncMode); } Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -43,6 +43,7 @@ mSocketType = ST_TCP; mLocalAddr = Addr(INADDR_ANY, INADDR_ANY); mClientId = 1; + mReadTimeout = 0; } NetControl::~NetControl() @@ -512,7 +513,7 @@ FD_SET(fd,&readfds); timeval time; - time.tv_sec = 0; + time.tv_sec = mReadTimeout; time.tv_usec = 0; for(;;) @@ -525,6 +526,7 @@ #endif int ret = select(maxFd, &readfds, 0, 0, &time); + time.tv_sec = 0; if (ret == 0) { @@ -596,14 +598,16 @@ } // test for pending fragments + int timeout = mReadTimeout; for(;;) { timeval time; - time.tv_sec = 0; + time.tv_sec = timeout; time.tv_usec = 0; fd_set test_fds = client_fds; int ret = select(maxFd+1, &test_fds, 0, 0, &time); + timeout = 0; if (ret == 0) { @@ -660,3 +664,15 @@ } } } + +void NetControl::BlockOnReadMessages(bool block) +{ + if (block) + { + mReadTimeout = 1; + } + else + { + mReadTimeout = 0; + } +} Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.h 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.h 2009-12-29 19:07:35 UTC (rev 129) @@ -124,6 +124,11 @@ static boost::shared_ptr<rcss::net::Socket> CreateSocket(ESocketType type); + /** if set true, ReadMessages call will not return immediately if there + * is no messages to read and it'll wait a little for incomming messages + */ + void BlockOnReadMessages(bool block); + protected: /** returns a human readable description of the socket type and port*/ @@ -198,6 +203,9 @@ /** the next available unique client id */ int mClientId; + + /** indicates how much ReadMessages should wait for new messages */ + int mReadTimeout; }; DECLARE_CLASS(NetControl); Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -445,6 +445,18 @@ } bool +ScriptServer::SetupDotDir() +{ + string dotDir; + if (GetDotDirName(dotDir) && CreateDotDir(dotDir)) + { + GetFile()->AddResourceLocation(dotDir); + return true; + } + return false; +} + +bool ScriptServer::ConstructInternal() { if (! Leaf::ConstructInternal()) Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.h =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.h 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.h 2009-12-29 19:07:35 UTC (rev 129) @@ -144,6 +144,9 @@ /** returns the context, the ScriptServer operates in */ boost::shared_ptr<CoreContext> GetContext() const; + /** creates dot directory and adds it to resource search paths */ + bool SetupDotDir(); + /** constructs the ZeitgeistObject corresponding to a given leaf */ static GCValue GetZeitgeistObject(boost::shared_ptr<Leaf> leaf); Modified: trunk/spark/lib/zeitgeist/zeitgeist.cpp =================================================================== --- trunk/spark/lib/zeitgeist/zeitgeist.cpp 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/lib/zeitgeist/zeitgeist.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -72,6 +72,7 @@ // setup the dot directory in the script server mCore->GetScriptServer()->SetDotName(dotName); + mCore->GetScriptServer()->SetupDotDir(); // run the zeitgeist init script mCore->GetScriptServer()->RunInitScript Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/plugin/CMakeLists.txt 2009-12-29 19:07:35 UTC (rev 129) @@ -10,6 +10,7 @@ endif (APPLE AND USE_COREFOUNDATION) add_subdirectory(accelerometer) +add_subdirectory(agentsynceffector) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) add_subdirectory(forceeffector) Added: trunk/spark/plugin/agentsynceffector/CMakeLists.txt =================================================================== --- trunk/spark/plugin/agentsynceffector/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/agentsynceffector/CMakeLists.txt 2009-12-29 19:07:35 UTC (rev 129) @@ -0,0 +1,19 @@ + +########### next target ############### + +set(agentsynceffector_LIB_SRCS + export.cpp + agentsynceffector.cpp + agentsynceffector.h + agentsynceffector_c.cpp +) + +add_library(agentsynceffector MODULE ${agentsynceffector_LIB_SRCS}) + +target_link_libraries(agentsynceffector ${spark_libs}) + +if (NOT APPLE) + set_target_properties(agentsynceffector PROPERTIES VERSION 0.0.0 SOVERSION 0) +endif (NOT APPLE) + +install(TARGETS agentsynceffector DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Added: trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp =================================================================== --- trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp (rev 0) +++ trunk/spark/plugin/agentsynceffector/agentsynceffector.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -0,0 +1,87 @@ +/* -*- mode: c++; c-basic-indent: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: forceeffector.cpp 19 2008-12-19 18:12:56Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "agentsynceffector.h" +#include <zeitgeist/logserver/logserver.h> +#include <oxygen/gamecontrolserver/actionobject.h> +#include <oxygen/agentaspect/agentaspect.h> + +using namespace boost; +using namespace oxygen; + +AgentSyncEffector::AgentSyncEffector() : oxygen::Effector() +{ +} + +AgentSyncEffector::~AgentSyncEffector() +{ +} + +bool AgentSyncEffector::Realize(boost::shared_ptr<ActionObject> action) +{ + bool res = Effector::Realize(action); + + if (mAgentAspect) + { + mAgentAspect->SetSynced(true); + } + return res; +} + +shared_ptr<ActionObject> +AgentSyncEffector::GetActionObject(const Predicate& predicate) +{ + if (predicate.name != GetPredicate()) + { + GetLog()->Error() << "ERROR: (AgentSyncEffector) invalid predicate" + << predicate.name << "\n"; + return shared_ptr<ActionObject>(); + } + + return shared_ptr<ActionObject>(new ActionObject(GetPredicate())); +} + +void AgentSyncEffector::OnLink() +{ + mAgentAspect = GetAgentAspect(); + + if (mAgentAspect.get() == 0) + { + GetLog()->Error() + << "ERROR: (AgentSyncEffector) cannot get the AgentAspect object\n"; + return; + } + + mAgentAspect = mAgentAspect->FindParentSupportingClass<AgentAspect>().lock(); + if (mAgentAspect.get() == 0) + { + GetLog()->Error() + << "ERROR: (AgentSyncEffector) cannot get the grand parent AgentAspect" + " object\n"; + return; + } +} + +void AgentSyncEffector::OnUnlink() +{ + mAgentAspect.reset(); +} Added: trunk/spark/plugin/agentsynceffector/agentsynceffector.h =================================================================== --- trunk/spark/plugin/agentsynceffector/agentsynceffector.h (rev 0) +++ trunk/spark/plugin/agentsynceffector/agentsynceffector.h 2009-12-29 19:07:35 UTC (rev 129) @@ -0,0 +1,55 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef AGENTSYNCEFFECTOR_H +#define AGENTSYNCEFFECTOR_H + +#include <oxygen/agentaspect/effector.h> + +class AgentSyncEffector : public oxygen::Effector +{ +public: + AgentSyncEffector(); + virtual ~AgentSyncEffector(); + + /** realize the sync action asap */ + virtual bool Realize(boost::shared_ptr<oxygen::ActionObject> action); + + /** returns the name of the predicate this effector implements. */ + virtual std::string GetPredicate() { return "syn"; } + + /** constructs an Actionobject, describing a predicate */ + virtual boost::shared_ptr<oxygen::ActionObject> + GetActionObject(const oxygen::Predicate& predicate); + + /** setup the reference to the agent aspect node */ + virtual void OnLink(); + + /** remove the reference to the agent aspect node */ + virtual void OnUnlink(); + +private: + boost::shared_ptr<oxygen::AgentAspect> mAgentAspect; +}; + +DECLARE_CLASS(AgentSyncEffector); + +#endif // AGENTSYNCEFFECTOR_H Added: trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp =================================================================== --- trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp (rev 0) +++ trunk/spark/plugin/agentsynceffector/agentsynceffector_c.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -0,0 +1,31 @@ +/* -*- mode: c++; c-basic-indent: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "agentsynceffector.h" + +using namespace boost; +using namespace oxygen; + +void CLASS(AgentSyncEffector)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/Effector); +} Added: trunk/spark/plugin/agentsynceffector/export.cpp =================================================================== --- trunk/spark/plugin/agentsynceffector/export.cpp (rev 0) +++ trunk/spark/plugin/agentsynceffector/export.cpp 2009-12-29 19:07:35 UTC (rev 129) @@ -0,0 +1,28 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "agentsynceffector.h" +#include <zeitgeist/zeitgeist.h> + +ZEITGEIST_EXPORT_BEGIN() + ZEITGEIST_EXPORT(AgentSyncEffector); +ZEITGEIST_EXPORT_END() Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2009-12-25 14:26:51 UTC (rev 128) +++ trunk/spark/spark/spark.rb 2009-12-29 19:07:35 UTC (rev 129) @@ -19,6 +19,9 @@ # the name of the default bundle that contains the default InputSystem $defaultInputSystemBundle = 'inputsdl' +# if simulator should run in real time rather than simulation time +$useRealTime = true + # (OpenGL rendering) # @@ -34,6 +37,7 @@ $agentStep = 0.02 $agentType = 'tcp' $agentPort = 3100 +$agentSyncMode = false # (MonitorControl) constants # @@ -294,6 +298,7 @@ if (agentControl != nil) agentControl.setServerPort($agentPort) agentControl.setStep($agentStep) + agentControl.setSyncMode($agentSyncMode) end if ($agentType == 'udp') @@ -402,6 +407,12 @@ # add the input control node simulationServer.initControlNode('kerosin/InputControl','InputControl') end + + # set timing mode (real time vs simulation time) + inputControl = get($serverPath+'simulation/InputControl') + if (inputControl != nil) + inputControl.setAdvanceTime($useRealTime) + end end def sparkSetupTrain() @@ -616,3 +627,5 @@ # importBundle "accelerometer" + +importBundle "agentsynceffector" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-12-25 14:27:19
|
Revision: 128 http://simspark.svn.sourceforge.net/simspark/?rev=128&view=rev Author: sgvandijk Date: 2009-12-25 14:26:51 +0000 (Fri, 25 Dec 2009) Log Message: ----------- - Enabe alpha test to prevent transparent pixels to write to z buffer Modified Paths: -------------- trunk/spark/lib/kerosin/renderserver/renderserver.cpp Modified: trunk/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-22 08:21:04 UTC (rev 127) +++ trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-25 14:26:51 UTC (rev 128) @@ -98,6 +98,9 @@ glEnable(GL_CULL_FACE); glCullFace(GL_BACK); + glAlphaFunc(GL_GREATER, 0.1); + glEnable(GL_ALPHA_TEST); + TLeafList lights; mActiveScene->ListChildrenSupportingClass<Light>(lights,true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-22 08:21:12
|
Revision: 127 http://simspark.svn.sourceforge.net/simspark/?rev=127&view=rev Author: a-held Date: 2009-12-22 08:21:04 +0000 (Tue, 22 Dec 2009) Log Message: ----------- Enabled accelerometer in branch did some refactoring to make code simpler and more consistent Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp branches/multiphys/spark/lib/oxygen/physicsserver/body.h branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/spark/spark.rb Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-22 08:21:04 UTC (rev 127) @@ -71,7 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) - ;(nd Accelerometer (setName torso)) + (nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-22 08:21:04 UTC (rev 127) @@ -55,6 +55,7 @@ physicsserver/angularmotor.h #interfaces + physicsserver/int/angularmotorint.h physicsserver/int/balljointint.h physicsserver/int/bodyint.h physicsserver/int/boxcolliderint.h Modified: branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/angularmotor.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -40,17 +40,17 @@ return; } - mODEJoint = dJointCreateAMotor((dWorldID) world, 0); + mJointID = (long) dJointCreateAMotor((dWorldID) world, 0); } void AngularMotor::SetMode(EMotorMode mode) { - dJointSetAMotorMode(mODEJoint,mode); + dJointSetAMotorMode( (dJointID) mJointID,mode); } AngularMotor::EMotorMode AngularMotor::GetMode() { - return static_cast<EMotorMode>(dJointGetAMotorMode(mODEJoint)); + return static_cast<EMotorMode>(dJointGetAMotorMode( (dJointID) mJointID)); } void AngularMotor::SetNumAxes(int num) @@ -63,58 +63,55 @@ return; } - dJointSetAMotorNumAxes(mODEJoint, num); + dJointSetAMotorNumAxes( (dJointID) mJointID, num); } int AngularMotor::GetNumAxes() { - return dJointGetAMotorNumAxes(mODEJoint); + return dJointGetAMotorNumAxes( (dJointID) mJointID); } void AngularMotor::SetMotorAxis(EAxisIndex idx, EAxisAnchor anchor, const salt::Vector3f& axis) { Vector3f globalAxis = GetWorldTransform() * axis; - dJointSetAMotorAxis (mODEJoint, idx, anchor, + dJointSetAMotorAxis ( (dJointID) mJointID, idx, anchor, globalAxis[0], globalAxis[1], globalAxis[2]); } AngularMotor::EAxisAnchor AngularMotor::GetAxisAnchor(EAxisIndex idx) { - return static_cast<EAxisAnchor>(dJointGetAMotorAxisRel (mODEJoint, idx)); + return static_cast<EAxisAnchor>(dJointGetAMotorAxisRel ( (dJointID) mJointID, idx)); } Vector3f AngularMotor::GetMotorAxis(EAxisIndex idx) { dVector3 dAxis; - dJointGetAMotorAxis(mODEJoint,idx,dAxis); + dJointGetAMotorAxis( (dJointID) mJointID,idx,dAxis); return Vector3f(dAxis[0],dAxis[1],dAxis[2]); } void AngularMotor::SetAxisAngle(EAxisIndex idx, float degAngle) { - dJointSetAMotorAngle(mODEJoint, idx, gDegToRad(degAngle)); + dJointSetAMotorAngle( (dJointID) mJointID, idx, gDegToRad(degAngle)); } float AngularMotor::GetAxisAngle(EAxisIndex idx) { - return gRadToDeg(dJointGetAMotorAngle(mODEJoint, idx)); + return gRadToDeg(dJointGetAMotorAngle((dJointID) mJointID, idx)); } float AngularMotor::GetAxisAngleRate(EAxisIndex idx) { - return gRadToDeg(dJointGetAMotorAngleRate(mODEJoint,idx)); + return gRadToDeg(dJointGetAMotorAngleRate((dJointID) mJointID,idx)); } void AngularMotor::SetParameter(int parameter, float value) { - dJointSetAMotorParam(mODEJoint, parameter, value); + dJointSetAMotorParam((dJointID) mJointID, parameter, value); } float AngularMotor::GetParameter(int parameter) const { - return dJointGetAMotorParam(mODEJoint, parameter); + return dJointGetAMotorParam((dJointID) mJointID, parameter); } - - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -42,8 +42,7 @@ return; } - mBallJointImp->CreateBallJoint(world); - mODEJoint = dJointCreateBall((dWorldID) world, 0); + mJointID = mBallJointImp->CreateBallJoint(world); } void BallJoint::SetAnchor(const Vector3f& anchor) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -24,7 +24,7 @@ using namespace oxygen; -Body::Body() : PhysicsObject(){ +Body::Body() : PhysicsObject(), mBodyID(0){ mBodyImp = boost::shared_ptr<ODEBody>(new ODEBody()); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/body.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/body.h 2009-12-22 08:21:04 UTC (rev 127) @@ -39,7 +39,11 @@ public: Body(); virtual ~Body(); - + +protected: + long mBodyID; + +private: boost::shared_ptr<BodyInt> mBodyImp; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -44,8 +44,7 @@ } // create a unit box - mBoxColliderImp->CreateBox(); - mGeomID = mBoxColliderImp->GetGeomID(); + mGeomID = mBoxColliderImp->CreateBox(); return (mGeomID != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -67,8 +67,7 @@ return false; } - mCapsuleColliderImp->CreateCapsule(); - mGeomID = mCapsuleColliderImp->GetGeomID(); + mGeomID = mCapsuleColliderImp->CreateCapsule(); return (mGeomID != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -40,8 +40,7 @@ return; } - mFixedJointImp->CreateFixedJoint(world); - mODEJoint = (dJointID) mFixedJointImp->GetJointID(); + mJointID = mFixedJointImp->CreateFixedJoint(world); } void FixedJoint::SetParameter(int /*parameter*/, float /*value*/) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2009-12-22 08:21:04 UTC (rev 127) @@ -36,6 +36,7 @@ class OXYGEN_API GenericPhysicsMatrix{}; class OXYGEN_API GenericContact{}; +class OXYGEN_API GenericMass{}; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -42,8 +42,7 @@ return; } - mHinge2JointImp->CreateHinge2Joint(world); - mODEJoint = (dJointID) mHinge2JointImp->GetJointID(); + mJointID = mHinge2JointImp->CreateHinge2Joint(world); } void Hinge2Joint::SetAnchor(const Vector3f& anchor) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -42,8 +42,7 @@ return; } - mHingeJointImp->CreateHingeJoint(world); - mODEJoint = (dJointID) mHingeJointImp->GetJointID(); + mJointID = mHingeJointImp->CreateHingeJoint(world); } void HingeJoint::SetAnchor(const Vector3f& anchor) Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/angularmotorint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -0,0 +1,42 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_ANGULARMOTORINT_H +#define OXYGEN_ANGULARMOTORINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ +class RigidBody; +class Joint; + +class OXYGEN_API AngularMotorInt +{ +public: + virtual long CreateAngularMotor() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_ANGULARMOTORINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -37,8 +37,7 @@ virtual void SetAnchor(const salt::Vector3f& anchor) = 0; virtual salt::Vector3f GetAnchor1() = 0; virtual salt::Vector3f GetAnchor2() = 0; - virtual void CreateBallJoint(long world) = 0; - virtual long GetJointID() = 0; + virtual long CreateBallJoint(long world) = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -36,9 +36,7 @@ virtual void SetBoxLengths(const salt::Vector3f& extents) = 0; virtual void GetBoxLengths(salt::Vector3f& extents) = 0; virtual float GetPointDepth(const salt::Vector3f& pos) = 0; - virtual void CreateBox() = 0; - - virtual long GetGeomID() = 0; + virtual long CreateBox() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -39,9 +39,7 @@ virtual float GetRadius() = 0; virtual float GetLength() = 0; virtual float GetPointDepth(const salt::Vector3f& pos) = 0; - - virtual long GetGeomID() = 0; - virtual void CreateCapsule() = 0; + virtual long CreateCapsule() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -44,7 +44,6 @@ virtual bool Intersect(boost::shared_ptr<Collider> collider, long geomID) = 0; virtual long GetParentSpaceID(long geomID) = 0; virtual void DestroyGeom(long geomID) = 0; - virtual long GetGeomID() = 0; virtual void TransformSetGeom(long parentGeomID, long geomID) = 0; virtual void SetSpace(long spaceID, long geomID, Collider* collider) = 0; virtual void SetBody(long bodyID, long geomID) = 0; @@ -58,9 +57,6 @@ return static_cast<Collider*>(dGeomGetData( (dGeomID) geomID)); #endif } - -protected: - long mGeomID; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -27,9 +27,8 @@ class OXYGEN_API FixedJointInt{ public: - virtual void CreateFixedJoint(long world) = 0; + virtual long CreateFixedJoint(long world) = 0; virtual void SetFixed() = 0; - virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -28,7 +28,7 @@ class OXYGEN_API Hinge2JointInt{ public: - virtual void CreateHinge2Joint(long world) = 0; + virtual long CreateHinge2Joint(long world) = 0; virtual void SetAnchor(const salt::Vector3f& anchor, const salt::Vector3f& up, const salt::Vector3f& right) = 0; @@ -39,7 +39,6 @@ virtual float GetAngleRate2() = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; - virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -28,7 +28,7 @@ class OXYGEN_API HingeJointInt{ public: - virtual void CreateHingeJoint(long world) = 0; + virtual long CreateHingeJoint(long world) = 0; virtual void SetAnchor(const salt::Vector3f& anchor) = 0; virtual salt::Vector3f GetAnchor1() = 0; virtual salt::Vector3f GetAnchor2() = 0; @@ -38,7 +38,6 @@ virtual float GetAngleRate() const = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; - virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -114,7 +114,6 @@ virtual void OnLink() = 0; protected: - long mJointID; boost::shared_ptr<dJointFeedback> mFeedback; float mJointMaxSpeed1; bool mIsLimitJointMaxSpeed1; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -36,9 +36,7 @@ virtual void SetPlaneParams(float a, float b, float c, float d) = 0; virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal) = 0; virtual float GetPointDepth(const salt::Vector3f& pos) = 0; - - virtual long GetGeomID() = 0; - virtual void CreatePlane() = 0; + virtual long CreatePlane() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -33,8 +33,7 @@ { public: virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length) = 0; - virtual void CreateRay() = 0; - virtual long GetGeomID() = 0; + virtual long CreateRay() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -24,6 +24,7 @@ #define OXYGEN_RIGIDBODYINT_H #include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { @@ -37,9 +38,9 @@ virtual bool IsEnabled() const = 0; virtual void UseGravity(bool f) = 0; virtual bool UsesGravity() const = 0; - virtual void CreateBody(long world) = 0; + virtual long CreateBody(long world) = 0; virtual void SetMass(float mass) = 0; - virtual void SetMassParameters(const float& mass) = 0; + virtual void SetMassParameters(const GenericMass& mass) = 0; virtual float GetMass() const = 0; virtual void SetSphere(float density, float radius) = 0; virtual void AddSphere(float density, float radius, const salt::Matrix& matrix) = 0; @@ -74,8 +75,6 @@ virtual salt::Matrix GetSynchronisationMatrix() = 0; virtual void BodySetData(RigidBody* rb) = 0; virtual RigidBody* BodyGetData(long bodyID) = 0; - - virtual long GetBodyID() = 0; virtual salt::Vector3f GetMassTrans() = 0; virtual void SetMassTrans(salt::Vector3f massTrans) = 0; virtual bool GetMassTransformed() = 0; @@ -90,12 +89,7 @@ #endif } -protected: - /** The ID of the managed body. This must be unique within the simulation. - It is used externally to reference this particular body. - */ - long mBodyID; - +protected: salt::Vector3f mMassTrans; bool mMassTransformed; }; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -33,13 +33,12 @@ class OXYGEN_API SliderJointInt { public: - virtual void CreateSliderJoint(long world) = 0; + virtual long CreateSliderJoint(long world) = 0; virtual float GetPosition() = 0; virtual float GetPositionRate() = 0; virtual void SetSliderAxis(salt::Vector3f& up) = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; - virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -36,9 +36,7 @@ virtual void SetRadius(float r) = 0; virtual float GetRadius() const = 0; virtual float GetPointDepth(const salt::Vector3f& pos) = 0; - virtual void CreateSphere() = 0; - - virtual long GetGeomID() = 0; + virtual long CreateSphere() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -35,9 +35,8 @@ { public: - virtual void CreateTransformCollider() = 0; + virtual long CreateTransformCollider() = 0; virtual void SetColliderParameters(int cleanup, int info) = 0; - virtual long GetGeomID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -33,7 +33,7 @@ { public: - virtual void CreateUniversalJoint(long world) = 0; + virtual long CreateUniversalJoint(long world) = 0; virtual void SetAnchor(const salt::Vector3f& anchor) = 0; virtual salt::Vector3f GetAnchor1() = 0; virtual salt::Vector3f GetAnchor2() = 0; @@ -47,7 +47,6 @@ virtual float GetAngleRate2() const = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; - virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -28,7 +28,7 @@ using namespace salt; Joint::Joint() : -PhysicsObject(), mODEJoint(0), +PhysicsObject(), mJointID(0), mJointMaxSpeed1(0), mJointMaxSpeed2(0), mIsLimitJointMaxSpeed1(false), mIsLimitJointMaxSpeed2(false) { @@ -41,12 +41,12 @@ void Joint::OnLink() { - if (mODEJoint == 0) + if (mJointID == 0) { return; } - dJointSetData(mODEJoint, this); + dJointSetData( (dJointID) mJointID, this); } shared_ptr<Joint> Joint::GetJoint(long jointID) @@ -82,7 +82,7 @@ void Joint::Attach(shared_ptr<RigidBody> body1, shared_ptr<RigidBody> body2) { - if (mODEJoint == 0) + if (mJointID == 0) { GetLog()->Error() << "(Joint) ERROR: Attach called with uninitialized ODE joint\n"; @@ -117,7 +117,7 @@ GetLog()->Debug() << "(Joint) Attaching '" << path1 << "' to '" << path2 << '\n'; - dJointAttach(mODEJoint, (dBodyID) id1, (dBodyID) id2); + dJointAttach( (dJointID) mJointID, (dBodyID) id1, (dBodyID) id2); } shared_ptr<RigidBody> Joint::GetBody(const std::string& path) @@ -162,12 +162,12 @@ int Joint::GetType() const { - return dJointGetType(mODEJoint); + return dJointGetType( (dJointID) mJointID); } boost::shared_ptr<RigidBody> Joint::GetBody(EBodyIndex idx) { - long bodyID = (long) dJointGetBody(mODEJoint, idx); + long bodyID = (long) dJointGetBody( (dJointID) mJointID, idx); return RigidBody::GetBody(bodyID); } @@ -227,12 +227,12 @@ } } - dJointSetFeedback(mODEJoint,mFeedback.get()); + dJointSetFeedback( (dJointID) mJointID,mFeedback.get()); } bool Joint::FeedBackEnabled() const { - return (dJointGetFeedback(mODEJoint) != 0); + return (dJointGetFeedback( (dJointID) mJointID) != 0); } Vector3f Joint::GetFeedbackForce(EBodyIndex idx) const @@ -436,14 +436,14 @@ void Joint::DestroyPhysicsObject() { - if (! mODEJoint) + if (!mJointID) { return; } EnableFeedback(false); - dJointDestroy(mODEJoint); - mODEJoint = 0; + dJointDestroy( (dJointID) mJointID); + mJointID = 0; } void Joint::SetJointMaxSpeed1(float rad) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -286,7 +286,7 @@ protected: /** the ID of the managed joint */ - dJointID mODEJoint; + long mJointID; /** the allocated joint feedback structure */ boost::shared_ptr<dJointFeedback> mFeedback; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -28,11 +28,11 @@ { } -void ODEBallJoint::CreateBallJoint(long world) +long ODEBallJoint::CreateBallJoint(long world) { dWorldID ODEWorld = (dWorldID) world; mODEJoint = dJointCreateBall(ODEWorld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODEBallJoint::SetAnchor(const Vector3f& gAnchor) @@ -57,7 +57,3 @@ return pos; } - -long ODEBallJoint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -37,8 +37,7 @@ void SetAnchor(const salt::Vector3f& anchor); salt::Vector3f GetAnchor1(); salt::Vector3f GetAnchor2(); - void CreateBallJoint(long world); - long GetJointID(); + long CreateBallJoint(long world); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -23,6 +23,6 @@ using namespace oxygen; -ODEBody::ODEBody() : ODEPhysicsObject(){ +ODEBody::ODEBody() : ODEPhysicsObject(), mODEBody(0){ } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.h 2009-12-22 08:21:04 UTC (rev 127) @@ -31,6 +31,9 @@ { public: ODEBody(); + +protected: + dBodyID mODEBody; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -28,7 +28,6 @@ ODEBoxCollider::ODEBoxCollider() : ODEConvexCollider() { - } void ODEBoxCollider::SetBoxLengths(const Vector3f& extents) @@ -41,10 +40,10 @@ ); } -void ODEBoxCollider::CreateBox() +long ODEBoxCollider::CreateBox() { mODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } void ODEBoxCollider::GetBoxLengths(Vector3f& extents) @@ -61,7 +60,3 @@ return dGeomBoxPointDepth (mODEGeom,pos[0],pos[1],pos[2]); } - -long ODEBoxCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -37,9 +37,7 @@ void SetBoxLengths(const salt::Vector3f& extents); void GetBoxLengths(salt::Vector3f& extents); float GetPointDepth(const salt::Vector3f& pos); - void CreateBox(); - - long GetGeomID(); + long CreateBox(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -67,10 +67,10 @@ return length; } -void ODECapsuleCollider::CreateCapsule() +long ODECapsuleCollider::CreateCapsule() { mODEGeom = dCreateCapsule(0, 1.0f, 1.0f); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } float ODECapsuleCollider::GetPointDepth(const Vector3f& pos) @@ -78,7 +78,3 @@ return dGeomCapsulePointDepth (mODEGeom,pos[0],pos[1],pos[2]); } - -long ODECapsuleCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -42,9 +42,7 @@ float GetRadius(); float GetLength(); float GetPointDepth(const salt::Vector3f& pos); - - long GetGeomID(); - void CreateCapsule(); + long CreateCapsule(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -37,7 +37,6 @@ ODECollider::ODECollider() : ODEPhysicsObject(), mODEGeom(0) { - mGeomID = 0; } ODECollider::~ODECollider() @@ -97,13 +96,8 @@ dGeomID ODEGeom = (dGeomID) geomID; dGeomDestroy(ODEGeom); mODEGeom = 0; - mGeomID = 0; } -long ODECollider::GetGeomID(){ - return mGeomID; -} - void ODECollider::TransformSetGeom(long parentGeomID, long geomID){ dGeomID parentODEGeom = (dGeomID) parentGeomID; dGeomID ODEGeom = (dGeomID) geomID; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -44,7 +44,6 @@ bool Intersect(boost::shared_ptr<Collider> collider, long geomID); long GetParentSpaceID(long geomID); void DestroyGeom(long GeomID); - long GetGeomID(); void TransformSetGeom(long parentGeomID, long geomID); void SetSpace(long spaceID, long geomID, Collider* collider); void SetBody(long bodyID, long geomID); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -27,18 +27,14 @@ { } -void ODEFixedJoint::CreateFixedJoint(long world) +long ODEFixedJoint::CreateFixedJoint(long world) { dWorldID ODEworld = (dWorldID) world; mODEJoint = dJointCreateFixed(ODEworld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODEFixedJoint::SetFixed() { dJointSetFixed(mODEJoint); } - -long ODEFixedJoint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -30,9 +30,8 @@ public: ODEFixedJoint(); - void CreateFixedJoint(long world); + long CreateFixedJoint(long world); void SetFixed(); - long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -28,11 +28,11 @@ { } -void ODEHinge2Joint::CreateHinge2Joint(long world) +long ODEHinge2Joint::CreateHinge2Joint(long world) { dWorldID ODEWorld = (dWorldID) world; mODEJoint = dJointCreateHinge2(ODEWorld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODEHinge2Joint::SetAnchor(const Vector3f& gAnchor, @@ -84,7 +84,3 @@ { return dJointGetHinge2Param(mODEJoint, parameter); } - -long ODEHinge2Joint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -30,7 +30,7 @@ public: ODEHinge2Joint(); - void CreateHinge2Joint(long world); + long CreateHinge2Joint(long world); void SetAnchor(const salt::Vector3f& gAnchor, const salt::Vector3f& up, const salt::Vector3f& right); @@ -41,7 +41,6 @@ float GetAngleRate2(); void SetParameter(int parameter, float value); float GetParameter(int parameter) const; - long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -27,11 +27,11 @@ { } -void ODEHingeJoint::CreateHingeJoint(long world) +long ODEHingeJoint::CreateHingeJoint(long world) { dWorldID ODEWorld = (dWorldID) world; mODEJoint = dJointCreateHinge(ODEWorld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODEHingeJoint::SetAnchor(const Vector3f& anchor) @@ -88,7 +88,3 @@ { return dJointGetHingeParam(mODEJoint, parameter); } - -long ODEHingeJoint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -30,7 +30,7 @@ public: ODEHingeJoint(); - void CreateHingeJoint(long world); + long CreateHingeJoint(long world); void SetAnchor(const salt::Vector3f& anchor); salt::Vector3f GetAnchor1(); salt::Vector3f GetAnchor2(); @@ -40,7 +40,6 @@ float GetAngleRate() const; void SetParameter(int parameter, float value); float GetParameter(int parameter) const; - long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -28,7 +28,6 @@ ODEJoint::ODEJoint() : ODEPhysicsObject(), mODEJoint(0) { - mJointID = 0; mJointMaxSpeed1 = mJointMaxSpeed2 = 0.0; mIsLimitJointMaxSpeed1 = mIsLimitJointMaxSpeed2 = false; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -33,11 +33,11 @@ dGeomPlaneSetParams(mODEGeom, a, b, c, d); } -void ODEPlaneCollider::CreatePlane() +long ODEPlaneCollider::CreatePlane() { // a plane with normal pointing up, going through the origin mODEGeom = dCreatePlane(0, 0, 1, 0, 0); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } void ODEPlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) @@ -52,7 +52,3 @@ return dGeomPlanePointDepth (mODEGeom,pos[0],pos[1],pos[2]); } - -long ODEPlaneCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -37,9 +37,7 @@ void SetPlaneParams(float a, float b, float c, float d); void SetParams(const salt::Vector3f& pos, salt::Vector3f normal); float GetPointDepth(const salt::Vector3f& pos); - - long GetGeomID(); - void CreatePlane(); + long CreatePlane(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -25,7 +25,6 @@ ODERayCollider::ODERayCollider() : ODECollider() { - } void ODERayCollider::SetParams(salt::Vector3f pos, @@ -35,12 +34,8 @@ dGeomRaySetLength(mODEGeom, length); } -void ODERayCollider::CreateRay() +long ODERayCollider::CreateRay() { mODEGeom = dCreateRay(0, 1.0f); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } - -long ODERayCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -35,8 +35,7 @@ public: ODERayCollider(); void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length); - void CreateRay(); - long GetGeomID(); + long CreateRay(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -32,16 +32,11 @@ using namespace salt; using namespace std; -ODERigidBody::ODERigidBody() : ODEBody(), mODEBody(0){ - mBodyID = 0; +ODERigidBody::ODERigidBody() : ODEBody(){ mMassTrans = Vector3f(0,0,0); mMassTransformed = false; } -long ODERigidBody::GetBodyID(){ - return mBodyID; -} - salt::Vector3f ODERigidBody::GetMassTrans(){ return mMassTrans; } @@ -91,21 +86,21 @@ return (dBodyGetGravityMode(mODEBody) != 0); } -void ODERigidBody::CreateBody(long world) +long ODERigidBody::CreateBody(long world) { // create the managed body mODEBody = dBodyCreate((dWorldID) world); - mBodyID = (long) mODEBody; + return (long) mODEBody; } void ODERigidBody::DestroyPhysicsObject(){ - if (mBodyID == 0) + if (mODEBody == 0) { return; } dBodyDestroy(mODEBody); - mBodyID = 0; + mODEBody = 0; } void ODERigidBody::BodySetData(RigidBody* rb) @@ -164,7 +159,7 @@ mMassTransformed = true; } -void ODERigidBody::SetMassParameters(const float& mass) +void ODERigidBody::SetMassParameters(const GenericMass& mass) { dMass& ODEMass = (dMass&) mass; dBodySetMass(mODEBody, &ODEMass); @@ -365,10 +360,9 @@ Vector3f ODERigidBody::GetLocalAngularVelocity() const { const dReal* vel = dBodyGetAngularVel(mODEBody); - Vector3f w; - dReal* wData = (dReal*) w.GetData(); - dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], wData); - return w; + dReal w[3]; + dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], w); + return Vector3f(w[0], w[1], w[2]); } Vector3f ODERigidBody::GetAngularVelocity() const Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-22 08:21:04 UTC (rev 127) @@ -40,7 +40,7 @@ void UseGravity(bool f); bool UsesGravity() const; void SetMass(float mass); - void SetMassParameters(const float& mass); + void SetMassParameters(const GenericMass& mass); float GetMass() const; void SetSphere(float density, float radius); void AddSphere(float density, float radius, const salt::Matrix& matrix); @@ -83,11 +83,13 @@ void SetMassTransformed(bool f); protected: + /**These methods are only called internally. + */ void AddMass(const dMass& mass, const salt::Matrix& matrix); /** creates an ODE body within the given world */ - void CreateBody(long world); + long CreateBody(long world); /** sets up an ode mass struct representing a box of the given size and total_mass @@ -142,12 +144,6 @@ is oriented along the body's z axis. */ void PrepareCapsuleTotal(dMass& mass, float total_mass, float radius, float length) const; - -private: - /** An ODE-specific body ID. This is used internally to call ODE- - specific methods that manipulate this body. - */ - dBodyID mODEBody; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -27,11 +27,11 @@ { } -void ODESliderJoint::CreateSliderJoint(long world) +long ODESliderJoint::CreateSliderJoint(long world) { dWorldID ODEWorld = (dWorldID) world; mODEJoint = dJointCreateSlider(ODEWorld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODESliderJoint::SetSliderAxis(Vector3f& up) @@ -58,7 +58,3 @@ { return dJointGetSliderParam(mODEJoint, parameter); } - -long ODESliderJoint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -34,13 +34,12 @@ public: ODESliderJoint(); - void CreateSliderJoint(long world); + long CreateSliderJoint(long world); float GetPosition(); float GetPositionRate(); void SetSliderAxis(salt::Vector3f& up); void SetParameter(int parameter, float value); float GetParameter(int parameter) const; - long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -26,8 +26,6 @@ ODESphereCollider::ODESphereCollider() : ODEConvexCollider() { - mODEGeom = 0; - mGeomID = 0; } void ODESphereCollider::SetRadius(float r) @@ -40,10 +38,10 @@ return dGeomSphereGetRadius(mODEGeom); } -void ODESphereCollider::CreateSphere() +long ODESphereCollider::CreateSphere() { mODEGeom = dCreateSphere(0, 1.0f); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } float ODESphereCollider::GetPointDepth(const Vector3f& pos) @@ -51,7 +49,3 @@ return dGeomSpherePointDepth (mODEGeom,pos[0],pos[1],pos[2]); } - -long ODESphereCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -36,9 +36,7 @@ void SetRadius(float r); float GetRadius() const; float GetPointDepth(const salt::Vector3f& pos); - void CreateSphere(); - - long GetGeomID(); + long CreateSphere(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -24,20 +24,16 @@ using namespace oxygen; -ODETransformCollider::ODETransformCollider() : ODECollider(){ - +ODETransformCollider::ODETransformCollider() : ODECollider() +{ } -void ODETransformCollider::CreateTransformCollider(){ +long ODETransformCollider::CreateTransformCollider(){ mODEGeom = dCreateGeomTransform(0); - mGeomID = (long) mODEGeom; + return (long) mODEGeom; } void ODETransformCollider::SetColliderParameters(int cleanup, int info){ dGeomTransformSetCleanup(mODEGeom, cleanup); dGeomTransformSetInfo(mODEGeom, info); } - -long ODETransformCollider::GetGeomID(){ - return mGeomID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h 2009-12-22 08:21:04 UTC (rev 127) @@ -34,9 +34,8 @@ public: ODETransformCollider(); - void CreateTransformCollider(); void SetColliderParameters(int cleanup, int info); - long GetGeomID(); + long CreateTransformCollider(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -26,11 +26,11 @@ { } -void ODEUniversalJoint::CreateUniversalJoint(long world) +long ODEUniversalJoint::CreateUniversalJoint(long world) { dWorldID ODEWorld = (dWorldID) world; mODEJoint = dJointCreateUniversal(ODEWorld, 0); - mJointID = (long) mODEJoint; + return (long) mODEJoint; } void ODEUniversalJoint::SetAnchor(const Vector3f& anchor) @@ -109,7 +109,3 @@ { return dJointGetUniversalParam(mODEJoint, parameter); } - -long ODEUniversalJoint::GetJointID(){ - return mJointID; -} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2009-12-22 08:21:04 UTC (rev 127) @@ -34,7 +34,7 @@ public: ODEUniversalJoint(); - void CreateUniversalJoint(long world); + long CreateUniversalJoint(long world); void SetAnchor(const salt::Vector3f& anchor); salt::Vector3f GetAnchor1(); salt::Vector3f GetAnchor2(); @@ -48,7 +48,6 @@ float GetAngleRate2() const; void SetParameter(int parameter, float value); float GetParameter(int parameter) const; - long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -54,10 +54,9 @@ } //create default plane - mPlaneColliderImp->CreatePlane(); - mGeomID = mPlaneColliderImp->GetGeomID(); + mGeomID = mPlaneColliderImp->CreatePlane(); - return (mPlaneColliderImp->GetGeomID() != 0); + return (mGeomID != 0); } void PlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -43,8 +43,7 @@ } // create a unit ray - mRayColliderImp->CreateRay(); - mGeomID = mRayColliderImp->GetGeomID(); + mGeomID = mRayColliderImp->CreateRay(); - return (mRayColliderImp->GetGeomID() != 0); + return (mGeomID != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-22 08:21:04 UTC (rev 127) @@ -41,7 +41,7 @@ long RigidBody::GetBodyID() const { - return mRigidBodyImp->GetBodyID(); + return mBodyID; } void RigidBody::Enable() @@ -71,9 +71,7 @@ bool RigidBody::CreateBody() { - long bodyID = mRigidBodyImp->GetBodyID(); - - if (bodyID != 0) + if (mBodyID != 0) { return true; } @@ -84,9 +82,9 @@ return false; } - mRigidBodyImp->CreateBody(world); + mBodyID = mRigidBodyImp->CreateBody(world); - if (mRigidBodyImp->GetBodyID() == 0) + if (mBodyID == 0) { GetLog()->Error() << "(Body) ERROR: could not create new ODE body\n"; @@ -131,7 +129,7 @@ return mRigidBodyImp->GetMass(); } -void RigidBody::SetMassParameters(const float& mass){ +void RigidBody::SetMassParameters(const GenericMass& mass){ mRigidBodyImp->SetMassParameters(mass); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-12-18 13:01:31 UTC (rev 126) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbo... [truncated message content] |
From: <yx...@us...> - 2009-12-18 13:01:43
|
Revision: 126 http://simspark.svn.sourceforge.net/simspark/?rev=126&view=rev Author: yxu Date: 2009-12-18 13:01:31 +0000 (Fri, 18 Dec 2009) Log Message: ----------- * fix for double precision in spark/lib/oxygen/physicsserver/body.cpp * fix for Accelerometer in spark/spark/spark.rb * enable Accelerometer in rcssserver3d/data/rsg/agent/nao/nao.rsg again ;) Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg trunk/spark/lib/oxygen/physicsserver/body.cpp trunk/spark/spark/spark.rb Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-18 06:24:13 UTC (rev 125) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-18 13:01:31 UTC (rev 126) @@ -71,7 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) - ;(nd Accelerometer (setName torso)) + (nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: trunk/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-12-18 06:24:13 UTC (rev 125) +++ trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-12-18 13:01:31 UTC (rev 126) @@ -420,9 +420,9 @@ Body::GetLocalAngularVelocity() const { const dReal* vel = dBodyGetAngularVel(mODEBody); - Vector3f w; - dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], w.GetData()); - return w; + dReal w[3]; + dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], w); + return Vector3f(w[0],w[1],w[2]); } void Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2009-12-18 06:24:13 UTC (rev 125) +++ trunk/spark/spark/spark.rb 2009-12-18 13:01:31 UTC (rev 126) @@ -613,3 +613,6 @@ # importBundle "collisionperceptor" + +# +importBundle "accelerometer" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-18 07:27:42
|
Revision: 125 http://simspark.svn.sourceforge.net/simspark/?rev=125&view=rev Author: a-held Date: 2009-12-18 06:24:13 +0000 (Fri, 18 Dec 2009) Log Message: ----------- integrated changes made in R121 and R124 into the branch Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h branches/multiphys/spark/plugin/CMakeLists.txt branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp Added Paths: ----------- branches/multiphys/spark/plugin/accelerometer/ branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp branches/multiphys/spark/plugin/accelerometer/accelerometer.h branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp branches/multiphys/spark/plugin/accelerometer/export.cpp Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-18 06:24:13 UTC (rev 125) @@ -46,8 +46,9 @@ (setLocalPos $GoalHalfDepth 0.0 (eval -1 * $GoalHalfHeight)) (setLocalRotation 90 90 0) (nd StaticMesh - (load $GoalObj) - (setScale $ObjWidth $ObjWidth $ObjWidth) + (load $GoalObj) + (setScale $ObjWidth $ObjWidth $ObjWidth) + (setTransparent) ) ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-18 06:24:13 UTC (rev 125) @@ -71,6 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) + ;(nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -26,10 +26,16 @@ using namespace kerosin; RenderNode::RenderNode() - : BaseNode() + : BaseNode(), + mTransparent(false) { } RenderNode::~RenderNode() { } + +void RenderNode::SetTransparent() +{ + mTransparent = true; +} Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h 2009-12-18 06:24:13 UTC (rev 125) @@ -42,6 +42,11 @@ /** renders the node */ virtual void RenderInternal() = 0; + + bool IsTransparent() { return mTransparent; } + void SetTransparent(); +private: + bool mTransparent; }; DECLARE_ABSTRACTCLASS(RenderNode); Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -23,7 +23,14 @@ using namespace kerosin; +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(RenderNode)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); + DEFINE_FUNCTION(setTransparent); } Modified: branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -123,7 +123,8 @@ } // standard rendering - RenderScene(mActiveScene); + RenderScene(mActiveScene, 0); + RenderScene(mActiveScene, 1); // reset GL lights glDisable(GL_LIGHTING); @@ -244,7 +245,7 @@ } void -RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) +RenderServer::RenderScene(boost::shared_ptr<BaseNode> node, unsigned pass) { #if 0 shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); @@ -254,7 +255,9 @@ } #endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); - if (renderNode.get() != 0) + if (renderNode.get() != 0 && + ((pass == 0 && !renderNode->IsTransparent()) || (pass == 1 && renderNode->IsTransparent())) + ) { glPushMatrix(); @@ -268,7 +271,7 @@ glMultMatrixf(node->GetWorldTransform().m); - renderNode->RenderInternal(); + renderNode->RenderInternal(); if (mEnablePicking) { @@ -294,7 +297,7 @@ continue; } - RenderScene(node); + RenderScene(node, pass); } } Modified: branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h 2009-12-18 06:24:13 UTC (rev 125) @@ -105,7 +105,7 @@ /** render a scene recursively. \param node the scene base node */ - void RenderScene(boost::shared_ptr<oxygen::BaseNode> node); + void RenderScene(boost::shared_ptr<oxygen::BaseNode> node, unsigned pass); /** sets the OpenGl view parameters for a camera */ Modified: branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -144,6 +144,12 @@ return true; } +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(StaticMesh)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); @@ -154,4 +160,5 @@ DEFINE_FUNCTION(setExternalMeshName) DEFINE_FUNCTION(setExternalMeshScale) DEFINE_FUNCTION(resetMaterials) + DEFINE_FUNCTION(setTransparent); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-18 06:24:13 UTC (rev 125) @@ -62,9 +62,11 @@ virtual void SetVelocity(const salt::Vector3f& vel) = 0; virtual void SetRotation(const salt::Matrix& rot) = 0; virtual salt::Matrix GetRotation() const = 0; + virtual salt::Vector3f GetLocalAngularVelocity() const = 0; virtual salt::Vector3f GetAngularVelocity() const = 0; virtual void SetAngularVelocity(const salt::Vector3f& vel) = 0; virtual void AddForce(const salt::Vector3f& force) = 0; + virtual salt::Vector3f GetForce() const = 0; virtual void AddTorque(const salt::Vector3f& torque) = 0; virtual void SetPosition(const salt::Vector3f& pos) = 0; virtual salt::Vector3f GetPosition() const = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -362,6 +362,15 @@ return rot; } +Vector3f ODERigidBody::GetLocalAngularVelocity() const +{ + const dReal* vel = dBodyGetAngularVel(mODEBody); + Vector3f w; + dReal* wData = (dReal*) w.GetData(); + dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], wData); + return w; +} + Vector3f ODERigidBody::GetAngularVelocity() const { const dReal* vel = dBodyGetAngularVel(mODEBody); @@ -413,6 +422,12 @@ dBodyAddForce(mODEBody, force.x(), force.y(), force.z()); } +Vector3f ODERigidBody::GetForce() const +{ + const dReal* f = dBodyGetForce(mODEBody); + return Vector3f(f[0], f[1], f[2]); +} + void ODERigidBody::AddTorque(const Vector3f& torque) { dBodyAddTorque(mODEBody, torque.x(), torque.y(), torque.z()); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-18 06:24:13 UTC (rev 125) @@ -63,9 +63,11 @@ void SetVelocity(const salt::Vector3f& vel); void SetRotation(const salt::Matrix& rot); salt::Matrix GetRotation() const; + salt::Vector3f GetLocalAngularVelocity() const; salt::Vector3f GetAngularVelocity() const; void SetAngularVelocity(const salt::Vector3f& vel); void AddForce(const salt::Vector3f& force); + salt::Vector3f GetForce() const; void AddTorque(const salt::Vector3f& torque); void SetPosition(const salt::Vector3f& pos); salt::Vector3f GetPosition() const; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -46,7 +46,7 @@ } /** returns the world node */ -shared_ptr<World> PhysicsObject::GetWorld() +shared_ptr<World> PhysicsObject::GetWorld() const { shared_ptr<Scene> scene = GetScene(); if (scene.get() == 0) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-18 06:24:13 UTC (rev 125) @@ -66,10 +66,10 @@ colliders and joints have to be treated in one go).*/ virtual void DestroyPhysicsObject(){}; -protected: /** returns the world node */ - boost::shared_ptr<World> GetWorld(); + boost::shared_ptr<World> GetWorld() const; +protected: /** finds the nearest parent space node */ boost::shared_ptr<Space> GetSpace(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -235,6 +235,11 @@ return mRigidBodyImp->GetRotation(); } +Vector3f RigidBody::GetLocalAngularVelocity() const +{ + return mRigidBodyImp->GetLocalAngularVelocity(); +} + Vector3f RigidBody::GetAngularVelocity() const { return mRigidBodyImp->GetAngularVelocity(); @@ -337,6 +342,11 @@ mRigidBodyImp->AddForce(force); } +Vector3f RigidBody::GetForce() const +{ + return mRigidBodyImp->GetForce(); +} + void RigidBody::AddTorque(const Vector3f& torque) { mRigidBodyImp->AddTorque(torque); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-12-18 06:24:13 UTC (rev 125) @@ -202,6 +202,9 @@ /** gets the rotation of this body */ salt::Matrix GetRotation() const; + + /** returns the current angular velocity of this body in local coordinates */ + salt::Vector3f GetLocalAngularVelocity() const; /** returns the current angular velocity of this body */ salt::Vector3f GetAngularVelocity() const; @@ -214,6 +217,9 @@ /** applies a force to the managed body */ void AddForce(const salt::Vector3f& force); + + /** returns the total force applied to this body */ + salt::Vector3f GetForce() const; /** aplies a force to the managed body */ void AddTorque(const salt::Vector3f& torque); Modified: branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -141,7 +141,7 @@ } } -shared_ptr<Scene> BaseNode::GetScene() +shared_ptr<Scene> BaseNode::GetScene() const { // is this node the scene node ? shared_ptr<Scene> self = Modified: branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h 2009-12-18 06:24:13 UTC (rev 125) @@ -96,7 +96,7 @@ void UpdateHierarchy(); /** moves up the hierarchy, until it finds a scene */ - boost::shared_ptr<Scene> GetScene(); + boost::shared_ptr<Scene> GetScene() const; /** enables debug mode controls */ void EnableDebugMode(); Modified: branches/multiphys/spark/plugin/CMakeLists.txt =================================================================== --- branches/multiphys/spark/plugin/CMakeLists.txt 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/plugin/CMakeLists.txt 2009-12-18 06:24:13 UTC (rev 125) @@ -9,6 +9,7 @@ set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework) endif (APPLE AND USE_COREFOUNDATION) +add_subdirectory(accelerometer) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) add_subdirectory(forceeffector) Added: branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt =================================================================== --- branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,16 @@ + +set(accelerometer_LIB_SRCS + export.cpp + accelerometer.h + accelerometer.cpp + accelerometer_c.cpp +) + +add_library(accelerometer MODULE ${accelerometer_LIB_SRCS}) + +target_link_libraries(accelerometer ${spark_libs} ${Boost_LIBRARIES}) + +set_target_properties(accelerometer PROPERTIES VERSION 0.0.0 SOVERSION 0) +if (NOT APPLE) + install(TARGETS accelerometer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (NOT APPLE) Added: branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,89 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "oxygen/physicsserver/world.h" +#include "oxygen/physicsserver/rigidbody.h" +#include "accelerometer.h" +#include <oxygen/sceneserver/transform.h> + +// using namespace kerosin; +using namespace oxygen; +using namespace boost; +using namespace zeitgeist; +using namespace salt; +using namespace std; + +Accelerometer::Accelerometer() : oxygen::Perceptor() +{ +} + +Accelerometer::~Accelerometer() +{ +} + +void Accelerometer::OnLink() +{ + shared_ptr<Transform> transformParent = shared_static_cast<Transform> + (FindParentSupportingClass<Transform>().lock()); + + mBody = shared_static_cast<const RigidBody> + (transformParent->GetChildOfClass("RigidBody")); + + mGravity = mBody->GetWorld()->GetGravity(); + mLastVel = mBody->GetVelocity(); +} + +bool Accelerometer::Percept(boost::shared_ptr<PredicateList> predList) +{ + Predicate &predicate = predList->AddPredicate(); + predicate.name = "ACC"; + predicate.parameter.Clear(); + + ParameterList &nameElement = predicate.parameter.AddList(); + nameElement.AddValue(std::string("n")); + nameElement.AddValue(GetName()); + + ParameterList &ratesElement = predicate.parameter.AddList(); + ratesElement.AddValue(std::string("a")); + ratesElement.AddValue(mAcc.x()); + ratesElement.AddValue(mAcc.y()); + ratesElement.AddValue(mAcc.z()); + + return true; +} + +void Accelerometer::PrePhysicsUpdateInternal(float deltaTime) +{ +// Vector3f F = mBody->GetForce(); +// float mass = mBody->GetMass(); +// mAcc = F / mass - mGravity; + + Vector3f vel = mBody->GetVelocity(); + Vector3f acc = (vel - mLastVel) / deltaTime; + acc -= mGravity; + + Matrix invRot = mBody->GetRotation(); + invRot.InvertRotationMatrix(); + acc = invRot * acc; + + float k = 0.9; + mAcc = k*mAcc + (1-k)*acc; + mLastVel = vel; +} Added: branches/multiphys/spark/plugin/accelerometer/accelerometer.h =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer.h (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer.h 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,49 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ACCELEROMETER_H +#define ACCELEROMETER_H + +#include <oxygen/agentaspect/perceptor.h> +#include <oxygen/physicsserver/rigidbody.h> + +class Accelerometer : public oxygen::Perceptor { +public: + Accelerometer(); + virtual ~Accelerometer(); + + //! \return true, if valid data is available and false otherwise. + bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); + + virtual void OnLink(); + +protected: + virtual void PrePhysicsUpdateInternal(float deltaTime); + +private: + boost::shared_ptr<const oxygen::RigidBody> mBody; + salt::Vector3f mAcc; + salt::Vector3f mGravity; + salt::Vector3f mLastVel; +}; + +DECLARE_CLASS(Accelerometer); + +#endif //ACCELEROMETER_H Added: branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" + +using namespace boost; +using namespace oxygen; + +void CLASS(Accelerometer)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/Perceptor); +} Added: branches/multiphys/spark/plugin/accelerometer/export.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/export.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/export.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,26 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" +#include <zeitgeist/zeitgeist.h> + +ZEITGEIST_EXPORT_BEGIN() + ZEITGEIST_EXPORT(Accelerometer); +ZEITGEIST_EXPORT_END() Modified: branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp =================================================================== --- branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -249,6 +249,11 @@ ss << "(nd StaticMesh"; } + if (mesh->IsTransparent()) + { + ss << " (setTransparent)"; + } + ss << " (load " << mesh->GetMeshName(); const ParameterList& params = mesh->GetMeshParameter(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-12-17 22:21:57
|
Revision: 124 http://simspark.svn.sourceforge.net/simspark/?rev=124&view=rev Author: sgvandijk Date: 2009-12-17 22:21:49 +0000 (Thu, 17 Dec 2009) Log Message: ----------- - Render transparent objects after solid objects - Comment out Accelerometer for now Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg trunk/spark/lib/kerosin/renderserver/rendernode.cpp trunk/spark/lib/kerosin/renderserver/rendernode.h trunk/spark/lib/kerosin/renderserver/rendernode_c.cpp trunk/spark/lib/kerosin/renderserver/renderserver.cpp trunk/spark/lib/kerosin/renderserver/renderserver.h trunk/spark/lib/kerosin/sceneserver/staticmesh_c.cpp trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp Modified: trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-17 22:21:49 UTC (rev 124) @@ -46,9 +46,10 @@ (setLocalPos $GoalHalfDepth 0.0 (eval -1 * $GoalHalfHeight)) (setLocalRotation 90 90 0) (nd StaticMesh - (load $GoalObj) - (setScale $ObjWidth $ObjWidth $ObjWidth) - ) + (load $GoalObj) + (setScale $ObjWidth $ObjWidth $ObjWidth) + (setTransparent) + ) ) ;; create the left goal post Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-17 22:21:49 UTC (rev 124) @@ -71,7 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) - (nd Accelerometer (setName torso)) + ;(nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: trunk/spark/lib/kerosin/renderserver/rendernode.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-17 22:21:49 UTC (rev 124) @@ -26,10 +26,16 @@ using namespace kerosin; RenderNode::RenderNode() - : BaseNode() + : BaseNode(), + mTransparent(false) { } RenderNode::~RenderNode() { } + +void RenderNode::SetTransparent() +{ + mTransparent = true; +} Modified: trunk/spark/lib/kerosin/renderserver/rendernode.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/rendernode.h 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/renderserver/rendernode.h 2009-12-17 22:21:49 UTC (rev 124) @@ -42,6 +42,11 @@ /** renders the node */ virtual void RenderInternal() = 0; + + bool IsTransparent() { return mTransparent; } + void SetTransparent(); +private: + bool mTransparent; }; DECLARE_ABSTRACTCLASS(RenderNode); Modified: trunk/spark/lib/kerosin/renderserver/rendernode_c.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-17 22:21:49 UTC (rev 124) @@ -23,7 +23,14 @@ using namespace kerosin; +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(RenderNode)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); + DEFINE_FUNCTION(setTransparent); } Modified: trunk/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-17 22:21:49 UTC (rev 124) @@ -123,7 +123,8 @@ } // standard rendering - RenderScene(mActiveScene); + RenderScene(mActiveScene, 0); + RenderScene(mActiveScene, 1); // reset GL lights glDisable(GL_LIGHTING); @@ -244,7 +245,7 @@ } void -RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) +RenderServer::RenderScene(boost::shared_ptr<BaseNode> node, unsigned pass) { #if 0 shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); @@ -254,7 +255,9 @@ } #endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); - if (renderNode.get() != 0) + if (renderNode.get() != 0 && + ((pass == 0 && !renderNode->IsTransparent()) || (pass == 1 && renderNode->IsTransparent())) + ) { glPushMatrix(); @@ -268,7 +271,7 @@ glMultMatrixf(node->GetWorldTransform().m); - renderNode->RenderInternal(); + renderNode->RenderInternal(); if (mEnablePicking) { @@ -294,7 +297,7 @@ continue; } - RenderScene(node); + RenderScene(node, pass); } } Modified: trunk/spark/lib/kerosin/renderserver/renderserver.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.h 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/renderserver/renderserver.h 2009-12-17 22:21:49 UTC (rev 124) @@ -105,7 +105,7 @@ /** render a scene recursively. \param node the scene base node */ - void RenderScene(boost::shared_ptr<oxygen::BaseNode> node); + void RenderScene(boost::shared_ptr<oxygen::BaseNode> node, unsigned pass); /** sets the OpenGl view parameters for a camera */ Modified: trunk/spark/lib/kerosin/sceneserver/staticmesh_c.cpp =================================================================== --- trunk/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-17 22:21:49 UTC (rev 124) @@ -144,6 +144,12 @@ return true; } +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(StaticMesh)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); @@ -154,4 +160,5 @@ DEFINE_FUNCTION(setExternalMeshName) DEFINE_FUNCTION(setExternalMeshScale) DEFINE_FUNCTION(resetMaterials) + DEFINE_FUNCTION(setTransparent); } Modified: trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp =================================================================== --- trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-17 08:11:25 UTC (rev 123) +++ trunk/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-17 22:21:49 UTC (rev 124) @@ -249,6 +249,11 @@ ss << "(nd StaticMesh"; } + if (mesh->IsTransparent()) + { + ss << " (setTransparent)"; + } + ss << " (load " << mesh->GetMeshName(); const ParameterList& params = mesh->GetMeshParameter(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-17 08:11:36
|
Revision: 123 http://simspark.svn.sourceforge.net/simspark/?rev=123&view=rev Author: a-held Date: 2009-12-17 08:11:25 +0000 (Thu, 17 Dec 2009) Log Message: ----------- implemented bridge pattern for all six base classes of Joint Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -19,6 +19,7 @@ */ #include <oxygen/physicsserver/ode/odeballjoint.h> #include <oxygen/physicsserver/balljoint.h> +#include <zeitgeist/logserver/logserver.h> using namespace oxygen; using namespace boost; @@ -41,6 +42,7 @@ return; } + mBallJointImp->CreateBallJoint(world); mODEJoint = dJointCreateBall((dWorldID) world, 0); } @@ -48,7 +50,7 @@ { // calculate anchor position in world coordinates Vector3f gAnchor = GetWorldTransform() * anchor; - dJointSetBallAnchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); + mBallJointImp->SetAnchor(gAnchor); } Vector3f BallJoint::GetAnchor(EBodyIndex idx) @@ -59,17 +61,13 @@ { case BI_FIRST: { - dReal anchor[3]; - dJointGetBallAnchor (mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mBallJointImp->GetAnchor1(); break; } case BI_SECOND: { - dReal anchor[3]; - dJointGetBallAnchor2(mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mBallJointImp->GetAnchor2(); break; } @@ -82,11 +80,13 @@ void BallJoint::SetParameter(int /*parameter*/, float /*value*/) { - // no ode set param fkt. defined + GetLog()->Error() << + "(BallJoint) WARNING: SetParameter function undefined for BallJoint, ignored\n"; } float BallJoint::GetParameter(int /*parameter*/) const { - // no ode get param fkt. defined + GetLog()->Error() << + "(BallJoint) WARNING: GetParameter function undefined for BallJoint, returned zero\n"; return 0; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -40,21 +40,24 @@ return; } - mODEJoint = dJointCreateFixed((dWorldID) world, 0); + mFixedJointImp->CreateFixedJoint(world); + mODEJoint = (dJointID) mFixedJointImp->GetJointID(); } void FixedJoint::SetParameter(int /*parameter*/, float /*value*/) { - // no ode set param fkt. defined + GetLog()->Error() << + "(FixedJoint) WARNING: SetParameter function undefined for FixedJoint, ignored\n"; } float FixedJoint::GetParameter(int /*parameter*/) const { - // no ode get param fkt. defined + GetLog()->Error() << + "(FixedJoint) WARNING: GetParameter function undefined for FixedJoint, returned zero\n"; return 0; } void FixedJoint::SetFixed() { - dJointSetFixed(mODEJoint); + mFixedJointImp->SetFixed(); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -41,23 +41,23 @@ { return; } - - mODEJoint = dJointCreateHinge2((dWorldID) world, 0); + + mHinge2JointImp->CreateHinge2Joint(world); + mODEJoint = (dJointID) mHinge2JointImp->GetJointID(); } void Hinge2Joint::SetAnchor(const Vector3f& anchor) { // calculate anchor position in world coordinates Vector3f gAnchor(GetWorldTransform() * anchor); - dJointSetHinge2Anchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); // relative universal hinge2 axis 1 points up Vector3f up(GetWorldTransform().Rotate(Vector3f(0,0,1))); - dJointSetHinge2Axis1(mODEJoint,up[0],up[1],up[2]); // relative universal hinge2 axis 2 points right Vector3f right(GetWorldTransform().Rotate(Vector3f(1,0,0))); - dJointSetHinge2Axis2(mODEJoint,right[0],right[1],right[2]); + + mHinge2JointImp->SetAnchor(gAnchor, up, right); } Vector3f Hinge2Joint::GetAnchor(EBodyIndex idx) @@ -68,18 +68,12 @@ { case BI_FIRST: { - dReal anchor[3]; - dJointGetHinge2Anchor (mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); - break; + pos = mHinge2JointImp->GetAnchor1(); } case BI_SECOND: { - dReal anchor[3]; - dJointGetHinge2Anchor2(mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); - break; + pos = mHinge2JointImp->GetAnchor2(); } default: @@ -94,11 +88,11 @@ switch (idx) { case AI_FIRST: - return gRadToDeg(dJointGetHinge2Angle1(mODEJoint)); + return mHinge2JointImp->GetAngle(); case AI_SECOND: - // dJointGetHinge2Angle2 is undeclared in ODE 0.039 - // return dJointGetHinge2Angle2(mODEJoint); + GetLog()->Error() << + "(Hinge2Joint) WARNING: GetAngle is undefined for EAxisIndex::AI_SECOND, returned zero\n"; return 0; default: @@ -111,10 +105,10 @@ switch (idx) { case AI_FIRST: - return gRadToDeg(dJointGetHinge2Angle1Rate(mODEJoint)); + return mHinge2JointImp->GetAngleRate1(); case AI_SECOND: - return gRadToDeg(dJointGetHinge2Angle2Rate(mODEJoint)); + return mHinge2JointImp->GetAngleRate2(); default: return 0; @@ -123,10 +117,10 @@ void Hinge2Joint::SetParameter(int parameter, float value) { - dJointSetHinge2Param(mODEJoint, parameter, value); + mHinge2JointImp->SetParameter(parameter, value); } float Hinge2Joint::GetParameter(int parameter) const { - return dJointGetHinge2Param(mODEJoint, parameter); + return mHinge2JointImp->GetParameter(parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -42,14 +42,15 @@ return; } - mODEJoint = dJointCreateHinge((dWorldID) world, 0); + mHingeJointImp->CreateHingeJoint(world); + mODEJoint = (dJointID) mHingeJointImp->GetJointID(); } void HingeJoint::SetAnchor(const Vector3f& anchor) { // calculate anchor position in world coordinates Vector3f gAnchor(GetWorldTransform() * anchor); - dJointSetHingeAnchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); + mHingeJointImp->SetAnchor(gAnchor); } Vector3f HingeJoint::GetAnchor(EBodyIndex idx) @@ -60,17 +61,13 @@ { case BI_FIRST: { - dReal anchor[3]; - dJointGetHingeAnchor (mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mHingeJointImp->GetAnchor1(); break; } case BI_SECOND: { - dReal anchor[3]; - dJointGetHingeAnchor2(mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mHingeJointImp->GetAnchor2(); break; } @@ -111,32 +108,30 @@ void HingeJoint::SetAxis(const Vector3f& axis) { Vector3f absAxis(GetWorldTransform().Rotate(axis)); - dJointSetHingeAxis(mODEJoint, absAxis[0], absAxis[1], absAxis[2]); + mHingeJointImp->SetAxis(absAxis); } Vector3f HingeJoint::GetAxis() { - dReal axis[3]; - dJointGetHingeAxis(mODEJoint, axis); - return Vector3f (axis[0], axis[1], axis[2]); + return mHingeJointImp->GetAxis(); } float HingeJoint::GetAngle() const { - return gRadToDeg(dJointGetHingeAngle(mODEJoint)); + return mHingeJointImp->GetAngle(); } float HingeJoint::GetAngleRate() const { - return gRadToDeg(dJointGetHingeAngleRate(mODEJoint)); + return mHingeJointImp->GetAngleRate(); } void HingeJoint::SetParameter(int parameter, float value) { - dJointSetHingeParam(mODEJoint, parameter, value); + mHingeJointImp->SetParameter(parameter, value); } float HingeJoint::GetParameter(int parameter) const { - return dJointGetHingeParam(mODEJoint, parameter); + return mHingeJointImp->GetParameter(parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -38,6 +38,7 @@ virtual salt::Vector3f GetAnchor1() = 0; virtual salt::Vector3f GetAnchor2() = 0; virtual void CreateBallJoint(long world) = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -29,6 +29,7 @@ public: virtual void CreateFixedJoint(long world) = 0; virtual void SetFixed() = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -39,6 +39,7 @@ virtual float GetAngleRate2() = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -38,6 +38,7 @@ virtual float GetAngleRate() const = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -114,7 +114,7 @@ virtual void OnLink() = 0; protected: - dJointID mODEJoint; + long mJointID; boost::shared_ptr<dJointFeedback> mFeedback; float mJointMaxSpeed1; bool mIsLimitJointMaxSpeed1; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -39,6 +39,7 @@ virtual void SetSliderAxis(salt::Vector3f& up) = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -47,6 +47,7 @@ virtual float GetAngleRate2() const = 0; virtual void SetParameter(int parameter, float value) = 0; virtual float GetParameter(int parameter) const = 0; + virtual long GetJointID() = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -30,7 +30,9 @@ void ODEBallJoint::CreateBallJoint(long world) { - mODEJoint = dJointCreateBall((dWorldID) world, 0); + dWorldID ODEWorld = (dWorldID) world; + mODEJoint = dJointCreateBall(ODEWorld, 0); + mJointID = (long) mODEJoint; } void ODEBallJoint::SetAnchor(const Vector3f& gAnchor) @@ -55,3 +57,7 @@ return pos; } + +long ODEBallJoint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -38,6 +38,7 @@ salt::Vector3f GetAnchor1(); salt::Vector3f GetAnchor2(); void CreateBallJoint(long world); + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -29,10 +29,16 @@ void ODEFixedJoint::CreateFixedJoint(long world) { - mODEJoint = dJointCreateFixed((dWorldID) world, 0); + dWorldID ODEworld = (dWorldID) world; + mODEJoint = dJointCreateFixed(ODEworld, 0); + mJointID = (long) mODEJoint; } void ODEFixedJoint::SetFixed() { dJointSetFixed(mODEJoint); } + +long ODEFixedJoint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -32,6 +32,7 @@ ODEFixedJoint(); void CreateFixedJoint(long world); void SetFixed(); + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -30,7 +30,9 @@ void ODEHinge2Joint::CreateHinge2Joint(long world) { - mODEJoint = dJointCreateHinge2((dWorldID) world, 0); + dWorldID ODEWorld = (dWorldID) world; + mODEJoint = dJointCreateHinge2(ODEWorld, 0); + mJointID = (long) mODEJoint; } void ODEHinge2Joint::SetAnchor(const Vector3f& gAnchor, @@ -82,3 +84,7 @@ { return dJointGetHinge2Param(mODEJoint, parameter); } + +long ODEHinge2Joint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -41,6 +41,7 @@ float GetAngleRate2(); void SetParameter(int parameter, float value); float GetParameter(int parameter) const; + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -29,7 +29,9 @@ void ODEHingeJoint::CreateHingeJoint(long world) { - mODEJoint = dJointCreateHinge((dWorldID) world, 0); + dWorldID ODEWorld = (dWorldID) world; + mODEJoint = dJointCreateHinge(ODEWorld, 0); + mJointID = (long) mODEJoint; } void ODEHingeJoint::SetAnchor(const Vector3f& anchor) @@ -86,3 +88,7 @@ { return dJointGetHingeParam(mODEJoint, parameter); } + +long ODEHingeJoint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -40,6 +40,7 @@ float GetAngleRate() const; void SetParameter(int parameter, float value); float GetParameter(int parameter) const; + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -26,8 +26,11 @@ using namespace std; using namespace salt; -ODEJoint::ODEJoint() : ODEPhysicsObject() +ODEJoint::ODEJoint() : ODEPhysicsObject(), mODEJoint(0) { + mJointID = 0; + mJointMaxSpeed1 = mJointMaxSpeed2 = 0.0; + mIsLimitJointMaxSpeed1 = mIsLimitJointMaxSpeed2 = false; } void ODEJoint::OnLink() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -80,6 +80,9 @@ bool IsLimitJointMaxSpeed1() const; bool IsLimitJointMaxSpeed2() const; void OnLink(); + +protected: + dJointID mODEJoint; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -29,7 +29,9 @@ void ODESliderJoint::CreateSliderJoint(long world) { - mODEJoint = dJointCreateSlider((dWorldID) world, 0); + dWorldID ODEWorld = (dWorldID) world; + mODEJoint = dJointCreateSlider(ODEWorld, 0); + mJointID = (long) mODEJoint; } void ODESliderJoint::SetSliderAxis(Vector3f& up) @@ -56,3 +58,7 @@ { return dJointGetSliderParam(mODEJoint, parameter); } + +long ODESliderJoint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -40,6 +40,7 @@ void SetSliderAxis(salt::Vector3f& up); void SetParameter(int parameter, float value); float GetParameter(int parameter) const; + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -28,7 +28,9 @@ void ODEUniversalJoint::CreateUniversalJoint(long world) { - mODEJoint = dJointCreateUniversal((dWorldID) world, 0); + dWorldID ODEWorld = (dWorldID) world; + mODEJoint = dJointCreateUniversal(ODEWorld, 0); + mJointID = (long) mODEJoint; } void ODEUniversalJoint::SetAnchor(const Vector3f& anchor) @@ -39,7 +41,7 @@ Vector3f ODEUniversalJoint::GetAnchor1() { dReal anchor[3]; - dJointGetUniversalAnchor (mODEJoint, anchor); + dJointGetUniversalAnchor(mODEJoint, anchor); Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); return pos; } @@ -107,3 +109,7 @@ { return dJointGetUniversalParam(mODEJoint, parameter); } + +long ODEUniversalJoint::GetJointID(){ + return mJointID; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h 2009-12-17 08:11:25 UTC (rev 123) @@ -48,6 +48,7 @@ float GetAngleRate2() const; void SetParameter(int parameter, float value); float GetParameter(int parameter) const; + long GetJointID(); }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -42,34 +42,34 @@ return; } - mODEJoint = dJointCreateSlider((dWorldID) world, 0); + mSliderJointImp->CreateSliderJoint(world); + mODEJoint = (dJointID) mSliderJointImp->GetJointID(); } void SliderJoint::Attach(shared_ptr<RigidBody> body1, shared_ptr<RigidBody> body2) { Joint::Attach(body1,body2); - // relative slider axis points up Vector3f up(GetWorldTransform().Rotate(Vector3f(0,0,1))); - dJointSetSliderAxis(mODEJoint,up[0],up[1],up[2]); + mSliderJointImp->SetSliderAxis(up); } float SliderJoint::GetPosition() { - return dJointGetSliderPosition(mODEJoint); + return mSliderJointImp->GetPosition(); } float SliderJoint::GetPositionRate() { - return dJointGetSliderPositionRate(mODEJoint); + return mSliderJointImp->GetPositionRate(); } void SliderJoint::SetParameter(int parameter, float value) { - dJointSetSliderParam(mODEJoint, parameter, value); + mSliderJointImp->SetParameter(parameter, value); } float SliderJoint::GetParameter(int parameter) const { - return dJointGetSliderParam(mODEJoint, parameter); + return mSliderJointImp->GetParameter(parameter); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp 2009-12-16 10:43:50 UTC (rev 122) +++ branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp 2009-12-17 08:11:25 UTC (rev 123) @@ -43,14 +43,15 @@ return; } - mODEJoint = dJointCreateUniversal((dWorldID) world, 0); + mUniversalJointImp->CreateUniversalJoint(world); + mODEJoint = (dJointID) mUniversalJointImp->GetJointID(); } void UniversalJoint::SetAnchor(const Vector3f& anchor) { // calculate anchor position in world coordinates Vector3f gAnchor(GetWorldTransform() * anchor); - dJointSetUniversalAnchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); + mUniversalJointImp->SetAnchor(gAnchor); } Vector3f UniversalJoint::GetAnchor(EBodyIndex idx) @@ -61,17 +62,13 @@ { case BI_FIRST: { - dReal anchor[3]; - dJointGetUniversalAnchor (mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mUniversalJointImp->GetAnchor1(); break; } case BI_SECOND: { - dReal anchor[3]; - dJointGetUniversalAnchor2(mODEJoint, anchor); - pos = Vector3f(anchor[0],anchor[1],anchor[2]); + pos = mUniversalJointImp->GetAnchor2(); break; } @@ -85,13 +82,13 @@ void UniversalJoint::SetAxis1(const Vector3f & axis) { Vector3f first(GetWorldTransform().Rotate(axis)); - dJointSetUniversalAxis1(mODEJoint,first[0],first[1],first[2]); + mUniversalJointImp->SetAxis1(first); } void UniversalJoint::SetAxis2(const Vector3f & axis) { Vector3f second(GetWorldTransform().Rotate(axis)); - dJointSetUniversalAxis2(mODEJoint,second[0],second[1],second[2]); + mUniversalJointImp->SetAxis2(second); } Vector3f UniversalJoint::GetAxis(EAxisIndex idx) const @@ -102,17 +99,13 @@ { case AI_FIRST: { - dReal axis[3]; - dJointGetUniversalAxis1(mODEJoint, axis); - vec = Vector3f(axis[0],axis[1],axis[2]); + vec = mUniversalJointImp->GetAxis1(); break; } case AI_SECOND: { - dReal axis[3]; - dJointGetUniversalAxis2(mODEJoint, axis); - vec = Vector3f(axis[0],axis[1],axis[2]); + vec = mUniversalJointImp->GetAxis2(); break; } @@ -128,10 +121,10 @@ switch (idx) { case AI_FIRST: - return gRadToDeg(dJointGetUniversalAngle1(mODEJoint)); + return mUniversalJointImp->GetAngle1(); case AI_SECOND: - return gRadToDeg(dJointGetUniversalAngle2(mODEJoint)); + return mUniversalJointImp->GetAngle2(); default: return 0; @@ -143,10 +136,10 @@ switch (idx) { case AI_FIRST: - return gRadToDeg(dJointGetUniversalAngle1Rate(mODEJoint)); + return mUniversalJointImp->GetAngleRate1(); case AI_SECOND: - return gRadToDeg(dJointGetUniversalAngle2Rate(mODEJoint)); + return mUniversalJointImp->GetAngleRate2(); default: return 0; @@ -155,10 +148,10 @@ void UniversalJoint::SetParameter(int parameter, float value) { - dJointSetUniversalParam(mODEJoint, parameter, value); + mUniversalJointImp->SetParameter(parameter, value); } float UniversalJoint::GetParameter(int parameter) const { - return dJointGetUniversalParam(mODEJoint, parameter); + return mUniversalJointImp->GetParameter(parameter); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-16 10:43:58
|
Revision: 122 http://simspark.svn.sourceforge.net/simspark/?rev=122&view=rev Author: a-held Date: 2009-12-16 10:43:50 +0000 (Wed, 16 Dec 2009) Log Message: ----------- Prepared bridge pattern for all joint classes Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.h branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/joint.h branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/sliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/universaljoint.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehingejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odejoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odesliderjoint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeuniversaljoint.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-16 10:43:50 UTC (rev 122) @@ -55,6 +55,7 @@ physicsserver/angularmotor.h #interfaces + physicsserver/int/balljointint.h physicsserver/int/bodyint.h physicsserver/int/boxcolliderint.h physicsserver/int/capsulecolliderint.h @@ -62,23 +63,32 @@ physicsserver/int/compoundcolliderint.h physicsserver/int/concavecolliderint.h physicsserver/int/conecolliderint.h + physicsserver/int/conetwistjointint.h physicsserver/int/convexcolliderint.h physicsserver/int/cylindercolliderint.h physicsserver/int/dynamicbodyint.h physicsserver/int/emptycolliderint.h + physicsserver/int/fixedjointint.h + physicsserver/int/generic6dofjointint.h + physicsserver/int/hingejointint.h + physicsserver/int/hinge2jointint.h + physicsserver/int/jointint.h physicsserver/int/physicsobjectint.h physicsserver/int/physicsserverint.h physicsserver/int/planecolliderint.h physicsserver/int/raycolliderint.h physicsserver/int/rigidbodyint.h + physicsserver/int/sliderjointint.h physicsserver/int/softbodyint.h physicsserver/int/spaceint.h physicsserver/int/spherecolliderint.h physicsserver/int/staticbodyint.h physicsserver/int/transformcolliderint.h + physicsserver/int/universaljointint.h physicsserver/int/worldint.h #ode-specific files + physicsserver/ode/odeballjoint.h physicsserver/ode/odebody.h physicsserver/ode/odeboxcollider.h physicsserver/ode/odedynamicbody.h @@ -87,19 +97,27 @@ physicsserver/ode/odecompoundcollider.h physicsserver/ode/odeconcavecollider.h physicsserver/ode/odeconecollider.h + physicsserver/ode/odeconetwistjoint.h physicsserver/ode/odeconvexcollider.h physicsserver/ode/odecylindercollider.h physicsserver/ode/odeemptycollider.h + physicsserver/ode/odefixedjoint.h + physicsserver/ode/odegeneric6dofjoint.h + physicsserver/ode/odehingejoint.h + physicsserver/ode/odehinge2joint.h + physicsserver/ode/odejoint.h physicsserver/ode/odephysicsobject.h physicsserver/ode/odephysicsserver.h physicsserver/ode/odeplanecollider.h physicsserver/ode/oderaycollider.h physicsserver/ode/oderigidbody.h + physicsserver/ode/odesliderjoint.h physicsserver/ode/odesoftbody.h physicsserver/ode/odespace.h physicsserver/ode/odespherecollider.h physicsserver/ode/odestaticbody.h physicsserver/ode/odetransformcollider.h + physicsserver/ode/odeuniversaljoint.h physicsserver/ode/odeworld.h physicsserver/ode/odewrapper.h @@ -220,9 +238,11 @@ physicsserver/velocitycontroller_c.cpp physicsserver/joint.cpp physicsserver/joint_c.cpp + physicsserver/generic6dofjoint.cpp physicsserver/generic6dofjoint_c.cpp physicsserver/balljoint.cpp physicsserver/balljoint_c.cpp + physicsserver/conetwistjoint.cpp physicsserver/conetwistjoint_c.cpp physicsserver/hingejoint.cpp physicsserver/hingejoint_c.cpp @@ -238,6 +258,7 @@ physicsserver/angularmotor_c.cpp #ODE-specific files + physicsserver/ode/odeballjoint.cpp physicsserver/ode/odebody.cpp physicsserver/ode/odeboxcollider.cpp physicsserver/ode/odecapsulecollider.cpp @@ -245,20 +266,28 @@ physicsserver/ode/odecompoundcollider.cpp physicsserver/ode/odeconcavecollider.cpp physicsserver/ode/odeconecollider.cpp + physicsserver/ode/odeconetwistjoint.cpp physicsserver/ode/odeconvexcollider.cpp physicsserver/ode/odecylindercollider.cpp physicsserver/ode/odedynamicbody.cpp physicsserver/ode/odeemptycollider.cpp + physicsserver/ode/odefixedjoint.cpp + physicsserver/ode/odegeneric6dofjoint.cpp + physicsserver/ode/odehingejoint.cpp + physicsserver/ode/odehinge2joint.cpp + physicsserver/ode/odejoint.cpp physicsserver/ode/odephysicsobject.cpp physicsserver/ode/odephysicsserver.cpp physicsserver/ode/odeplanecollider.cpp physicsserver/ode/oderaycollider.cpp physicsserver/ode/oderigidbody.cpp + physicsserver/ode/odesliderjoint.cpp physicsserver/ode/odesoftbody.cpp physicsserver/ode/odespace.cpp physicsserver/ode/odespherecollider.cpp physicsserver/ode/odestaticbody.cpp physicsserver/ode/odetransformcollider.cpp + physicsserver/ode/odeuniversaljoint.cpp physicsserver/ode/odeworld.cpp sceneserver/basenode.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -17,6 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/ode/odeballjoint.h> #include <oxygen/physicsserver/balljoint.h> using namespace oxygen; @@ -25,6 +26,7 @@ BallJoint::BallJoint() : Generic6DOFJoint() { + mBallJointImp = boost::shared_ptr<ODEBallJoint>(new ODEBallJoint()); } BallJoint::~BallJoint() @@ -88,6 +90,3 @@ // no ode get param fkt. defined return 0; } - - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/balljoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -25,6 +25,7 @@ namespace oxygen { +class BallJointInt; class OXYGEN_API BallJoint : public Generic6DOFJoint { @@ -42,7 +43,7 @@ the two bodies. If the joint is perfectly satisfied, the joint anchor point will be the same for both bodies. */ - salt::Vector3f GetAnchor (EBodyIndex idx); + salt::Vector3f GetAnchor(EBodyIndex idx); protected: /** creates a new contact joint */ @@ -53,6 +54,9 @@ /** returns a joint parameter value */ virtual float GetParameter(int parameter) const; + +private: + boost::shared_ptr<BallJointInt> mBallJointImp; }; DECLARE_CLASS(BallJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-16 10:43:50 UTC (rev 122) @@ -22,7 +22,6 @@ #ifndef OXYGEN_COLLIDER_H #define OXYGEN_COLLIDER_H -//#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/oxygen_defines.h> #include <string> Added: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,42 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: joint.h 107 2009-11-25 06:09:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/conetwistjoint.h> +#include <oxygen/physicsserver/ode/odeconetwistjoint.h> + +using namespace oxygen; + +ConeTwistJoint::ConeTwistJoint() : Generic6DOFJoint(){ + mConeTwistJointImp = boost::shared_ptr<ODEConeTwistJoint>(new ODEConeTwistJoint()); +} + +ConeTwistJoint::~ConeTwistJoint(){ + +} + +void ConeTwistJoint::SetParameter(int parameter, float value){ + +} + +float ConeTwistJoint::GetParameter(int parameter) const{ + return 0.0; +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/conetwistjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -27,6 +27,8 @@ namespace oxygen { +class ConeTwistJointInt; + /** ConeTwistJoint is not yet implemented. */ @@ -35,13 +37,16 @@ { public: - ConeTwistJoint() : Generic6DOFJoint(){}; - virtual ~ConeTwistJoint(){}; + ConeTwistJoint(); + virtual ~ConeTwistJoint(); //overwrite pure virtual methods inherited from Joint //to shut the compiler up - void SetParameter(int parameter, float value){}; - float GetParameter(int parameter) const {}; + void SetParameter(int parameter, float value); + float GetParameter(int parameter) const; + +private: + boost::shared_ptr<ConeTwistJointInt> mConeTwistJointImp; }; DECLARE_CLASS(ConeTwistJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -18,14 +18,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/fixedjoint.h> +#include <oxygen/physicsserver/ode/odefixedjoint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; -using namespace boost; -using namespace salt; FixedJoint::FixedJoint() : Generic6DOFJoint() { + mFixedJointImp = boost::shared_ptr<ODEFixedJoint>(new ODEFixedJoint()); } FixedJoint::~FixedJoint() @@ -58,4 +58,3 @@ { dJointSetFixed(mODEJoint); } - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/fixedjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -25,12 +25,15 @@ namespace oxygen { +class FixedJointInt; + /** The fixed joint maintains a fixed relative position and orientation between two bodies, or between a body and the static environment. */ class OXYGEN_API FixedJoint : public Generic6DOFJoint { + public: FixedJoint(); virtual ~FixedJoint(); @@ -49,6 +52,9 @@ /** returns a joint parameter value */ virtual float GetParameter(int parameter) const; + +private: + boost::shared_ptr<FixedJointInt> mFixedJointImp; }; DECLARE_CLASS(FixedJoint); Added: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,34 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: joint.h 107 2009-11-25 06:09:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/generic6dofjoint.h> +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> + +using namespace oxygen; + +Generic6DOFJoint::Generic6DOFJoint() : Joint(){ + mGeneric6DOFJointImp = boost::shared_ptr<ODEGeneric6DOFJoint>(new ODEGeneric6DOFJoint()); +} + +Generic6DOFJoint::~Generic6DOFJoint(){ + +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/generic6dofjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -27,6 +27,8 @@ namespace oxygen { +class Generic6DOFJointInt; + /** Generic6DOFJoint is a placeholder class for "six degrees of freedom" - joints. They are supported by some 3D modelling tools and simspark shall eventually be able to import models created @@ -36,8 +38,11 @@ class OXYGEN_API Generic6DOFJoint : public Joint { public: - Generic6DOFJoint() : Joint(){}; - virtual ~Generic6DOFJoint(){}; + Generic6DOFJoint(); + virtual ~Generic6DOFJoint(); + +private: + boost::shared_ptr<Generic6DOFJointInt> mGeneric6DOFJointImp; }; DECLARE_ABSTRACTCLASS(Generic6DOFJoint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hinge2joint.h> +#include <oxygen/physicsserver/ode/odehinge2joint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -26,6 +27,7 @@ Hinge2Joint::Hinge2Joint() : Generic6DOFJoint() { + mHinge2JointImp = boost::shared_ptr<ODEHinge2Joint>(new ODEHinge2Joint()); } Hinge2Joint::~Hinge2Joint() @@ -128,8 +130,3 @@ { return dJointGetHinge2Param(mODEJoint, parameter); } - - - - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hinge2joint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -25,6 +25,7 @@ namespace oxygen { +class Hinge2JointInt; class OXYGEN_API Hinge2Joint : public Generic6DOFJoint { @@ -62,6 +63,9 @@ /** returns a joint parameter value */ virtual float GetParameter(int parameter) const; + +private: + boost::shared_ptr<Hinge2JointInt> mHinge2JointImp; }; DECLARE_CLASS(Hinge2Joint); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -18,6 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <oxygen/physicsserver/hingejoint.h> +#include <oxygen/physicsserver/ode/odehingejoint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -26,6 +27,7 @@ HingeJoint::HingeJoint() : Generic6DOFJoint() { + mHingeJointImp = boost::shared_ptr<ODEHingeJoint>(new ODEHingeJoint()); } HingeJoint::~HingeJoint() @@ -138,9 +140,3 @@ { return dJointGetHingeParam(mODEJoint, parameter); } - - - - - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/hingejoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -26,6 +26,7 @@ namespace oxygen { class RigidBody; +class HingeJointInt; class OXYGEN_API HingeJoint : public Generic6DOFJoint { @@ -77,6 +78,9 @@ protected: /** creates a new hingejoint joint */ virtual void OnLink(); + +private: + boost::shared_ptr<HingeJointInt> mHingeJointImp; }; DECLARE_CLASS(HingeJoint); Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/balljointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,45 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_BALLJOINTINT_H +#define OXYGEN_BALLJOINTINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ +class RigidBody; +class Joint; + +class OXYGEN_API BallJointInt +{ +public: + virtual void SetAnchor(const salt::Vector3f& anchor) = 0; + virtual salt::Vector3f GetAnchor1() = 0; + virtual salt::Vector3f GetAnchor2() = 0; + virtual void CreateBallJoint(long world) = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_BALLJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/conetwistjointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,38 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_CONETWISTJOINTINT_H +#define OXYGEN_CONETWISTJOINTINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API ConeTwistJointInt +{ + +}; + +} //namespace oxygen + +#endif //OXYGEN_CONETWISTJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/fixedjointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,36 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: fixedjoint.h 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_FIXEDJOINTINT_H +#define OXYGEN_FIXEDJOINTINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen{ + +class OXYGEN_API FixedJointInt{ + +public: + virtual void CreateFixedJoint(long world) = 0; + virtual void SetFixed() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_FIXEDJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/generic6dofjointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,38 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_GENERIC6DOFJOINTINT_H +#define OXYGEN_GENERIC6DOFJOINTINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API Generic6DOFJointInt +{ + +}; + +} //namespace oxygen + +#endif //OXYGEN_GENERIC6DOFJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hinge2jointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: hingejoint.h 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_HINGE2JOINTINT_H +#define OXYGEN_HINGE2JOINTINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen{ + +class OXYGEN_API Hinge2JointInt{ + +public: + virtual void CreateHinge2Joint(long world) = 0; + virtual void SetAnchor(const salt::Vector3f& anchor, + const salt::Vector3f& up, + const salt::Vector3f& right) = 0; + virtual salt::Vector3f GetAnchor1() = 0; + virtual salt::Vector3f GetAnchor2() = 0; + virtual float GetAngle() = 0; + virtual float GetAngleRate1() = 0; + virtual float GetAngleRate2() = 0; + virtual void SetParameter(int parameter, float value) = 0; + virtual float GetParameter(int parameter) const = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_HINGE2JOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/hingejointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,45 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: hingejoint.h 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_HINGEJOINTINT_H +#define OXYGEN_HINGEJOINTINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen{ + +class OXYGEN_API HingeJointInt{ + +public: + virtual void CreateHingeJoint(long world) = 0; + virtual void SetAnchor(const salt::Vector3f& anchor) = 0; + virtual salt::Vector3f GetAnchor1() = 0; + virtual salt::Vector3f GetAnchor2() = 0; + virtual void SetAxis(const salt::Vector3f& axis) = 0; + virtual salt::Vector3f GetAxis() = 0; + virtual float GetAngle() const = 0; + virtual float GetAngleRate() const = 0; + virtual void SetParameter(int parameter, float value) = 0; + virtual float GetParameter(int parameter) const = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_HINGEJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/jointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,127 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_JOINTINT_H +#define OXYGEN_JOINTINT_H + +#include <oxygen/physicsserver/ode/odewrapper.h> +#include <boost/smart_ptr/shared_ptr.hpp> +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> +#include <string> + +namespace oxygen +{ +class RigidBody; +class Joint; + +class OXYGEN_API JointInt +{ +public: + enum EBodyIndex + { + BI_FIRST = 0, + BI_SECOND = 1 + }; + + enum EAxisIndex + { + AI_FIRST = 0, + AI_SECOND = 1, + AI_THIRD = 2 + }; + + static Joint* GetJoint(long jointID){ + + } + + static bool AreConnected(boost::shared_ptr<RigidBody> body1, + boost::shared_ptr<RigidBody> body2){ + + } + + static bool AreConnectedExcluding(boost::shared_ptr<RigidBody> body1, + boost::shared_ptr<RigidBody> body2, + int joint_type){ + + } + + virtual void DestroyJoint() = 0; + virtual void Attach(boost::shared_ptr<RigidBody> body1, + boost::shared_ptr<RigidBody> body2) = 0; + virtual void Attach(const std::string& path1, const std::string& path2) = 0; + virtual int GetType() const = 0; + virtual boost::shared_ptr<RigidBody> GetBody(EBodyIndex idx) = 0; + virtual void EnableFeedback(bool enable) = 0; + virtual bool FeedbackEnabled() const = 0; + virtual salt::Vector3f GetFeedbackForce(EBodyIndex idx) const = 0; + virtual salt::Vector3f GetFeedbackTorque(EBodyIndex idx) const = 0; + virtual void SetFudgeFactor(EAxisIndex idx, float fudge_factor) = 0; + virtual float GetFudgeFactor(EAxisIndex idx) const = 0; + virtual void SetBounce(EAxisIndex idx, float bounce) = 0; + virtual float GetBounce(EAxisIndex idx) const = 0; + virtual void SetLowStopDeg(EAxisIndex idx, float deg) = 0; + virtual float GetLowStopDeg(EAxisIndex idx) const = 0; + virtual void SetHighStopDeg(EAxisIndex idx, float deg) = 0; + virtual float GetHighStopDeg(EAxisIndex idx) const = 0; + virtual void SetLowStopPos(EAxisIndex idx, float deg) = 0; + virtual float GetLowStopPos(EAxisIndex idx) const = 0; + virtual void SetHighStopPos(EAxisIndex idx, float deg) = 0; + virtual float GetHighStopPos(EAxisIndex idx) const = 0; + virtual void SetCFM(EAxisIndex idx, float cfm) = 0; + virtual float GetCFM(EAxisIndex idx) const = 0; + virtual void SetStopCFM(EAxisIndex idx, float cfm) = 0; + virtual float GetStopCFM(EAxisIndex idx) const = 0; + virtual void SetStopERP(EAxisIndex idx, float erp) = 0; + virtual float GetStopERP(EAxisIndex idx) const = 0; + virtual void SetSuspensionERP(EAxisIndex idx, float erp) = 0; + virtual float GetSuspensionERP(EAxisIndex idx) const = 0; + virtual void SetSuspensionCFM(EAxisIndex idx, float cfm) = 0; + virtual float GetSuspensionCFM(EAxisIndex idx) const = 0; + virtual void SetLinearMotorVelocity(EAxisIndex idx, float vel) = 0; + virtual float GetLinearMotorVelocity(EAxisIndex idx) const = 0; + virtual void SetAngularMotorVelocity(EAxisIndex idx, float deg) = 0; + virtual float GetAngularMotorVelocity(EAxisIndex idx) const = 0; + virtual void SetMaxMotorForce(EAxisIndex idx, float f) = 0; + virtual float GetMaxMotorForce(EAxisIndex idx) const = 0; + virtual void SetParameter(int parameter, float value) = 0; + virtual float GetParameter(int parameter) const = 0; + virtual void SetJointMaxSpeed1(float rad) = 0; + virtual void SetJointMaxSpeed2(float rad) = 0; + virtual float GetJointMaxSpeed1() const = 0; + virtual float GetJointMaxSpeed2() const = 0; + virtual bool IsLimitJointMaxSpeed1() const = 0; + virtual bool IsLimitJointMaxSpeed2() const = 0; + virtual void OnLink() = 0; + +protected: + dJointID mODEJoint; + boost::shared_ptr<dJointFeedback> mFeedback; + float mJointMaxSpeed1; + bool mIsLimitJointMaxSpeed1; + float mJointMaxSpeed2; + bool mIsLimitJointMaxSpeed2; +}; + +} //namespace oxygen + +#endif //OXYGEN_JOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_SLIDERJOINTINT_H +#define OXYGEN_SLIDERJOINTINT_H + +#include <boost/smart_ptr/shared_ptr.hpp> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ +class RigidBody; + +class OXYGEN_API SliderJointInt +{ +public: + virtual void CreateSliderJoint(long world) = 0; + virtual float GetPosition() = 0; + virtual float GetPositionRate() = 0; + virtual void SetSliderAxis(salt::Vector3f& up) = 0; + virtual void SetParameter(int parameter, float value) = 0; + virtual float GetParameter(int parameter) const = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_SLIDERJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/universaljointint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,54 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_UNIVERSALJOINTINT_H +#define OXYGEN_UNIVERSALJOINTINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API UniversalJointInt +{ + +public: + virtual void CreateUniversalJoint(long world) = 0; + virtual void SetAnchor(const salt::Vector3f& anchor) = 0; + virtual salt::Vector3f GetAnchor1() = 0; + virtual salt::Vector3f GetAnchor2() = 0; + virtual void SetAxis1(const salt::Vector3f& axis) = 0; + virtual void SetAxis2(const salt::Vector3f& axis) = 0; + virtual salt::Vector3f GetAxis1() const = 0; + virtual salt::Vector3f GetAxis2() const = 0; + virtual float GetAngle1() const = 0; + virtual float GetAngle2() const = 0; + virtual float GetAngleRate1() const = 0; + virtual float GetAngleRate2() const = 0; + virtual void SetParameter(int parameter, float value) = 0; + virtual float GetParameter(int parameter) const = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_UNIVERSALJOINTINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -19,6 +19,7 @@ */ #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/rigidbody.h> +#include <oxygen/physicsserver/ode/odejoint.h> #include <zeitgeist/logserver/logserver.h> using namespace oxygen; @@ -31,6 +32,7 @@ mJointMaxSpeed1(0), mJointMaxSpeed2(0), mIsLimitJointMaxSpeed1(false), mIsLimitJointMaxSpeed2(false) { + mJointImp = boost::shared_ptr<ODEJoint>(new ODEJoint()); } Joint::~Joint() Modified: branches/multiphys/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2009-12-15 11:29:57 UTC (rev 121) +++ branches/multiphys/spark/lib/oxygen/physicsserver/joint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -29,8 +29,9 @@ namespace oxygen { class RigidBody; +class JointInt; -/** \class Joint encapsulates an ODE joint object. A joint is a +/** \class Joint encapsulates a joint object. A joint is a relationship (a constraint) that is enforced between two bodies so that they can only have certain positions and orientations relative to each other. @@ -67,7 +68,7 @@ Joint(); virtual ~Joint(); - /** destroy the managed ODE object */ + /** destroy the managed physics object */ virtual void DestroyPhysicsObject(); /** attaches the joint to some new bodies. If the joint is already @@ -94,8 +95,8 @@ /** returns the Joint node corresponding to the given joint */ static boost::shared_ptr<Joint> GetJoint(long jointID); - /** returns the type of the managed ODE joint, possible return - values are dJointTypeNone, dJointTypeBall, dJointTypeHinge, + /** returns the type of the managed joint, possible return + values from ODE are dJointTypeNone, dJointTypeBall, dJointTypeHinge, dJointTypeSlider, dJointTypeContact, dJointTypeUniversal, dJointTypeHinge2, dJointTypeFixed or dJointTypeAMotor. */ @@ -243,7 +244,7 @@ /** sets the maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) - turns off the motor + turns off the motor. */ void SetMaxMotorForce(EAxisIndex idx, float f); @@ -277,14 +278,14 @@ bool IsLimitJointMaxSpeed2() const; protected: - /** associated the created ODE joint with this node */ + /** associates the created joint with this node */ virtual void OnLink(); - /** get the node at 'path' and tries a cast to Body */ + /** gets the node at 'path' and tries a cast to Body */ boost::shared_ptr<RigidBody> GetBody(const std::string& path); protected: - /** the managed ODE joint */ + /** the ID of the managed joint */ dJointID mODEJoint; /** the allocated joint feedback structure */ @@ -298,6 +299,9 @@ /** The maximum joint speed in rad, valid only for universaljoint */ float mJointMaxSpeed2; bool mIsLimitJointMaxSpeed2; + +private: + boost::shared_ptr<JointInt> mJointImp; }; DECLARE_ABSTRACTCLASS(Joint); Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,57 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: balljoint.cpp 112 2009-12-02 10:06:02Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odeballjoint.h> +#include <oxygen/physicsserver/balljoint.h> + +using namespace oxygen; +using namespace boost; +using namespace salt; + +ODEBallJoint::ODEBallJoint() : ODEGeneric6DOFJoint() +{ +} + +void ODEBallJoint::CreateBallJoint(long world) +{ + mODEJoint = dJointCreateBall((dWorldID) world, 0); +} + +void ODEBallJoint::SetAnchor(const Vector3f& gAnchor) +{ + dJointSetBallAnchor (mODEJoint, gAnchor[0], gAnchor[1], gAnchor[2]); +} + +Vector3f ODEBallJoint::GetAnchor1() +{ + dReal anchor[3]; + dJointGetBallAnchor (mODEJoint, anchor); + Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + + return pos; +} + +Vector3f ODEBallJoint::GetAnchor2() +{ + dReal anchor[3]; + dJointGetBallAnchor2(mODEJoint, anchor); + Vector3f pos = Vector3f(anchor[0],anchor[1],anchor[2]); + + return pos; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeballjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,45 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_ODEBALLJOINT_H +#define OXYGEN_ODEBALLJOINT_H + +#include <oxygen/physicsserver/int/balljointint.h> +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API ODEBallJoint : public BallJointInt, public ODEGeneric6DOFJoint +{ +public: + ODEBallJoint(); + void SetAnchor(const salt::Vector3f& anchor); + salt::Vector3f GetAnchor1(); + salt::Vector3f GetAnchor2(); + void CreateBallJoint(long world); +}; + +} //namespace oxygen + +#endif //OXYGEN_BALLJOINTINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,28 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odeconetwistjoint.h> + +using namespace oxygen; + +ODEConeTwistJoint::ODEConeTwistJoint() : ODEGeneric6DOFJoint(){ + +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconetwistjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,40 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODECONETWISTJOINT_H +#define OXYGEN_ODECONETWISTJOINT_H + +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/int/conetwistjointint.h> + +namespace oxygen +{ + +class OXYGEN_API ODEConeTwistJoint : public ConeTwistJointInt, public ODEGeneric6DOFJoint +{ + +public: + ODEConeTwistJoint(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODECONETWISTJOINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,38 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: fixedjoint.cpp 112 2009-12-02 10:06:02Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odefixedjoint.h> + +using namespace oxygen; +using namespace boost; + +ODEFixedJoint::ODEFixedJoint() : ODEGeneric6DOFJoint() +{ +} + +void ODEFixedJoint::CreateFixedJoint(long world) +{ + mODEJoint = dJointCreateFixed((dWorldID) world, 0); +} + +void ODEFixedJoint::SetFixed() +{ + dJointSetFixed(mODEJoint); +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odefixedjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,39 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: fixedjoint.h 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEFIXEDJOINT_H +#define OXYGEN_ODEFIXEDJOINT_H + +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> +#include <oxygen/physicsserver/int/fixedjointint.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen{ + +class OXYGEN_API ODEFixedJoint : public FixedJointInt, public ODEGeneric6DOFJoint{ + +public: + ODEFixedJoint(); + void CreateFixedJoint(long world); + void SetFixed(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEFIXEDJOINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,28 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odegeneric6dofjoint.h> + +using namespace oxygen; + +ODEGeneric6DOFJoint::ODEGeneric6DOFJoint() : ODEJoint(){ + +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odegeneric6dofjoint.h 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,39 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEGENERIC6DOFJOINT_H +#define OXYGEN_ODEGENERIC6DOFJOINT_H + +#include <oxygen/physicsserver/ode/odejoint.h> +#include <oxygen/physicsserver/int/generic6dofjointint.h> + +namespace oxygen +{ + +class OXYGEN_API ODEGeneric6DOFJoint : public Generic6DOFJointInt, public ODEJoint +{ +public: + ODEGeneric6DOFJoint(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEGENERIC6DOFJOINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odehinge2joint.cpp 2009-12-16 10:43:50 UTC (rev 122) @@ -0,0 +1,84 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: hinge2joint.cpp 112 2009-12-02 10:06:02Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odehinge2joint.h> + +using namespace oxygen; +using namespace boost; +using namespace salt; + +ODEHinge2Joint::ODEHinge2Joint() : ODEGeneric6DOFJoint() +{ +} + +void ODEHinge2Joint::CreateHinge2Joint(long world) +{ + mODEJoint = dJointCreateHinge2((dWorldID) world, 0); +... [truncated message content] |
From: <yx...@us...> - 2009-12-15 11:30:07
|
Revision: 121 http://simspark.svn.sourceforge.net/simspark/?rev=121&view=rev Author: yxu Date: 2009-12-15 11:29:57 +0000 (Tue, 15 Dec 2009) Log Message: ----------- * add accelerometer in the chest of NAO * make some functions const Modified Paths: -------------- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg trunk/spark/lib/oxygen/physicsserver/body.cpp trunk/spark/lib/oxygen/physicsserver/body.h trunk/spark/lib/oxygen/physicsserver/odeobject.cpp trunk/spark/lib/oxygen/physicsserver/odeobject.h trunk/spark/lib/oxygen/sceneserver/basenode.cpp trunk/spark/lib/oxygen/sceneserver/basenode.h trunk/spark/plugin/CMakeLists.txt Added Paths: ----------- trunk/spark/plugin/accelerometer/ trunk/spark/plugin/accelerometer/CMakeLists.txt trunk/spark/plugin/accelerometer/accelerometer.cpp trunk/spark/plugin/accelerometer/accelerometer.h trunk/spark/plugin/accelerometer/accelerometer_c.cpp trunk/spark/plugin/accelerometer/export.cpp Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-15 11:29:57 UTC (rev 121) @@ -71,6 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) + (nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: trunk/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -18,6 +18,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "salt/tvector.h" + + #include "body.h" #include "world.h" #include "../sceneserver/scene.h" @@ -413,6 +416,15 @@ return Vector3f(vel[0], vel[1], vel[2]); } +Vector3f +Body::GetLocalAngularVelocity() const +{ + const dReal* vel = dBodyGetAngularVel(mODEBody); + Vector3f w; + dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], w.GetData()); + return w; +} + void Body::SetAngularVelocity(const Vector3f& vel) { @@ -531,6 +543,12 @@ dBodyAddForce(mODEBody, force.x(), force.y(), force.z()); } +Vector3f Body::GetForce() const +{ + const dReal* f = dBodyGetForce(mODEBody); + return Vector3f(f[0], f[1], f[2]); +} + void Body::AddTorque(const Vector3f& torque) { Modified: trunk/spark/lib/oxygen/physicsserver/body.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.h 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/physicsserver/body.h 2009-12-15 11:29:57 UTC (rev 121) @@ -205,6 +205,9 @@ /** gets the rotation of this body */ salt::Matrix GetRotation() const; + /** returns the current angular velocity of this body in local coordination */ + salt::Vector3f GetLocalAngularVelocity() const; + /** returns the current angular velocity of this body */ salt::Vector3f GetAngularVelocity() const; @@ -217,6 +220,9 @@ /** applies a force to the managed ODE body */ void AddForce(const salt::Vector3f& force); + /** returns the total force applied to this body */ + salt::Vector3f GetForce() const; + /** aplies a force to the managed ODE body */ void AddTorque(const salt::Vector3f& torque); Modified: trunk/spark/lib/oxygen/physicsserver/odeobject.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject.cpp 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/physicsserver/odeobject.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -42,7 +42,7 @@ } /** returns the world node */ -shared_ptr<World> ODEObject::GetWorld() +shared_ptr<World> ODEObject::GetWorld() const { shared_ptr<Scene> scene = GetScene(); if (scene.get() == 0) Modified: trunk/spark/lib/oxygen/physicsserver/odeobject.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-12-15 11:29:57 UTC (rev 121) @@ -61,10 +61,10 @@ /** destroy the managed ODE object */ virtual void DestroyODEObject() = 0; -protected: /** returns the world node */ - boost::shared_ptr<World> GetWorld(); + boost::shared_ptr<World> GetWorld() const; +protected: /** finds the nearest parent space node */ boost::shared_ptr<Space> GetSpace(); Modified: trunk/spark/lib/oxygen/sceneserver/basenode.cpp =================================================================== --- trunk/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -141,7 +141,7 @@ } } -shared_ptr<Scene> BaseNode::GetScene() +shared_ptr<Scene> BaseNode::GetScene() const { // is this node the scene node ? shared_ptr<Scene> self = Modified: trunk/spark/lib/oxygen/sceneserver/basenode.h =================================================================== --- trunk/spark/lib/oxygen/sceneserver/basenode.h 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/lib/oxygen/sceneserver/basenode.h 2009-12-15 11:29:57 UTC (rev 121) @@ -96,7 +96,7 @@ void UpdateHierarchy(); /** moves up the hierarchy, until it finds a scene */ - boost::shared_ptr<Scene> GetScene(); + boost::shared_ptr<Scene> GetScene() const; /** enables debug mode controls */ void EnableDebugMode(); Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-12-14 11:14:38 UTC (rev 120) +++ trunk/spark/plugin/CMakeLists.txt 2009-12-15 11:29:57 UTC (rev 121) @@ -9,6 +9,7 @@ set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework) endif (APPLE AND USE_COREFOUNDATION) +add_subdirectory(accelerometer) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) add_subdirectory(forceeffector) Added: trunk/spark/plugin/accelerometer/CMakeLists.txt =================================================================== --- trunk/spark/plugin/accelerometer/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/accelerometer/CMakeLists.txt 2009-12-15 11:29:57 UTC (rev 121) @@ -0,0 +1,16 @@ + +set(accelerometer_LIB_SRCS + export.cpp + accelerometer.h + accelerometer.cpp + accelerometer_c.cpp +) + +add_library(accelerometer MODULE ${accelerometer_LIB_SRCS}) + +target_link_libraries(accelerometer ${spark_libs} ${Boost_LIBRARIES}) + +set_target_properties(accelerometer PROPERTIES VERSION 0.0.0 SOVERSION 0) +if (NOT APPLE) + install(TARGETS accelerometer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (NOT APPLE) Added: trunk/spark/plugin/accelerometer/accelerometer.cpp =================================================================== --- trunk/spark/plugin/accelerometer/accelerometer.cpp (rev 0) +++ trunk/spark/plugin/accelerometer/accelerometer.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -0,0 +1,93 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "oxygen/physicsserver/world.h" + + +#include "oxygen/physicsserver/body.h" + + +#include "accelerometer.h" +#include <oxygen/sceneserver/transform.h> + +// using namespace kerosin; +using namespace oxygen; +using namespace boost; +using namespace zeitgeist; +using namespace salt; +using namespace std; + +Accelerometer::Accelerometer() : oxygen::Perceptor() +{ +} + +Accelerometer::~Accelerometer() +{ +} + +void Accelerometer::OnLink() +{ + shared_ptr<Transform> transformParent = shared_static_cast<Transform> + (FindParentSupportingClass<Transform>().lock()); + + mBody = shared_static_cast<const Body> + (transformParent->GetChildOfClass("Body")); + + mGravity = mBody->GetWorld()->GetGravity(); + mLastVel = mBody->GetVelocity(); +} + +bool Accelerometer::Percept(boost::shared_ptr<PredicateList> predList) +{ + Predicate &predicate = predList->AddPredicate(); + predicate.name = "ACC"; + predicate.parameter.Clear(); + + ParameterList &nameElement = predicate.parameter.AddList(); + nameElement.AddValue(std::string("n")); + nameElement.AddValue(GetName()); + + ParameterList &ratesElement = predicate.parameter.AddList(); + ratesElement.AddValue(std::string("a")); + ratesElement.AddValue(mAcc.x()); + ratesElement.AddValue(mAcc.y()); + ratesElement.AddValue(mAcc.z()); + + return true; +} + +void Accelerometer::PrePhysicsUpdateInternal(float deltaTime) +{ +// Vector3f F = mBody->GetForce(); +// float mass = mBody->GetMass(); +// mAcc = F / mass - mGravity; + + Vector3f vel = mBody->GetVelocity(); + Vector3f acc = (vel - mLastVel) / deltaTime; + acc -= mGravity; + + Matrix invRot = mBody->GetRotation(); + invRot.InvertRotationMatrix(); + acc = invRot * acc; + + float k = 0.9; + mAcc = k*mAcc + (1-k)*acc; + mLastVel = vel; +} Added: trunk/spark/plugin/accelerometer/accelerometer.h =================================================================== --- trunk/spark/plugin/accelerometer/accelerometer.h (rev 0) +++ trunk/spark/plugin/accelerometer/accelerometer.h 2009-12-15 11:29:57 UTC (rev 121) @@ -0,0 +1,49 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ACCELEROMETER_H +#define ACCELEROMETER_H + +#include <oxygen/agentaspect/perceptor.h> +#include <oxygen/physicsserver/body.h> + +class Accelerometer : public oxygen::Perceptor { +public: + Accelerometer(); + virtual ~Accelerometer(); + + //! \return true, if valid data is available and false otherwise. + bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); + + virtual void OnLink(); + +protected: + virtual void PrePhysicsUpdateInternal(float deltaTime); + +private: + boost::shared_ptr<const oxygen::Body> mBody; + salt::Vector3f mAcc; + salt::Vector3f mGravity; + salt::Vector3f mLastVel; +}; + +DECLARE_CLASS(Accelerometer); + +#endif //ACCELEROMETER_H Added: trunk/spark/plugin/accelerometer/accelerometer_c.cpp =================================================================== --- trunk/spark/plugin/accelerometer/accelerometer_c.cpp (rev 0) +++ trunk/spark/plugin/accelerometer/accelerometer_c.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" + +using namespace boost; +using namespace oxygen; + +void CLASS(Accelerometer)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/Perceptor); +} Added: trunk/spark/plugin/accelerometer/export.cpp =================================================================== --- trunk/spark/plugin/accelerometer/export.cpp (rev 0) +++ trunk/spark/plugin/accelerometer/export.cpp 2009-12-15 11:29:57 UTC (rev 121) @@ -0,0 +1,26 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" +#include <zeitgeist/zeitgeist.h> + +ZEITGEIST_EXPORT_BEGIN() + ZEITGEIST_EXPORT(Accelerometer); +ZEITGEIST_EXPORT_END() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-14 11:14:54
|
Revision: 120 http://simspark.svn.sourceforge.net/simspark/?rev=120&view=rev Author: a-held Date: 2009-12-14 11:14:38 +0000 (Mon, 14 Dec 2009) Log Message: ----------- implemented bridge pattern for TransformCollider implemented bridge pattern for Collider superclass declare several classes in genericphysicsobjects.h so you can tell what a pointer should be pointing to Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.h branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.cpp branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.h branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.h branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.cpp branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h Removed Paths: ------------- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobject.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-14 11:14:38 UTC (rev 120) @@ -14,7 +14,7 @@ gamecontrolserver/behavior.h oxygen.h oxygen_defines.h - physicsserver/genericphysicsobject.h + physicsserver/genericphysicsobjects.h physicsserver/physicsobject.h physicsserver/body.h physicsserver/rigidbody.h @@ -75,6 +75,7 @@ physicsserver/int/spaceint.h physicsserver/int/spherecolliderint.h physicsserver/int/staticbodyint.h + physicsserver/int/transformcolliderint.h physicsserver/int/worldint.h #ode-specific files @@ -98,6 +99,7 @@ physicsserver/ode/odespace.h physicsserver/ode/odespherecollider.h physicsserver/ode/odestaticbody.h + physicsserver/ode/odetransformcollider.h physicsserver/ode/odeworld.h physicsserver/ode/odewrapper.h @@ -256,6 +258,7 @@ physicsserver/ode/odespace.cpp physicsserver/ode/odespherecollider.cpp physicsserver/ode/odestaticbody.cpp + physicsserver/ode/odetransformcollider.cpp physicsserver/ode/odeworld.cpp sceneserver/basenode.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -45,9 +45,9 @@ // create a unit box mBoxColliderImp->CreateBox(); - mODEGeom = (dGeomID) mBoxColliderImp->GetGeomID(); + mGeomID = mBoxColliderImp->GetGeomID(); - return (mBoxColliderImp->GetGeomID() != 0); + return (mGeomID != 0); } void BoxCollider::GetBoxLengths(Vector3f& extents) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -68,9 +68,9 @@ } mCapsuleColliderImp->CreateCapsule(); - mODEGeom = (dGeomID) mCapsuleColliderImp->GetGeomID(); + mGeomID = mCapsuleColliderImp->GetGeomID(); - return (mCapsuleColliderImp->GetGeomID() != 0); + return (mGeomID != 0); } float CapsuleCollider::GetPointDepth(const Vector3f& pos) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/collider.h> #include <oxygen/physicsserver/ode/odecollider.h> #include <oxygen/physicsserver/collisionhandler.h> @@ -33,7 +34,7 @@ using namespace boost; using namespace std; -Collider::Collider() : PhysicsObject(), mODEGeom(0) +Collider::Collider() : PhysicsObject(), mGeomID(0) { mColliderImp = boost::shared_ptr<ODECollider>(new ODECollider()); } @@ -45,15 +46,10 @@ void Collider::OnLink() { PhysicsObject::OnLink(); - + if (mGeomID == 0) return; + weak_ptr<Node> parent = GetParent(); - if ( - (mODEGeom == 0) || - (parent.expired()) - ) - { - return; - } + if (parent.expired()) return; shared_ptr<TransformCollider> tcParent = shared_dynamic_cast<TransformCollider>(parent.lock()); @@ -63,30 +59,23 @@ // our parent is an ODE transform geom that encapsulates // this geom, so register ourself to it. This geom must // not directly register to a space or a body. - dGeomTransformSetGeom((dGeomID) tcParent->GetGeomID(), mODEGeom); + mColliderImp->TransformSetGeom(tcParent->GetGeomID(), mGeomID); + return; } // this geom is independent, so register to space and body // if we have a space add the geom to it long spaceID = FindSpaceID(); - if ( - (spaceID) && - (! dSpaceQuery((dSpaceID) spaceID, mODEGeom)) - ) - { - dGeomSetData(mODEGeom, this); - dSpaceAdd((dSpaceID) spaceID, mODEGeom); - } + mColliderImp->SetSpace(spaceID, mGeomID, this); + // if there is a Body below our parent, link to it shared_ptr<RigidBody> body = shared_static_cast<RigidBody> (parent.lock()->GetChildOfClass("RigidBody")); - if (body.get() != 0) - { - dGeomSetBody (mODEGeom, (dBodyID) body->GetBodyID()); - } else - { + if (body.get() != 0) + mColliderImp->SetBody(body->GetBodyID(), mGeomID); + else{ // no body node found, setup initial position and // orientation identical to the parent node SetRotation(GetWorldTransform()); @@ -97,21 +86,12 @@ void Collider::OnUnlink() { PhysicsObject::OnUnlink(); - - // remove collision geometry from space long space = GetParentSpaceID(); - if ( - (mODEGeom == 0) || - (space == 0) - ) - { - return; - } - - if (space) + if (space && mGeomID) { - dSpaceRemove((dSpaceID) space, mODEGeom); + // remove collision geometry from space + mColliderImp->RemoveFromSpace(mGeomID, space); } } @@ -129,7 +109,7 @@ long Collider::GetGeomID() { - return (long) mODEGeom; + return mGeomID; } bool Collider::AddCollisionHandler(const std::string& handlerName) @@ -149,12 +129,8 @@ } void Collider::OnCollision (boost::shared_ptr<Collider> collidee, - void* contact, ECollisionType type) - -{ - dContact* helpContact = (dContact*) contact; - dContact& ODEContact = (dContact&) *helpContact; - + GenericContact& contact, ECollisionType type) +{ TLeafList handlers; ListChildrenSupportingClass<CollisionHandler>(handlers); @@ -175,7 +151,7 @@ continue; } - handler->HandleCollision(collidee, ODEContact); + handler->HandleCollision(collidee, contact); } } @@ -187,7 +163,7 @@ } Collider* collPtr = - static_cast<Collider*>(dGeomGetData((dGeomID) geomID)); + ColliderInt::GetColliderPointer(geomID); if (collPtr == 0) { @@ -212,73 +188,60 @@ void Collider::SetRotation(const Matrix& rot) { - dMatrix3 ODEMatrix; - GenericPhysicsObject& matrixRef = (GenericPhysicsObject&) ODEMatrix; - ConvertRotationMatrix(rot, matrixRef); - dGeomSetRotation(mODEGeom, ODEMatrix); + mColliderImp->SetRotation(rot, mGeomID); } void Collider::SetPosition(const Vector3f& pos) { Vector3f globalPos(GetWorldTransform() * pos); - dGeomSetPosition (mODEGeom, globalPos[0], globalPos[1], globalPos[2]); + mColliderImp->SetPosition(globalPos, mGeomID); } void Collider::SetLocalPosition(const Vector3f& pos) { - dGeomSetPosition (mODEGeom, pos[0], pos[1], pos[2]); + mColliderImp->SetLocalPosition(pos, mGeomID); } Vector3f Collider::GetPosition() const { - const dReal* pos = dGeomGetPosition(mODEGeom); - return Vector3f(pos[0],pos[1],pos[2]); + return mColliderImp->GetPosition(mGeomID); } long Collider::GetParentSpaceID() { - if (mODEGeom == 0) + if (mGeomID == 0) { return 0; } - return (long) dGeomGetSpace(mODEGeom); + return mColliderImp->GetParentSpaceID(mGeomID); } bool Collider::Intersects(boost::shared_ptr<Collider> collider) { if ( - (mODEGeom == 0) || + (mGeomID == 0) || (collider.get() == 0) ) { return false; } - dContactGeom contact; - - return dCollide - ( - mODEGeom, - (dGeomID) collider->GetGeomID(), - 1, /* ask for at most one collision point */ - &contact, - sizeof(contact) - ) > 0; + return mColliderImp->Intersect(collider, mGeomID); } void Collider::DestroyPhysicsObject() { - if (! mODEGeom) + if (! mGeomID) { return; } - dGeomDestroy(mODEGeom); - mODEGeom = 0; + mColliderImp->DestroyGeom(mGeomID); + mGeomID = 0; } -void Collider::AddNotCollideWithColliderName(const std::string & colliderName, bool isAdd) +void Collider::AddNotCollideWithColliderName(const std::string& colliderName, bool isAdd) { TColliderNameSet::iterator it = mNotCollideWithSet.find(colliderName); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-14 11:14:38 UTC (rev 120) @@ -22,7 +22,7 @@ #ifndef OXYGEN_COLLIDER_H #define OXYGEN_COLLIDER_H -#include <oxygen/physicsserver/ode/odewrapper.h> +//#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/oxygen_defines.h> #include <string> @@ -31,6 +31,7 @@ namespace oxygen { class ColliderInt; +class GenericContact; /** \class Collider encapsulates a geometry object- geom for short. Geoms are the fundamental objects in the collision @@ -87,7 +88,7 @@ symmetric case */ virtual void OnCollision (boost::shared_ptr<Collider> collidee, - void* contact, ECollisionType type); + GenericContact& contact, ECollisionType type); /** registers a new collision handler to this collider. If no collision handler is registered until the first call to @@ -160,8 +161,8 @@ // Members // protected: - /** the ode collision geometry */ - dGeomID mODEGeom; + /** the ID of the managed collision geometry */ + long mGeomID; private: boost::shared_ptr<ColliderInt> mColliderImp; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -21,6 +21,7 @@ */ #include <oxygen/physicsserver/collisionhandler.h> #include <oxygen/physicsserver/collider.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/world.h> #include <oxygen/physicsserver/space.h> #include <oxygen/sceneserver/scene.h> Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-12-14 11:14:38 UTC (rev 120) @@ -31,6 +31,7 @@ class Collider; class World; class Space; +class GenericContact; /** \class CollisionHandler defines an interface for handlers that take action in response to a collision. To each Collider instance @@ -64,7 +65,7 @@ as returned from the ODE dCollide function */ virtual void HandleCollision - (boost::shared_ptr<Collider> collidee, dContact& contact) = 0; + (boost::shared_ptr<Collider> collidee, GenericContact& contact) = 0; /** returns true if a class of CollisionHandlers wants to handle both- a collision and it's symmetric counterpart. Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -150,8 +150,10 @@ } void -ContactJointHandler::HandleCollision(shared_ptr<Collider> collidee, dContact& contact) +ContactJointHandler::HandleCollision(shared_ptr<Collider> collidee, GenericContact& contact) { + dContact& ODEContact = (dContact&) contact; + if ( (mCollider.get() == 0) || (mWorld.get() == 0) || @@ -184,11 +186,11 @@ } // calculate the resulting surface parameters - CalcSurfaceParam(contact.surface,handler->mSurfaceParameter); + CalcSurfaceParam(ODEContact.surface,handler->mSurfaceParameter); // create the contact joint and attach it to the body dJointID joint = dJointCreateContact - ((dWorldID) mWorld->GetWorldID(), mSpace->GetODEJointGroup(), &contact); + ((dWorldID) mWorld->GetWorldID(), mSpace->GetODEJointGroup(), &ODEContact); dJointAttach (joint, myBody, collideeBody); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/contactjointhandler.h 2009-12-14 11:14:38 UTC (rev 120) @@ -51,7 +51,7 @@ as returned from the ODE dCollide function */ virtual void HandleCollision - (boost::shared_ptr<Collider> collidee, dContact& contact); + (boost::shared_ptr<Collider> collidee, GenericContact& contact); /** the ContactJointHandler is not a symmetric handler. See CollisionHandler::IsSymmetricHandler for an explanation Deleted: branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobject.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobject.h 2009-12-14 11:14:38 UTC (rev 120) @@ -1,50 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: joint.h 107 2009-11-25 06:09:10Z a-held $ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef OXYGEN_GENERICPHYSICSOBJECT_H -#define OXYGEN_GENERICPHYSICSOBJECT_H - -#include <oxygen/oxygen_defines.h> - -namespace oxygen -{ -/** GenericPhysicsObject is an empty class that has only supportive - purposes. In many cases, it is required to pass a pointer or a - reference to an engine-specific object on to the abstract layer, - usually when a method of a different class is called. In that case, - the pointer or reference must first be cast to a pointer or reference - to this generic class. After the method call has been delegated by - the abstract layer, the callee can then re-cast the pointer or - reference type to the expected engine-specific type. - - This is done optimistically, i.e. callees trust that callers - will not cast a pointer or reference to a wrong engine-specific type - to a GenericPhysicsObject pointer and then commit a prank call. -*/ - -class OXYGEN_API GenericPhysicsObject -{ - -}; - -} //namespace oxygen - -#endif //OXYGEN_GENERICPHYSICSOBJECT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobjects.h 2009-12-14 11:14:38 UTC (rev 120) @@ -0,0 +1,42 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: joint.h 107 2009-11-25 06:09:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_GENERICPHYSICSOBJECTS_H +#define OXYGEN_GENERICPHYSICSOBJECTS_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ +/** GenericPhysicsObjects declares empty classes that have supportive + purposes. In many cases, it is required to pass a pointer or a + reference to an engine-specific object on to the abstract layer, + usually when a method of a different class is called. In that case, + the pointer or reference must first be cast to a pointer or reference + to one of the generic classes defined here. +*/ + +class OXYGEN_API GenericPhysicsMatrix{}; +class OXYGEN_API GenericContact{}; + +} //namespace oxygen + +#endif //OXYGEN_GENERICPHYSICSOBJECTS_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-14 11:14:38 UTC (rev 120) @@ -35,36 +35,32 @@ class OXYGEN_API ColliderInt { -public: - enum ECollisionType - { - CT_DIRECT, - CT_SYMMETRIC - }; - - typedef std::set<std::string> TColliderNameSet; - - static boost::shared_ptr<Collider> GetCollider(long GeomID){}; - - virtual void OnCollision(boost::shared_ptr<Collider> collidee, dContact& contact, ECollisionType type) = 0; - virtual bool AddCollisionHandler(const std::string& handlerName) = 0; +public: + + virtual void SetPosition(const salt::Vector3f& globalPos, long geomID) = 0; + virtual void SetLocalPosition(const salt::Vector3f& pos, long geomID) = 0; + virtual salt::Vector3f GetPosition(long geomID) const = 0; + virtual void SetRotation(const salt::Matrix& rot, long geomID) = 0; + virtual bool Intersect(boost::shared_ptr<Collider> collider, long geomID) = 0; + virtual long GetParentSpaceID(long geomID) = 0; + virtual void DestroyGeom(long geomID) = 0; virtual long GetGeomID() = 0; - virtual void SetPosition(const salt::Vector3f& pos) = 0; - virtual void SetLocalPosition(const salt::Vector3f& pos) = 0; - virtual salt::Vector3f GetPosition() const = 0; - virtual void SetRotation(const salt::Matrix& rot) = 0; - virtual bool Intersects(boost::shared_ptr<Collider> collider) = 0; - virtual long GetParentSpaceID() = 0; - virtual void AddNotCollideWithColliderName(const std::string& colliderName, bool isAdd) = 0; - virtual const TColliderNameSet& GetNotCollideWithSet() const = 0; - virtual void OnLink() = 0; - virtual void OnUnlink() = 0; - virtual void PrePhysicsUpdateInternal(float deltaTime) = 0; - virtual void DestroyPhysicsObject() = 0; + virtual void TransformSetGeom(long parentGeomID, long geomID) = 0; + virtual void SetSpace(long spaceID, long geomID, Collider* collider) = 0; + virtual void SetBody(long bodyID, long geomID) = 0; + virtual void RemoveFromSpace(long geomID, long spaceID) = 0; + // Here, we have to cheat with the preprocessor, since a static method + // is required, and the bridge pattern requires member variables to + // be used (so we cannot use the bridge pattern) + static Collider* GetColliderPointer(long geomID){ + #ifdef OXYGEN_ODEWRAPPER_H + return static_cast<Collider*>(dGeomGetData( (dGeomID) geomID)); + #endif + } + protected: long mGeomID; - TColliderNameSet mNotCollideWithSet; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2009-12-14 11:14:38 UTC (rev 120) @@ -26,7 +26,7 @@ #include <boost/smart_ptr/shared_ptr.hpp> #include <salt/matrix.h> #include <oxygen/oxygen_defines.h> -#include <oxygen/physicsserver/genericphysicsobject.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> namespace oxygen { @@ -35,8 +35,8 @@ { public: - virtual void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsObject& matrix) = 0; - virtual void ConvertRotationMatrix(const GenericPhysicsObject* matrix, salt::Matrix& rot) const = 0; + virtual void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix) = 0; + virtual void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const = 0; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-14 11:14:38 UTC (rev 120) @@ -90,7 +90,7 @@ protected: /** The ID of the managed body. This must be unique within the simulation. - It is used externally to reference this partcular body. + It is used externally to reference this particular body. */ long mBodyID; Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/transformcolliderint.h 2009-12-14 11:14:38 UTC (rev 120) @@ -0,0 +1,45 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: transformcolliderint.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_TRANSFORMCOLLIDERINT_H +#define OXYGEN_TRANSFORMCOLLIDERINT_H + +#include <oxygen/physicsserver/ode/odewrapper.h> +#include <oxygen/oxygen_defines.h> +#include <set> +#include <string> + +namespace oxygen +{ + +class OXYGEN_API TransformColliderInt +{ + +public: + virtual void CreateTransformCollider() = 0; + virtual void SetColliderParameters(int cleanup, int info) = 0; + virtual long GetGeomID() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_COLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -44,222 +44,47 @@ { } -void ODECollider::OnLink() -{/* - //PhysicsObject::OnLink(); - - - //weak_ptr<Node> parent = GetParent(); - if ( - (mODEGeom == 0) //|| - //(parent.expired()) - ) - { - return; - } - - // shared_ptr<TransformCollider> tcParent = - // shared_dynamic_cast<TransformCollider>(parent.lock()); - - if (tcParent.get() != 0) - { - // our parent is an ODE transform geom that encapsulates - // this geom, so register ourself to it. This geom must - // not directly register to a space or a body. - dGeomTransformSetGeom((dGeomID) tcParent->GetGeomID(), mODEGeom); - return; - } - - // this geom is independent, so register to space and body - // if we have a space add the geom to it - //long spaceID = FindSpaceID(); - if ( - (spaceID) && - (! dSpaceQuery((dSpaceID) spaceID, mODEGeom)) - ) - { - dGeomSetData(mODEGeom, this); - dSpaceAdd((dSpaceID) spaceID, mODEGeom); - } - // if there is a Body below our parent, link to it - shared_ptr<RigidBody> body = shared_static_cast<RigidBody> - (parent.lock()->GetChildOfClass("RigidBody")); - - if (body.get() != 0) - { - dGeomSetBody (mODEGeom, (dBodyID) body->GetBodyID()); - } else - { - // no body node found, setup initial position and - // orientation identical to the parent node - SetRotation(GetWorldTransform()); - SetPosition(Vector3f(0,0,0)); - } -*/} - -void ODECollider::OnUnlink() +void ODECollider::SetRotation(const Matrix& rot, long geomID) { - //PhysicsObject::OnUnlink(); - - // remove collision geometry from space - long space = GetParentSpaceID(); - - if ( - (mODEGeom == 0) || - (space == 0) - ) - { - return; - } - - if (space) - { - dSpaceRemove((dSpaceID) space, mODEGeom); - } -} - -void ODECollider::PrePhysicsUpdateInternal(float /*deltaTime*/) -{ - // if (FindChildSupportingClass<CollisionHandler>(false).get() == 0) - // { - // for convenience we add a ContactJointHandler if no - // other handler is registered. This behaviour covers the - // majority of all use cases and eases the creation of - // Colliders. - AddCollisionHandler("oxygen/ContactJointHandler"); - // } -} - -long ODECollider::GetGeomID() -{ - return (long) mODEGeom; -} - -bool ODECollider::AddCollisionHandler(const std::string& handlerName) -{/* - shared_ptr<CollisionHandler> handler = - shared_dynamic_cast<CollisionHandler>(GetCore()->New(handlerName)); - - if (handler.get() == 0) - { - GetLog()->Error() - << "ERROR: (Collider) Cannot create CollisionHandler " - << handlerName << "\n"; - return false; - } - - return AddChildReference(handler); -*/} - -void ODECollider::OnCollision (boost::shared_ptr<Collider> collidee, - dContact& contact, ECollisionType type) - -{/* - TLeafList handlers; - ListChildrenSupportingClass<CollisionHandler>(handlers); - - for ( - TLeafList::iterator iter = handlers.begin(); - iter != handlers.end(); - ++iter - ) - { - shared_ptr<CollisionHandler> handler = - shared_static_cast<CollisionHandler>(*iter); - - if ( - (type == CT_SYMMETRIC) && - (! handler->IsSymmetricHandler()) - ) - { - continue; - } - - handler->HandleCollision(collidee, contact); - } -*/} - -/*shared_ptr<Collider> ODECollider::GetCollider(long geomID) -{ - if (geomID == 0) - { - return shared_ptr<Collider>(); - } - - Collider* collPtr = - static_cast<Collider*>(dGeomGetData((dGeomID) geomID)); - - if (collPtr == 0) - { - // we cannot use the logserver here - cerr << "ERROR: (Collider) no Collider found for GeomID " - << geomID << "\n"; - return shared_ptr<Collider>(); - } - - shared_ptr<Collider> collider = shared_static_cast<Collider> - (collPtr->GetSelf().lock()); - - if (collider.get() == 0) - { - // we cannot use the logserver here - cerr << "ERROR: (Collider) got no shared_ptr for GeomID " - << geomID << "\n"; - } - - return collider; -}*/ - -void ODECollider::SetRotation(const Matrix& rot) -{ + dGeomID ODEGeom = (dGeomID) geomID; dMatrix3 ODEMatrix; - GenericPhysicsObject& matrixRef = (GenericPhysicsObject&) ODEMatrix; + GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; ConvertRotationMatrix(rot, matrixRef); - dGeomSetRotation(mODEGeom, ODEMatrix); + dGeomSetRotation(ODEGeom, ODEMatrix); } -void ODECollider::SetPosition(const Vector3f& pos) +void ODECollider::SetPosition(const Vector3f& globalPos, long geomID) { - //Vector3f globalPos(GetWorldTransform() * pos); - //dGeomSetPosition (mODEGeom, globalPos[0], globalPos[1], globalPos[2]); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomSetPosition (ODEGeom, globalPos[0], globalPos[1], globalPos[2]); } -void ODECollider::SetLocalPosition(const Vector3f& pos) +void ODECollider::SetLocalPosition(const Vector3f& pos, long geomID) { - dGeomSetPosition (mODEGeom, pos[0], pos[1], pos[2]); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomSetPosition (ODEGeom, pos[0], pos[1], pos[2]); } -Vector3f ODECollider::GetPosition() const +Vector3f ODECollider::GetPosition(long geomID) const { - const dReal* pos = dGeomGetPosition(mODEGeom); + dGeomID ODEGeom = (dGeomID) geomID; + const dReal* pos = dGeomGetPosition(ODEGeom); return Vector3f(pos[0],pos[1],pos[2]); } -long ODECollider::GetParentSpaceID() +long ODECollider::GetParentSpaceID(long geomID) { - if (mODEGeom == 0) - { - return 0; - } - - return (long) dGeomGetSpace(mODEGeom); + dGeomID ODEGeom = (dGeomID) geomID; + return (long) dGeomGetSpace(ODEGeom); } -bool ODECollider::Intersects(boost::shared_ptr<Collider> collider) +bool ODECollider::Intersect(boost::shared_ptr<Collider> collider, long geomID) { - if ( - (mODEGeom == 0) || - (collider.get() == 0) - ) - { - return false; - } - + dGeomID ODEGeom = (dGeomID) geomID; dContactGeom contact; return dCollide - ( - mODEGeom, + (ODEGeom, (dGeomID) collider->GetGeomID(), 1, /* ask for at most one collision point */ &contact, @@ -267,40 +92,43 @@ ) > 0; } -void ODECollider::DestroyPhysicsObject() +void ODECollider::DestroyGeom(long geomID) { - if (! mODEGeom) - { - return; - } - - dGeomDestroy(mODEGeom); + dGeomID ODEGeom = (dGeomID) geomID; + dGeomDestroy(ODEGeom); mODEGeom = 0; + mGeomID = 0; } -void ODECollider::AddNotCollideWithColliderName(const std::string & colliderName, bool isAdd) -{ - TColliderNameSet::iterator it = mNotCollideWithSet.find(colliderName); +long ODECollider::GetGeomID(){ + return mGeomID; +} - if (isAdd) - { - if (it == mNotCollideWithSet.end()) - { - //I'm not have this one - mNotCollideWithSet.insert(colliderName); - } - } - else - { - if (it != mNotCollideWithSet.end()) - { - //Remove - mNotCollideWithSet.erase(it); - } - } +void ODECollider::TransformSetGeom(long parentGeomID, long geomID){ + dGeomID parentODEGeom = (dGeomID) parentGeomID; + dGeomID ODEGeom = (dGeomID) geomID; + dGeomTransformSetGeom(parentODEGeom, ODEGeom); } -const ODECollider::TColliderNameSet& ODECollider::GetNotCollideWithSet() const -{ - return mNotCollideWithSet; +void ODECollider::SetSpace(long spaceID, long geomID, Collider* collider){ + dSpaceID ODESpace = (dSpaceID) spaceID; + dGeomID ODEGeom = (dGeomID) geomID; + + if (!spaceID) return; + if (dSpaceQuery(ODESpace, ODEGeom)) return; + + dGeomSetData(ODEGeom, collider); + dSpaceAdd(ODESpace, ODEGeom); } + +void ODECollider::SetBody(long bodyID, long geomID){ + dBodyID ODEBody = (dBodyID) bodyID; + dGeomID ODEGeom = (dGeomID) geomID; + dGeomSetBody(ODEGeom, ODEBody); +} + +void ODECollider::RemoveFromSpace(long geomID, long spaceID){ + dGeomID ODEGeom = (dGeomID) geomID; + dSpaceID ODESpace = (dSpaceID) spaceID; + dSpaceRemove(ODESpace, ODEGeom); +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.h 2009-12-14 11:14:38 UTC (rev 120) @@ -28,6 +28,7 @@ namespace oxygen { +class Collider; class OXYGEN_API ODECollider : public ColliderInt, public ODEPhysicsObject { @@ -36,25 +37,21 @@ ODECollider(); virtual ~ODECollider(); - void OnCollision(boost::shared_ptr<Collider> collidee, dContact& contact, ECollisionType type); - bool AddCollisionHandler(const std::string& handlerName); + void SetPosition(const salt::Vector3f& globalPos, long geomID); + void SetLocalPosition(const salt::Vector3f& pos, long GeomID); + salt::Vector3f GetPosition(long geomID) const; + void SetRotation(const salt::Matrix& rot, long GeomID); + bool Intersect(boost::shared_ptr<Collider> collider, long geomID); + long GetParentSpaceID(long geomID); + void DestroyGeom(long GeomID); long GetGeomID(); - void SetPosition(const salt::Vector3f& pos); - void SetLocalPosition(const salt::Vector3f& pos); - salt::Vector3f GetPosition() const; - void SetRotation(const salt::Matrix& rot); - bool Intersects(boost::shared_ptr<Collider> collider); - long GetParentSpaceID(); - void AddNotCollideWithColliderName(const std::string& colliderName, bool isAdd); - const TColliderNameSet& GetNotCollideWithSet() const; - void OnLink(); - void OnUnlink(); - void PrePhysicsUpdateInternal(float deltaTime); - void DestroyPhysicsObject(); + void TransformSetGeom(long parentGeomID, long geomID); + void SetSpace(long spaceID, long geomID, Collider* collider); + void SetBody(long bodyID, long geomID); + void RemoveFromSpace(long geomID, long spaceID); protected: dGeomID mODEGeom; - TColliderNameSet mNotCollideWithSet; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -32,7 +32,7 @@ ODEPhysicsObject::ODEPhysicsObject(){ } -void ODEPhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsObject& matrix) +void ODEPhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix) { dMatrix3& odeMatrix = (dMatrix3&) matrix; @@ -50,7 +50,7 @@ odeMatrix[11] = 0; } -void ODEPhysicsObject::ConvertRotationMatrix(const GenericPhysicsObject* matrix, salt::Matrix& rot) const +void ODEPhysicsObject::ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const { dReal* odeMatrix = (dReal*) matrix; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h 2009-12-14 11:14:38 UTC (rev 120) @@ -35,8 +35,8 @@ public: ODEPhysicsObject(); - void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsObject& matrix); - void ConvertRotationMatrix(const GenericPhysicsObject* matrix, salt::Matrix& rot) const; + void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix); + void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const; }; } //namespace oxygen Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -133,7 +133,7 @@ dMass transMass(ODEMass); dMatrix3 ODEMatrix; - GenericPhysicsObject& matrixRef = (GenericPhysicsObject&) ODEMatrix; + GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; ConvertRotationMatrix(matrix, matrixRef); dMassRotate(&transMass, ODEMatrix); @@ -348,7 +348,7 @@ void ODERigidBody::SetRotation(const Matrix& rot) { dMatrix3 ODEMatrix; - GenericPhysicsObject& matrixRef = (GenericPhysicsObject&) ODEMatrix; + GenericPhysicsMatrix& matrixRef = (GenericPhysicsMatrix&) ODEMatrix; ConvertRotationMatrix(rot, matrixRef); dBodySetRotation(mODEBody, ODEMatrix); } @@ -356,7 +356,7 @@ salt::Matrix ODERigidBody::GetRotation() const { const dReal* ODEMatrix = dBodyGetRotation(mODEBody); - GenericPhysicsObject* matrixPtr = (GenericPhysicsObject*) ODEMatrix; + GenericPhysicsMatrix* matrixPtr = (GenericPhysicsMatrix*) ODEMatrix; salt::Matrix rot; ConvertRotationMatrix(matrixPtr,rot); return rot; Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -0,0 +1,43 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odetransformcollider.h> + +using namespace oxygen; + +ODETransformCollider::ODETransformCollider() : ODECollider(){ + +} + +void ODETransformCollider::CreateTransformCollider(){ + mODEGeom = dCreateGeomTransform(0); + mGeomID = (long) mODEGeom; +} + +void ODETransformCollider::SetColliderParameters(int cleanup, int info){ + dGeomTransformSetCleanup(mODEGeom, cleanup); + dGeomTransformSetInfo(mODEGeom, info); +} + +long ODETransformCollider::GetGeomID(){ + return mGeomID; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odetransformcollider.h 2009-12-14 11:14:38 UTC (rev 120) @@ -0,0 +1,44 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odetransformcollider.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_ODETRANSFORMCOLLIDER_H +#define OXYGEN_ODETRANSFORMCOLLIDER_H + +#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/int/transformcolliderint.h> + +namespace oxygen +{ + +class OXYGEN_API ODETransformCollider : public TransformColliderInt, public ODECollider +{ + +public: + ODETransformCollider(); + void CreateTransformCollider(); + void SetColliderParameters(int cleanup, int info); + long GetGeomID(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODECOLLIDER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <oxygen/physicsserver/genericphysicsobject.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> #include <oxygen/physicsserver/physicsobject.h> #include <oxygen/physicsserver/space.h> #include <oxygen/physicsserver/world.h> @@ -136,12 +136,12 @@ return 0; } -void PhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsObject& matrix) +void PhysicsObject::ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix) { mPhysicsObjectImp->ConvertRotationMatrix(rot, matrix); } -void PhysicsObject::ConvertRotationMatrix(const GenericPhysicsObject* matrix, salt::Matrix& rot) const +void PhysicsObject::ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const { mPhysicsObjectImp->ConvertRotationMatrix(matrix, rot); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-14 11:14:38 UTC (rev 120) @@ -31,7 +31,7 @@ class Space; class World; class PhysicsObjectInt; -class GenericPhysicsObject; +class GenericPhysicsMatrix; /** ODEObject is the base of all classes encapsulating ODE concepts */ @@ -76,12 +76,12 @@ /** converts the rotation part of a salt::Matrix to an engine-specific matrix, currently used for ODE's dMatrix3 */ - void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsObject& matrix); + void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix); /** coverts an engine-specific to the rotation part of a salt::Matrix, currently used for ODE's dMatrix3 */ - void ConvertRotationMatrix(const GenericPhysicsObject* matrix, salt::Matrix& rot) const; + void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const; private: boost::shared_ptr<PhysicsObjectInt> mPhysicsObjectImp; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -55,7 +55,7 @@ //create default plane mPlaneColliderImp->CreatePlane(); - mODEGeom = (dGeomID) mPlaneColliderImp->GetGeomID(); + mGeomID = mPlaneColliderImp->GetGeomID(); return (mPlaneColliderImp->GetGeomID() != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -44,7 +44,7 @@ // create a unit ray mRayColliderImp->CreateRay(); - mODEGeom = (dGeomID) mRayColliderImp->GetGeomID(); + mGeomID = mRayColliderImp->GetGeomID(); return (mRayColliderImp->GetGeomID() != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -26,7 +26,7 @@ void RecorderHandler::HandleCollision -(boost::shared_ptr<Collider> collidee, dContact& /*contact*/) +(boost::shared_ptr<Collider> collidee, GenericContact& /*contact*/) { mCollisionSet.insert(weak_ptr<Collider>(collidee)); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/recorderhandler.h 2009-12-14 11:14:38 UTC (rev 120) @@ -52,7 +52,7 @@ as returned from the ODE dCollide function */ virtual void HandleCollision - (boost::shared_ptr<Collider> collidee, dContact& contact); + (boost::shared_ptr<Collider> collidee, GenericContact& contact); /** removes all stored collisions from the recorder */ void Clear(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -170,8 +170,8 @@ for (int i=0;i<n;++i) { // notify the collider nodes - collider->OnCollision(collidee,(void*) &contacts[i],Collider::CT_DIRECT); - collidee->OnCollision(collider,(void*) &contacts[i],Collider::CT_SYMMETRIC); + collider->OnCollision(collidee,(GenericContact&) contacts[i],Collider::CT_DIRECT); + collidee->OnCollision(collider,(GenericContact&) contacts[i],Collider::CT_SYMMETRIC); } } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -51,7 +51,7 @@ // create a unit sphere mSphereColliderImp->CreateSphere(); - mODEGeom = (dGeomID) mSphereColliderImp->GetGeomID(); + mGeomID = mSphereColliderImp->GetGeomID(); return (mSphereColliderImp->GetGeomID() != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/ode/odetransformcollider.h> #include <oxygen/physicsserver/transformcollider.h> using namespace oxygen; @@ -27,6 +28,7 @@ TransformCollider::TransformCollider() : Collider() { + mTransformColliderImp = boost::shared_ptr<ODETransformCollider>(new ODETransformCollider()); } bool TransformCollider::ConstructInternal() @@ -36,20 +38,23 @@ return false; } - mODEGeom = dCreateGeomTransform(0); + mTransformColliderImp->CreateTransformCollider(); + mGeomID = mTransformColliderImp->GetGeomID(); - if (mODEGeom == 0) + if (mGeomID == 0) { return false; } //! do not automatically destroy encapsulated geoms - dGeomTransformSetCleanup(mODEGeom, 0); + int cleanupSetting = 0; /** report the transform geom in collisions instead of the encapsulated geoms */ - dGeomTransformSetInfo(mODEGeom, 1); + int infoSetting = 1; + + mTransformColliderImp->SetColliderParameters(cleanupSetting, infoSetting); return true; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/lib/oxygen/physicsserver/transformcollider.h 2009-12-14 11:14:38 UTC (rev 120) @@ -27,8 +27,9 @@ namespace oxygen { +class TransformColliderInt; -/** TransformCollider encapsulates an ODE transform geometry object +/** TransformCollider encapsulates a transform geometry object that encapsulates another geom. It allows the encapsulated geom to be positioned and rotated arbitrarily with respect to its point of reference. @@ -54,6 +55,9 @@ protected: virtual bool ConstructInternal(); + +private: + boost::shared_ptr<TransformColliderInt> mTransformColliderImp; }; DECLARE_CLASS(TransformCollider); Modified: branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.cpp =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.cpp 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.cpp 2009-12-14 11:14:38 UTC (rev 120) @@ -61,7 +61,7 @@ void PerceptorHandler::HandleCollision -(boost::shared_ptr<Collider> collidee, dContact& /*contact*/) +(boost::shared_ptr<Collider> collidee, GenericContact& /*contact*/) { if (mColPercept.get() == 0) return; Modified: branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.h =================================================================== --- branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.h 2009-12-11 08:54:01 UTC (rev 119) +++ branches/multiphys/spark/plugin/collisionperceptor/perceptorhandler.h 2009-12-14 11:14:38 UTC (rev 120) @@ -23,6 +23,7 @@ #define PERCEPTORHANDLER_H #include <oxygen/physicsserver/collisionhandler.h> +#include <oxygen/physicsserver/genericphysicsobjects.h> class CollisionPerceptor; @@ -46,7 +47,7 @@ as returned from the ODE dCollide function */ virtual void HandleCollision - (boost::shared_ptr<oxygen::Collider> collidee, dContact& contact); + (boost::shared_ptr<oxygen::Collider> collidee, oxygen::GenericContact& contact); protected: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-11 08:54:08
|
Revision: 119 http://simspark.svn.sourceforge.net/simspark/?rev=119&view=rev Author: a-held Date: 2009-12-11 08:54:01 +0000 (Fri, 11 Dec 2009) Log Message: ----------- Implemented bridge pattern for RayCollider and PlaneCollider Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-10 08:34:56 UTC (rev 118) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-11 08:54:01 UTC (rev 119) @@ -68,6 +68,8 @@ physicsserver/int/emptycolliderint.h physicsserver/int/physicsobjectint.h physicsserver/int/physicsserverint.h + physicsserver/int/planecolliderint.h + physicsserver/int/raycolliderint.h physicsserver/int/rigidbodyint.h physicsserver/int/softbodyint.h physicsserver/int/spaceint.h @@ -89,6 +91,8 @@ physicsserver/ode/odeemptycollider.h physicsserver/ode/odephysicsobject.h physicsserver/ode/odephysicsserver.h + physicsserver/ode/odeplanecollider.h + physicsserver/ode/oderaycollider.h physicsserver/ode/oderigidbody.h physicsserver/ode/odesoftbody.h physicsserver/ode/odespace.h @@ -245,6 +249,8 @@ physicsserver/ode/odeemptycollider.cpp physicsserver/ode/odephysicsobject.cpp physicsserver/ode/odephysicsserver.cpp + physicsserver/ode/odeplanecollider.cpp + physicsserver/ode/oderaycollider.cpp physicsserver/ode/oderigidbody.cpp physicsserver/ode/odesoftbody.cpp physicsserver/ode/odespace.cpp Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/planecolliderint.h 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_PLANECOLLIDERINT_H +#define OXYGEN_PLANECOLLIDERINT_H + +#include <salt/matrix.h> +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API PlaneColliderInt +{ +public: + virtual void SetPlaneParams(float a, float b, float c, float d) = 0; + virtual void SetParams(const salt::Vector3f& pos, salt::Vector3f normal) = 0; + virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + + virtual long GetGeomID() = 0; + virtual void CreatePlane() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_PLANECOLLIDERINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/raycolliderint.h 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,42 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: raycolliderint.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_RAYCOLLIDERINT_H +#define OXYGEN_RAYCOLLIDERINT_H + +#include <salt/vector.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API RayColliderInt +{ +public: + virtual void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length) = 0; + virtual void CreateRay() = 0; + virtual long GetGeomID() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_RAYCOLLIDERINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,58 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: planecollider.cpp 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odeplanecollider.h> + +using namespace oxygen; +using namespace salt; + +ODEPlaneCollider::ODEPlaneCollider() : ODECollider() +{ +} + +void ODEPlaneCollider::SetPlaneParams(float a, float b, float c, float d) +{ + dGeomPlaneSetParams(mODEGeom, a, b, c, d); +} + +void ODEPlaneCollider::CreatePlane() +{ + // a plane with normal pointing up, going through the origin + mODEGeom = dCreatePlane(0, 0, 1, 0, 0); + mGeomID = (long) mODEGeom; +} + +void ODEPlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) +{ + normal.Normalize(); + float d = pos.Dot(normal); + dGeomPlaneSetParams(mODEGeom, normal.x(), normal.y(), normal.z(), d); +} + +float ODEPlaneCollider::GetPointDepth(const Vector3f& pos) +{ + return dGeomPlanePointDepth + (mODEGeom,pos[0],pos[1],pos[2]); +} + +long ODEPlaneCollider::GetGeomID(){ + return mGeomID; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeplanecollider.h 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,47 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeplanecollider.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_ODEPLANECOLLIDER_H +#define OXYGEN_ODEPLANECOLLIDER_H + +#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/int/planecolliderint.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API ODEPlaneCollider : public PlaneColliderInt, public ODECollider +{ +public: + ODEPlaneCollider(); + void SetPlaneParams(float a, float b, float c, float d); + void SetParams(const salt::Vector3f& pos, salt::Vector3f normal); + float GetPointDepth(const salt::Vector3f& pos); + + long GetGeomID(); + void CreatePlane(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEPLANECOLLIDER_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.cpp 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,46 @@ +/* -*- mode: c++ -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: raycollider.cpp 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/oderaycollider.h> + +using namespace oxygen; + +ODERayCollider::ODERayCollider() : ODECollider() +{ + +} + +void ODERayCollider::SetParams(salt::Vector3f pos, + salt::Vector3f dir, float length) +{ + dGeomRaySet(mODEGeom, pos[0], pos[1], pos[2], dir[0], dir[1], dir[2]); + dGeomRaySetLength(mODEGeom, length); +} + +void ODERayCollider::CreateRay() +{ + mODEGeom = dCreateRay(0, 1.0f); + mGeomID = (long) mODEGeom; +} + +long ODERayCollider::GetGeomID(){ + return mGeomID; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderaycollider.h 2009-12-11 08:54:01 UTC (rev 119) @@ -0,0 +1,44 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: oderaycollider.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_ODERAYCOLLIDER_H +#define OXYGEN_ODERAYCOLLIDER_H + +#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/int/raycolliderint.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API ODERayCollider : public RayColliderInt, public ODECollider +{ +public: + ODERayCollider(); + void SetParams(salt::Vector3f pos, salt::Vector3f dir, float length); + void CreateRay(); + long GetGeomID(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODERAYCOLLIDER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-10 08:34:56 UTC (rev 118) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.cpp 2009-12-11 08:54:01 UTC (rev 119) @@ -20,12 +20,15 @@ */ #include <oxygen/physicsserver/planecollider.h> +#include <oxygen/physicsserver/ode/odeplanecollider.h> +#include <zeitgeist/logserver/logserver.h> using namespace oxygen; using namespace salt; PlaneCollider::PlaneCollider() : Collider() { + mPlaneColliderImp = boost::shared_ptr<ODEPlaneCollider>(new ODEPlaneCollider()); } void PlaneCollider::SetParams(float a, float b, float c, float d) @@ -40,7 +43,7 @@ d /= l; } - dGeomPlaneSetParams(mODEGeom, a, b, c, d); + mPlaneColliderImp->SetPlaneParams(a, b, c, d); } bool PlaneCollider::ConstructInternal() @@ -50,39 +53,35 @@ return false; } - // a plane with normal pointing up, going through the origin - mODEGeom = dCreatePlane(0, 0, 1, 0, 0); + //create default plane + mPlaneColliderImp->CreatePlane(); + mODEGeom = (dGeomID) mPlaneColliderImp->GetGeomID(); - return (mODEGeom != 0); + return (mPlaneColliderImp->GetGeomID() != 0); } -void -PlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) +void PlaneCollider::SetParams(const salt::Vector3f& pos, salt::Vector3f normal) { normal.Normalize(); float d = pos.Dot(normal); - dGeomPlaneSetParams(mODEGeom, normal.x(), normal.y(), normal.z(), d); + mPlaneColliderImp->SetPlaneParams(normal.x(), normal.y(), normal.z(), d); + //dGeomPlaneSetParams(mODEGeom, normal.x(), normal.y(), normal.z(), d); } -void -PlaneCollider::SetPosition(const salt::Vector3f& /*pos*/) +void PlaneCollider::SetPosition(const salt::Vector3f& /*pos*/) { - // planes are non placeable geoms + GetLog()->Error() + << "(PlaneCollider) WARNING: tried to set the position of a non-placeable geom, ignored\n"; } -void -PlaneCollider::SetRotation(const Matrix& /*rot*/) +void PlaneCollider::SetRotation(const Matrix& /*rot*/) { - // planes are non placeable geoms + GetLog()->Error() + << "(PlaneCollider) WARNING: tried to set the rotation of a non-placeable geom, ignored\n"; } -float -PlaneCollider::GetPointDepth(const Vector3f& pos) +float PlaneCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return dGeomPlanePointDepth - (mODEGeom,worldPos[0],worldPos[1],worldPos[2]); + return mPlaneColliderImp->GetPointDepth(worldPos); } - - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.h 2009-12-10 08:34:56 UTC (rev 118) +++ branches/multiphys/spark/lib/oxygen/physicsserver/planecollider.h 2009-12-11 08:54:01 UTC (rev 119) @@ -27,6 +27,7 @@ namespace oxygen { +class PlaneColliderInt; /** PlaneCollider encapsulates an ODE plane geometry object. Planes are non-placeable geoms, i.e. unlike placeable geoms, planes do @@ -74,6 +75,9 @@ /** constructs a default plane with normal pointing up, going through the origin */ virtual bool ConstructInternal(); + +private: + boost::shared_ptr<PlaneColliderInt> mPlaneColliderImp; }; DECLARE_CLASS(PlaneCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-10 08:34:56 UTC (rev 118) +++ branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.cpp 2009-12-11 08:54:01 UTC (rev 119) @@ -19,24 +19,23 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <oxygen/physicsserver/ode/oderaycollider.h> #include <oxygen/physicsserver/raycollider.h> using namespace oxygen; RayCollider::RayCollider() : Collider() { + mRayColliderImp = boost::shared_ptr<ODERayCollider>(new ODERayCollider()); } -void -RayCollider::SetParams(salt::Vector3f pos, +void RayCollider::SetParams(salt::Vector3f pos, salt::Vector3f dir, float length) { - dGeomRaySet(mODEGeom, pos[0], pos[1], pos[2], dir[0], dir[1], dir[2]); - dGeomRaySetLength(mODEGeom, length); + mRayColliderImp->SetParams(pos, dir, length); } -bool -RayCollider::ConstructInternal() +bool RayCollider::ConstructInternal() { if (! Collider::ConstructInternal()) { @@ -44,7 +43,8 @@ } // create a unit ray - mODEGeom = dCreateRay(0, 1.0f); + mRayColliderImp->CreateRay(); + mODEGeom = (dGeomID) mRayColliderImp->GetGeomID(); - return (mODEGeom != 0); + return (mRayColliderImp->GetGeomID() != 0); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.h 2009-12-10 08:34:56 UTC (rev 118) +++ branches/multiphys/spark/lib/oxygen/physicsserver/raycollider.h 2009-12-11 08:54:01 UTC (rev 119) @@ -27,6 +27,7 @@ namespace oxygen { +class RayColliderInt; /** RayCollider encapsulates an ODE ray geometry "object". * @@ -54,6 +55,9 @@ protected: /** constructs a default ray with a length of 1 */ virtual bool ConstructInternal(); + +private: + boost::shared_ptr<RayColliderInt> mRayColliderImp; }; DECLARE_CLASS(RayCollider); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-12-10 08:35:03
|
Revision: 118 http://simspark.svn.sourceforge.net/simspark/?rev=118&view=rev Author: a-held Date: 2009-12-10 08:34:56 +0000 (Thu, 10 Dec 2009) Log Message: ----------- Searched and renamed all CCylinders, CappedCylinders and Capped Cylinders to Capsule Implemented bridge pattern for CapsuleCollider Provided bridge pattern for ConeCollider Declared GenericPhysicsObject class that can be cast to in order to pass pointers to engine-specific objects on to the abstract layer (like void*, but cleaner) Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/hoap2.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot055.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot056.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbot.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotcomp.rsg branches/multiphys/rcssserver3d/doc/users/robots.tex branches/multiphys/spark/data/ros/aibo.rsi branches/multiphys/spark/data/ros/blockworld.ros branches/multiphys/spark/data/rsg/boxspheres/simspark.rsg branches/multiphys/spark/lib/kerosin/CMakeLists.txt branches/multiphys/spark/lib/kerosin/kerosin.cpp branches/multiphys/spark/lib/kerosin/kerosin.h branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.cpp branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.h branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/physicsobjectint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/worldint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odephysicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody_c.cpp branches/multiphys/spark/plugin/rosimporter/roselements.cpp branches/multiphys/spark/plugin/rosimporter/roselements.h branches/multiphys/spark/plugin/rosimporter/rosimporter.cpp branches/multiphys/spark/plugin/rosimporter/rosimporter.h Added Paths: ----------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_appearance.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics_nocollider.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg branches/multiphys/spark/data/rsg/boxspheres/capsule.rsg branches/multiphys/spark/data/rsg/boxspheres/staticcapsule.rsg branches/multiphys/spark/lib/kerosin/sceneserver/capsule.cpp branches/multiphys/spark/lib/kerosin/sceneserver/capsule.h branches/multiphys/spark/lib/kerosin/sceneserver/capsule_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/conecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/genericphysicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/int/capsulecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/conecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecapsulecollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconecollider.h Removed Paths: ------------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_appearance.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg branches/multiphys/spark/data/rsg/boxspheres/staticccylinder.rsg branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.cpp branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.h branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder_c.cpp Modified: branches/multiphys/rcssserver3d/data/rsg/agent/hoap2.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/hoap2.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/hoap2.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -142,7 +142,7 @@ (nd Transform (setLocalPos $offsetLeftShoulderCylX $offsetLeftShoulderCylY $offsetLeftShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) ) @@ -151,7 +151,7 @@ (nd Transform (setLocalPos $offsetRightShoulderCylX $offsetRightShoulderCylY $offsetRightShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) ) @@ -373,7 +373,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -410,7 +410,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) Added: branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_appearance.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_appearance.rsg (rev 0) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_appearance.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,11 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $radius $length $material) + + (nd Capsule + (setParams $radius $length) + (setMaterial $material) + ) +) Added: branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics.rsg (rev 0) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,19 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $radius $length $totalMass) + + (nd RigidBody + (setName capsuleBody) + (setCapsuleTotal $totalMass $radius $length) + + (importScene rsg/agent/nao/dragcontroller.rsg) + ) + + (nd CapsuleCollider + (setParams $radius $length) + + (importScene rsg/agent/nao/contactjointhandler.rsg) + ) + ) Added: branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics_nocollider.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics_nocollider.rsg (rev 0) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/capsule_physics_nocollider.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,13 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $radius $length $totalMass) + + (nd RigidBody + (setName capsuleBody) + (setCapsuleTotal $totalMass $radius) + + (importScene rsg/agent/nao/dragcontroller.rsg) + ) +) Deleted: branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_appearance.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_appearance.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_appearance.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,11 +0,0 @@ -; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $radius $length $material) - - (nd CCylinder - (setParams $radius $length) - (setMaterial $material) - ) -) Deleted: branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,19 +0,0 @@ -; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $radius $length $totalMass) - - (nd RigidBody - (setName ccylinderBody) - (setCappedCylinderTotal $totalMass $radius $length) - - (importScene rsg/agent/nao/dragcontroller.rsg) - ) - - (nd CCylinderCollider - (setParams $radius $length) - - (importScene rsg/agent/nao/contactjointhandler.rsg) - ) - ) Deleted: branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/ccylinder_physics_nocollider.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,13 +0,0 @@ -; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $radius $length $totalMass) - - (nd RigidBody - (setName ccylinderBody) - (setCappedCylinderTotal $totalMass $radius) - - (importScene rsg/agent/nao/dragcontroller.rsg) - ) -) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -43,12 +43,12 @@ (setName neck) (setLocalPos $Neck_X $Neck_Y $Neck_Z) - (importScene rsg/agent/nao/ccylinder_appearance.rsg $Neck_Radius $Neck_Length matDarkGrey) - (importScene rsg/agent/nao/ccylinder_physics.rsg $Neck_Radius $Neck_Length $Neck_Mass) + (importScene rsg/agent/nao/capsule_appearance.rsg $Neck_Radius $Neck_Length matDarkGrey) + (importScene rsg/agent/nao/capsule_physics.rsg $Neck_Radius $Neck_Length $Neck_Mass) (importScene rsg/agent/nao/hingejoint.rsg hj1 he1 - ../ccylinderBody ../../body/boxBody + ../capsuleBody ../../body/boxBody 0 0 0 0 0 1 $he1_min $he1_max) @@ -80,7 +80,7 @@ (importScene rsg/agent/nao/hingejoint.rsg hj2 he2 - ../sphereBody ../../neck/ccylinderBody + ../sphereBody ../../neck/capsuleBody ;../boxBody ../../body/boxBody 0 0 -0.005 1 0 0 Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot055.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot055.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot055.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -168,7 +168,7 @@ (nd Transform (setLocalPos $offsetLeftShoulderCylX $offsetLeftShoulderCylY $offsetLeftShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName leftshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -178,7 +178,7 @@ (nd Transform (setLocalPos $offsetRightShoulderCylX $offsetRightShoulderCylY $offsetRightShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName rightshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -336,7 +336,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -374,7 +374,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot056.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot056.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot056.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -204,7 +204,7 @@ (nd Transform (setLocalPos $offsetLeftShoulderCylX $offsetLeftShoulderCylY $offsetLeftShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName leftshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -214,7 +214,7 @@ (nd Transform (setLocalPos $offsetRightShoulderCylX $offsetRightShoulderCylY $offsetRightShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName rightshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -409,7 +409,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -455,7 +455,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -771,7 +771,7 @@ (nd Transform (setLocalPos 0 0 (eval (eval $ThighHeight * -0.5) - 0.025)) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matRed) (setParams 0.1 (eval $ThighLength - 0.2)) ) @@ -812,7 +812,7 @@ (nd Transform (setLocalPos 0 0 (eval (eval $ThighHeight * -0.5) - 0.025)) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matRed) (setParams 0.1 (eval $ThighLength - 0.2)) ) Added: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg (rev 0) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,37 @@ +;; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $name $perceptorName $effectorName $attach + $x $y $z + $lenX $lenY $lenZ + $anchorX $anchorY $anchorZ + $axisX $axisY $axisZ $minDeg $maxDeg + $totalMass $material $ElbowRadius $ElbowLen) + + (nd Transform + (setName $name) + (setLocalPos $x $y $z) + (importScene rsg/agent/soccerbot058/box.rsg + $lenX $lenY $lenZ + $totalMass $material) + + ;; install hinge joint + (importScene rsg/agent/nao/hingejoint.rsg + $perceptorName $effectorName + ../boxBody $attach + $anchorX $anchorY $anchorZ + $axisX $axisY $axisZ + $minDeg $maxDeg) + + ;; static cylinder for the elbow + (nd Transform + (setLocalPos $anchorX $anchorY $anchorZ) + (setLocalRotation 0 90 0) + (nd Capsule + (setMaterial matGrey) + (setParams $ElbowRadius $ElbowLen) + ) + ) + ) + ) Deleted: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,37 +0,0 @@ -;; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $name $perceptorName $effectorName $attach - $x $y $z - $lenX $lenY $lenZ - $anchorX $anchorY $anchorZ - $axisX $axisY $axisZ $minDeg $maxDeg - $totalMass $material $ElbowRadius $ElbowLen) - - (nd Transform - (setName $name) - (setLocalPos $x $y $z) - (importScene rsg/agent/soccerbot058/box.rsg - $lenX $lenY $lenZ - $totalMass $material) - - ;; install hinge joint - (importScene rsg/agent/nao/hingejoint.rsg - $perceptorName $effectorName - ../boxBody $attach - $anchorX $anchorY $anchorZ - $axisX $axisY $axisZ - $minDeg $maxDeg) - - ;; static cylinder for the elbow - (nd Transform - (setLocalPos $anchorX $anchorY $anchorZ) - (setLocalRotation 0 90 0) - (nd CCylinder - (setMaterial matGrey) - (setParams $ElbowRadius $ElbowLen) - ) - ) - ) - ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/lowerarm.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -38,7 +38,7 @@ (nd Transform (setLocalPos $anchorX $anchorY $anchorZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLen) ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbot.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbot.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbot058/soccerbot.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -216,7 +216,7 @@ $offsetLeftShoulderCylY $offsetLeftShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName leftshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -228,7 +228,7 @@ $offsetRightShoulderCylY $offsetRightShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName rightshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -434,7 +434,7 @@ - (eval $ShankHeight / 2.0) - (eval 0.05 * $scale))) (def $ShankAnchorZ (eval $ShankHeight * 0.5)) - (importScene rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg + (importScene rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg leftshank llj4 lle4 ../../leftthigh/boxBody $LeftShankPosX $LeftShankPosY $LeftShankPosZ $ShankLength $ShankWidth $ShankHeight @@ -447,7 +447,7 @@ (def $RightShankPosX $RightThighPosX) (def $RightShankPosY $RightThighPosY) (def $RightShankPosZ $LeftShankPosZ) - (importScene rsg/agent/soccerbot058/box_with_hj_with_ccylinder.rsg + (importScene rsg/agent/soccerbot058/box_with_hj_with_capsule.rsg rightshank rlj4 rle4 ../../rightthigh/boxBody $RightShankPosX $RightShankPosY $RightShankPosZ $ShankLength $ShankWidth $ShankHeight Modified: branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotcomp.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotcomp.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/data/rsg/agent/soccerbotcomp.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -203,7 +203,7 @@ (nd Transform (setLocalPos $offsetLeftShoulderCylX $offsetLeftShoulderCylY $offsetLeftShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName leftshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -213,7 +213,7 @@ (nd Transform (setLocalPos $offsetRightShoulderCylX $offsetRightShoulderCylY $offsetRightShoulderCylZ) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setName rightshoulderpin) (setMaterial matDarkGrey) (setParams $TorsoCylinderRadius $TorsoCylinderLength) @@ -369,7 +369,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -415,7 +415,7 @@ (nd Transform (setLocalPos 0 0 (eval -1 * (eval (eval $UpperarmHeight / 2.0) + (eval $ElbowRadius / 2.0)))) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matGrey) (setParams $ElbowRadius $ElbowLength) ) @@ -621,7 +621,7 @@ (nd Transform (setLocalPos 0 0 (eval (eval $ThighHeight * -0.5) - 0.025)) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matRed) (setParams 0.1 (eval $ThighLength - 0.2)) ) @@ -662,7 +662,7 @@ (nd Transform (setLocalPos 0 0 (eval (eval $ThighHeight * -0.5) - 0.025)) (setLocalRotation 0 90 0) - (nd CCylinder + (nd Capsule (setMaterial matRed) (setParams 0.1 (eval $ThighLength - 0.2)) ) Modified: branches/multiphys/rcssserver3d/doc/users/robots.tex =================================================================== --- branches/multiphys/rcssserver3d/doc/users/robots.tex 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/rcssserver3d/doc/users/robots.tex 2009-12-10 08:34:56 UTC (rev 118) @@ -237,11 +237,11 @@ box\_physics\_with\_handler.rsg & Not only do the job as file “box\_physics.rsg”, but also install a touchperceptorhandler under the BoxCollider Node. \\ - ccylinder\_appearance.rsg & Install a capped cylinder which is + capsule\_appearance.rsg & Install a capsule which is for the GL render. \\ - ccylinder\_physics.rsg & Install a capped cylinder that has + capsule\_physics.rsg & Install a capsule that has physics effect(ODE related) \\ - ccylinder\_physics\_nocollider.rsg & Install a capped cylinder that + capsule\_physics\_nocollider.rsg & Install a capsule that only has dynamics effect (mass, linear velocity, etc). But it can never collide to the others. \\ contactjointhandler.rsg & Install a contactjointhandler to Modified: branches/multiphys/spark/data/ros/aibo.rsi =================================================================== --- branches/multiphys/spark/data/ros/aibo.rsi 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/data/ros/aibo.rsi 2009-12-10 08:34:56 UTC (rev 118) @@ -12184,13 +12184,13 @@ </PhysicalAttributes> </SimpleBox> <!-- - <SimpleCappedCylinder name="larm3Capped" radius="0.016" height="0.03"> + <SimpleCapsule name="larm3Capped" radius="0.016" height="0.03"> <Translation x="-0.003" y="-0.028" z="0.0"/> <Rotation x="-90.0" y="0.0" z="-25.0"/> <PhysicalAttributes> <Mass value="0.05"/> </PhysicalAttributes> - </SimpleCappedCylinder> + </SimpleCapsule> --> </PhysicalRepresentation> </ComplexShape> @@ -15442,13 +15442,13 @@ </PhysicalAttributes> </SimpleBox> <!-- - <SimpleCappedCylinder name="rarm3Capped" radius="0.016" height="0.03"> + <SimpleCapsule name="rarm3Capped" radius="0.016" height="0.03"> <Translation x="-0.003" y="-0.028" z="0.0"/> <Rotation x="-90.0" y="0.0" z="-25.0"/> <PhysicalAttributes> <Mass value="0.05"/> </PhysicalAttributes> - </SimpleCappedCylinder> + </SimpleCapsule> --> </PhysicalRepresentation> </ComplexShape> @@ -24870,13 +24870,13 @@ </Polygon> </GraphicalRepresentation> <PhysicalRepresentation> - <SimpleCappedCylinder name="headCCylinder" radius="0.026" height="0.075"> + <SimpleCapsule name="headCapsule" radius="0.026" height="0.075"> <Translation x="-0.023" y="0.005" z="0.0"/> <Rotation x="0.0" y="90.0" z="20.0"/> <PhysicalAttributes> <Mass value="0.25"/> </PhysicalAttributes> - </SimpleCappedCylinder> + </SimpleCapsule> <SimpleSphere name="headSphere" radius="0.032"> <Translation x="0.012" y="0.012" z="0.0"/> <PhysicalAttributes> @@ -25191,13 +25191,13 @@ </Polygon> </GraphicalRepresentation> <PhysicalRepresentation> - <SimpleCappedCylinder name="neckCCylinder" radius="0.013" height="0.034"> + <SimpleCapsule name="neckCapsule" radius="0.013" height="0.034"> <Translation x="0.0" y="0.038" z="0.0"/> <Rotation x="90.0" y="0.0" z="0.0"/> <PhysicalAttributes> <Mass value="0.05"/> </PhysicalAttributes> - </SimpleCappedCylinder> + </SimpleCapsule> <SimpleSphere name="neckSphere" radius="0.032"> <Translation x="0.0" y="0.08" z="0.0"/> <PhysicalAttributes> @@ -27630,13 +27630,13 @@ <Mass value="1.0"/> </PhysicalAttributes> </SimpleSphere> - <SimpleCappedCylinder name="bodyCCylinder" radius="0.04" height="0.05"> + <SimpleCapsule name="bodyCapsule" radius="0.04" height="0.05"> <Translation x="0.0" y="-0.005" z="0.0"/> <Rotation x="0.0" y="90.0" z="0.0"/> <PhysicalAttributes> <Mass value="2.5"/> </PhysicalAttributes> - </SimpleCappedCylinder> + </SimpleCapsule> <SimpleSphere name="bodySphere2" radius="0.055"> <Translation x="0.06" y="0.004" z="0.0"/> <PhysicalAttributes> @@ -27764,4 +27764,4 @@ </Elements> </Movable> </Macro> -</RoSiIncludeFile> \ No newline at end of file +</RoSiIncludeFile> Modified: branches/multiphys/spark/data/ros/blockworld.ros =================================================================== --- branches/multiphys/spark/data/ros/blockworld.ros 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/data/ros/blockworld.ros 2009-12-10 08:34:56 UTC (rev 118) @@ -273,16 +273,16 @@ </Box> </Elements> </Movable> - <Movable name="cappedcylinder"> + <Movable name="capsule"> <Elements> - <CappedCylinder name="CappedCylinder" radius="0.05" height="0.15"> + <Capsule name="Capsule" radius="0.05" height="0.15"> <Translation x="0.3" y="-0.5" z="0.5"/> <Rotation x="0" y="80" z="0"/> <Appearance ref="green"/> <PhysicalAttributes> <Mass value="1"/> </PhysicalAttributes> - </CappedCylinder> + </Capsule> </Elements> </Movable> </Elements> Added: branches/multiphys/spark/data/rsg/boxspheres/capsule.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/capsule.rsg (rev 0) +++ branches/multiphys/spark/data/rsg/boxspheres/capsule.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,35 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $radius $length $totalMass $material) + + (nd Capsule + (setParams $radius $length) + (setMaterial $material) + ) + + (nd RigidBody + (setName capsuleBody) + ;(setCapsuleTotal $totalMass $radius $length) + (setCapsule $totalMass $radius $length) + ) + + (nd CapsuleCollider + (setParams $radius $length) + (nd ContactJointHandler + (setContactBounceMode false) + + (setContactSlipMode true) + (setContactSlip 0.1 0.1) + + (setContactSoftERPMode true) + (setContactSoftERP 0.2) + + (setContactSoftCFM true) + (setContactSoftCFM 0.01) + ) + ) + ) + + Deleted: branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/data/rsg/boxspheres/ccylinder.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,35 +0,0 @@ -; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $radius $length $totalMass $material) - - (nd CCylinder - (setParams $radius $length) - (setMaterial $material) - ) - - (nd RigidBody - (setName ccylinderBody) - ;(setCappedCylinderTotal $totalMass $radius $length) - (setCappedCylinder $totalMass $radius $length) - ) - - (nd CCylinderCollider - (setParams $radius $length) - (nd ContactJointHandler - (setContactBounceMode false) - - (setContactSlipMode true) - (setContactSlip 0.1 0.1) - - (setContactSoftERPMode true) - (setContactSoftERP 0.2) - - (setContactSoftCFM true) - (setContactSoftCFM 0.01) - ) - ) - ) - - Modified: branches/multiphys/spark/data/rsg/boxspheres/simspark.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/simspark.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/data/rsg/boxspheres/simspark.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -35,15 +35,15 @@ ) ) -; add capped cylinder +; add capsule (nd Transform (setLocalPos -4 0 20) - (importScene rsg/boxspheres/ccylinder.rsg 1 3 2 matBlue) + (importScene rsg/boxspheres/capsule.rsg 1 3 2 matBlue) ) (nd Transform (setLocalPos -6 3 20) - (importScene rsg/boxspheres/ccylinder.rsg 1 10 2 matWhite) + (importScene rsg/boxspheres/capsule.rsg 1 10 2 matWhite) ) ; add two layer of spheres @@ -58,4 +58,4 @@ (importScene rsg/boxspheres/layer.rsg 1 1) ) -) \ No newline at end of file +) Added: branches/multiphys/spark/data/rsg/boxspheres/staticcapsule.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/staticcapsule.rsg (rev 0) +++ branches/multiphys/spark/data/rsg/boxspheres/staticcapsule.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,17 @@ +; -*- mode: lisp; -*- + +(RSG 0 1) +( + (templ $radius $length $density $material) + + (nd Capsule + (setParams $radius $length) + (setMaterial $material) + ) + + (nd CapsuleCollider + (setParams $radius $length) + ) + ) + + Deleted: branches/multiphys/spark/data/rsg/boxspheres/staticccylinder.rsg =================================================================== --- branches/multiphys/spark/data/rsg/boxspheres/staticccylinder.rsg 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/data/rsg/boxspheres/staticccylinder.rsg 2009-12-10 08:34:56 UTC (rev 118) @@ -1,17 +0,0 @@ -; -*- mode: lisp; -*- - -(RSG 0 1) -( - (templ $radius $length $density $material) - - (nd CCylinder - (setParams $radius $length) - (setMaterial $material) - ) - - (nd CCylinderCollider - (setParams $radius $length) - ) - ) - - Modified: branches/multiphys/spark/lib/kerosin/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/kerosin/CMakeLists.txt 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/CMakeLists.txt 2009-12-10 08:34:56 UTC (rev 118) @@ -25,7 +25,7 @@ sceneserver/light.h sceneserver/sphere.h sceneserver/box.h - sceneserver/ccylinder.h + sceneserver/capsule.h sceneserver/cylinder.h sceneserver/staticmesh.h soundserver/soundeffect.h @@ -90,8 +90,8 @@ sceneserver/box_c.cpp sceneserver/sphere.cpp sceneserver/sphere_c.cpp - sceneserver/ccylinder.cpp - sceneserver/ccylinder_c.cpp + sceneserver/capsule.cpp + sceneserver/capsule_c.cpp sceneserver/cylinder.cpp sceneserver/cylinder_c.cpp sceneserver/staticmesh.cpp Modified: branches/multiphys/spark/lib/kerosin/kerosin.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/kerosin.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/kerosin.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -58,7 +58,7 @@ zg.GetCore()->RegisterClassObject(new CLASS(Light), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(StaticMesh), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(Box), "kerosin/"); - zg.GetCore()->RegisterClassObject(new CLASS(CCylinder), "kerosin/"); + zg.GetCore()->RegisterClassObject(new CLASS(Capsule), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(Cylinder), "kerosin/"); zg.GetCore()->RegisterClassObject(new CLASS(Sphere), "kerosin/"); Modified: branches/multiphys/spark/lib/kerosin/kerosin.h =================================================================== --- branches/multiphys/spark/lib/kerosin/kerosin.h 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/kerosin.h 2009-12-10 08:34:56 UTC (rev 118) @@ -61,7 +61,7 @@ #include "sceneserver/axis.h" #include "sceneserver/light.h" #include "sceneserver/sphere.h" -#include "sceneserver/ccylinder.h" +#include "sceneserver/capsule.h" #include "sceneserver/cylinder.h" #include "sceneserver/staticmesh.h" Added: branches/multiphys/spark/lib/kerosin/sceneserver/capsule.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/capsule.cpp (rev 0) +++ branches/multiphys/spark/lib/kerosin/sceneserver/capsule.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,65 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: capsule.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "capsule.h" +#include <kerosin/openglserver/openglserver.h> +#include <kerosin/materialserver/material.h> + +using namespace boost; +using namespace kerosin; +using namespace zeitgeist; +using namespace salt; + +Capsule::Capsule() : SingleMatNode() +{ +} + +Capsule::~Capsule() +{ +} + +void Capsule::SetParams(float radius, float length) +{ + ParameterList parameter; + parameter.AddValue(radius); + parameter.AddValue(length); + + Load("StdCapsule",parameter); + + mRadius = radius; + mLength = length; +} + +void Capsule::GetParams(float& radius, float& length) const +{ + radius = mRadius; + length = mLength; +} + +float Capsule::GetRadius() +{ + return mRadius; +} + +float Capsule::GetLength() +{ + return mLength; +} Added: branches/multiphys/spark/lib/kerosin/sceneserver/capsule.h =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/capsule.h (rev 0) +++ branches/multiphys/spark/lib/kerosin/sceneserver/capsule.h 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,78 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: capsule.h 57 2009-03-18 07:26:56Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef KEROSIN_CAPSULE_H +#define KEROSIN_CAPSULE_H + +#include <kerosin/kerosin_defines.h> +#include "singlematnode.h" + +namespace kerosin +{ +class Material; + +/** Capsule is a SingleMatNode that creates and renders a capsule + mesh with the given length and radius + */ +class KEROSIN_API Capsule : public SingleMatNode +{ + // + // Function + // +public: + Capsule(); + virtual ~Capsule(); + + /** sets the parameters of the capsule. + + \param radius is the radius of the caps, and of the cylinder + itself + + \param length is the height of the cylinder, not counting the + caps + */ + void SetParams(float radius, float length); + + /** returns the parameters of the capsule */ + void GetParams(float& radius, float& length) const; + + /** returns the radius of the capsule */ + float GetRadius(); + + /** returns the length of the capsule */ + float GetLength(); + + // + // Members + // +protected: + /** the radius of the caps and the cylinder */ + float mRadius; + + /** the height of the clinder, not counting the caps */ + float mLength; +}; + +DECLARE_CLASS(Capsule); + +} //namespace kerosin + +#endif //KEROSIN_CAPSULE_H Added: branches/multiphys/spark/lib/kerosin/sceneserver/capsule_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/capsule_c.cpp (rev 0) +++ branches/multiphys/spark/lib/kerosin/sceneserver/capsule_c.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -0,0 +1,62 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: capsule_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include "capsule.h" + +using namespace boost; +using namespace kerosin; +using namespace salt; + +FUNCTION(Capsule,setParams) +{ + float inRadius; + float inLength; + + if ( + (in.GetSize() != 2) || + (! in.GetValue(in[0], inRadius)) || + (! in.GetValue(in[1], inLength)) + ) + { + return false; + } + + obj->SetParams(inRadius,inLength); + return true; +} + +FUNCTION(Capsule,getRadius) +{ + return obj->GetRadius(); +} + +FUNCTION(Capsule,getLength) +{ + return obj->GetLength(); +} + +void CLASS(Capsule)::DefineClass() +{ + DEFINE_BASECLASS(kerosin/SingleMatNode); + DEFINE_FUNCTION(setParams); + DEFINE_FUNCTION(getRadius); + DEFINE_FUNCTION(getLength); +} Deleted: branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -1,65 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include "ccylinder.h" -#include <kerosin/openglserver/openglserver.h> -#include <kerosin/materialserver/material.h> - -using namespace boost; -using namespace kerosin; -using namespace zeitgeist; -using namespace salt; - -CCylinder::CCylinder() : SingleMatNode() -{ -} - -CCylinder::~CCylinder() -{ -} - -void CCylinder::SetParams(float radius, float length) -{ - ParameterList parameter; - parameter.AddValue(radius); - parameter.AddValue(length); - - Load("StdCCylinder",parameter); - - mRadius = radius; - mLength = length; -} - -void CCylinder::GetParams(float& radius, float& length) const -{ - radius = mRadius; - length = mLength; -} - -float CCylinder::GetRadius() -{ - return mRadius; -} - -float CCylinder::GetLength() -{ - return mLength; -} Deleted: branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.h =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.h 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder.h 2009-12-10 08:34:56 UTC (rev 118) @@ -1,78 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef KEROSIN_CCYLINDER_H -#define KEROSIN_CCYLINDER_H - -#include <kerosin/kerosin_defines.h> -#include "singlematnode.h" - -namespace kerosin -{ -class Material; - -/** CCylinder is a SingleMatNode that creates and renders a capped - cylinder mesh with the given length and radius - */ -class KEROSIN_API CCylinder : public SingleMatNode -{ - // - // Function - // -public: - CCylinder(); - virtual ~CCylinder(); - - /** sets the parameters of the capped cylinder. - - \param radius is the radius of the caps, and of the cylinder - itself - - \param length is the height of the cylinder, not counting the - caps - */ - void SetParams(float radius, float length); - - /** returns the parameters of the capped cylinder */ - void GetParams(float& radius, float& length) const; - - /** returns the radius of the capped cylinder */ - float GetRadius(); - - /** returns the length of the capped cylinder */ - float GetLength(); - - // - // Members - // -protected: - /** the radius of the caps and the cylinder */ - float mRadius; - - /** the height of the clinder, not counting the caps */ - float mLength; -}; - -DECLARE_CLASS(CCylinder); - -} //namespace kerosin - -#endif //KEROSIN_CCYLINDER_H Deleted: branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder_c.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/kerosin/sceneserver/ccylinder_c.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -1,62 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include "ccylinder.h" - -using namespace boost; -using namespace kerosin; -using namespace salt; - -FUNCTION(CCylinder,setParams) -{ - float inRadius; - float inLength; - - if ( - (in.GetSize() != 2) || - (! in.GetValue(in[0], inRadius)) || - (! in.GetValue(in[1], inLength)) - ) - { - return false; - } - - obj->SetParams(inRadius,inLength); - return true; -} - -FUNCTION(CCylinder,getRadius) -{ - return obj->GetRadius(); -} - -FUNCTION(CCylinder,getLength) -{ - return obj->GetLength(); -} - -void CLASS(CCylinder)::DefineClass() -{ - DEFINE_BASECLASS(kerosin/SingleMatNode); - DEFINE_FUNCTION(setParams); - DEFINE_FUNCTION(getRadius); - DEFINE_FUNCTION(getLength); -} Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-10 08:34:56 UTC (rev 118) @@ -14,6 +14,7 @@ gamecontrolserver/behavior.h oxygen.h oxygen_defines.h + physicsserver/genericphysicsobject.h physicsserver/physicsobject.h physicsserver/body.h physicsserver/rigidbody.h @@ -56,9 +57,11 @@ #interfaces physicsserver/int/bodyint.h physicsserver/int/boxcolliderint.h + physicsserver/int/capsulecolliderint.h physicsserver/int/colliderint.h physicsserver/int/compoundcolliderint.h physicsserver/int/concavecolliderint.h + physicsserver/int/conecolliderint.h physicsserver/int/convexcolliderint.h physicsserver/int/cylindercolliderint.h physicsserver/int/dynamicbodyint.h @@ -76,9 +79,11 @@ physicsserver/ode/odebody.h physicsserver/ode/odeboxcollider.h physicsserver/ode/odedynamicbody.h + physicsserver/ode/odecapsulecollider.h physicsserver/ode/odecollider.h physicsserver/ode/odecompoundcollider.h physicsserver/ode/odeconcavecollider.h + physicsserver/ode/odeconecollider.h physicsserver/ode/odeconvexcollider.h physicsserver/ode/odecylindercollider.h physicsserver/ode/odeemptycollider.h @@ -177,6 +182,7 @@ physicsserver/compoundcollider_c.cpp physicsserver/concavecollider.cpp physicsserver/concavecollider_c.cpp + physicsserver/conecollider.cpp physicsserver/conecollider_c.cpp physicsserver/convexcollider.cpp physicsserver/convexcollider_c.cpp @@ -228,9 +234,11 @@ #ODE-specific files physicsserver/ode/odebody.cpp physicsserver/ode/odeboxcollider.cpp + physicsserver/ode/odecapsulecollider.cpp physicsserver/ode/odecollider.cpp physicsserver/ode/odecompoundcollider.cpp physicsserver/ode/odeconcavecollider.cpp + physicsserver/ode/odeconecollider.cpp physicsserver/ode/odeconvexcollider.cpp physicsserver/ode/odecylindercollider.cpp physicsserver/ode/odedynamicbody.cpp Modified: branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -40,7 +40,7 @@ static const string gSphereStr = "StdUnitSphere"; static const string gBoxStr = "StdUnitBox"; -static const string gCCylinderStr = "StdCCylinder"; +static const string gCapsuleStr = "StdCapsule"; static const string gCylinderStr = "StdUnitCylinder"; shared_ptr<TriMesh> @@ -56,9 +56,9 @@ return UnitBoxMesh(); } - if (name == gCCylinderStr) + if (name == gCapsuleStr) { - return UnitCCylinder(parameter); + return UnitCapsule(parameter); } if (name == gCylinderStr) @@ -253,7 +253,7 @@ } // -// unit capped cylinder +// unit capsule // static void AddVertex(float** at, float x, float y, float z) { @@ -265,7 +265,7 @@ std::string StdMeshImporter::MangleName (const string& name, const ParameterList& parameter) { if ( - (name != gCCylinderStr) || + (name != gCapsuleStr) || (parameter.GetSize() < 2) ) { @@ -273,7 +273,7 @@ } stringstream ss; - ss << gCCylinderStr; + ss << gCapsuleStr; float radius; if (parameter.GetValue(parameter[0],radius)) @@ -290,18 +290,18 @@ return ss.str(); } -shared_ptr<TriMesh> StdMeshImporter::UnitCCylinder(const ParameterList& parameter) +shared_ptr<TriMesh> StdMeshImporter::UnitCapsule(const ParameterList& parameter) { // // code adapted from ODE's drawstuff lib // - // generated capped clinder with r=1 and l=1 + // generated capsule with r=1 and l=1 float ccRadius = 1; float ccLength = 1; GetLog()->Debug() - << "(StdMeshImporter::UnitCCylinder) paramSize=" + << "(StdMeshImporter::UnitCapsule) paramSize=" << parameter.GetSize() << "\n"; if (parameter.GetSize() >= 2) { @@ -310,8 +310,8 @@ } // number of sides to the cylinder (divisible by 4): - const int capped_cylinder_quality = 3; - const int n = capped_cylinder_quality*4; + const int capsule_quality = 3; + const int n = capsule_quality*4; int innerLoop = (n+1); int numVertices = innerLoop * 2; @@ -447,7 +447,7 @@ mesh->SetPos(pos,numVertices); mesh->SetNormals(normals); mesh->AddFace(idx); - mesh->SetName(MangleName(gCCylinderStr,parameter)); + mesh->SetName(MangleName(gCapsuleStr,parameter)); return mesh; } Modified: branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.h =================================================================== --- branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.h 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/geometryserver/stdmeshimporter.h 2009-12-10 08:34:56 UTC (rev 118) @@ -28,7 +28,7 @@ namespace oxygen { /** \class StdMeshImporter is a MeshImporter that generates a standard - set of meshes. These are spheres, boxes and capped cylinders. + set of meshes. These are spheres, boxes and capsule. */ class OXYGEN_API StdMeshImporter : public MeshImporter { @@ -41,7 +41,7 @@ virtual boost::shared_ptr<TriMesh> ImportMesh (const std::string& name,const zeitgeist::ParameterList& parameter); - /** returns a unique name for each parameterized capped cylinder + /** returns a unique name for each parameterized capsule mesh, and \param name otherwise */ virtual std::string MangleName @@ -54,8 +54,8 @@ /** constructs a unit box */ boost::shared_ptr<TriMesh> UnitBoxMesh(); - /** constructs a unit capped cylinder */ - boost::shared_ptr<TriMesh> UnitCCylinder + /** constructs a unit capsule */ + boost::shared_ptr<TriMesh> UnitCapsule (const zeitgeist::ParameterList& parameter); /** constructs a flat unit cylinder */ Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -3,7 +3,7 @@ this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University - $Id: ccylindercollider.cpp 108 2009-11-25 10:20:10Z a-held $ + $Id: capsulecollider.cpp 108 2009-11-25 10:20:10Z a-held $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,51 +20,44 @@ */ #include <oxygen/physicsserver/capsulecollider.h> +#include <oxygen/physicsserver/ode/odecapsulecollider.h> using namespace oxygen; using namespace salt; CapsuleCollider::CapsuleCollider() : ConvexCollider() { + mCapsuleColliderImp = boost::shared_ptr<ODECapsuleCollider>(new ODECapsuleCollider()); } void CapsuleCollider::SetParams(float radius, float length) { - dGeomCCylinderSetParams (mODEGeom, radius, length); + mCapsuleColliderImp->SetParams(radius, length); } void CapsuleCollider::SetRadius(float radius) { - SetParams(radius,GetLength()); + mCapsuleColliderImp->SetRadius(radius); } void CapsuleCollider::SetLength(float length) { - SetParams(GetRadius(),length); + mCapsuleColliderImp->SetLength(length); } void CapsuleCollider::GetParams(float& radius, float& length) { - dReal r,l; - dGeomCCylinderGetParams(mODEGeom,&r,&l); - radius = r; - length = l; + mCapsuleColliderImp->GetParams(radius, length); } float CapsuleCollider::GetRadius() { - float length; - float radius; - GetParams(radius,length); - return radius; + return mCapsuleColliderImp->GetRadius(); } float CapsuleCollider::GetLength() { - float radius; - float length; - GetParams(radius,length); - return length; + return mCapsuleColliderImp->GetLength(); } bool CapsuleCollider::ConstructInternal() @@ -74,16 +67,14 @@ return false; } - // create a unit capped cylinder - mODEGeom = dCreateCCylinder(0, 1.0f, 1.0f); + mCapsuleColliderImp->CreateCapsule(); + mODEGeom = (dGeomID) mCapsuleColliderImp->GetGeomID(); - return (mODEGeom != 0); + return (mCapsuleColliderImp->GetGeomID() != 0); } float CapsuleCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return dGeomCCylinderPointDepth - (mODEGeom,worldPos[0],worldPos[1],worldPos[2]); + return mCapsuleColliderImp->GetPointDepth(worldPos); } - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider.h 2009-12-10 08:34:56 UTC (rev 118) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: ccylindercollider.h 108 2009-11-25 10:20:10Z a-held $ + $Id: capsulecollider.h 108 2009-11-25 10:20:10Z a-held $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,8 +27,9 @@ namespace oxygen { +class CapsuleColliderInt; -/** CapsuleCollider encapsulates an ODE capsule geometry +/** CapsuleCollider encapsulates a capsule geometry object. A capsule is like a cylinder except it has half-sphere caps at its ends. This feature makes the internal collision detection code particularly fast and accurate. @@ -74,6 +75,9 @@ /** constructs a default capsule with an radius of 1 and a length of 1 */ virtual bool ConstructInternal(); + +private: + boost::shared_ptr<CapsuleColliderInt> mCapsuleColliderImp; }; DECLARE_CLASS(CapsuleCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/physicsserver/capsulecollider_c.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -3,7 +3,7 @@ this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University - $Id: ccylindercollider_c.cpp 108 2009-11-25 10:20:10Z a-held $ + $Id: capsulecollider_c.cpp 108 2009-11-25 10:20:10Z a-held $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-09 08:42:42 UTC (rev 117) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-10 08:34:56 UTC (rev 118) @@ -213,8 +213,8 @@ void Collider::SetRotation(const Matrix& rot) { dMatrix3 ODEMatrix; - void* matrixPtr = (void*) &ODEMatrix; - ConvertRotationMatrix(rot, matrixPtr); + GenericPhysicsObject& matrixRef = ... [truncated message content] |
From: <a-...@us...> - 2009-12-09 08:42:53
|
Revision: 117 http://simspark.svn.sourceforge.net/simspark/?rev=117&view=rev Author: a-held Date: 2009-12-09 08:42:42 +0000 (Wed, 09 Dec 2009) Log Message: ----------- provided bridge pattern for ConvexCollider and CylinderCollider implemented bridge pattern for BoxCollider and SphereCollider Modified Paths: -------------- branches/multiphys/spark/lib/oxygen/CMakeLists.txt branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/collider.h branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h Added Paths: ----------- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h Modified: branches/multiphys/spark/lib/oxygen/CMakeLists.txt =================================================================== --- branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/CMakeLists.txt 2009-12-09 08:42:42 UTC (rev 117) @@ -55,9 +55,12 @@ #interfaces physicsserver/int/bodyint.h + physicsserver/int/boxcolliderint.h physicsserver/int/colliderint.h physicsserver/int/compoundcolliderint.h physicsserver/int/concavecolliderint.h + physicsserver/int/convexcolliderint.h + physicsserver/int/cylindercolliderint.h physicsserver/int/dynamicbodyint.h physicsserver/int/emptycolliderint.h physicsserver/int/physicsobjectint.h @@ -65,21 +68,26 @@ physicsserver/int/rigidbodyint.h physicsserver/int/softbodyint.h physicsserver/int/spaceint.h + physicsserver/int/spherecolliderint.h physicsserver/int/staticbodyint.h physicsserver/int/worldint.h #ode-specific files physicsserver/ode/odebody.h + physicsserver/ode/odeboxcollider.h physicsserver/ode/odedynamicbody.h physicsserver/ode/odecollider.h physicsserver/ode/odecompoundcollider.h physicsserver/ode/odeconcavecollider.h + physicsserver/ode/odeconvexcollider.h + physicsserver/ode/odecylindercollider.h physicsserver/ode/odeemptycollider.h physicsserver/ode/odephysicsobject.h physicsserver/ode/odephysicsserver.h physicsserver/ode/oderigidbody.h physicsserver/ode/odesoftbody.h physicsserver/ode/odespace.h + physicsserver/ode/odespherecollider.h physicsserver/ode/odestaticbody.h physicsserver/ode/odeworld.h physicsserver/ode/odewrapper.h @@ -163,7 +171,6 @@ physicsserver/boxcollider_c.cpp physicsserver/capsulecollider.cpp physicsserver/capsulecollider_c.cpp - physicsserver/cylindercollider_c.cpp physicsserver/collider.cpp physicsserver/collider_c.cpp physicsserver/compoundcollider.cpp @@ -171,11 +178,14 @@ physicsserver/concavecollider.cpp physicsserver/concavecollider_c.cpp physicsserver/conecollider_c.cpp + physicsserver/convexcollider.cpp physicsserver/convexcollider_c.cpp physicsserver/collisionhandler.cpp physicsserver/collisionhandler_c.cpp physicsserver/contactjointhandler.cpp physicsserver/contactjointhandler_c.cpp + physicsserver/cylindercollider.cpp + physicsserver/cylindercollider_c.cpp physicsserver/emptycollider.cpp physicsserver/emptycollider_c.cpp physicsserver/physicsserver.cpp @@ -217,9 +227,12 @@ #ODE-specific files physicsserver/ode/odebody.cpp + physicsserver/ode/odeboxcollider.cpp + physicsserver/ode/odecollider.cpp physicsserver/ode/odecompoundcollider.cpp physicsserver/ode/odeconcavecollider.cpp - physicsserver/ode/odecollider.cpp + physicsserver/ode/odeconvexcollider.cpp + physicsserver/ode/odecylindercollider.cpp physicsserver/ode/odedynamicbody.cpp physicsserver/ode/odeemptycollider.cpp physicsserver/ode/odephysicsobject.cpp @@ -227,6 +240,7 @@ physicsserver/ode/oderigidbody.cpp physicsserver/ode/odesoftbody.cpp physicsserver/ode/odespace.cpp + physicsserver/ode/odespherecollider.cpp physicsserver/ode/odestaticbody.cpp physicsserver/ode/odeworld.cpp Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -21,27 +21,22 @@ */ #include <oxygen/physicsserver/boxcollider.h> +#include <oxygen/physicsserver/ode/odeboxcollider.h> using namespace oxygen; using namespace salt; BoxCollider::BoxCollider() : ConvexCollider() { + mBoxColliderImp = boost::shared_ptr<ODEBoxCollider>(new ODEBoxCollider()); } -void -BoxCollider::SetBoxLengths(const Vector3f& extents) +void BoxCollider::SetBoxLengths(const Vector3f& extents) { - dGeomBoxSetLengths( - mODEGeom, - extents[0], - extents[1], - extents[2] - ); + mBoxColliderImp->SetBoxLengths(extents); } -bool -BoxCollider::ConstructInternal() +bool BoxCollider::ConstructInternal() { if (! Collider::ConstructInternal()) { @@ -49,23 +44,18 @@ } // create a unit box - mODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); + mBoxColliderImp->CreateBox(); + mODEGeom = (dGeomID) mBoxColliderImp->GetGeomID(); - return (mODEGeom != 0); + return (mBoxColliderImp->GetGeomID() != 0); } -void -BoxCollider::GetBoxLengths(Vector3f& extents) +void BoxCollider::GetBoxLengths(Vector3f& extents) { - dVector3 lengths; - dGeomBoxGetLengths(mODEGeom,lengths); - extents[0] = lengths[0]; - extents[1] = lengths[1]; - extents[2] = lengths[2]; + mBoxColliderImp->GetBoxLengths(extents); } -float -BoxCollider::GetBoxLength(int axis) +float BoxCollider::GetBoxLength(int axis) { if ( (axis<0) || @@ -80,12 +70,8 @@ return extents[axis]; } -float -BoxCollider::GetPointDepth(const Vector3f& pos) +float BoxCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return dGeomBoxPointDepth - (mODEGeom,worldPos[0],worldPos[1],worldPos[2]); + return mBoxColliderImp->GetPointDepth(worldPos); } - - Modified: branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/boxcollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -27,6 +27,7 @@ namespace oxygen { +class BoxColliderInt; /** BoxCollider encapsulates an ODE box geometry object. */ @@ -60,6 +61,9 @@ protected: /** constructs a default box with side lengths of 1 */ virtual bool ConstructInternal(); + +private: + boost::shared_ptr<BoxColliderInt> mBoxColliderImp; }; DECLARE_CLASS(BoxCollider); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -46,7 +46,6 @@ { PhysicsObject::OnLink(); - weak_ptr<Node> parent = GetParent(); if ( (mODEGeom == 0) || @@ -150,9 +149,12 @@ } void Collider::OnCollision (boost::shared_ptr<Collider> collidee, - dContact& contact, ECollisionType type) + void* contact, ECollisionType type) { + dContact* helpContact = (dContact*) contact; + dContact& ODEContact = (dContact&) *helpContact; + TLeafList handlers; ListChildrenSupportingClass<CollisionHandler>(handlers); @@ -173,7 +175,7 @@ continue; } - handler->HandleCollision(collidee, contact); + handler->HandleCollision(collidee, ODEContact); } } @@ -298,7 +300,7 @@ } } -const Collider::TColliderNameSet & Collider::GetNotCollideWithSet() const +const Collider::TColliderNameSet& Collider::GetNotCollideWithSet() const { return mNotCollideWithSet; } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/collider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -32,7 +32,7 @@ { class ColliderInt; -/** \class Collider encapsulates an ODE geometry object- geom for +/** \class Collider encapsulates a geometry object- geom for short. Geoms are the fundamental objects in the collision system. They represent a single rigid shape as for example a sphere or a box. A special kind of geom called 'space' can @@ -49,14 +49,17 @@ // public: /** enumerates the two different collision instances reported to - the OnCollision member for each collision reported from ODE. + the OnCollision member for each collision reported from the + physics engine. */ enum ECollisionType { - /** the collision pair as reported from ODE */ + /** the collision pair as reported from the physics engine */ CT_DIRECT, - /** the symmetric pair to the pair reported from ODE */ + /** the symmetric pair to the pair reported from the + physics engine + */ CT_SYMMETRIC }; @@ -80,11 +83,11 @@ \param holds the contact points between the two affected geoms as returned from ODE dCollide function - \param symmetric indicates tha this collision indicates a + \param symmetric indicates that this collision indicates a symmetric case */ virtual void OnCollision (boost::shared_ptr<Collider> collidee, - dContact& contact, ECollisionType type); + void* contact, ECollisionType type); /** registers a new collision handler to this collider. If no collision handler is registered until the first call to @@ -94,10 +97,10 @@ */ bool AddCollisionHandler(const std::string& handlerName); - /** returns the Collider corresponding to the given ODE geom */ + /** returns the Collider corresponding to the given geom */ static boost::shared_ptr<Collider> GetCollider(long geomID); - /** returns the ID of managed ODE geom */ + /** returns the ID of managed geom */ long GetGeomID(); /** sets the relative position of the managed geom directly. If @@ -120,23 +123,23 @@ */ virtual void SetRotation(const salt::Matrix& rot); - /** returns true if the ODE geom managed by this + /** returns true if the geom managed by this Collider intersects with the geom managed by the given collider */ bool Intersects(boost::shared_ptr<Collider> collider); - /** returns the ODE handle ID of the containing parent space */ + /** returns the handle ID of the containing parent space */ virtual long GetParentSpaceID(); /** Add/Reomve a collider name that not collide with */ - void AddNotCollideWithColliderName(const std::string & colliderName, bool isAdd); + void AddNotCollideWithColliderName(const std::string& colliderName, bool isAdd); /** Get the not collide with collider set */ - const TColliderNameSet & GetNotCollideWithSet() const; + const TColliderNameSet& GetNotCollideWithSet() const; protected: /** registers the managed geom to the Space of the Scene and to - the associated ODE body + the associated body */ virtual void OnLink(); @@ -165,7 +168,7 @@ protected: /** a set that store the colliders that I never collide with - Note: they are should in the same space, orelse this is ignored + Note: they should be in the same space, or else this is ignored */ TColliderNameSet mNotCollideWithSet; }; Added: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,33 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: body.h 106 2009-11-19 10:10:50Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/convexcollider.h> +#include <oxygen/physicsserver/ode/odeconvexcollider.h> + +using namespace oxygen; + +ConvexCollider::ConvexCollider() : Collider(){ + mConvexColliderImp = boost::shared_ptr<ODEConvexCollider>(new ODEConvexCollider()); +} + +ConvexCollider::~ConvexCollider(){ + +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/convexcollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -27,15 +27,21 @@ namespace oxygen { +class ConvexColliderInt; + /** ConvexCollider is the common base class of all convex geometry objects, such as spheres and boxes. */ class OXYGEN_API ConvexCollider : public Collider { + public: - ConvexCollider() : Collider(){}; - virtual ~ConvexCollider(){}; + ConvexCollider(); + virtual ~ConvexCollider(); + +private: + boost::shared_ptr<ConvexColliderInt> mConvexColliderImp; }; DECLARE_ABSTRACTCLASS(ConvexCollider); Added: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,33 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: body.h 106 2009-11-19 10:10:50Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/cylindercollider.h> +#include <oxygen/physicsserver/ode/odecylindercollider.h> + +using namespace oxygen; + +CylinderCollider::CylinderCollider() : ConvexCollider(){ + mCylinderColliderImp = boost::shared_ptr<ODECylinderCollider>(new ODECylinderCollider()); +} + +CylinderCollider::~CylinderCollider(){ + +} Modified: branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/cylindercollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -27,6 +27,8 @@ namespace oxygen { +class CylinderColliderInt; + /** CylinderCollider is not yet implemented. */ @@ -37,8 +39,11 @@ // Functions // public: - CylinderCollider() : ConvexCollider(){}; - virtual ~CylinderCollider(){}; + CylinderCollider(); + virtual ~CylinderCollider(); + +private: + boost::shared_ptr<CylinderColliderInt> mCylinderColliderImp; }; DECLARE_CLASS(CylinderCollider); Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/boxcolliderint.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_BOXCOLLIDERINT_H +#define OXYGEN_BOXCOLLIDERINT_H + +#include <salt/salt.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API BoxColliderInt +{ + +public: + virtual void SetBoxLengths(const salt::Vector3f& extents) = 0; + virtual void GetBoxLengths(salt::Vector3f& extents) = 0; + virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void CreateBox() = 0; + + virtual long GetGeomID() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_BOXCOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/colliderint.h 2009-12-09 08:42:42 UTC (rev 117) @@ -63,7 +63,7 @@ virtual void DestroyPhysicsObject() = 0; protected: - dGeomID mODEGeom; + long mGeomID; TColliderNameSet mNotCollideWithSet; }; Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/convexcolliderint.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,38 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_CONVEXCOLLIDERINT_H +#define OXYGEN_CONVEXCOLLIDERINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API ConvexColliderInt +{ + +}; + +} //namespace oxygen + +#endif //OXYGEN_CONVEXCOLLIDERINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/cylindercolliderint.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,38 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_CYLINDERCOLLIDERINT_H +#define OXYGEN_CYLINDERCOLLIDERINT_H + +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API CylinderColliderInt +{ + +}; + +} //namespace oxygen + +#endif //OXYGEN_CYLINDERCOLLIDERINT_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/spherecolliderint.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: space.h 102 2009-11-18 07:24:29Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_SPHERECOLLIDERINT_H +#define OXYGEN_SPHERECOLLIDERINT_H + +#include <salt/salt.h> +#include <oxygen/oxygen_defines.h> + +namespace oxygen +{ + +class OXYGEN_API SphereColliderInt +{ + +public: + virtual void SetRadius(float r) = 0; + virtual float GetRadius() const = 0; + virtual float GetPointDepth(const salt::Vector3f& pos) = 0; + virtual void CreateSphere() = 0; + + virtual long GetGeomID() = 0; +}; + +} //namespace oxygen + +#endif //OXYGEN_SPHERECOLLIDERINT_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odebody.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -4,7 +4,7 @@ Fri May 9 2003 Copyright (C) 2002,2003 Koblenz University Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + $Id: odebody.cpp 3 2008-11-21 02:38:08Z hedayat $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,67 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: boxcollider.cpp 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/collider.h> +#include <oxygen/physicsserver/ode/odeboxcollider.h> + +using namespace oxygen; +using namespace salt; + +ODEBoxCollider::ODEBoxCollider() : ODEConvexCollider() +{ + +} + +void ODEBoxCollider::SetBoxLengths(const Vector3f& extents) +{ + dGeomBoxSetLengths( + mODEGeom, + extents[0], + extents[1], + extents[2] + ); +} + +void ODEBoxCollider::CreateBox() +{ + mODEGeom = dCreateBox (0, 1.0f, 1.0f, 1.0f); + mGeomID = (long) mODEGeom; +} + +void ODEBoxCollider::GetBoxLengths(Vector3f& extents) +{ + dVector3 lengths; + dGeomBoxGetLengths(mODEGeom,lengths); + extents[0] = lengths[0]; + extents[1] = lengths[1]; + extents[2] = lengths[2]; +} + +float ODEBoxCollider::GetPointDepth(const Vector3f& pos) +{ + return dGeomBoxPointDepth + (mODEGeom,pos[0],pos[1],pos[2]); +} + +long ODEBoxCollider::GetGeomID(){ + return mGeomID; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeboxcollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,47 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEBOXCOLLIDER_H +#define OXYGEN_ODEBOXCOLLIDER_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/int/boxcolliderint.h> +#include <oxygen/physicsserver/ode/odeconvexcollider.h> + +namespace oxygen +{ + +class OXYGEN_API ODEBoxCollider : public BoxColliderInt, public ODEConvexCollider +{ +public: + ODEBoxCollider(); + void SetBoxLengths(const salt::Vector3f& extents); + void GetBoxLengths(salt::Vector3f& extents); + float GetPointDepth(const salt::Vector3f& pos); + void CreateBox(); + + long GetGeomID(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODEBOXCOLLIDER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -37,6 +37,7 @@ ODECollider::ODECollider() : ODEPhysicsObject(), mODEGeom(0) { + mGeomID = 0; } ODECollider::~ODECollider() Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,28 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odeconvexcollider.h> + +using namespace oxygen; + +ODEConvexCollider::ODEConvexCollider() : ODECollider(){ + +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odeconvexcollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,39 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODECONVEXCOLLIDER_H +#define OXYGEN_ODECONVEXCOLLIDER_H + +#include <oxygen/physicsserver/ode/odecollider.h> +#include <oxygen/physicsserver/int/convexcolliderint.h> + +namespace oxygen +{ + +class OXYGEN_API ODEConvexCollider : public ConvexColliderInt, public ODECollider +{ +public: + ODEConvexCollider(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODECONVEXCOLLIDER_H Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,28 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odecylindercollider.h> + +using namespace oxygen; + +ODECylinderCollider::ODECylinderCollider() : ODEConvexCollider(){ + +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odecylindercollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,39 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODECYLINDERCOLLIDER_H +#define OXYGEN_ODECYLINDERCOLLIDER_H + +#include <oxygen/physicsserver/ode/odeconvexcollider.h> +#include <oxygen/physicsserver/int/cylindercolliderint.h> + +namespace oxygen +{ + +class OXYGEN_API ODECylinderCollider : public CylinderColliderInt, public ODEConvexCollider +{ +public: + ODECylinderCollider(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODECYLINDERCOLLIDER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -32,7 +32,7 @@ using namespace salt; using namespace std; -ODERigidBody::ODERigidBody() : ODEBody(){ +ODERigidBody::ODERigidBody() : ODEBody(), mODEBody(0){ mBodyID = 0; mMassTrans = Vector3f(0,0,0); mMassTransformed = false; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespace.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -158,8 +158,8 @@ for (int i=0;i<n;++i) { // notify the collider nodes - collider->OnCollision(collidee,contacts[i],Collider::CT_DIRECT); - collidee->OnCollision(collider,contacts[i],Collider::CT_SYMMETRIC); + //collider->OnCollision(collidee,contacts[i],Collider::CT_DIRECT); + //collidee->OnCollision(collider,contacts[i],Collider::CT_SYMMETRIC); } } Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,57 @@ +/* -*- mode: c++ -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: spherecollider.cpp 108 2009-11-25 10:20:10Z a-held $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odespherecollider.h> + +using namespace oxygen; +using namespace salt; + +ODESphereCollider::ODESphereCollider() : ODEConvexCollider() +{ + mODEGeom = 0; + mGeomID = 0; +} + +void ODESphereCollider::SetRadius(float r) +{ + dGeomSphereSetRadius(mODEGeom, r); +} + +float ODESphereCollider::GetRadius() const +{ + return dGeomSphereGetRadius(mODEGeom); +} + +void ODESphereCollider::CreateSphere() +{ + mODEGeom = dCreateSphere(0, 1.0f); + mGeomID = (long) mODEGeom; +} + +float ODESphereCollider::GetPointDepth(const Vector3f& pos) +{ + return dGeomSpherePointDepth + (mODEGeom,pos[0],pos[1],pos[2]); +} + +long ODESphereCollider::GetGeomID(){ + return mGeomID; +} Added: branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h (rev 0) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/odespherecollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -0,0 +1,46 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODESPHERECOLLIDER_H +#define OXYGEN_ODESPHERECOLLIDER_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/int/spherecolliderint.h> +#include <oxygen/physicsserver/ode/odeconvexcollider.h> + +namespace oxygen +{ + +class OXYGEN_API ODESphereCollider : public SphereColliderInt, public ODEConvexCollider +{ +public: + ODESphereCollider(); + void SetRadius(float r); + float GetRadius() const; + float GetPointDepth(const salt::Vector3f& pos); + void CreateSphere(); + + long GetGeomID(); +}; + +} //namespace oxygen + +#endif //OXYGEN_ODESPHERECOLLIDER_H Modified: branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/space.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -138,8 +138,8 @@ if (s1 == s2) { - const oxygen::Collider::TColliderNameSet & collider_set = collider->GetNotCollideWithSet(); - const oxygen::Collider::TColliderNameSet & collidee_set = collidee->GetNotCollideWithSet(); + const oxygen::Collider::TColliderNameSet& collider_set = collider->GetNotCollideWithSet(); + const oxygen::Collider::TColliderNameSet& collidee_set = collidee->GetNotCollideWithSet(); if ( (collider_set.find(collidee->GetName()) != collider_set.end()) || (collidee_set.find(collider->GetName()) != collidee_set.end()) @@ -170,8 +170,8 @@ for (int i=0;i<n;++i) { // notify the collider nodes - collider->OnCollision(collidee,contacts[i],Collider::CT_DIRECT); - collidee->OnCollision(collider,contacts[i],Collider::CT_SYMMETRIC); + collider->OnCollision(collidee,(void*) &contacts[i],Collider::CT_DIRECT); + collidee->OnCollision(collider,(void*) &contacts[i],Collider::CT_SYMMETRIC); } } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.cpp 2009-12-09 08:42:42 UTC (rev 117) @@ -20,44 +20,44 @@ */ #include <oxygen/physicsserver/spherecollider.h> +#include <oxygen/physicsserver/ode/odespherecollider.h> using namespace oxygen; using namespace salt; SphereCollider::SphereCollider() : ConvexCollider() { + mSphereColliderImp = boost::shared_ptr<ODESphereCollider>(new ODESphereCollider()); } -void -SphereCollider::SetRadius(float r) +void SphereCollider::SetRadius(float r) { - dGeomSphereSetRadius(mODEGeom, r); + mSphereColliderImp->SetRadius(r); } -float -SphereCollider::GetRadius() const +float SphereCollider::GetRadius() const { - return dGeomSphereGetRadius(mODEGeom); + return mSphereColliderImp->GetRadius(); } -bool -SphereCollider::ConstructInternal() +bool SphereCollider::ConstructInternal() { - if (! Collider::ConstructInternal()) + if (!Collider::ConstructInternal()) { return false; } + + // mODEGeom = dCreateSphere(0, 1.0f); // create a unit sphere - mODEGeom = dCreateSphere(0, 1.0f); + mSphereColliderImp->CreateSphere(); + mODEGeom = (dGeomID) mSphereColliderImp->GetGeomID(); - return (mODEGeom != 0); + return (mSphereColliderImp->GetGeomID() != 0); } -float -SphereCollider::GetPointDepth(const Vector3f& pos) +float SphereCollider::GetPointDepth(const Vector3f& pos) { Vector3f worldPos(GetWorldTransform() * pos); - return dGeomSpherePointDepth - (mODEGeom,worldPos[0],worldPos[1],worldPos[2]); + return mSphereColliderImp->GetPointDepth(worldPos); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h 2009-12-08 07:56:49 UTC (rev 116) +++ branches/multiphys/spark/lib/oxygen/physicsserver/spherecollider.h 2009-12-09 08:42:42 UTC (rev 117) @@ -27,8 +27,9 @@ namespace oxygen { +class SphereColliderInt; -/** SphereCollider encapsulates an ODE sphere geometry object. +/** SphereCollider encapsulates a sphere geometry object. */ class OXYGEN_API SphereCollider : public ConvexCollider { @@ -38,10 +39,10 @@ public: SphereCollider(); - /** sets the radius of the managed ODE sphere geom */ + /** sets the radius of the managed sphere geom */ void SetRadius(float r); - /** get the radius back from ODE */ + /** get the radius back from */ float GetRadius() const; /** returns the depth of the given relative position in the @@ -54,6 +55,9 @@ protected: /** constructs a default sphere with a radius of 1 */ virtual bool ConstructInternal(); + +private: + boost::shared_ptr<SphereColliderInt> mSphereColliderImp; }; DECLARE_CLASS(SphereCollider); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |