Changeset 14339 for lang/ruby/pitagora
- Timestamp:
- 06/21/08 16:54:51 (5 years ago)
- Location:
- lang/ruby/pitagora/trunk/ode_ruby
- Files:
-
- 6 added
- 2 modified
-
demo/test2.rb (modified) (5 diffs)
-
save/state_5.yaml (modified) (9 diffs)
-
textures/i_love_ruby.png (added)
-
textures/ruby_kaigi_08_logo.png (added)
-
textures/ruby_logo.png (added)
-
textures/user_021.ppm (added)
-
textures/user_022.ppm (added)
-
textures/user_023.ppm (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/pitagora/trunk/ode_ruby/demo/test2.rb
r14321 r14339 4 4 require 'monitor' 5 5 require 'yaml' 6 require 'erb' 6 7 7 8 def log(s) … … 41 42 #p Ode_cpp::dWorldGetContactMaxCorrectingVel($world.id) 42 43 #p Ode_cpp::dWorldGetContactSurfaceLayer($world.id) 43 Ode_cpp::dWorldSetContactMaxCorrectingVel($world.id, 1000.0)44 Ode_cpp::dWorldSetContactSurfaceLayer($world.id, 0.001)45 Ode_cpp::dWorldSetAutoDisableAverageSamplesCount($world.id, 10)44 #Ode_cpp::dWorldSetContactMaxCorrectingVel($world.id, 1000.0) 45 #Ode_cpp::dWorldSetContactSurfaceLayer($world.id, 0.001) 46 #Ode_cpp::dWorldSetAutoDisableAverageSamplesCount($world.id, 10) 46 47 47 48 # Base/Box/Sphere/Capsule/Cylinder … … 125 126 126 127 def load_from_yaml(fn) 127 yaml_obj = YAML.load_file(fn) 128 #yaml_obj = YAML.load_file(fn) 129 yaml_obj = YAML::load(ERB.new(IO.read( fn )).result) 130 128 131 yaml_obj.each do |hash| 129 132 klass = eval(hash[:class]) … … 274 277 275 278 # スライドタイトル0 276 #xyz=[15.7971229553223, 5.94557666778564, 1.14663815498352]277 #hpr=[177.560760498047, -10.6020441055298, 0.0]278 279 xyz=[15.8511810302734, 11.0112943649292, 1.18576812744141] 279 280 hpr=[-179.67204284668, -9.92193984985352, 0.0] 280 281 281 # tmp1 282 # tmp1 はじめの坂 282 283 #xyz=[15.0797939300537, -8.75014877319336, 3.6630527973175] 283 284 #hpr=[-162.504684448242, -10.6020441055298, 0.0] 285 286 # tmp2 最後の坂 287 #xyz=[14.5021448135376, 4.13276433944702, 6.16305589675903] 288 #hpr=[83.4953155517578, -31.60205078125, 0.0] 289 290 # tmp3 最後のBOX 291 #xyz=[-1.51419591903687, 4.49123239517212, 3.6630527973175] 292 #hpr=[129.995315551758, -4.10204410552979, 0.0] 284 293 285 294 self.set_viewpoint(xyz, hpr) … … 318 327 contact.surface.mu = Float::MAX 319 328 contact.surface.mu2 = 0.0 320 contact.surface.bounce = 0.1 329 # contact.surface.bounce = 0.1 330 contact.surface.bounce = 0.5 321 331 contact.surface.bounce_vel = 0.1 322 332 contact.surface.soft_cfm = 0.01 -
lang/ruby/pitagora/trunk/ode_ruby/save/state_5.yaml
r14321 r14339 72 72 73 73 - :class: Box 74 :name: "大きな坂の 下"74 :name: "大きな坂の台" 75 75 :pars: 76 76 - - 2 77 - 1077 - 5 78 78 - 3 79 79 - 1 … … 119 119 :texture: 0 120 120 :color: 121 - 1.0122 - 0. 5123 - 0. 5121 - 0.7 122 - 0.2 123 - 0.2 124 124 125 125 - :class: Box … … 158 158 159 159 - :class: Sphere 160 :name: " ボール"160 :name: "黄色いボール" 161 161 :pars: 162 162 - 1.5 … … 165 165 - -10.0 166 166 - -10.0 167 - 4.0167 - 8.0 168 168 :texture: 0 169 169 :color: … … 292 292 #============ 293 293 294 - :class: Box 295 :name: "最後のボールの台" 296 :pars: 297 - - 4 298 - 0.5 299 - 4 300 - 1 301 :position: 302 - 18.0 303 - 15.0 304 - 2.0 305 :texture: 0 306 :color: 307 - 0.0 308 - 0.7 309 - 1.5 310 294 311 - :class: Sphere 295 :name: " ボール1"296 :pars: 297 - 1.0 298 - 0.1 299 :position: 300 - 1 7.0301 - 1 6.0302 - 2.0312 :name: "赤いボール" 313 :pars: 314 - 1.0 315 - 0.1 316 :position: 317 - 18.0 318 - 15 319 - 7.0 303 320 :texture: 0 304 321 :color: … … 308 325 309 326 327 - :class: Box 328 :name: "最後の台" 329 :pars: 330 - - 3 331 - 4 332 - 3 333 - 1 334 :position: 335 - 18.0 336 - 18.0 337 - 1.5 338 :texture: 0 339 :color: 340 - 0.0 341 - 1.7 342 - 1.5 343 344 - :class: Box 345 :name: "最後の坂" 346 :pars: 347 - - 12 348 - 4 349 - 0.1 350 - 1 351 :position: 352 - 13.0 353 - 18.0 354 - 3.2 355 :texture: 0 356 :color: 357 - 0.0 358 - 1.2 359 - 0.5 360 361 - :class: Box 362 :name: "最後の坂の枠" 363 :pars: 364 - - 12 365 - 0.3 366 - 0.3 367 - 1 368 :position: 369 - 13.0 370 - 19.0 371 - 3.5 372 :texture: 0 373 :color: 374 - 1.5 375 - 0.2 376 - 0.5 377 378 310 379 #================================================== 311 380 … … 593 662 594 663 - :class: Box 595 :name: "slide 5 "664 :name: "slide 5-0" 596 665 :pars: 597 666 - - 1 … … 600 669 - 1 601 670 :position: 602 - 15.0603 - 1 5.0671 - -10.0 672 - 19.0 604 673 - 1.0 605 674 :texture: 1015 … … 621 690 - 0.173648177666931 622 691 - 0.0 692 693 <% (1..1).each do |l| %> 694 <% (1..3).each do |m| %> 695 <% z = 0 %> 696 <% (1..4).each do |n| %> 697 <% h = 2-n/8.0; z += h %> 698 - :class: Box 699 :name: "slide 5-<%=l%>_<%=m%>_<%=n%>" 700 :pars: 701 - - <%= h %> 702 - <%= h %> 703 - <%= h %> 704 - 0.0001 705 :position: 706 - <%= -12.0 + l *2.1 -2.1*(m%2) %> 707 - <%= 12.5 + m *1.05 %> 708 - <%= z-h/2.0 %> 709 :texture: <%= [1021,1022,1023,1015][n-1] %> 710 :color: 711 - <%= 2.0 %> 712 - <%= 1.5 %> 713 - <%= 1.5 %> 714 <% end %> 715 <% end %> 716 <% end %> 623 717 624 718 - :class: Box
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)