weasel API - v0.8.0
    Preparing search index...

    Interface OriginProjection<TPose>

    Projection used by gridSnapStrategy when TPose doesn't expose {x,y} directly (Path, polygon, etc.). The strategy reads the snap point via getOrigin, rounds it to the grid, then asks translate to move the pose by the resulting delta.

    interface OriginProjection<TPose> {
        getOrigin(pose: TPose): { x: number; y: number };
        translate(pose: TPose, dx: number, dy: number): TPose;
    }

    Type Parameters

    • TPose
    Index

    Methods