/** @packageDocumentation
 * @module Curve
 */
import { BSpline2dNd } from "../bspline/BSplineSurface";
import { GeometryHandler } from "../geometry3d/GeometryHandler";
import { Range3d } from "../geometry3d/Range";
import { Transform } from "../geometry3d/Transform";
import { Polyface } from "../polyface/Polyface";
import { SolidPrimitive } from "../solid/SolidPrimitive";
import { CoordinateXYZ } from "./CoordinateXYZ";
import { CurveCollection } from "./CurveCollection";
import { CurvePrimitive } from "./CurvePrimitive";
import { PointString3d } from "./PointString3d";
/**
 * Describes the category of a [[GeometryQuery]], enabling type-switching like:
 * ```ts
 *   function processGeometryQuery(q: GeometryQuery): void {
 *     if ("solid" === q.geometryCategory)
 *       alert("Solid type = " + q.solidPrimitiveType); // compiler knows q is an instance of SolidPrimitive
 *    // ...etc...
 * ```
 *
 * Each string maps to a particular subclass of [[GeometryQuery]]:
 *  - "polyface" => [[Polyface]]
 *  - "curvePrimitive" => [[CurvePrimitive]]
 *  - "curveCollection" => [[CurveCollection]]
 *  - "solid" => [[SolidPrimitive]]
 *  - "point" => [[CoordinateXYZ]]
 *  - "pointCollection" => [[PointString3d]]
 *  - "bsurf" => [[BSpline2dNd]] (which is an intermediate class shared by [[BSplineSurface3d]] and [[BSplineSurface3dH]])
 *
 *  @see [[AnyGeometryQuery]]
 * @public
 */
export type GeometryQueryCategory = "polyface" | "curvePrimitive" | "curveCollection" | "solid" | "point" | "pointCollection" | "bsurf";
/**
 * Union type for subclasses of [[GeometryQuery]]. Specific subclasses can be discriminated at compile- or run-time
 * using [[GeometryQuery.geometryCategory]].
 * @public
 */
export type AnyGeometryQuery = Polyface | CurvePrimitive | CurveCollection | SolidPrimitive | CoordinateXYZ | PointString3d | BSpline2dNd;
/**
 * Queries to be supported by Curve, Surface, and Solid objects.
 * * `GeometryQuery` is an abstract base class with (abstract) methods for querying curve, solid primitive, mesh,
 * and bspline surfaces.
 * @public
 */
export declare abstract class GeometryQuery {
    /** Type discriminator. */
    abstract readonly geometryCategory: GeometryQueryCategory;
    /** Return the range of the entire GeometryQuery tree. */
    range(transform?: Transform, result?: Range3d): Range3d;
    /** Extend `rangeToExtend` by the range of this geometry multiplied by the `transform`. */
    abstract extendRange(rangeToExtend: Range3d, transform?: Transform): void;
    /**
     * Attempt to transform in place.
     * * LineSegment3d, Arc3d, LineString3d, BsplineCurve3d always succeed.
     * * Some geometry types may fail if scaling is non-uniform.
     */
    abstract tryTransformInPlace(transform: Transform): boolean;
    /** Try to move the geometry by dx,dy,dz. */
    tryTranslateInPlace(dx: number, dy?: number, dz?: number): boolean;
    /** Return a transformed clone. */
    abstract cloneTransformed(transform: Transform): GeometryQuery | undefined;
    /** Return a clone */
    abstract clone(): GeometryQuery | undefined;
    /**
     * Return GeometryQuery children for recursive queries.
     * * leaf classes do not need to implement.
     */
    get children(): GeometryQuery[] | undefined;
    /** Test `if (other instanceof this.Type)`. REQUIRED IN ALL CONCRETE CLASSES. */
    abstract isSameGeometryClass(other: GeometryQuery): boolean;
    /**
     * Test for exact structure and nearly identical geometry.
     * *  Leaf classes must implement.
     * *  Base class implementation recurses through children.
     * *  Base implementation is complete for classes with children and no properties.
     * *  Classes with both children and properties must implement for properties, call super for children.
     */
    isAlmostEqual(other: GeometryQuery): boolean;
    /**
     * Apply instance method [[isAlmostEqual]] if both are defined.
     * * Both undefined returns true.
     * * Single defined returns false.
     */
    static areAlmostEqual(a: GeometryQuery | undefined, b: GeometryQuery | undefined): boolean;
    /**
     * Double Dispatch call pattern.
     * * User code implements a `GeometryHandler` with specialized methods to handle `LineSegment3d`, `Arc3d`, etc as
     * relevant to its use case.
     * * Each such `GeometryQuery` class implements this method as a one-line method containing the appropriate call
     * such as `handler.handleLineSegment3d())`
     * * This allows each type-specific method to be called without a switch or `instanceof` test.
     * @param handler handler to be called by the particular geometry class
     */
    abstract dispatchToGeometryHandler(handler: GeometryHandler): any;
}
//# sourceMappingURL=GeometryQuery.d.ts.map