Example #1
0
 public Ellipse(ParticleManager m, Vector3 p, int accuracy)
     :base(m, p)
 {
     Vertices = new CascadeVertex[accuracy * 3];
     PrimitiveCount = accuracy;
     int o = 0;
     for (float i = 0; i < 360; i += 360f / (float)accuracy)
     {
         Vertices[o] = new CascadeVertex(Vector3.Zero,Color.White);
         Vertices[o + 1] = new CascadeVertex(new Vector3(MyMath.LengthDirX(50, i), MyMath.LengthDirY(50, i), 0), Color.White);
         Vertices[o + 2] = new CascadeVertex(new Vector3(MyMath.LengthDirX(50, i + (360f / accuracy)), MyMath.LengthDirY(50, i + (360f / accuracy)), 0), Color.White);
         o += 3;
     }
 }
Example #2
0
 public PolygonRect(float Width, float Height)
 {
     width = Width; height = Height;
     color = new ColorManager();
     color.Color = Color.Black;
     vertices = new CascadeVertex[6];
     vertices[0] = new CascadeVertex(new Vector3(0, 0, 0), Color.Red);
     vertices[1] = new CascadeVertex(new Vector3(Width, 0, 0), Color.Red);
     vertices[2] = new CascadeVertex(new Vector3(Width, Height, 0), Color.Red);
     vertices[3] = new CascadeVertex(new Vector3(Width, Height, 0), Color.Red);
     vertices[4] = new CascadeVertex(new Vector3(0, Height, 0), Color.Red);
     vertices[5] = new CascadeVertex(new Vector3(0, 0, 0), Color.Red);
     Origin = Vector3.Zero;
 }