コード例 #1
0
ファイル: Tut10_Mesh.cs プロジェクト: xMelanie99/privat
        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 SceneNode
                    {
                        Components =
                        {
                            // TRANSFORM COMPONENT
                            _baseTransform,

                            // SHADER EFFECT COMPONENT
                            SimpleMeshes.MakeMaterial((float4)ColorUint.LightGrey),

                            // MESH COMPONENT
                            //SimpleMeshes.CreateCylinder(5, 10, 8)
                            SimpleMeshes.CreateTorus(8, 3, 25, 25)
                        }
                    },
                }
            });
        }