General Information about Name Sets


For an overview and for a list of all Name Set functions, see Name Sets.

A name set is a PEX resource which maintains a set of identifiers called names. A name set allows conditional treatment of output primitives during rendering, picking, and structure searching operations.

Search contexts and pick measures also have attributes that are name set resource identifiers.

Renderer resources and PHIGS workstation resources each have a name set attribute considered as the current name set. You cannot directly modify the contents of the current name set nor query the contents in the PHIGS workstation resource. The name set used in a renderer resource is set through the pipeline context resource that provides the initial state for the renderer. There are output commands that cause identifiers to be added to or removed from this name set. Thus, as a structure traversal or series of output commands is executed, the contents of the current name set can fluctuate.

Special filters are built into renderer, search context, pick measure, and PHIGS workstation resources. These filters consist of a pair of name set resource identifiers, one of which is considered as the inclusion set and the other which is considered as the exclusion set. Both are provided because sometimes it is easier to specify what passes the filter test, while other times it is easier to specify what does not pass the filter test.

The filtering criteria is successfully met if, when an output primitive command is executed, the inclusion name set contains at least one name contained in the current name set, and the exclusion name set does not contain any names in the current name set. If a name is contained in both the inclusion set and the exclusion set, then the name is considered to be only in the exclusion set.

Conditional operations that are supported with name sets include highlighting, treating primitives as though they were invisible, and ignoring certain primitives when searching through a structure network or performing a picking operation.

The user can render the scene in different ways by modifying the highlighting inclusion and exclusion sets and retraversing the structure network. If the highlighting inclusion and exclusion sets are empty when the structure network is traversed, then the scene is drawn as normal. If the user invokes PEXChangeNameSet to add "antique" to the highlighting inclusion set, then all of the "antique" objects are highlighted the next time the structure network is traversed. If the user adds "wooden" to the highlighting inclusion set, then all "wooden" objects and all "antique" objects are highlighted. If "wooden" is added to the highlighting exclusion set instead, then all objects that are "antique" but not "wooden" are highlighted.

The only attribute in a name set is a list ofnames. For performance reasons, the implementation may limit the set of available names. To determine the number of names available, invoke the PEXGetImpDepConstants function. PEXlib includes functions to create, copy, free, query, and modify name sets.