| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- -- Generated by: ../../../buildr/Bin/GltfImporter CornellBox.gltf /home/godlike/src/anki/Samples/SimpleScene/Assets -rpath Assets -texrpath Assets -lod-count 1
- local scene = getSceneGraph()
- local events = getEventManager()
- node = scene:newModelNode("Mesh_0")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_0_backWall.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_1")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_1_ceiling.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_2")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_2_floor.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_3")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_3_leftWall.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_4")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_4_light.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_5")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_5_rightWall.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_6")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_6_shortBox.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newModelNode("Mesh_7")
- node:getSceneNodeBase():getModelComponent():loadModelResource("Assets/Mesh_7_tallBox.ankimdl")
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(5.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newPerspectiveCameraNode("Camera_Orientation")
- scene:setActiveCameraNode(node:getSceneNodeBase())
- frustumc = node:getSceneNodeBase():getFrustumComponent()
- frustumc:setPerspective(0.100000, 500.000000, getMainRenderer():getAspectRatio() * 1.024779, 1.024779)
- frustumc:setShadowCascadesDistancePower(1.5)
- frustumc:setEffectiveShadowDistance(100.000000)
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.217066, 6.668793, 17.325689, 0))
- rot = Mat3x4.new()
- rot:setAll(0.999854, -0.000334, 0.017085, 0.000000, -0.001690, 0.992972, 0.118340, 0.000000, -0.017005, -0.118352, 0.992826, 0.000000)
- trf:setRotation(rot)
- trf:setScale(1.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newPointLightNode("Point_Orientation")
- lcomp = node:getSceneNodeBase():getLightComponent()
- lcomp:setDiffuseColor(Vec4.new(10.000000, 10.000000, 10.000000, 1))
- lcomp:setShadowEnabled(1)
- lcomp:setRadius(20.000000)
- trf = Transform.new()
- trf:setOrigin(Vec4.new(0.000000, 8.913514, 0.000000, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(1.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
- node = scene:newGlobalIlluminationProbeNode("Cube.011")
- comp = node:getSceneNodeBase():getGlobalIlluminationProbeComponent()
- comp:setBoxVolumeSize(Vec3.new(11.824861, 11.571836, 11.040863))
- trf = Transform.new()
- trf:setOrigin(Vec4.new(-0.064907, 4.847455, -0.144611, 0))
- rot = Mat3x4.new()
- 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)
- trf:setRotation(rot)
- trf:setScale(1.000000)
- node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
|