# SectionTool
Default section tool implementation.
WARNING
This extension requires and active CameraController extension implementation.
# Accessors
enabled | sectionPlanes | visible |
---|
# Methods
getBox | getObbTransform | on | removeListener |
---|---|---|---|
setBox | toggle |
# Typedefs
SectionToolEvent | SectionToolEventPayload |
---|
# Accessors
# enabled
get enabled(): boolean
set enabled(value: boolean)
2
Enables/disables the extension.
Returns: boolean
# sectionPlanes
get sectionPlanes(): Planes[]
Gets the section box's up to date section planes
Returns: Plane[] (opens new window)
# visible
get visible(): boolean
set visible(value: boolean)
2
Gets and sets the visbility of the actual section box.
Returns: boolean
# Methods
# getBox
getBox(): OBB
Gets the current section box bounds.
Returns: OBB (opens new window)
# getObbTransform
getObbTransform(): Matrix4
Gets the current section box transform.
Returns: Matrix4 (opens new window)
# on
on(e: CameraEvent, handler: (data: boolean) => void)
Function for subscribing to camera events.
Parameters
- e: CameraEvent
- handler: The handler for the events
Returns: void
# removeListener
removeListener(e: CameraEvent, handler: (data: unknown) => void)
Function for un-subscribing from camera events.
Parameters
- e: CameraEvent
- handler: The handler for the events to unsubscribe
Returns: void
# setBox
setBox(targetBox: OBB | Box3 | { min: Vector3Like; max: Vector3Like }, offset = 0): void
Sets the section box to the specified bounds Parameters
- targetBox: Box3 (opens new window) | OBB (opens new window) | { min: Vector3Like; max: Vector3Like }
- optional offset: Linear tolerance
Returns: void
# toggle
toggle(): void
Enables/disables the section tool.
Returns: void
# Typedefs
# SectionToolEvent
enum SectionToolEvent {
DragStart = "section-box-drag-start",
DragEnd = "section-box-drag-end",
Updated = "section-box-changed",
}
2
3
4
5
Events that the extension can emit.
# SectionToolEventPayload
interface SectionToolEventPayload {
[SectionToolEvent.DragStart]: void
[SectionToolEvent.DragEnd]: void
[SectionToolEvent.Updated]: Plane[]
}
2
3
4
5
Mapping SectionToolEvent types to handler argument type