Viewer - Interaction
    Preparing search index...

    Interface ISnapRestriction

    interface ISnapRestriction {
        active: boolean;
        enabled: boolean;
        enabledEditable: boolean;
        enableVisualization: boolean;
        id: string;
        priority: number;
        showVisualization: boolean;
        removeVisualization(): void;
        snap(
            ray: IRay,
            point: vec3,
            distance: number,
            metaData?: RestrictionMetaData,
        ): RestrictionResult | undefined;
    }
    Index

    Properties

    active: boolean

    If the restriction is actively being used at the moment.

    enabled: boolean

    Whether the restriction is enabled or not.

    enabledEditable: boolean

    If the enabling or disabling of the restriction is allowed to the end user. If it is not editable, the default value for enabling or disabling the restriction is used.

    enableVisualization: boolean

    If the visualization of the restriction is enabled or not. If the restriction has no visualization, this property has no effect.

    id: string

    The unique identifier of the restriction.

    priority: number

    The priority of the restriction.

    showVisualization: boolean

    Whether the visualization of the restriction is shown or not (if there is one).

    Methods

    • Remove the visualization of the restriction.

      Returns void

    • Restrict the position of a point.

      Parameters

      • ray: IRay

        The ray that is used for the restriction.

      • point: vec3

        The position of the point.

      • distance: number

        The distance of the point to the ray.

      • OptionalmetaData: RestrictionMetaData

        The meta data of the point.

      Returns RestrictionResult | undefined

      The restricted position of the point.