--package.path = package.path .. '.\\Scripts\\DemoScenes\\?.lua;'
local sceneEnvironment = require("demosceneEnvironment")

-- sceneAPI = sceneEnvironment.createInstance()
scene = {} -- сюда кладем все созданные объекты

function loadScene(scenePtr)
	sceneAPI = sceneEnvironment.getInterface(scenePtr)
	scene.m = sceneAPI:addModel("f-18c", -5, 2.4, -6);
	scene.m:setArgument(0, 1); --rear gear
	scene.m:setArgument(3, 1); --rear gear
	scene.m:setArgument(5, 1); --nose gear
	scene.m:setArgument(8, .9);  -- wings fold
	scene.m.transform:setOrient(0,-45,0);
	
	scene.m = sceneAPI:addModel("f-18c", 7, 2.4, -6);
	scene.m:setArgument(0, 1); --rear gear
	scene.m:setArgument(3, 1); --rear gear
	scene.m:setArgument(5, 1); --nose gear
	scene.m:setArgument(8, .9);  --wings fold
	scene.m.transform:setOrient(0,-45,0);
	
	scene.m = sceneAPI:addModel("f-18c", 19, 2.4, -6);
	scene.m:setArgument(0, 1); --rear gear
	scene.m:setArgument(3, 1); --rear gear
	scene.m:setArgument(5, 1); --nose gear
	scene.m:setArgument(8, .9);  -- wings fold	
	scene.m.transform:setOrient(0,-45,0);
	
	scene.m = sceneAPI:addModel("f-18c", -5, 2.4, 12);
	scene.m:setArgument(0, 1); --rear gear
	scene.m:setArgument(3, 1); --rear gear
	scene.m:setArgument(5, 1); --nose gear
	scene.m:setArgument(8, .9);  -- wings fold	
	scene.m.transform:setOrient(0,45,0);
	
	scene.m = sceneAPI:addModel("f-18c", 7, 2.4, 12);
	scene.m:setArgument(0, 1); --rear gear
	scene.m:setArgument(3, 1); --rear gear
	scene.m:setArgument(5, 1); --nose gear
	scene.m:setArgument(8, .9);  -- wings fold	
	scene.m.transform:setOrient(0,45,0);	
	
	scene.g = sceneAPI:addModel("generatorf", 1, 0, 2);
	scene.g.transform:setOrient(0,0,0);
	
	scene.cam = sceneAPI:addCamera(0,0,0);
	scene.cam:setFov(90);
	scene.cam.transform:setPosition(15,10,10);

	scene.flr = sceneAPI:addModel("flatsurface", 0,0,0); 
	scene.flr:drawToEnvironment(true);
	scene.flr.transform:scale(.2,.2,.2);

	scene.sh = sceneAPI:addModel("ukrytie", 0,0,0); 
	scene.sh:drawToEnvironment(true);
	scene.sh.transform:scale(2,2,2);
	
	scene.L1 = sceneAPI:addLightOmni(8,15,0,	0,0.6,0.8); --------------------
	scene.L2 = sceneAPI:addLightOmni(-8,15,0,	0,0.6,0.8);  --------------------
	
	scene.cam.transform:lookAtObject(scene.m);
	scene.cam.transform:lookAtPoint(0,0,0);

end


