Originally Posted by
arthurprs
Originally Posted by
Evil_Toaster
Originally Posted by
arthurprs
Thx for the reply, i think i have understand but what is draw with 4 vectices ?
To put it simply, a vertice is a point. In 2D, it's (x,y), in 3D it's (x,y,z). A number of vertices make up a shape:
2 vertices: Line
3 vertices: Triangle
4 vertices: Quad
etc
So what I mean by drawing with 4 vertices is instead of a draw function which accepts an X, Y, Width, Height, you need one that will accept 4 vertices (points) to draw.
2d with 4 points :?
looks vry strange to me :?
Well how about looking at it this way. A draw function defined as:
Draw(X, Y, Width, Height : Real);
If you call it using:
Draw(0,0, 64, 32);
It will draw a rectangle with the following 4 points:
Point1: (0,0)
Point2: (64,0)
Point3: (0,32)
Point4: (64,32)
You could write a different function which accepts 4 points instead:
Draw(Point1, Point2, Point3, Point4 : TPointReal);
And call it using:
Draw(PointReal(0,0),PointReal(64,0),PointReal(0,32 ),PointReal(64,32));
Both functions do exactly the same thing in this case, but the second function (if implemented correctly) would allow you to draw something using -any- 4 points, whereas the first will limit you to squares and rectangles aligned with the X and Y axis.
Bookmarks