Chapter 14. Selection in 3D Applications
Prev | Part III. 3D Style Guidelines | Next

## Chapter 14. Selection in 3D Applications

Any 3D application that offers more than simple viewing requires a selection mechanism. Just like 2D applications, 3D applications need to allow users to select one or more objects. This chapter discusses object selection in 3D applications and extends and complements the guidelines for selection in 2D applications (see “Selection” in Chapter 7). It includes these topics:

- “3D Selection Concepts and Models” briefly summarizes the object-action paradigm, explains two techniques for selecting objects (direct and indirect selection), and discusses how the OSF/Motif selection models apply to 3D applications.

- “Selection Feedback for 3D Objects” discusses user feedback to indicate an object can be selected and to indicate an object is currently selected.

- “Lead Objects in 3D Applications” explains how to use the concept of a lead object to determine how to apply specific actions when multiple objects are selected.

## 3D Selection Concepts and Models

This section first discusses the object-action paradigm and then contrasts two techniques for selecting objects: direct selection and indirect selection. It then presents the selection models and minimum selection actions users expect in a 3D application. These techniques extend the 2D-oriented OSF/Motif guidelines for selection (see “Selection” in Chapter 7).

### The Object-Action Paradigm in 3D Applications

In the object-action paradigm, the user first selects an object or a group of objects and then applies an action to the objects in the selection (see “Selection” in Chapter 7 for details). Object selection is the prerequisite to other operations. As a shortcut, selecting and manipulating the object can sometimes be combined (see “Drag and Drop for Non-Text Objects” in Chapter 7, “Focus, Selection, and Drag and Drop”). For example, users may move the pointer over an object, press and hold the mouse button, and thereby select and drag the object at the same time.

Each 3D application must have a current selection to which the action is applied at any time. The current selection may be empty (that is, no selection). Note that if your application supports several viewports, each window can maintain a separate selection, but there is only one current selection.

Some applications use an action-object paradigm instead: The user selects an action, then chooses the object to which the action should apply, and exits by returning to the selection rule (neutral state). This paradigm can be useful for tools that attach to the pointing device. In most cases, however, a user interface using an action-object paradigm tends to be excessively modal and cumbersome to use, and this paradigm isn't recommended.

### Direct Selection in 3D Applications

Direct selection means that the user selects one or more objects by selecting the objects themselves, not an indirect representation of them (for example, the name of an object in a list). Because users of 2D applications are accustomed to direct selection, using direct selection in 3D applications makes these applications easier to learn. Direct selection is therefore the preferred primary selection mechanism.

Direct selection can be used to select one or more objects, as follows:

- To select a single object, the user moves the pointer over an object and presses the left mouse button. As the user clicks, the application determines which object is selected by following a ray projected into the scene. The first object the ray intersects is selected.

- To add objects to the current selection (or remove them from the current selection), the user holds the <Ctrl> key while clicking on individual objects. Objects which are not currently selected become selected, while currently selected objects are deselected.

- To select several objects at the same time, the user presses the left mouse button and drags around a group of objects. When the user releases the mouse button, all objects inside the drag area are selected. This is referred to as sweep selection. There are two variants of this technique:

  - Rectangle-drag. The user drags the pointer to define the diagonal of a rectangular area on the screen. All objects inside this rectangle are selected.

  - Lasso-drag. The user draws out an irregularly shaped area with the pointer. All objects inside this area are selected.

  In both cases, the initial mouse-down action doesn't make a selection but sets the point of origin for the area to be selected. When the user releases the mouse button to complete the drag operation, the selected region is defined by the boundaries of the drag and extends from the user's current z position back to the full length of the viewing frustum. All objects, completely visible or partly obscured, that fall in this region are considered to be in the selected region.

Note that some applications may need to provide sub-object selection methods to allow users to select vertices, edges, and faces. This isn't discussed in this document.

### Indirect Selection in 3D Applications

In indirect selection, the user selects an object by selecting an indirect representation of it. For example, assume that the names of all the objects in a 3D scene appear in a scrolling list and the user can click on a name in the list to select the object. Other examples are using a “Select All” menu command, which allows users to select all objects in a 3D scene, and selecting up and down a text representation of the object hierarchy.

Indirect selection is a useful secondary selection mechanism. It can be especially useful in 3D applications because:

- Users may have to choose among a large number of objects.

- An object may be obscured or too far away in the scene to be easily selected using direct selection.

Don't make indirect selection the only selection paradigm. Instead, use it to augment direct selection.

### 3D Selection Models

The four OSF/Motif selection models recommended for 2D applications are listed in Table 7-1. For 3D applications, users expect that one of the following two OSF/Motif selection models is supported:

- The single selection model in applications that allow users to select only one object at a time

- The discontiguous selection model in applications that allow users to select more than one object at a time (these objects don't have to be next to each other).

Table 14-1 describes the selection actions in the single selection and discontiguous selection models. It also lists which of these actions users minimally expect in a 3D application and which are optional but ideally supported.

Table 14-1. 3D Selection Actions and Results

Action | Model | Required | Result
--- | --- | --- | ---
Click an object. | Single and discontiguous | Yes | Object is selected. Any previously selected objects are deselected.
<Ctrl>-click an object. | Discontiguous | Yes | Selection state of the object is toggled. That is, a previously selected object is removed from the current selection and a previously unselected object is added to the current selection.
<Shift>-click an object. | Discontiguous | No[a] | Same as <Ctrl>-clicking an object.
Click outside the selection in an empty area.[b] | Single and discontiguous | Yes | All objects are deselected.
Sweep out a selection area.[c] | Discontiguous | No | Only objects included in the sweep area are selected. All other objects are deselected.
<Ctrl>-sweep an area.c | Discontiguous | No | Selection state of each object inside the sweep area is toggled. Selection state of each object outside the sweep area is unchanged.
<Shift>-sweep an area.c | Discontiguous | No[d] | Same as <Ctrl>-sweep area.
[a] Recommended if users are accustomed to using the <Shift> key in their other applications to toggle the selection state of an object. [b] An application may additionally include a “Deselect All” menu item. This is especially useful for applications that support densely populated scenes or objects that fill the entire background. [c] Can support sweep selection using either rectangle-drag or lasso-drag as described in “Direct Selection in 3D Applications.” [d] Recommended if your application supports the selection action <Ctrl>-sweep area and users are accustomed to using the <Shift> key to toggle the selection state of an object.

### Selection in Hierarchies of Objects

Some applications support hierarchies of objects and allow users to select more than one object in these hierarchies. If your application lets users select more than one object in a hierarchy of objects, provide at a minimum a method for selecting the highest and lowest object in the hierarchy and a method for adjusting the selection up and down the hierarchy.

### 3D Selection Design Guidelines

When designing the selection user interface for your 3D application...

- Follow the object-action paradigm of direct manipulation: The user first selects an object (or group of objects), then chooses an action to perform on it.

- For actions that apply to objects, apply the action to all the objects in the current selection and only to those objects.

- Provide one current selection for each application at any time. The current selection may be empty (that is, no selection). Note that each window of your application can maintain a separate selection, but there is only one current selection.

- Support direct selection as the primary selection mechanism. Using the left mouse button, the user either clicks directly on an object to select it or sweeps out an area to select multiple objects.

- Support indirect selection if your users need it. For example, allow users to select an indirect representation of an object such as an item in a list, or provide a “Select All” menu item.

- If your application lets users select more than one object in a hierarchy of objects, provide at a minimum a method for selecting the highest and lowest object in the hierarchy and a method for adjusting the selection up and down the hierarchy.

When deciding on a selection model...

- If your application allows users to select only one object at a time, support the OSF/Motif single selection model as follows:

- Users directly select an object by moving the pointer over it and pressing the left mouse button. Any previously selected object is deselected.

- Users deselect an object by clicking outside the selection in an empty area.

- If your application allows users to select more than one object at a time, support the OSF/Motif discontiguous selection model as follows. Ideally, support the entire OSF/Motif discontiguous selection model.

- Users directly select an object by moving the pointer over it and pressing the left mouse button. Any previously selected objects are deselected.

- Users <Ctrl>-click an unselected object to add it to the current selection, and <Ctrl>-click an already selected object to remove it from the current selection. That is, <Ctrl>-click toggles the selection state of the object.

- If users are accustomed to using the <Shift> key in other applications to toggle the selection state of an object, allow them to add and remove objects by <Shift>-clicking an object in addition to <Ctrl>-clicking an object. In that case, <Shift>-clicking an object performs the same selection actions as <Ctrl>-clicking an object.

- Users deselect all objects by clicking outside the selection in an empty area. In addition, a “Deselect All” menu item may be useful for some applications.

- Optionally, allow users to use sweep selection to select multiple objects, allowing either rectangle-drag or lasso-drag. At the end of a sweep action, the only objects selected are those inside the sweep area.

- Optionally allow users to <Ctrl>-sweep through a collection of objects to toggle the selection state of all objects inside the sweep area. That is, objects inside the sweep area that were previously selected are deselected, and objects inside the sweep area that were previously deselected are selected. The selection state of objects outside the sweep area doesn't change.

- If your application supports the optional <Ctrl>-sweep selection action and users are accustomed to using the <Shift> key in their other applications to toggle the selection state of an object, allow users to use <Shift>-sweep in addition to <Ctrl>-sweep to toggle the selection state of all objects inside the sweep area.

## Selection Feedback for 3D Objects

When an object is selected, applications need to provide selection feedback on the object. This section discusses three techniques for indicating that an object is selected—bounding box, manipulator, and highlighting—and provides guidelines for when to use each technique.

This section covers these topics:

- “Bounding Box Selection Feedback”

- “Manipulator Selection Feedback”

- “Highlight Selection Feedback”

### Bounding Box Selection Feedback

Figure 14-1 shows two objects with bounding box feedback: A box is placed around the object. The bounding box needs to be differently shaped or larger than the object itself so that it's readily visible. Using a distinct color for the box is also highly recommended.

Figure 14-1. Two Objects with Bounding Box Feedback

Note that for some applications a bounding box may not be the most intuitive or useful shape. For example, some applications might use a bounding volume that's a pyramid or cone. Other applications might use a shape that uses planes that don't form a closed bounding volume. In most cases, however, users find the bounding box the most intuitive shape. The term bounding box is used in this document to mean a bounding box or a bounding volume.

Bounding box selection feedback is most appropriate for applications where users can select objects but either don't typically manipulate them (translate, rotate, scale) or can't manipulate them. This type of feedback is appropriate for both applications that support the single selection model and applications that support the discontiguous selection model (see “3D Selection Models”).

### Manipulator Selection Feedback

Figure 14-2 shows an application that uses a manipulator to indicate that an object is selected. A manipulator is a control that allows users to change the position, orientation, or scale of objects. Specific manipulators are discussed in Chapter 15, “Manipulating 3D Objects.”

Figure 14-2. Object With Manipulator

Manipulator selection feedback is most appropriate for applications where users typically select objects to perform manipulations on them. For these applications, placing the manipulator on an object as soon as the object is selected has two advantages:

- The manipulator feedback clearly indicates that the object is selected.

- The immediate display of the manipulator makes the manipulation functions readily available.

If your application allows users to select more than one object at a time (see the description of the discontiguous selection model in “3D Selection Models”), you need to decide whether to use manipulators as selection feedback on all or just some of the selected objects. Displaying a manipulator on all selected objects may make it more difficult for users to select and interact with a specific object's manipulator and may impede performance.

As an alternative, some applications support the concept of a lead object (see “Lead Objects in 3D Applications”). The lead object has the manipulator as the selection feedback and other selected objects have bounding boxes as the selection feedback (see “Lead Object When Selecting Multiple Objects”).

### Highlight Selection Feedback

In highlight selection feedback, selected objects are highlighted in some way to make them stand out, for example, by brightening the colors of the selected objects or using the same distinct color for all selected objects.

This technique is most appropriate for experiential consumer applications that allow users, for example, to explore an architectural model or a museum. These types of applications typically want to always present a realistic representation of objects in the scene to make the experience immediate. Cluttering the scene with bounding boxes would greatly reduce the realism.

### 3D Selection Feedback Design Guidelines

When designing selection feedback for your 3D application...

- Provide clear feedback on each object as it is selected.

- When using a bounding box for selection feedback, make sure that it's differently shaped or larger than the object itself so that it's readily visible. Using a distinct color for the bounding box is also highly recommended.

- If users don't typically select objects in your application to manipulate them (translate, rotate, scale) or can't manipulate the selected objects, use bounding boxes to indicate the selected objects.

- If users typically select objects in your application to manipulate them, use the manipulator as selection feedback. If your application allows more than one object to be selected at a time, consider displaying the manipulator only on a lead object and bounding boxes on the other selected objects.

- If your application needs to always present a realistic “experience-oriented” representation of objects in the scene, highlight selected objects in some way rather than cluttering the scene with bounding boxes or manipulators.

## Lead Objects in 3D Applications

If your application allows users to select more than one object at a time, consider identifying one of those objects as the lead object (also sometimes called the master object). The lead object is necessary for performing certain object manipulations if more than one object is selected. For example, if you have several objects selected and rotate the lead object, all selected objects rotate around the lead object's center of rotation.

The lead object is clearly distinguished from other objects in the selection. For example as shown in Figure 14-3, if users typically select objects to manipulate them, the manipulator can be used to distinguish the lead object and bounding boxes can be used as selection feedback on other selected objects (see “Manipulator Selection Feedback”).

The rest of this section discusses how to choose the lead object in specific situations.

- “Lead Object When Selecting Multiple Objects”

- “Lead Object During Grouping and Ungrouping”

For more detailed information on the role of the lead object during specific manipulations, see “Object Manipulation for Multiple Selected 3D Objects” in Chapter 15.

### Lead Object When Selecting Multiple Objects

If the user clicks to define a selection or <Ctrl>-clicks to add to a selection (see “3D Selection Models”), the object just added to the selection becomes the lead object. Having the last object selected be the lead object differs from the standard OSF/Motif guidelines of having the lead or “anchor” be the first object selected regardless of how many objects are later added to the selection.

This difference between the 2D-oriented OSF/Motif guidelines and these 3D guidelines is necessary because it allows users to quickly change the lead object in a 3D application. For example, to change the lead object to one that's currently not selected, a user can use click or <Ctrl>-click to select that object. To change the lead object to one that's already selected, the user can click or <Ctrl>-click twice on the object: the first time to deselect it and the second time to make it the most recently selected object.

Figure 14-3. Selection Feedback: Lead Object Has Manipulator.

In some situations, users may add multiple objects to the current selection without actually clicking on the individual objects. For example, a user may select several objects using sweep selection (see “3D Selection Models”) or choose a “Select All” menu command to select all objects in a scene. Alternatively, a user may import a grouped object, place it in the scene, then ungroup the collection, leading to the selection of all objects that were previously grouped (see “Lead Object During Grouping and Ungrouping”). In these situations, make the lead object the one that's closest to the camera and closest to the middle of the viewing window.

When the user deselects the lead object, move back through the previous lead objects making the most recent lead object that's still selected the new lead object.

### Lead Object During Grouping and Ungrouping

If the user groups a collection of objects, the group becomes a single selected object. Since the group is also considered to be the last selected object, it becomes the lead object. All selection feedback is removed from the individual objects in the group and the selection feedback is displayed only for the group.

Figure 14-4. Grouped Collection of Objects With Manipulator.

When the user ungroups a grouped collection of objects, for example, by selecting the group and choosing an Ungroup command, each object in that group becomes selected. The object from the group that's closest to the camera and closest to the middle of the viewing window becomes the lead object. Figure 14-4 shows a grouped collection of objects and Figure 14-5 shows the same group ungrouped. After ungrouping, the knight is the lead object because it's closest to the camera and closest to the middle of the viewing window. In this example, the lead object uses the manipulator to distinguish it from other selected objects.

Figure 14-5. Ungrouped Collection of Objects (Knight Is Lead Object)

### Lead Object Design Guidelines for 3D Applications

When designing the selection user interface for your 3D application...

- If your application allows users to select more than one object at a time, consider identifying one of those objects as the lead object.

- Clearly distinguish the lead object from other selected objects:

- If users typically select objects to manipulate them, consider making this distinction by displaying the manipulator only on the lead object and a bounding box on all other selected objects.

- Otherwise, if there are manipulators or bounding boxes on all selected objects, distinguish the lead object another way (color, full manipulator instead of partial, and so on.).

- If the user clicks to define a selection or <Ctrl>-clicks to add to a selection, make the lead object the last object selected. This allows users to change the lead object using click or <Ctrl>-click on an object that's currently not selected, or using <Ctrl>-click twice on a currently selected object.

- If the user employs a single action such as a sweep selection to select multiple objects at the same time, make the lead object the one that's closest to the camera and closest to the middle of the viewing window.

- When the user deselects the lead object, move back through the previous lead objects making the most recent lead object that's still selected the new lead object.

- If the user groups a collection of objects, make the group the new lead object.

- When the user ungroups a grouped collection of objects, each object that was in the group becomes selected, and the object from the group that's closest to the camera and closest to the middle of the viewing window becomes the new lead object.

Prev | Table of Contents | Next
Chapter 13. Interactive Viewing of 3D Objects |  | Chapter 15. Manipulating 3D Objects