Hyluss

Asdf

Nov 14th, 2018
234
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 20.79 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3. using Microsoft.Xna.Framework.Input;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7.  
  8. namespace UkladSloneczny
  9. {
  10.     public class Game1 : Game
  11.     {
  12.         GraphicsDeviceManager graphics;
  13.         SpriteBatch spriteBatch;
  14.         KeyboardState prevState;
  15.  
  16.         private Texture2D background;
  17.         public BasicEffect basicEffect;
  18.         public Camera camera;
  19.         Floor floor;
  20.         Cube earth, cubeMoon, mars, saturn, sun;
  21.  
  22.        private bool _grid = true;
  23.         private bool _background = true;
  24.  
  25.  
  26.         public Game1()
  27.         {
  28.             graphics = new GraphicsDeviceManager(this);
  29.             Content.RootDirectory = "Content";
  30.  
  31.             Window.AllowUserResizing = false;
  32.             graphics.PreferredBackBufferHeight = 720;
  33.             graphics.PreferredBackBufferWidth = 1280;
  34.             graphics.IsFullScreen = false;
  35.             IsMouseVisible = false;
  36.         }
  37.  
  38.         protected override void Initialize()
  39.         {
  40.             basicEffect = new BasicEffect(GraphicsDevice)
  41.             {
  42.                 Alpha = 1,
  43.                 VertexColorEnabled = true,
  44.                 LightingEnabled = false,
  45.             };
  46.  
  47.             camera = new Camera(this, new Vector3(0, 10, 0), Vector3.Zero, 5);
  48.             Components.Add(camera);
  49.  
  50.             floor = new Floor(GraphicsDevice, 200, 200);
  51.            
  52.  
  53.             sun = new Cube(this, new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(5), new Vector3(0,0,3), GraphicsDevice, Color.Yellow, Color.OrangeRed);
  54.             Components.Add(sun);
  55.  
  56.             earth = new Cube(this, new Vector3(0, 20, 0), new Vector3(0, 0, 0), new Vector3(3), new Vector3(0, 0, 2), GraphicsDevice,Color.Green,Color.Yellow);
  57.             Components.Add(earth);
  58.  
  59.             cubeMoon = new Cube(this, new Vector3(0, 10, 0), new Vector3(0, 0, 0), new Vector3(1), new Vector3(0, 0, 15), GraphicsDevice);
  60.             Components.Add(cubeMoon);
  61.  
  62.             mars = new Cube(this, new Vector3(0, 50, 0), new Vector3(0, 0, 0), new Vector3(2), new Vector3(0, 0, 3), GraphicsDevice, Color.Red, Color.DarkRed);
  63.             Components.Add(mars);
  64.  
  65.             saturn = new Cube(this, new Vector3(0, 70, 0), new Vector3(0, 0, 0), new Vector3(3), new Vector3(0, 0, 2), GraphicsDevice, Color.Blue, Color.DarkRed);
  66.             Components.Add(saturn);
  67.  
  68.             base.Initialize();
  69.         }
  70.  
  71.         protected override void LoadContent()
  72.         {
  73.             spriteBatch = new SpriteBatch(GraphicsDevice);
  74.             background = Content.Load<Texture2D>("stars");
  75.         }
  76.  
  77.         protected override void UnloadContent() { }
  78.  
  79.         protected override void Update(GameTime gameTime)
  80.         {
  81.             var keyboardState = Keyboard.GetState();
  82.             var mouseState = Mouse.GetState();
  83.             var mousePostion = new Point(mouseState.X, mouseState.Y);
  84.  
  85.  
  86.  
  87.             if (keyboardState.IsKeyDown(Keys.Escape))
  88.             {
  89.                 Exit();
  90.             }
  91.  
  92.             if (keyboardState.IsKeyDown(Keys.LeftShift) )
  93.             {
  94.                 camera.cameraSpeed = 25;
  95.             }
  96.             if (keyboardState.IsKeyDown(Keys.X) && prevState.IsKeyUp(Keys.X))
  97.             {
  98.                 _grid = !_grid;
  99.             }
  100.             if (keyboardState.IsKeyDown(Keys.B) && prevState.IsKeyUp(Keys.B))
  101.             {
  102.                 _background = !_background;
  103.             }
  104.             else if (prevState.IsKeyDown(Keys.LeftShift) && keyboardState.IsKeyUp(Keys.LeftShift))
  105.             {
  106.                 camera.cameraSpeed = 5;
  107.             }
  108.  
  109.             cubeMoon.rotationCenter = earth.GetActualPosition();
  110.  
  111.             base.Update(gameTime);
  112.             prevState = keyboardState;
  113.         }
  114.  
  115.         protected override void Draw(GameTime gameTime)
  116.         {
  117.             graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
  118.             if (_background)
  119.             {
  120.                 spriteBatch.Begin();
  121.  
  122.                 spriteBatch.Draw(background,
  123.                     new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height),
  124.                     Color.White);
  125.  
  126.                 spriteBatch.End();
  127.             }
  128.  
  129.             RasterizerState rasterizerState = new RasterizerState()
  130.             {
  131.                 CullMode = CullMode.None
  132.             };
  133.             GraphicsDevice.RasterizerState = rasterizerState;
  134.  
  135.             var depthStencilState = new DepthStencilState
  136.             {
  137.                 DepthBufferEnable = true
  138.             };
  139.             GraphicsDevice.DepthStencilState = depthStencilState;
  140.  
  141.             if(_grid)
  142.             floor.Draw(camera, basicEffect);
  143.  
  144.             sun.Draw();
  145.             earth.Draw();
  146.             cubeMoon.Draw();
  147.             mars.Draw();
  148.             saturn.Draw();
  149.  
  150.             base.Draw(gameTime);
  151.         }
  152.     }
  153.     public class Camera : GameComponent
  154.     {
  155.         private KeyboardState prevState;
  156.  
  157.         private Vector3 cameraPosition;
  158.         public Vector3 cameraRotation;
  159.  
  160.         public float cameraSpeed { get; set; }
  161.         public Vector3 cameraLookAt;
  162.  
  163.         private Vector3 mouseRotationBuffer;
  164.         private MouseState currentMouseState;
  165.         private MouseState prevMouseState;
  166.  
  167.         public BoundingBox ColliderBox { get { return new BoundingBox(cameraPosition - new Vector3(0.3f), cameraPosition + new Vector3(0.3f)); } }
  168.  
  169.         public bool ShowCenterLine { get; set; }
  170.  
  171.         public Vector3 Position
  172.         {
  173.             get { return cameraPosition; }
  174.             set
  175.             {
  176.                 cameraPosition = value;
  177.                 UpdateLookAt();
  178.             }
  179.         }
  180.  
  181.         public Vector3 Rotation
  182.         {
  183.             get { return cameraRotation; }
  184.             set
  185.             {
  186.                 cameraRotation = value;
  187.                 UpdateLookAt();
  188.             }
  189.         }
  190.  
  191.         public Matrix Projection { get; protected set; }
  192.  
  193.         public Matrix View { get { return Matrix.CreateLookAt(cameraPosition, cameraLookAt, Vector3.Up); } }
  194.  
  195.         public Camera(Game game, Vector3 position, Vector3 rotation, float speed) : base(game)
  196.         {
  197.             cameraSpeed = speed;
  198.             Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, Game.GraphicsDevice.Viewport.AspectRatio, 0.05f, 1000);
  199.             MoveTo(position, rotation);
  200.  
  201.             prevMouseState = Mouse.GetState();
  202.         }
  203.  
  204.         private void MoveTo(Vector3 pos, Vector3 rot)
  205.         {
  206.             Position = pos;
  207.             Rotation = rot;
  208.         }
  209.  
  210.         private void UpdateLookAt()
  211.         {
  212.             var rotationMartix = Matrix.CreateRotationX(cameraRotation.X) * Matrix.CreateRotationY(cameraRotation.Y);
  213.  
  214.             var lookAtOffset = Vector3.Transform(Vector3.UnitZ, rotationMartix);
  215.             cameraLookAt = cameraPosition + lookAtOffset;
  216.         }
  217.  
  218.         private Vector3 PreviewMove(Vector3 amount)
  219.         {
  220.             var rotate = Matrix.CreateRotationY(cameraRotation.Y);
  221.  
  222.             var movment = new Vector3(amount.X, amount.Y, amount.Z);
  223.             movment = Vector3.Transform(movment, rotate);
  224.  
  225.             return cameraPosition + movment;
  226.         }
  227.  
  228.         public Vector3 cameraAxiesPosition
  229.         {
  230.             get
  231.             {
  232.                 var rotate = Matrix.CreateRotationX(cameraRotation.X) * Matrix.CreateRotationY(cameraRotation.Y) * Matrix.CreateRotationZ(cameraRotation.Z);
  233.                 var movment = new Vector3(-0.3f, -0.15f, 0.5f);
  234.                 movment = Vector3.Transform(movment, rotate);
  235.  
  236.                 return cameraPosition + movment;
  237.             }
  238.         }
  239.  
  240.         private void Move(Vector3 scale)
  241.         {
  242.             MoveTo(PreviewMove(scale), Rotation);
  243.         }
  244.  
  245.         public override void Update(GameTime gameTime)
  246.         {
  247.             if (Game.IsActive)
  248.             {
  249.                 currentMouseState = Mouse.GetState();
  250.                 var keyboardState = Keyboard.GetState();
  251.                 var dt = (float)gameTime.ElapsedGameTime.TotalSeconds;
  252.  
  253.                 var moveVector = Vector3.Zero;
  254.  
  255.                 if (keyboardState.IsKeyDown(Keys.Q))
  256.                     moveVector.Z = 1;
  257.                 if (keyboardState.IsKeyDown(Keys.A))
  258.                     moveVector.Z = -1;
  259.  
  260.                 if (keyboardState.IsKeyDown(Keys.Left))
  261.                     moveVector.X = 1;
  262.                 if (keyboardState.IsKeyDown(Keys.Right))
  263.                     moveVector.X = -1;
  264.  
  265.                 if (keyboardState.IsKeyDown(Keys.Up)) //up
  266.                     moveVector.Y = 1;
  267.                 if (keyboardState.IsKeyDown(Keys.Down)) //down
  268.                     moveVector.Y = -1;
  269.  
  270.                 if (moveVector != Vector3.Zero)
  271.                 {
  272.                     moveVector.Normalize();
  273.                     moveVector *= dt * cameraSpeed;
  274.  
  275.                     Move(moveVector);
  276.                 }
  277.  
  278.                 //#region Camera Mouse
  279.                 //if (currentMouseState != prevMouseState)
  280.                 //{
  281.                 //    var deltaX = currentMouseState.X - (Game.GraphicsDevice.Viewport.Width / 2);
  282.                 //    var deltaY = currentMouseState.Y - (Game.GraphicsDevice.Viewport.Height / 2);
  283.  
  284.                 //    mouseRotationBuffer.X -= 0.05F * deltaX * dt; //0,05 czułość <3
  285.                 //    mouseRotationBuffer.Y -= 0.05F * deltaY * dt;
  286.  
  287.                 //    if (mouseRotationBuffer.Y < MathHelper.ToRadians(-75))
  288.                 //        mouseRotationBuffer.Y -= mouseRotationBuffer.Y - MathHelper.ToRadians(-75);
  289.  
  290.                 //    if (mouseRotationBuffer.Y > MathHelper.ToRadians(75))
  291.                 //        mouseRotationBuffer.Y -= mouseRotationBuffer.Y - MathHelper.ToRadians(75);
  292.  
  293.                 //    Rotation = new Vector3(
  294.                 //        -MathHelper.Clamp(mouseRotationBuffer.Y, MathHelper.ToRadians(-75f), MathHelper.ToRadians(75f)),
  295.                 //        MathHelper.WrapAngle(mouseRotationBuffer.X),
  296.                 //        0);
  297.                 //}
  298.  
  299.                 //Mouse.SetPosition(Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.Height / 2);
  300.  
  301.                 prevMouseState = currentMouseState;
  302.                 //#endregion
  303.  
  304.                 prevState = keyboardState;
  305.  
  306.                 base.Update(gameTime);
  307.  
  308.             }
  309.         }
  310.     }
  311.     public class Floor
  312.     {
  313.         private int floorWidth;
  314.         private int floorHeight;
  315.         private VertexBuffer floorBuffer;
  316.         private GraphicsDevice device;
  317.         Color[] floorColors = new Color[2] { Color.Transparent, Color.Gray };
  318.  
  319.         public Floor(GraphicsDevice device, int width, int height)
  320.         {
  321.             this.device = device;
  322.             floorWidth = width;
  323.             floorHeight = height;
  324.             BuildFloorBuffer();
  325.         }
  326.  
  327.         private void BuildFloorBuffer()
  328.         {
  329.             List<VertexPositionColor> vertexList = new List<VertexPositionColor>();
  330.             int counter = 0;
  331.  
  332.             for (int x = 0; x < floorWidth; x++)
  333.             {
  334.                 counter++;
  335.                 for (int z = 0; z < floorHeight; z++)
  336.                 {
  337.                     counter++;
  338.  
  339.                     foreach (var vertex in FloorTile(x, z, floorColors[counter % 2]))
  340.                     {
  341.                         vertexList.Add(vertex);
  342.                     }
  343.                 }
  344.             }
  345.  
  346.             floorBuffer = new VertexBuffer(device, VertexPositionColor.VertexDeclaration, vertexList.Count, BufferUsage.None);
  347.             floorBuffer.SetData(vertexList.ToArray());
  348.         }
  349.  
  350.         private List<VertexPositionColor> FloorTile(int xOffset, int zOffset, Color tileColor)
  351.         {
  352.             var vList = new List<VertexPositionColor>()
  353.             {
  354.                 new VertexPositionColor(new Vector3(0 + xOffset - 100, 0 + zOffset - floorHeight/2, 0), tileColor),
  355.                 new VertexPositionColor(new Vector3(1 + xOffset - 100, 0 + zOffset - floorHeight/2, 0), tileColor),
  356.                 new VertexPositionColor(new Vector3(0 + xOffset - 100, 1 + zOffset - floorHeight/2, 0), tileColor),
  357.                 new VertexPositionColor(new Vector3(1 + xOffset - 100, 0 + zOffset - floorHeight/2, 0), tileColor),
  358.                 new VertexPositionColor(new Vector3(1 + xOffset - 100, 1 + zOffset - floorHeight/2, 0), tileColor),
  359.                 new VertexPositionColor(new Vector3(0 + xOffset - 100, 1 + zOffset - floorHeight/2, 0), tileColor),
  360.             };
  361.  
  362.             return vList;
  363.         }
  364.  
  365.         public void Draw(Camera camera, BasicEffect effect)
  366.         {
  367.             effect.VertexColorEnabled = true;
  368.             effect.View = camera.View;
  369.             effect.Projection = camera.Projection;
  370.             effect.World = Matrix.Identity;
  371.  
  372.             foreach (var pass in effect.CurrentTechnique.Passes)
  373.             {
  374.                 pass.Apply();
  375.                 device.SetVertexBuffer(floorBuffer);
  376.                 device.DrawPrimitives(PrimitiveType.TriangleList, 0, floorBuffer.VertexCount / 3);
  377.             }
  378.         }
  379.     }
  380.     public class Cube : GameComponent
  381.     {
  382.         public Vector3 middleLocation;
  383.         VertexPositionColor[] planetVertices;
  384.         GraphicsDevice graphicsDevice;
  385.         Vector3 speed;
  386.  
  387.         Vector3 size;
  388.         Vector3 angle;
  389.         Game1 game;
  390.         public Vector3 rotationCenter;
  391.         Camera camera;
  392.  
  393.         private Matrix World;
  394.  
  395.         Vector3 vectorZero = Vector3.Zero;
  396.  
  397.         public List<Color> Colors;
  398.  
  399.         public Cube(Game game, Vector3 middleLocation, Vector3 rotationCenter, Vector3 size, Vector3 speed, GraphicsDevice graphicsDevice, params Color[] colors)
  400.             : base(game)
  401.         {
  402.  
  403.             Colors = colors.ToList();
  404.  
  405.             if (!Colors.Any())
  406.             {
  407.                 Colors = new List<Color>() { Color.White, Color.Black, Color.White, Color.Black };
  408.             }
  409.  
  410.             this.game = game as Game1;
  411.             this.camera = this.game.camera;
  412.  
  413.             this.middleLocation = middleLocation;
  414.  
  415.             angle = Vector3.Zero;
  416.             this.size = size;
  417.             this.speed = speed;
  418.             this.rotationCenter = rotationCenter;
  419.             this.graphicsDevice = graphicsDevice;
  420.  
  421.             this.basicEffect = new BasicEffect(graphicsDevice)
  422.             {
  423.                 Alpha = 1,
  424.                 VertexColorEnabled = true,
  425.                 LightingEnabled = false,
  426.             };
  427.  
  428.             planetVertices = CubeVerticles();
  429.  
  430.         }
  431.  
  432.         public VertexPositionColor[] GetPlanetVertices()
  433.         {
  434.             return this.planetVertices;
  435.         }
  436.  
  437.         public Vector3 GetActualPosition()
  438.         {
  439.             return Vector3.Transform(middleLocation, World);
  440.         }
  441.  
  442.         public override void Update(GameTime gameTime)
  443.         {
  444.             angle += speed;
  445.  
  446.             World = Matrix.Identity;
  447.             World *= Matrix.CreateRotationX(MathHelper.ToRadians(angle.X));
  448.             World *= Matrix.CreateRotationY(MathHelper.ToRadians(angle.Y));
  449.             World *= Matrix.CreateRotationZ(MathHelper.ToRadians(angle.Z));
  450.             World *= Matrix.CreateTranslation(rotationCenter);
  451.  
  452.             basicEffect.World = World;
  453.             basicEffect.View = camera.View;
  454.             basicEffect.Projection = camera.Projection;
  455.         }
  456.  
  457.         private VertexPositionColor[] CubeVerticles()
  458.         {
  459.             Vector3 topLeftFront = new Vector3(-size.X + middleLocation.X, size.Y + middleLocation.Y, size.Z + middleLocation.Z);
  460.             Vector3 bottomLeftFront = new Vector3(-size.X + middleLocation.X, -size.Y + middleLocation.Y, size.Z + middleLocation.Z);
  461.             Vector3 topRightFront = new Vector3(size.X + middleLocation.X, size.Y + middleLocation.Y, size.Z + middleLocation.Z);
  462.             Vector3 bottomRightFront = new Vector3(size.X + middleLocation.X, -size.Y + middleLocation.Y, size.Z + middleLocation.Z);
  463.             Vector3 topLeftBack = new Vector3(-size.X + middleLocation.X, size.Y + middleLocation.Y, -size.Z + middleLocation.Z);
  464.             Vector3 topRightBack = new Vector3(size.X + middleLocation.X, size.Y + middleLocation.Y, -size.Z + middleLocation.Z);
  465.             Vector3 bottomLeftBack = new Vector3(-size.X + middleLocation.X, -size.Y + middleLocation.Y, -size.Z + middleLocation.Z);
  466.             Vector3 bottomRightBack = new Vector3(size.X + middleLocation.X, -size.Y + middleLocation.Y, -size.Z + middleLocation.Z);
  467.  
  468.             Random rnd = new Random();
  469.  
  470.             VertexPositionColor[] verticles = new VertexPositionColor[8]{
  471.                 new VertexPositionColor(topLeftFront, Colors[rnd.Next(0,Colors.Count())]),//1
  472.                 new VertexPositionColor(bottomLeftFront, Colors[rnd.Next(0,Colors.Count())]),//1
  473.                 new VertexPositionColor(topRightFront, Colors[rnd.Next(0,Colors.Count())]),//2
  474.                 new VertexPositionColor(bottomRightFront, Colors[rnd.Next(0,Colors.Count())]),//3
  475.                 new VertexPositionColor(topLeftBack, Colors[rnd.Next(0,Colors.Count())]),//4
  476.                 new VertexPositionColor(topRightBack, Colors[rnd.Next(0,Colors.Count())]),//5
  477.                 new VertexPositionColor(bottomLeftBack, Colors[rnd.Next(0,Colors.Count())]),//6
  478.                 new VertexPositionColor(bottomRightBack, Colors[rnd.Next(0,Colors.Count())])//7
  479.             };
  480.             List<VertexPositionColor> cubeVertices = new List<VertexPositionColor>();
  481.             //Front
  482.             cubeVertices.Add(verticles[2]); cubeVertices.Add(verticles[3]); cubeVertices.Add(verticles[0]);
  483.             cubeVertices.Add(verticles[3]); cubeVertices.Add(verticles[1]); cubeVertices.Add(verticles[0]);
  484.             //Left
  485.             cubeVertices.Add(verticles[0]); cubeVertices.Add(verticles[1]); cubeVertices.Add(verticles[4]);
  486.             cubeVertices.Add(verticles[1]); cubeVertices.Add(verticles[6]); cubeVertices.Add(verticles[4]);
  487.             //Back
  488.             cubeVertices.Add(verticles[4]); cubeVertices.Add(verticles[6]); cubeVertices.Add(verticles[7]);
  489.             cubeVertices.Add(verticles[5]); cubeVertices.Add(verticles[4]); cubeVertices.Add(verticles[7]);
  490.             //Right
  491.             cubeVertices.Add(verticles[5]); cubeVertices.Add(verticles[7]); cubeVertices.Add(verticles[2]);
  492.             cubeVertices.Add(verticles[7]); cubeVertices.Add(verticles[3]); cubeVertices.Add(verticles[2]);
  493.             //Top
  494.             cubeVertices.Add(verticles[2]); cubeVertices.Add(verticles[0]); cubeVertices.Add(verticles[5]);
  495.             cubeVertices.Add(verticles[5]); cubeVertices.Add(verticles[0]); cubeVertices.Add(verticles[4]);
  496.             //Bottom
  497.             cubeVertices.Add(verticles[1]); cubeVertices.Add(verticles[3]); cubeVertices.Add(verticles[6]);
  498.             cubeVertices.Add(verticles[6]); cubeVertices.Add(verticles[3]); cubeVertices.Add(verticles[7]);
  499.             return cubeVertices.ToArray();
  500.         }
  501.  
  502.         public void Draw()
  503.         {
  504.             basicEffect.CurrentTechnique.Passes[0].Apply();
  505.             this.graphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.TriangleList, planetVertices, 0, planetVertices.Length / 3);
  506.         }
  507.  
  508.         public BasicEffect basicEffect { get; set; }
  509.     }
  510.     public class Line : IDisposable
  511.     {
  512.         public Vector3 startPoint;
  513.         public Vector3 endPoint;
  514.         private VertexPositionColor[] vertices;
  515.  
  516.         public Line(Vector3 startPoint, Vector3 endPoint)
  517.         {
  518.             this.startPoint = startPoint;
  519.             this.endPoint = endPoint;
  520.         }
  521.  
  522.         public Line() { }
  523.  
  524.         public void DrawLine(BasicEffect basicEffect, GraphicsDevice graphicsDevice)
  525.         {
  526.             basicEffect.CurrentTechnique.Passes[0].Apply();
  527.             vertices = new[] { new VertexPositionColor(startPoint, Color.White), new VertexPositionColor(endPoint, Color.White) };
  528.             graphicsDevice.DrawUserPrimitives(PrimitiveType.LineList, vertices, 0, 1);
  529.         }
  530.  
  531.         public void DrawLine(BasicEffect basicEffect, GraphicsDevice graphicsDevice, Vector3 start, Vector3 end)
  532.         {
  533.             basicEffect.CurrentTechnique.Passes[0].Apply();
  534.             vertices = new[] { new VertexPositionColor(start, Color.White), new VertexPositionColor(end, Color.White) };
  535.             graphicsDevice.DrawUserPrimitives(PrimitiveType.LineList, vertices, 0, 1);
  536.         }
  537.  
  538.         public void DrawLine(BasicEffect basicEffect, GraphicsDevice graphicsDevice, Vector3 start, Vector3 end, Color color)
  539.         {
  540.             basicEffect.CurrentTechnique.Passes[0].Apply();
  541.             vertices = new[] { new VertexPositionColor(start, color), new VertexPositionColor(end, color) };
  542.             graphicsDevice.DrawUserPrimitives(PrimitiveType.LineList, vertices, 0, 1);
  543.         }
  544.  
  545.         public void Dispose()
  546.         {
  547.             throw new NotImplementedException();
  548.         }
  549.     }
  550. }
Comments
  • User was banned
Add Comment
Please, Sign In to add comment