MLightCAD
    Preparing search index...

    Manages batched entity preview overlays for command jigs.

    Used by MOVE, ROTATE, COPY, and similar modify jigs. When batch preview creation succeeds, the overlay reuses GPU-resident geometry and is updated each frame via AcEdBaseView.updateEntityPreview. When creation fails, callers fall back to legacy transient entity clones.

    Pass copyCount of 1 (default) for a single transformed preview, or a larger value for COPY array previews with independent placements.

    Index

    Constructors

    • Creates one or more batched preview overlays for the given entities.

      Batch preview is disabled when copyCount is zero, the view cannot create batch previews, or any individual overlay fails to initialize. On partial failure, all successfully created overlays are disposed before returning.

      Parameters

      • view: AcEdBaseView

        View that owns preview creation and scene updates

      • entityIds: string[]

        Object ids of entities to include in each overlay

      • copyCount: number = 1

        Number of overlays to create (default 1)

      Returns AcEdBatchedPreview

    Properties

    copyCount: number

    Number of preview overlays managed by this instance.

    Zero when no previews were requested at construction time.

    useBatchPreview: boolean

    Whether this instance is driving batched GPU-resident previews.

    When false, callers should use the legacy transient-entity preview path.

    Methods

    • Updates the world-space placement of every copy overlay.

      Each overlay receives a translation matrix derived from displacement, scaled by its copy factor and optional fit mode via scaleCopyDisplacement. No-op when useBatchPreview is false.

      Parameters

      • view: AcEdBaseView

        View that owns the preview overlays

      • displacement: AcGeVector3dLike

        Base displacement from the copy base point to the current cursor position

      • fitMode: boolean

        When true, scales displacements so the last copy lands on the cursor (factor / copyCount); otherwise uses full multiples

      Returns void