Header to include: ipoint.h
int imodPointAppend(Icont *cont, Ipoint *pnt)
int imodPointAppendXYZ(Icont *cont, float x, float y, float z)
int imodPointAdd(Icont *cont, Ipoint *pnt, int index)
int imodPointDelete(Icont *cont, int index)
void imodPointSetSize(Icont *cont, int pt, float size)
float imodPointGetSize(Iobj *obj, Icont *cont, int pt)
double imodel_point_dist(Ipoint *pnt1, Ipoint *pnt2)
float imodPointDistance(Ipoint *pnt1, Ipoint *pnt2)
float imodPoint3DScaleDistance(Ipoint *p1, Ipoint *p2, Ipoint *scale)
double imodPoint2DAngle(Ipoint *pt)
float imodPointLineSegDistance(Ipoint *lp1, Ipoint *lp2, Ipoint *p,
float *tval)
float imodPointContDistance(Icont *cont, Ipoint *pt, int open, int threeD, int *closest)
float imodPointDot(Ipoint *pnt1, Ipoint *pnt2)
void imodPointCross( Ipoint *v1, Ipoint *v2, Ipoint *rp)
void imodPointNormalize(Ipoint *n)
int imodPointIsEqual(Ipoint *a, Ipoint *b)
int imodPointIntersect(Ipoint *a, Ipoint *b, Ipoint *c, Ipoint *d)
float imodPointArea(Ipoint *p1, Ipoint *p2, Ipoint *p3)
float imodPointAreaScale(Ipoint *p1, Ipoint *p2, Ipoint *p3, Ipoint *s)
int imodPointInsideCont(Icont *cont, Ipoint *pt)
int imodPointInsideArea(Iobj *obj, int *list, int nlist, float x, float y)
int makeAreaContList(Iobj *obj, int iz, int *list, int *nlist, int listSize)
Adds point pnt to the end of contour cont. Manages point sizes and labels correctly. Returns number of points in contour, or 0 if an error occurs.
Adds the point x, y, z to the end of contour cont. Manages point sizes and labels correctly. Returns number of points in contour, or 0 if an error occurs.
Adds point pnt to contour cont at the given index. Manages point sizes, labels, and general storage items correctly. Returns number of points in contour, or 0 if an error occurs.
Deletes the point at index from contour cont. Frees the point and size arrays if the only point is deleted, and manages point sizes, labels, and general storage items correctly. Returns the size of the contour or -1 for error.
Sets the size of point at pt in contour cont to size. Creates a size array if necessary.
Returns the size of the point at pt in contour cont and object obj; if no size was set for his point it returns the default size for object.
Returns distance in the X/Y plane between pnt1 and pnt2.
Returns distance in the X/Y plane between pnt1 and pnt2.
Returns distance in 3D between points p1 and p2, with coordinates scaled by the values in scale.
Returns angle of line from origin to X, Y coordinates of pt, between -pi/2 and pi/2
Returns the square of the distance between point p and the line segment between lp1 and lp2. In tval, it returns the parameter specifying the position along the segment of the point of closest approach (between 0 at lp1 and 1 at lp2).
Returns the closest distance between the line segments in cont and point pt, or returns 0 for an empty contour or the distance to the single point in a one-point contour. Set open non-zero for an open contour (i.e., to exclude the segment connecting end to start). Set threeD non-zero to have the distances measured in 3D instead of in the X/Y plane. Also returns in closest the index of the point at the beginning of the closest line segment.
Returns dot product of pnt1 and pnt2.
Returns cross product of pnt1 and pnt2.
Normalizes vector in n to length 1.
Returns 1 if point a equals point b, 0 otherwise.
Returns 1 if the line segment between a and b intersects the line segment between c and d, 0 otherwise.
Returns the area of the 3D triangle formed by p1, p2, and p3
Returns the area of the 3D triangle formed by p1, p2, and p3, with point coordinates scaled by s.
Returns 1 if the point pt is inside or on the contour cont, otherwise returns 0. Uses the same code as in InsideContour.
Tests whether the point x, y is inside any of the contours in object obj listed in list, where nlist is the number of entries in list. If the point is inside a contour, it returns the contour number; otherwise it returns -1.
Makes a list of the contours in object obj on the Z section closest to the Z value iz. The contour numbers are returned in list and the number of contours in nlist. listSize specifies the size of the list array. Assumes the contours are planar and tests the Z value only of the first point. Returns 1 if there are no contours in the object or -1 if there are more than listSize contours on the plane.