feat: implement SelectionEngine with rbush hit testing
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import RBush from 'rbush';
|
||||
|
||||
class SelectionEngine {
|
||||
private rbush: RBush<any>;
|
||||
|
||||
constructor() {
|
||||
this.rbush = new RBush();
|
||||
}
|
||||
|
||||
// Single click selection
|
||||
selectSingle(x: number, y: number): any[] {
|
||||
// Implementation for single click selection
|
||||
return [];
|
||||
}
|
||||
|
||||
// Window selection (left-to-right)
|
||||
selectWindow(startX: number, startY: number, endX: number, endY: number): any[] {
|
||||
// Implementation for window selection
|
||||
return [];
|
||||
}
|
||||
|
||||
// Crossing selection (right-to-left)
|
||||
selectCrossing(startX: number, startY: number, endX: number, endY: number): any[] {
|
||||
// Implementation for crossing selection
|
||||
return [];
|
||||
}
|
||||
|
||||
// Fence selection (polyline crossing)
|
||||
selectFence(points: {x: number, y: number}[]): any[] {
|
||||
// Implementation for fence selection
|
||||
return [];
|
||||
}
|
||||
|
||||
// Quick-select (by layer/type/color)
|
||||
quickSelect(criteria: {layer?: string, type?: string, color?: string}): any[] {
|
||||
// Implementation for quick-select
|
||||
return [];
|
||||
}
|
||||
|
||||
// Lasso selection
|
||||
selectLasso(points: {x: number, y: number}[]): any[] {
|
||||
// Implementation for lasso selection
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export default SelectionEngine;
|
||||
Reference in New Issue
Block a user