SceneContainer CreateScene() { // Initialize transform components that need to be changed inside "RenderAFrame" _baseTransform = new Transform { Rotation = new float3(0, 0, 0), Scale = new float3(1, 1, 1), Translation = new float3(0, 0, 0) }; // Setup the scene graph return(new SceneContainer { Children = new List <SceneNode> { new SceneNode { Components = new List <SceneComponent> { // TRANSFORM COMPONENT _baseTransform, // SHADER EFFECT COMPONENT SimpleMeshes.MakeMaterial((float4)ColorUint.LightSkyBlue), // MESH COMPONENT SimpleMeshes.CreateCylinder(5, 10, 18) } }, } }); }
SceneContainer CreateScene() { // Initialize transform components that need to be changed inside "RenderAFrame" _carTransform = new Transform { Rotation = new float3(0, 0, 0), Scale = new float3(1, 1, 1), Translation = new float3(0, 0, 0) }; // Setup the scene graph return(new SceneContainer { Children = new List <SceneNode> { new SceneNode { Components = new List <SceneComponent> { // TRANSFROM COMPONENT _carTransform, // SHADER EFFECT COMPONENT SimpleMeshes.MakeMaterial((float4)ColorUint.LightGrey), // MESH COMPONENT // SimpleAssetsPickinges.CreateCuboid(new float3(10, 10, 10)) SimpleMeshes.CreateCuboid(new float3(10, 10, 10)) } }, } }); }