# PrimitiveBoundsHandle

> Base class for a compound handle to edit a bounding volume in the Scene view.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.3/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor

```csharp
public abstract class PrimitiveBoundsHandle
```

## Remarks

This class allows you to display a shape with up to six control handles for simultaneously editing the size and center of a bounding volume. Dragging on any one control handle will expand the volume along the control handle's axis. All classes that inherit from this class also gain the following modifier keys while a control handle is being dragged:

• **Alt**: Pin the [PrimitiveBoundsHandle.center](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/center.md) of the volume to its location at the time the control handle was clicked and grow the size in both directions along the control handle's axis of movement.

• **Shift**: Uniformly scale the volume along all enabled [PrimitiveBoundsHandle.axes](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/axes-1.md) in proportion to its size at the time the control handle was clicked.

The handle rendered by this class's [PrimitiveBoundsHandle.DrawHandle()](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/drawhandle.md) method is affected by global state in the [Handles](/engine/6000.3/script-reference/unityeditor/handles.md) class, such as [Handles.matrix](/engine/6000.3/script-reference/unityeditor/handles/matrix.md) and [Handles.color](/engine/6000.3/script-reference/unityeditor/handles/color.md).

Additional Resources: [Editor.OnSceneGUI()](/engine/6000.3/script-reference/unityeditor/editor/onscenegui.md), [Handles.SetCamera](/engine/6000.3/script-reference/unityeditor/handles/setcamera.md).

## Constructors

| Constructor                                                                                                         | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| [PrimitiveBoundsHandle()](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/ctor.md) | Create a new instance of the [PrimitiveBoundsHandle](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle.md) class. |

## Properties

| Property                                                                                                                                     | Description                                                                                                                                                                                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [axes](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/axes-1.md)                                           | Flags specifying which axes should display control handles.                                                                                                                                                                                                                         |
| [center](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/center.md)                                         | Returns or specifies the center of the bounding volume for the handle.                                                                                                                                                                                                              |
| [handleColor](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/handlecolor.md)                               | Returns or specifies the color of the control handles.                                                                                                                                                                                                                              |
| [midpointHandleDrawFunction](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/midpointhandledrawfunction.md) | An optional [Handles.CapFunction](/engine/6000.3/script-reference/unityeditor/handles/capfunction.md) to use when displaying the control handles. Defaults to [Handles.DotHandleCap](/engine/6000.3/script-reference/unityeditor/handles/dothandlecap.md) if no value is specified. |
| [midpointHandleSizeFunction](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/midpointhandlesizefunction.md) | The [Handles.SizeFunction](/engine/6000.3/script-reference/unityeditor/handles/sizefunction.md) to specify how large the midpoint control handles should be.                                                                                                                        |
| [wireframeColor](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/wireframecolor.md)                         | Returns or specifies the color of the wireframe shape.                                                                                                                                                                                                                              |

## Methods

| Method                                                                                                                 | Description                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [DrawHandle](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/drawhandle.md)           | A function to display this instance in the current handle camera using its current configuration.                                                                                                                                                                                                           |
| [DrawWireframe](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/drawwireframe.md)     | Draw a wireframe shape for this instance. Subclasses must implement this method.                                                                                                                                                                                                                            |
| [GetSize](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/getsize.md)                 | Gets the current size of the bounding volume for this instance.                                                                                                                                                                                                                                             |
| [IsAxisEnabled](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/isaxisenabled.md)     | Gets a value indicating whether the specified axis is enabled for the current instance.                                                                                                                                                                                                                     |
| [OnHandleChanged](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/onhandlechanged.md) | A callback for when a control handle was dragged in the Scene.                                                                                                                                                                                                                                              |
| [SetColor](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/setcolor.md)               | Sets [PrimitiveBoundsHandle.handleColor](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/handlecolor.md) and [PrimitiveBoundsHandle.wireframeColor](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/wireframecolor.md) to the same value. |
| [SetSize](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/setsize.md)                 | Sets the current size of the bounding volume for this instance.                                                                                                                                                                                                                                             |

## Static Methods

| Method                                                                                                                                                     | Description                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [DefaultMidpointHandleSizeFunction](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/defaultmidpointhandlesizefunction.md) | A [Handles.SizeFunction](/engine/6000.3/script-reference/unityeditor/handles/sizefunction.md) that returns a fixed screen-space size. |

## Enums

| Enum                                                                                                                                         | Description                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PrimitiveBoundsHandle.Axes](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/axes.md)                       | A flag enumeration for specifying which axes on a [PrimitiveBoundsHandle](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle.md) object should be enabled. |
| [PrimitiveBoundsHandle.HandleDirection](/engine/6000.3/script-reference/unityeditor/imgui/controls/primitiveboundshandle/handledirection.md) | An enumeration of directions the handle moves in.                                                                                                                                        |
