Scene.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. -- Generated by: C:\Users\godli\src\anki\out\build\x64-Debug\Bin\GltfImporter.exe CornellBox.gltf .. -rpath Assets -texrpath Assets -v
  2. local scene = getSceneGraph()
  3. local events = getEventManager()
  4. node = scene:newModelNode("Mesh_0")
  5. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_0_backWall_24a9b01d8fc47286.ankimdl")
  6. trf = Transform.new()
  7. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  8. rot = Mat3x4.new()
  9. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  10. trf:setRotation(rot)
  11. trf:setScale(5.000000)
  12. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  13. node = scene:newModelNode("Mesh_1")
  14. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_1_ceiling_3aa8abc0da9fdec8.ankimdl")
  15. trf = Transform.new()
  16. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  17. rot = Mat3x4.new()
  18. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  19. trf:setRotation(rot)
  20. trf:setScale(5.000000)
  21. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  22. node = scene:newModelNode("Mesh_2")
  23. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_2_floor_cc46c84f817f093a.ankimdl")
  24. trf = Transform.new()
  25. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  26. rot = Mat3x4.new()
  27. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  28. trf:setRotation(rot)
  29. trf:setScale(5.000000)
  30. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  31. node = scene:newModelNode("Mesh_3")
  32. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_3_leftWall_acf66dd2ebcb73e6.ankimdl")
  33. trf = Transform.new()
  34. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  35. rot = Mat3x4.new()
  36. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  37. trf:setRotation(rot)
  38. trf:setScale(5.000000)
  39. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  40. node = scene:newModelNode("Mesh_4")
  41. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_4_light_82ddb9b3263c8f6e.ankimdl")
  42. trf = Transform.new()
  43. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  44. rot = Mat3x4.new()
  45. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  46. trf:setRotation(rot)
  47. trf:setScale(5.000000)
  48. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  49. node = scene:newModelNode("Mesh_5")
  50. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_5_rightWall_46f15190068c514a.ankimdl")
  51. trf = Transform.new()
  52. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  53. rot = Mat3x4.new()
  54. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  55. trf:setRotation(rot)
  56. trf:setScale(5.000000)
  57. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  58. node = scene:newModelNode("Mesh_6")
  59. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_6_shortBox_6c09f7141caa6339.ankimdl")
  60. trf = Transform.new()
  61. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  62. rot = Mat3x4.new()
  63. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  64. trf:setRotation(rot)
  65. trf:setScale(5.000000)
  66. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  67. node = scene:newModelNode("Mesh_7")
  68. node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_7_tallBox_e327ec5ce1a1e7eb.ankimdl")
  69. trf = Transform.new()
  70. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  71. rot = Mat3x4.new()
  72. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  73. trf:setRotation(rot)
  74. trf:setScale(5.000000)
  75. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  76. node = scene:newPerspectiveCameraNode("Camera")
  77. scene:setActiveCameraNode(node:getSceneNodeBase())
  78. frustumc = node:getSceneNodeBase():getFrustumComponent()
  79. frustumc:setPerspective(0.100000, 500.000000, getMainRenderer():getAspectRatio() * 1.024779, 1.024779)
  80. frustumc:setShadowCascadesDistancePower(1.5)
  81. frustumc:setEffectiveShadowDistance(100.000000)
  82. trf = Transform.new()
  83. trf:setOrigin(Vec4.new(0.217066, 6.668793, 17.325689, 0))
  84. rot = Mat3x4.new()
  85. rot:setAll(0.999854, -0.000334, 0.017085, 0.000000, -0.001690, 0.992972, 0.118341, 0.000000, -0.017005, -0.118352, 0.992826, 0.000000)
  86. trf:setRotation(rot)
  87. trf:setScale(1.000000)
  88. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  89. node = scene:newPointLightNode("Point")
  90. lcomp = node:getSceneNodeBase():getLightComponent()
  91. lcomp:setDiffuseColor(Vec4.new(10.000000, 10.000000, 10.000000, 1))
  92. lcomp:setShadowEnabled(1)
  93. lcomp:setRadius(20.000000)
  94. trf = Transform.new()
  95. trf:setOrigin(Vec4.new(0.000000, 8.913514, 0.000000, 0))
  96. rot = Mat3x4.new()
  97. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, -0.000000, 1.000000, 0.000000, 0.000000, -1.000000, -0.000000, 0.000000)
  98. trf:setRotation(rot)
  99. trf:setScale(1.000000)
  100. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  101. node = scene:newGlobalIlluminationProbeNode("Cube.011")
  102. comp = node:getSceneNodeBase():getGlobalIlluminationProbeComponent()
  103. comp:setBoxVolumeSize(Vec3.new(11.824861, 11.571836, 11.040863))
  104. trf = Transform.new()
  105. trf:setOrigin(Vec4.new(-0.064907, 4.847455, -0.144611, 0))
  106. rot = Mat3x4.new()
  107. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  108. trf:setRotation(rot)
  109. trf:setScale(1.000000)
  110. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)