跳到主要内容

flywave-terrain-datasource.groundmodificationeventparams

Home > @flywave/flywave-terrain-datasource > GroundModificationEventParams

GroundModificationEventParams interface

Parameters for ground modification events

This interface defines the structure of events that are dispatched when ground modifications are added, removed, updated, or cleared. These events provide detailed information about what changed and where, allowing other parts of the system to react appropriately.

Signature:

export interface GroundModificationEventParams 

Properties

Property

Modifiers

Type

Description

affectedBounds

GeoBox | null

Bounding box of the affected area

Represents the spatial extent of the area that was directly affected by the change operation. This is more specific than globalBounds and represents only the changed region.

affectedIds

string[]

IDs of the affected modifications

Array of unique identifiers for the modifications that were directly affected by the change operation.

changeType

"add" | "remove" | "update" | "clear" | "bounds"

Type of change that occurred

Indicates what kind of operation was performed: - "add": A new modification was added - "remove": A modification was removed - "update": An existing modification was updated - "clear": All modifications were cleared - "bounds": Global bounds were updated

globalBounds

GeoBox | null

Global bounding box containing all modifications after the change

Represents the overall spatial extent of all ground modifications after the change operation was completed. This is useful for determining what areas of the terrain might need updating.

modifications?

GroundModificationPolygon[]

(Optional) Array of affected modifications (for add/update operations)

For add and update operations, this field contains the actual modification objects that were affected. This provides detailed information about what changed without requiring additional lookups.

previousBounds?

GeoBox | null

(Optional) Previous bounding box before the change (only for updates)

For update operations, this field contains the bounding box of the affected area before the change was made. This allows for comparison between old and new states.