Click or drag to resize

SelectionBoxManagerHitTest Method

화면 좌표의 선택상자 반환

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public int HitTest(
	int x,
	int y
)

Parameters

x
Type: SystemInt32
화면 좌표 X
y
Type: SystemInt32
화면 좌표 Y

Return Value

Type: Int32
선택상자 아이디(ID). 해당 좌표에 선택상자가 없는 경우 -1 반환.
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    // Event 선언
    vizcore3d.View.OnViewDragDrop += View_OnViewDragDrop;
}

private void View_OnViewDragDrop(object sender, Event.EventManager.ViewDragDropEventArgs e)
{
    int x = e.X;
    int y = e.Y;

    // 해당 위치 선택상자(SelectionBox) 조회
    int id = vizcore3d.SelectionBox.HitTest(x, y);
    if(id != -1)
    {
        VIZCore3D.NET.Data.SelectionBox box = vizcore3d.SelectionBox.GetItem(id);
    }
}
See Also