1 #ifndef __INFORMATION_H__
2 #define __INFORMATION_H__
4 #include "entitycontainer.h"
9 * Class for getting information about entities. This includes
10 * also things like the end point of an element which is
11 * nearest to a given coordinate.
12 * There's no interaction handled in this class.
13 * This class is bound to an entity container.
15 * @author Andrew Mustun
20 RS_Information(RS_EntityContainer & entityContainer);
22 static bool isDimension(RS2::EntityType type);
23 static bool isTrimmable(RS_Entity * e);
24 static bool isTrimmable(RS_Entity * e1, RS_Entity * e2);
25 Vector getNearestEndpoint(const Vector & point, double * dist = NULL) const;
26 Vector getNearestPointOnEntity(const Vector & point, bool onEntity = true,
27 double * dist = NULL, RS_Entity ** entity = NULL) const;
28 RS_Entity * getNearestEntity(const Vector & point, double * dist = NULL,
29 RS2::ResolveLevel level = RS2::ResolveAll) const;
30 static VectorSolutions getIntersection(RS_Entity * e1, RS_Entity * e2, bool onEntities = false);
31 static VectorSolutions getIntersectionLineLine(RS_Line * e1, RS_Line * e2);
32 static VectorSolutions getIntersectionLineArc(RS_Line * line, RS_Arc * arc);
33 static VectorSolutions getIntersectionArcArc(RS_Arc * e1, RS_Arc * e2);
34 static VectorSolutions getIntersectionLineEllipse(RS_Line * line, RS_Ellipse * ellipse);
35 static bool isPointInsideContour(const Vector & point, RS_EntityContainer * contour,
36 bool * onContour = NULL);
39 RS_EntityContainer * container;