Exemplo n.º 1
0
 public void BeginRender()
 {
     if (isInitialized)
     {
         DirectXDll.BeginRender();
     }
 }
Exemplo n.º 2
0
 public void FinishRender()
 {
     if (isInitialized)
     {
         DirectXDll.FinishRender();
     }
 }
Exemplo n.º 3
0
 public void DirectXControl_SizeChanged(object sender, EventArgs e)
 {
     if (isInitialized)
     {
         DirectXDll.Resize((int)Handle);
     }
     Invalidate();
 }
Exemplo n.º 4
0
        public void ModifyBoundingBox(List <Point> points)
        {
            float xMin = (float)points[0].X;
            float yMin = (float)points[0].Y;
            float xMax = (float)points[1].X;
            float yMax = (float)points[1].Y;

            DirectXDll.ModifyBoundingBox(xMin, yMin, xMax, yMax);
        }
Exemplo n.º 5
0
        public void ModifyEllipse(int ellipseIndex, Point o, float aO, float bO, float angle, Color color, Color borderColor, float width)
        {
            float x = (float)o.X;
            float y = (float)o.Y;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            float rB = borderColor.R / 255.0f;
            float gB = borderColor.G / 255.0f;
            float bB = borderColor.B / 255.0f;

            DirectXDll.ModifyEllipse(ellipseIndex, x, y, aO, bO, angle, r, g, b, rB, gB, bB, width);
        }
Exemplo n.º 6
0
        public int AddEllipse(Point o, float aO, float bO, float angle, Color color, Color borderColor, float width)
        {
            float x = (float)o.X;
            float y = (float)o.Y;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            float rB = borderColor.R / 255.0f;
            float gB = borderColor.G / 255.0f;
            float bB = borderColor.B / 255.0f;

            return(DirectXDll.AddEllipse(x, y, aO, bO, angle, r, g, b, rB, gB, bB, width));
        }
Exemplo n.º 7
0
        public int AddTriangle(List <Point> points, Color color, Color borderColor, float width)
        {
            float x1 = (float)points[0].X;
            float y1 = (float)points[0].Y;
            float x2 = (float)points[1].X;
            float y2 = (float)points[1].Y;
            float x3 = (float)points[2].X;
            float y3 = (float)points[2].Y;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            float rB = borderColor.R / 255.0f;
            float gB = borderColor.G / 255.0f;
            float bB = borderColor.B / 255.0f;

            return(DirectXDll.AddTriangle(x1, y1, x2, y2, x3, y3, r, g, b, rB, gB, bB, width));
        }
Exemplo n.º 8
0
        public void ModifyTriangle(int triangleIndex, List <Point> points, Color color, Color borderColor, float width)
        {
            float x1 = (float)points[0].X;
            float y1 = (float)points[0].Y;
            float x2 = (float)points[1].X;
            float y2 = (float)points[1].Y;
            float x3 = (float)points[2].X;
            float y3 = (float)points[2].Y;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            float rB = borderColor.R / 255.0f;
            float gB = borderColor.G / 255.0f;
            float bB = borderColor.B / 255.0f;

            DirectXDll.ModifyTriangle(triangleIndex, x1, y1, x2, y2, x3, y3, r, g, b, rB, gB, bB, width);
        }
Exemplo n.º 9
0
        public void ModifyPolyLine(int polyLineIndex, List <Point> points, Color color, float width)
        {
            float x1 = (float)points[0].X;
            float y1 = (float)points[0].Y;
            float x2 = (float)points[1].X;
            float y2 = (float)points[1].Y;
            float x3 = points.Count > 2 ? (float)points[2].X : 0.0f;
            float y3 = points.Count > 2 ? (float)points[2].Y : 0.0f;
            float x4 = points.Count > 3 ? (float)points[3].X : 0.0f;
            float y4 = points.Count > 3 ? (float)points[3].Y : 0.0f;
            float x5 = points.Count > 4 ? (float)points[4].X : 0.0f;
            float y5 = points.Count > 4 ? (float)points[4].Y : 0.0f;
            float x6 = points.Count > 5 ? (float)points[5].X : 0.0f;
            float y6 = points.Count > 5 ? (float)points[5].Y : 0.0f;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            DirectXDll.ModifyPolyLine(polyLineIndex, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, points.Count, r, g, b, width);
        }
Exemplo n.º 10
0
        public int AddPolyLine(List <Point> points, Color color, float width)
        {
            float x1 = (float)points[0].X;
            float y1 = (float)points[0].Y;
            float x2 = (float)points[1].X;
            float y2 = (float)points[1].Y;
            float x3 = points.Count > 2 ? (float)points[2].X : 0.0f;
            float y3 = points.Count > 2 ? (float)points[2].Y : 0.0f;
            float x4 = points.Count > 3 ? (float)points[3].X : 0.0f;
            float y4 = points.Count > 3 ? (float)points[3].Y : 0.0f;
            float x5 = points.Count > 4 ? (float)points[4].X : 0.0f;
            float y5 = points.Count > 4 ? (float)points[4].Y : 0.0f;
            float x6 = points.Count > 5 ? (float)points[5].X : 0.0f;
            float y6 = points.Count > 5 ? (float)points[5].Y : 0.0f;

            float r = color.R / 255.0f;
            float g = color.G / 255.0f;
            float b = color.B / 255.0f;

            return(DirectXDll.AddPolyLine(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, points.Count, r, g, b, width));
        }
Exemplo n.º 11
0
 public void SetBoundingBoxZoom(float scale)
 {
     DirectXDll.SetBoundingBoxZoom(scale);
 }
Exemplo n.º 12
0
 public void SetCameraZoom(float scale)
 {
     DirectXDll.SetCameraZoom(scale);
 }
Exemplo n.º 13
0
 public void SetCameraPosition(Point position)
 {
     DirectXDll.SetCameraPosition((float)position.X, (float)position.Y);
 }
Exemplo n.º 14
0
 public void RenderQuad(int quadIndex)
 {
     DirectXDll.RenderQuad(quadIndex);
 }
Exemplo n.º 15
0
 public void RenderBoundingBox()
 {
     DirectXDll.RenderBoundingBox();
 }
Exemplo n.º 16
0
 public void Release()
 {
     DirectXDll.Release();
 }
Exemplo n.º 17
0
 public void Init()
 {
     DirectXDll.Init((int)Handle);
     isInitialized = true;
 }
Exemplo n.º 18
0
 public void RemovePolyLine(int polyLineIndex)
 {
     DirectXDll.RemovePolyLine(polyLineIndex);
 }
Exemplo n.º 19
0
 public void RemoveEllipse(int ellipseIndex)
 {
     DirectXDll.RemoveEllipse(ellipseIndex);
 }
Exemplo n.º 20
0
 public void RemoveQuad(int quadIndex)
 {
     DirectXDll.RemoveQuad(quadIndex);
 }
Exemplo n.º 21
0
 public void RemoveTriangle(int triangleIndex)
 {
     DirectXDll.RemoveTriangle(triangleIndex);
 }