void QccTrianglePrint(const QccTriangle
*triangle);
int QccTriangleBoundingBox(const QccTriangle *triangle,
QccPoint *box_max, QccPoint *box_min);
int QccTrianglePointInside(const
QccTriangle *triangle, const QccPoint *point);
int QccTriangleCreateAffineTransform(const QccTriangle *triangle1, const QccTriangle *triangle2, QccMatrix transform);
typedef struct
{
QccPoint vertices[3];
} QccTriangle;
The fields of QccTriangle are as follows:
QccTriangleBoundingBox() determines the bounding box of triangle. The bounding box is defined as the smallest rectangle that encloses all three vertices of triangle. QccTriangleBoundingBox() returns the bounding box by specifying the points of the upper-left (box_max) and lower-right (box_min) corners of the bounding box.
QccTrianglePointInside() returns 1 if point lies within the interior of triangle (i.e., triangle encloses point), and 0 if point is outside of triangle.
QccTriangleCreateAffineTransform() determines an affine transform, affine_transform, that maps points in triangle1 into triangle2. affine_transform should be a 3 x 3 matrix allocated prior to calling QccTriangleCreateAffineTransform()
Y. Altunbasak, A. M. Tekalp, and G. Bozdagi, "Two-Dimensional Object-based Coding Using a Content-based Mesh and Affine Motion Parameterization," in Proceedings of the International Conference on Image Processing, Washington, DC, October 1995, pp. 394 397.