0

Is there a way i can create 3D graphics in c#? is there an API out there, built into c# or would i have to make my own? here is how i can create a cube

void drawcube(Pen mypen, Rectangle rect1, int size){
            Rectangle rect2 = new Rectangle(rect1.X + size, rect1.Y + size,
                                            rect1.Width, rect1.Height);
            G.DrawRectangle(mypen, rect1);
            G.DrawRectangle(mypen, rect2);

            G.DrawLine (mypen, new Point(rect1.Right, rect1.Y),
                        new Point(rect2.Right, rect2.Y) );
            G.DrawLine( mypen, new Point(rect1.X, rect1.Bottom), new Point(rect2.X, rect2.Bottom) );                                                                   

            G.DrawLine(mypen, rect1.Location, rect2.Location);
            G.DrawLine(mypen, new Point(rect1.Right, rect1.Bottom), new Point(rect2.Right, rect2.Bottom));
            }
3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by ddanbe
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.