AnchorPoint
Anchor 기준점 — 대상 방향성 bbox 상의 정규화 좌표. 2D/3D 공용.
Horizontal(0=Left,0.5=Center,1=Right), Vertical(0=Top,0.5=Middle,1=Bottom), Depth(0=Front,0.5=Middle,1=Back), 각 [0,1].
2D 대상(평면 텍스트 노트 등)에서는 Depth inert. 3x3 = 1^2 평면 preset, 임의 (H,V[,D]) = custom.
휘발 value 타입 — 영속 저장 안 함.
Constructors
| Name | Description |
|---|---|
| AnchorPoint(float horizontal, float vertical) | 2D anchor. Depth 는 DEFAULT_DEPTH(0.5) 로 설정된다(하위호환). |
| AnchorPoint(float horizontal, float vertical, float depth) | 3D anchor. depth 0=Front .. 1=Back. |
Properties
| Name | Type | Description |
|---|---|---|
| BottomCenter | AnchorPoint | |
| BottomLeft | AnchorPoint | |
| BottomRight | AnchorPoint | |
| Center | AnchorPoint | |
| Depth | float | 깊이 비율 (0=Front, 0.5=Middle, 1=Back). 평면(2D) 대상에서는 inert. |
| Horizontal | float | 수평 비율 (0=Left, 0.5=Center, 1=Right) |
| MiddleLeft | AnchorPoint | |
| MiddleRight | AnchorPoint | |
| TopCenter | AnchorPoint | |
| TopLeft | AnchorPoint | |
| TopRight | AnchorPoint | |
| Vertical | float | 수직 비율 (0=Top, 0.5=Middle, 1=Bottom) |
Fields
| Name | Description |
|---|---|
| DEFAULT_DEPTH | 2D anchor 생성 시 Depth 기본값 — 중간면(평면 대상에서 inert). |
| DepthBack | |
| DepthFront | |
| DepthMiddle |
Methods
| Name | Description |
|---|---|
| Grid | rows×cols 균등 grid anchor 생성 (변이축; 3,3 = 3x3 preset). 각 축은 [0,1] 을 균등 분할: n개 셀 → i/(n-1). 단일 행/열(n=1)은 중앙(0.5). 반환 순서 = row-major (Top→Bottom 의 각 행에서 Left→Right). |
| WithDepth | 동일한 (Horizontal, Vertical) 에 지정 depth 만 적용한 새 anchor 반환. 27개 depth preset 폭증 대신 조합으로 3D anchor 를 구성한다. 예: AnchorPoint.Center.WithDepth(AnchorPoint.DepthFront). |