AutoMovie API
    Preparing search index...

    Function placeAutoMovieInspectionLabels

    • Place labels on a picture: project each labelled path's centre through the camera into pixels and keep a label only where its box overlaps no label kept before it.

      Each path is given as its world box, and its label reads the path's last name, (root) for the empty path. A label's anchor is the pixel the centre of its box projects to, with the top-left of the picture at (0, 0), x to the right and y down, and its box is the box stampAutoMovieRasterLabel stamps at scale with its top-left corner on the anchor: scale * (4 * length + 3) pixels wide and 9 * scale high. Labels are taken in the order given; one whose box overlaps a kept box, or whose anchor lies behind the camera or outside the picture, is listed in dropped with its projected anchor instead, so a reader knows it was asked for.

      The camera's world matrix and projection must be current.

      It throws for a size or scale that is not a positive integer.

      Parameters

      • props: {
            boxes: readonly {
                max: IAutoMovieVector3;
                min: IAutoMovieVector3;
                path: string;
            }[];
            camera: Camera;
            height: number;
            scale: number;
            width: number;
        }
        • boxes: readonly { max: IAutoMovieVector3; min: IAutoMovieVector3; path: string }[]

          What to label: each path with its world box in metres.

        • camera: Camera

          The camera the picture is drawn through.

        • height: number

          Picture height in pixels.

        • scale: number

          Size of one font pixel of the stamp, in picture pixels.

        • width: number

          Picture width in pixels.

      Returns IAutoMovieInspectionLabelPlacement