DIRECTORY GGBasicTypes, GGInterfaceTypes; GGMultiGravity: CEDAR DEFINITIONS = BEGIN AlignBag: TYPE = REF AlignBagObj; AlignBagObj: TYPE = GGInterfaceTypes.AlignBagObj; Caret: TYPE = GGInterfaceTypes.Caret; FeatureCycler: TYPE = GGInterfaceTypes.FeatureCycler; FeatureData: TYPE = GGInterfaceTypes.FeatureData; GGData: TYPE = GGInterfaceTypes.GGData; NearVertexEdgeAndFaces: TYPE = GGInterfaceTypes.NearVertexEdgeAndFaces; Point: TYPE = GGBasicTypes.Point; TriggerBag: TYPE = REF TriggerBagObj; TriggerBagObj: TYPE = GGInterfaceTypes.TriggerBagObj; Vector: TYPE = GGBasicTypes.Vector; Map: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; PointsPreferred: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; LinesPreferred: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; FacesPreferred: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; MapCycler: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL] RETURNS [featureCycler: FeatureCycler]; PointsPreferredCycler: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL, maxDimension: [0..1] _ 1] RETURNS [featureCycler: FeatureCycler]; LinesPreferredCycler: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData] RETURNS [featureCycler: FeatureCycler]; FacesPreferredCycler: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData] RETURNS [featureCycler: FeatureCycler]; EmptyCycler: PROC [testPoint: Point] RETURNS [featureCycler: FeatureCycler]; FirstFeature: PROC [featureCycler: FeatureCycler] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; NextFeature: PROC [featureCycler: FeatureCycler] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; PreviousFeature: PROC [featureCycler: FeatureCycler] RETURNS [resultPoint: Point, normal: Vector, feature: FeatureData, hitData: REF ANY]; MultiMap: PUBLIC PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL] RETURNS [nearVEF: NearVertexEdgeAndFaces, count: NAT]; MultiLinesPreferred: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData] RETURNS [nearVEF: NearVertexEdgeAndFaces, count: NAT]; MultiPointsPreferred: PROC [testPoint: Point, t: REAL, alignBag: AlignBag, sceneBag: TriggerBag, ggData: GGData, intersections: BOOL] RETURNS [nearVEF: NearVertexEdgeAndFaces, count: NAT]; NewMultiGravityPool: PROC [] RETURNS [REF]; -- stored in GGData; storage pool for GGMultiGravityImpl END. ΘGGMultiGravity.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Bier, July 7, 1987 2:51:15 pm PDT Contents: Performs hit testing similar to uniGravity. Instead of returning a single nearest feature, we return the N (or fewer) nearest features which are within a given tolerance distance from the test point. The algorithm used is described in [Cyan]Documentation>MultiGravity.tioga. Pier, October 13, 1987 10:29:37 am PDT Dispatches to StrictDistance or InnerCircle as appropriate. Calls MultiStrictDistance and picks a single "best" feature. If there are no good features within radius t of testPoint, then resultPoint = testPoint and feature = hitData = NIL. Calls MultiPointsPreferred and picks a single "best" feature. If there are no good features within radius t of testPoint, then resultPoint = testPoint and feature = hitData = NIL. If intersections is TRUE then compute all pair-wise intersections of gravity-active curves and count them as distinguished points. Calls MultiStrictDistance and picks a single "best" feature. If there are no good features within radius t of testPoint, then resultPoint = testPoint and feature = hitData = NIL. Calls MultiPointsPreferred and picks a single "best" feature. If there are no good features within radius t of testPoint, then resultPoint = testPoint and feature = hitData = NIL. If intersections is TRUE then compute all pair-wise intersections of gravity-active curves and count them as distinguished points. Dispatches to StrictDistance or InnerCircle as appropriate. Dispatches to MultiStrictDistance or MultiInnerCircle depending on the Gargoyle Gravity Type button in the user interface. Returns up to n closest features, their closest points, and their distances from the testpoint. Features farther than t from testPoint may or may not be included. The results will be located in features[0] .. features[count-1], points[0] .. points[count-1], and distances[0] .. distances[count-1]. Returns up to n closest features, their closest points, and their distances from the testpoint. Features farther than t from testPoint may or may not be included. The results will be located in features[0] .. features[count-1], points[0] .. points[count-1], and distances[0] .. distances[count-1]. If any points are within radius t/2 of testPoint, then only points (e.g. vertices, control points, and intersection points) will be mentioned. Otherwise, "features" will consist of a mixture of points and curves. Κ:˜šœ™Icodešœ Οmœ1™