コード例 #1
0
ファイル: ExampleScene.cs プロジェクト: eivan/ManagedGL
        public override void OnLoad()
        {
            base.OnLoad();

            NextCamera();

            camera.Position = new Vector3(4, 4, 4);
            camera.Target   = Vector3.Zero;

            var vertices = new[] {
                new VertexPositionNormalColor(new Vector3(-1, -1, 0), new Vector3(1, 0, 0), new Vector3(1, 0, 0)),
                new VertexPositionNormalColor(new Vector3(1, -1, 0), new Vector3(1, 0, 0), new Vector3(0, 1, 0)),
                new VertexPositionNormalColor(new Vector3(-1, 1, 0), new Vector3(1, 0, 0), new Vector3(0, 0, 1)),
                new VertexPositionNormalColor(new Vector3(1, 1, 0), new Vector3(1, 0, 0), new Vector3(1, 0, 0))
            };

            //pointCloud.SetVertices(vertices);

            VertexPositionNormal[] temp_verts;
            Geometries.Ellipsoid(10, 10, 2, 1, 1, out temp_verts);
            pointCloud.SetVertices(temp_verts.Select(v => new VertexPositionNormalColor(v, Vector3.UnitX)).ToArray());
        }