HSelectionSet

class HSelectionSet

The HSelectionSet class manages a list of selected items.

HSelectionSet creates and stores a list of HOOPS geometric primitives or segments that are defined by operators which use the HOOPS routine HC_Compute_Selection. The class supports adding, removing individual and multiple items from the list. It encapsulates the logic used to check whether an item is already selected. Items that are selected (those in the list) are highlighted in the scene. HSelectionSet can be easily extended to support control of highlight mode and style (for example, color, lineweight, boundingbox style, or 2d_quickmoved geometry).

Index

Methods

Variables

Methods

virtual void HSelectionSet::UpdateTransparency(bool force_flush = false)

protected virtual

Used internally to update the transparency used in inverse transparency highlighting

Parameters

force_flush: If true, the transparency will be removed even if there are still selected items.
HSelectionSet::HSelectionSet(HBaseView *view, bool bReferenceSelection = false)

Construct an HSelectionSet object.

virtual HSelectionSet::~HSelectionSet()

virtual

virtual void HSelectionSet::Init()

virtual

Initializes the selection list and updates all selection attributes in the associated view.

virtual void HSelectionSet::Select(HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message = false)

virtual

Adds the item identified by ‘key’ to the selection list. If the item is geometry, that geometry is moved to a highlight segment (temporary segment with new attributes). If the item is a segment, the segment’s attributes are directly modified.

This method Selects a specific instance of a segment/geometric-primitive. This instance selection is necessary if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected (so that the item will highlight/dehighlight in 1 view rather than all views) If selection on a particular instance is not necessary, then set num_include_keys to 0, and set include_keys to NULL

If this method is overloaded, then the matching DeSelect and IsSelected methods should also be overloaded.

Parameters

key: The key of the item to add.

num_include_keys: The number of include keys in the path upto the driver key.

include_keys: An array of include keys.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::Select(HSelectionItem *new_sel, bool emit_message = false)

virtual

Adds a custom selection item to the selection list. If one of the standard selection items is to be used, there is no compelling reason to use this function. Rather it is offered as a way of getting derived selection items into the selection list and having them behave in a natural way without violating the encapsulation of the HSelectionSet.

Very little work will be done with the selection item. You can expect to have its time stamp set and its Highlight() function called.

Parameters

new_sel: A pointer to a selection item.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::SelectRegion(HShellObject const &oShell, int num_include_keys, HC_KEY include_keys[], int region, bool emit_message)

virtual

Adds a region of a shell identified by ‘key’ to the selection list.

This method Selects a specific instance of a segment/geometric-primitive. This instance selection is necessary if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected (so that the item will highlight/dehighlight in 1 view rather than all views) If selection on a particular instance is not necessary, then set num_include_keys to 0, and set include_keys to NULL

If this method is overloaded, then the matching DeSelect method should also be overloaded.

Parameters

oShell: The HShellObject to which the region belongs.

num_include_keys: The number of include keys in the path upto the driver key

include_keys: An array of include keys

region: The region in the shell to select

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::SelectSubentity(HC_KEY key, int num_include_keys, HC_KEY include_keys[], int count, int const faces[] = 0, int const vertex1[] = 0, int const vertex2[] = 0, bool emit_message = false)

virtual

Adds the geometry identified by ‘key’ to the selection list and highlights the indicated sub-elements.

This method selects specific sub-elements of a piece of geometry, usually a shell or mesh. The first three and final arguments are identical to Select(). The remaining four are typically used passed in from HC_Show_Selection_Elements().

If this method is overloaded, then the matching DeSelect and IsSelected methods should also be overloaded.

Parameters

key: The key of the geometry with sub-elements to be highlighted.

num_include_keys: The number of include keys in the path up to the driver key.

include_keys: An array of include keys.

count: The number of entries in the faces, vertex1, and vertex2 arrays. Typically the faces array is shorter than either vertex array. This is perfectly acceptable. In this case, simply pad the remainder of the array with -1.

faces: The face numbers to be highlighted. Each one of these represents a face in the geometry associated with key.

vertex1: Array of indices into the points array of the geometry specified by key. Each of these indices represents a vertex to be highlighted.

vertex2: Array of indices into the points array of the geometry specified by key. Each one of these indices represents a point that, when paired with the corresponding point in vertex1 array, represents an edge to be highlighted.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::Select(HC_KEY key, char const *segpath, HC_KEY include_key, HC_KEY includer_key, bool emit_message = false)

virtual

Deprecated. This method has been replaced by the variant that accepts arguments for number of include keys (num_include_keys) and list of include keys (include_keys) Adds the key of an item to the selection list. If the item is geometry, that geometry is moved to a highlight segment (temporary segment with new attributes). If a segment, the segment’s attributes are directly modified.

Parameters

key: The key of the item to add.

segpath: The full name of the segment. Passed by reference.

include_key: The key to the include segment that owns geometry in the scene.

includer_key: The key to the segment in which ‘include_segment’ has been included.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::DeSelect(HC_KEY key, bool emit_message = false)

virtual

Removes all items identified by ‘key’ from the selection list and modifies those item’s attributes so that they are no longer highlighted. Note that there can be multiple items identified by ‘key’ in the selection list, but with each item representing a different ‘selection instance’ of that item. For example, there might be 4 views of a model, and a particular item is selected in 2 of the views.

If it is desirable to DeSelect a single particular instance of an item, then call the DeSelect variant that accepts arguments for number of include keys (num_include_keys) and list of include keys (include_keys) to identified the specific view.

Parameters

key: The HOOPS key to the item to be deselected.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::DeSelect(HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message = false)

virtual

Removes an item from a list and modifies that item’s attributes so that it is no longer highlighted.

This variant DeSelects a specific instance of a segment/geometric-primitive (typically, this would be desirable if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected. In other words, use this method to deselect a given item for one view instead of the all views that are using it via the include library.

This variant should be overloaded if the matching ‘Select’ method has been overloaded.

Parameters

key: The HOOPS key to the item to be deselected.

num_include_keys: The number of include keys in the path upto the driver key

include_keys: An array of include keys

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::DeSelect(HSelectionItem *remove_sel, bool emit_message = false)

virtual

Removes an item from a list and modifies that item’s attributes so that it is no longer highlighted.

This variant DeSelects a specific selection item in the selection list. Use this variant if you are using a custom selection item or if you have already located the exact item you would like deselected.

Parameters

new_sel: A pointer to a selection item.

emit_message: Indicates that a message should be sent to the emit_message_function

virtual void HSelectionSet::DeSelectRegion(HShellObject const &oShell, int region, bool emit_messag)

virtual

Removes all items identified by ‘key’ from the selection list and modifies those item’s attributes so that they are no longer highlighted. Note that there can be multiple items identified by ‘key’ in the selection list, but with each item representing a different ‘selection instance’ of that item. For example, there might be 4 views of a model, and a particular item is selected in 2 of the views.

If it is desirable to DeSelect a single particular instance of an item, then call the DeSelect variant that accepts arguments for number of include keys (num_include_keys) and list of include keys (include_keys).

Parameters

oShell: The HShellObject to which the region belongs.

region: The region in the shell to deselect

emit_message: Indicates that a message should be sent to the emit_message_function, which (if implemented) would typically use the HOOPS/Net ‘Send’ function to dispatch the message to clients

virtual void HSelectionSet::DeSelectRegion(HShellObject const &oShell, int num_include_keys, HC_KEY include_keys[], int region, bool emit_message = false)

virtual

Removes a region of a shell from the selection list and modifies that item’s attributes so that it is no longer highlighted.

This variant DeSelects a specific instance of a segment/geometric-primitive (typically, this would be desirable if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected). In other words, use this method to DeSelect a given region for a specific view instead of all the views that used this region via the ‘include library.’

This variant should be overloaded if the matching ‘Select’ method has been overloaded.

Parameters

oShell: The HShellObject to which the region belongs.

num_include_keys: The number of include keys in the path upto the driver key

include_keys: An array of include keys

region: The region in the shell to deselect

emit_message: Indicates that a message should be sent to the emit_message_function, which (if implemented) would typically use the HOOPS/Net ‘Send’ function to dispatch the message to clients

virtual void HSelectionSet::DeSelectSubentity(HC_KEY key, int num_include_keys, HC_KEY include_keys[], int count, int const faces[], int const vertex1[], int const vertex2[], bool emit_message = false)

virtual

Removes a some or all of a subentity selection of a shell or meshfrom the selection list and modifies that item’s attributes so that it is no longer highlighted. It does this via a logical subtraction of the indicated elements from each subentity selection in the selection list. For discussion of arguments, see SelectSubentity().

virtual bool HSelectionSet::SelectSubentityOOC(HC_KEY key, int num_include_keys, HC_KEY include_keys[], int count, int const faces[] = 0, int const vertex1[] = 0, int const vertex2[] = 0, bool emit_message = false)

virtual

virtual bool HSelectionSet::DeSelectOOC(HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message = false)

virtual

virtual bool HSelectionSet::HighlightRegionEdges()

virtual

Returns true if the edges in region selection will be highlighted. The default is true.

virtual void HSelectionSet::HighlightRegionEdges(bool yesno)

virtual

Sets whether or not edges in region selection will be highlighted.

virtual bool HSelectionSet::HighlightAnnotations()

virtual

Returns true if annotations will be highlighted. The default is true.

virtual void HSelectionSet::HighlightAnnotations(bool yesno)

virtual

Sets whether or MVO annotations will be highlighted.

virtual HRegionEdgeHighlightMode HSelectionSet::HighlightRegionEdgesAutoVisibility()

virtual

Returns the state of the edges in region selection. The default is visible.

virtual void HSelectionSet::HighlightRegionEdgesAutoVisibility(bool yesno)

virtual

Sets whether or not edges in region selection will be visible.

virtual void HSelectionSet::HighlightRegionEdgesAutoVisibility(HRegionEdgeHighlightMode edge_state)

virtual

Sets the state of the edges in region selection.

virtual void HSelectionSet::HighlightRegionFacesAutoVisibility(HRegionFaceHighlightMode face_state)

virtual

Sets the state of the edges in region selection.

virtual HRegionFaceHighlightMode HSelectionSet::HighlightRegionFacesAutoVisibility()

virtual

Returns the state of the edges in region selection. The default is visible.

virtual void HSelectionSet::DeSelectAll()

virtual

Removes all item from a list and modifies those items so that they are no longer highlighted. The base implementation of this method does NOT call the DeSelect method, due to performance concerns. If it is necessary for customized DeSelect logic to be executed for each item, then that should be handled in the overloaded implementation of this method. (The overloaded implementation should loop through the objects similar to the base method’s implementation, and perform custom DeSelect logic on each item as desired.)

virtual bool HSelectionSet::IsSelected(HC_KEY key) const

const virtual

Determines if an item identified by ‘key’ is already in the current selection list.

If it is desirable to check if a particular instance of an item is selected, then call the IsSelected variant that accepts arguments for number of include keys (num_include_keys) and list of include keys (include_keys)

Parameters

key: The HOOPS key to the item to be checked.

Returns

True if the item is already selected, false if not.
virtual bool HSelectionSet::IsSelected(HC_KEY key, int num_include_keys, const HC_KEY include_keys[]) const

const virtual

Determines if a specific selection instance of an item identified by ‘key’ is already in the current selection list.

This variant determines if a specific instance of a segment/geometric-primitive is selected (typically, this would be desirable if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected (so that the item will highlight/dehighlight in 1 view rather than all views).

This variant should be overloaded if the matching Select and DeSelect methods have been overloaded.

Parameters

key: The HOOPS key to the item to be checked.

num_include_keys: The number of include keys in the path upto the driver key.

include_keys: An array of include keys.

Returns

True if the item is already selected, false if not.
virtual bool HSelectionSet::IsSelected(HSelectionItem const *item) const

const virtual

Determines if a specific selection item is already in the current selection list.

This variant determines if the exact HSelectionItem (or derived class) is already in the selection list. It does not examine sub-components to determine if an equivalent item is selected.

This variant should be overloaded if the matching Select and DeSelect methods have been overloaded.

Parameters

item: The HSelectionItem (or derived class) to be searched for.

Returns

True if the item is already selected, false if not.
virtual bool HSelectionSet::IsRegionSelected(HC_KEY key, int num_include_keys, const HC_KEY include_keys[], int region) const

const virtual

Determines if a specific selection instance of a region identified by ‘key’ and ‘region’ is already in the current selection list.

This variant determines if a specific instance of a segment/geometric-primitive is selected (typically, this would be desirable if a driver segment/subsegment with ‘view’ attributes is including a segment in the ‘include library’, and you only want that particular reference of the item to be selected/deselected (so that the item will highlight/dehighlight in 1 view rather than all views).

This variant should be overloaded if the matching Select and DeSelect methods have been overloaded.

Parameters

key: The HOOPS shell key to the item to be checked.

num_include_keys: The number of include keys in the path upto the driver key

include_keys: An array of include keys

region: the region number we’re checking for

Returns

True if the item is already selected, false if not.
virtual bool HSelectionSet::IsHighlightSegment(HC_KEY segment_key) const

const virtual

Determines if the segment key passed is the temporary highlight segment.

Parameters

segment_key: The HOOPS segment key to be checked.

Returns

true if the segment key is a temporary highlight segment
virtual void HSelectionSet::SetSelectionFaceColor(HPixelRGBA &rgba)

virtual

Sets the color to use for selected faces

Parameters

rgba: The color used to highlight selected faces.
virtual void HSelectionSet::SetGrayScale(bool grayScale)

virtual

Use this method to cause the scene to be drawn in grayscale.

Parameters

grayScale: Pass if true if you wish the scene to be drawn in grayscale and false if otherwise.
virtual void HSelectionSet::SetInvisible(bool Invisible)

virtual

Use this method to cause the highlighted item to be invisible.

Parameters

Invisible: Pass if true if you wish the items to beinvisible and false if otherwise.
virtual bool HSelectionSet::GetInvisible()

virtual

Use this method to find out if highlighted items will be invisible.

Returns

True if HOOPS will hide selected items.
virtual void HSelectionSet::SetAllowDisplacement(bool allowDisplacement)

virtual

Use this method to allow or disallow HOOPS to draw selected segments in front of coincident geometry.

virtual bool HSelectionSet::GetAllowDisplacement()

virtual

Use this method to find out if HOOPS will push back coincident geometry and draw selected items in front.

Returns

True if HOOPS will draw selected segments in front of coincident geometry.
virtual HSelList *HSelectionSet::GetSelectionList()

virtual

Returns the current selection list pointer. This function is deprecated and should not be used. To retrieve members from the selection list, use GetAt() instead.

Returns

A HSelList pointer to current selection list.
virtual void HSelectionSet::GetSelectionFaceColor(HPixelRGBA &rgba)

virtual

Returns the current color for selected faces

Parameters

rgba: This method populates this parameter with the color used to highlight selected faces.
virtual void HSelectionSet::SetSelectionEdgeColor(HPixelRGBA &rgb)

virtual

Sets the color to use for selected edges

Parameters

rgb: The color used to highlight selected edges.
virtual void HSelectionSet::GetSelectionEdgeColor(HPixelRGBA &rgba)

virtual

Returns the current color for selected Edges.

Parameters

rgba: This method populates this parameter with the color used to highlight selected edges.
virtual void HSelectionSet::SetSelectionCutEdgeColor(HPixelRGBA &rgb)

virtual

Sets the color to use for selected cutting edges.

Parameters

rgb: The color used to highlight selected cutting edges.
virtual void HSelectionSet::GetSelectionCutEdgeColor(HPixelRGBA &rgba)

virtual

Returns the current color for selected cutting edges.

Parameters

rgba: This method populates this parameter with the color used to highlight selected cutting edges.
virtual void HSelectionSet::SetSelectionCutFaceColor(HPixelRGBA &rgb)

virtual

Sets the color to use for selected cutting faces.

Parameters

rgb: The highlight color for selected cutting faces.
virtual void HSelectionSet::GetSelectionCutFaceColor(HPixelRGBA &rgba)

virtual

Returns the current color for selected cutting faces.

Parameters

rgba: This method populates this parameter with the color used to highlight selected cutting faces.
virtual void HSelectionSet::SetSelectionMarkerColor(HPixelRGBA &rgb)

virtual

Sets the color to use for selected markers.

Parameters

rgb: The highlight color you want to use for selected markers.
virtual void HSelectionSet::GetSelectionMarkerColor(HPixelRGBA &rgba)

virtual

Returns the current color for selected Markers.

Parameters

rgba: The method populates this parameter with the highlight color for selected markers.
virtual void HSelectionSet::SetSelectionEdgeWeight(float weight)

virtual

Sets the weight to use for highlighting selected edges.

Parameters

weight: The edge weight used for highlighting.
virtual float HSelectionSet::GetSelectionEdgeWeight()

virtual

Returns the current edge weight used to highlight selected edges.

Returns

Selection edge weight.
virtual void HSelectionSet::SetSelectionMarkerSize(float size)

virtual

Sets the size to use for selected markers.

Parameters

size: Size of the current marker used for highlighting
virtual float HSelectionSet::GetSelectionMarkerSize()

virtual

Returns the current marker size used to highlight selected markers.

Returns

Selection marker size
virtual HC_KEY HSelectionSet::GetAt(unsigned int index)

virtual

Returns the value of a given list item. Note: if it is important that the list order be the same as the selection order, call SetSortSelectionList first.

Parameters

index: The index into the list.

Returns

The item at a given offset within the list. Returns INVALID_KEY if no item is found.
virtual bool HSelectionSet::GetAll(HC_KEY out_array[])

virtual

Fills the keys of the selection list in to an array. Note: if it is important that the list order be the same as the selection order, call SetSortSelectionList first.

Parameters

out_array: A key array that is pre-sized to receive all the selection keys.

Returns

This returns true if it succeeds or false if it fails.
HSelectionItem const *HSelectionSet::GetSelectionItemAt(unsigned int index)

Returns the selection item object pointer at the given offset.

Parameters

index: The index into the list.

Returns

The item at a given offset within the list. Returns 0, if no item is found.
HSelectionItem const *HSelectionSet::GetSelectionItem(HC_KEY key)

Returns the selection item object pointer with the given key.

Parameters

key: The key of the selection item you are interested in.

Returns

The item with the given key within the list. Returns 0, if no item is found.
unsigned int HSelectionSet::GetSize() const

const

Returns

The length of the current selection list.
virtual void HSelectionSet::Reset()

virtual

Resets the selection list length to zero.

virtual bool HSelectionSet::DeleteSelection(bool emit_message = false)

virtual

Deletes all the items currently selected.

Parameters

emit_message: Indicates that a message should be sent to the emit_message_function, which (if implemented) would typically use the HOOPS/Net ‘Send’ function to dispatch the message to clients.

Returns

True if the currently selected items were successfully deleted.
HC_KEY HSelectionSet::GetHighlightStyle() const

const

Returns the key to style segment which is being used to highlight the selection items.

Returns

HC_KEY to highlight style segment.
void HSelectionSet::SetHighlightStyle(HC_KEY key)
char const *HSelectionSet::GetHighlightStyleName() const

const

bool HSelectionSet::DeInstance(HSelectionItem *sel_item)

If the selected item is a shared segment or entity, this method will make a copy of it so that it is not shared anymore. Use this method when you want to physically modify the selection (delete, transform, color) and, at the same time, only affect the selected entity (even if it is shared). Once the method is finished, the sel_item will be the selection item itself which with the newly changed data. Using GetKey function, you can access the new key to de-instanced segment/entity. The function will copy every segment that is include from top (except for the topmost which is assumed to be model segment included by view). NOTE:

  1. This will change the segment hierarchy of the model and hence will update any other selection made.
  2. The selection item has to be a part of current selection list to be able to de-instance. sel_item The HSelectionItem item you wish to deinstance.

Parameters

sel_item: The HSelectionItem item you wish to deinstance.

Returns

True if successful and false if otherwise.
bool HSelectionSet::DeInstance(unsigned int index)

Deinstances the item located at index in the selection list.

Parameters

index: the index in the selection list of the item you wish to deinstance.

Returns

True if successful and false if otherwise.
virtual bool HSelectionSet::GetSubwindowPenetration()

virtual

Returns

A boolean indicating whether the HSelectionSet allows Selection through Subwindows. Note that this behavior is undefined in conjunction with reference selection. Default setting is false.
virtual void HSelectionSet::SetSubwindowPenetration(bool allow)

virtual

Sets the entity selection mode for the HSelectionSet.

Parameters

allow: If true, then Selection through Subwindows is enabled. Otherwise, subwindows block the selection from walking the tree below them. Note that this behavior is undefined in conjunction with reference selection. Default setting is false.
virtual bool HSelectionSet::GetAllowSubentitySelection()

virtual

Returns

A boolean indicating whether the HSelectionSet allows Subentity Selection.
virtual void HSelectionSet::SetAllowSubentitySelection(bool allow)

virtual

Sets the subentity selection mode for the HSelectionSet.

Parameters

allow: If true, then Subentity Selection is enabled.
virtual HSelectLevel HSelectionSet::GetSelectionLevel() const

const virtual

Returns

An enumeration indicating whether the HSelectionSet allows segment, entity, region, or subentity selection.
virtual void HSelectionSet::SetSelectionLevel(HSelectLevel level)

virtual

Parameters

level: An enumeration indicating whether the HSelectionSet should allow segment, entity, region, or subentity selection.
virtual bool HSelectionSet::GetAllowEntitySelection()

virtual

Returns

A boolean indicating whether the HSelectionSet allows Entity Selection.
virtual void HSelectionSet::SetAllowEntitySelection(bool allow)

virtual

Sets the entity selection mode for the HSelectionSet.

Parameters

allow: If true, then Entity Selection is enabled.
virtual bool HSelectionSet::GetAllowRegionSelection() const

const virtual

Returns

A boolean indicating whether the HSelectionSet allows Region Selection.
virtual void HSelectionSet::SetAllowRegionSelection(bool allow)

virtual

Call this method to enable or disable region selection mode for the HSelectionSet.

Parameters

allow: If true, then Region Selection is allowed.
void HSelectionSet::RegisterHighlightSeg(HC_KEY seg_key)

Used by HSelectionItem to add a segment to the list when it has been highlighted.

Parameters

segment_key: The HOOPS segment key to be registered.
void HSelectionSet::UnRegisterHighlightSeg(HC_KEY seg_key)

Used by HSelectionItem removed segment from the list once it has been unhighlighted.

Parameters

segment_key: The HOOPS segment key to be unregistered.
virtual HSelectionHighlightMode const HSelectionSet::GetHighlightMode()

virtual

Returns

The selection highlight mode.
virtual void HSelectionSet::SetHighlightMode(HSelectionHighlightMode m)

virtual

This function determines the behavior when an object is selected.

Setting the mode to HighlightDefault is the classical HOOPS behavior whereby highlighting is achieved by using a conditional include to modify the color of the actual geometry. This is very robust and time-tested, but has the disadvantage of modifying the actual segment structure. As a result, a full update is typically required and, if the static model is being used, it will need to be regenerated.

HighlightQuickmoves, on the other hand, uses quick moves to draw another copy of the selected geometry over the top of the existing one. This has two benefits. It does not require a full update, improving behavior on large models. Further, because it does not modify the segment structure, static models do not need to be regenerated.

InverseTransparency uses the same mechanics as HighlightDefault and inherits all its benefits and drawbacks to achieve a very different effect. When an object is selected with this highlight mode, the selected object does not change. Instead the rest of the model becomes transparent (use SetHighlightTransparency() to set how transparent). Use of this mode has the largest performance implications. Not only does it modify the segment structure, but it also creates a potentially large amount of transparent geometry which can be computationally intensive to render.

ColoredInverseTransparency is identical to InverseTransparency highlighting detailed above except the selected object(s) are highlighted in the highlight color.

Parameters

m: the new highlight mode (see the SelectionHighlightMode enumeration for possible values)
virtual void HSelectionSet::SetHighlightTransparency(float trans)

virtual

Sets the transparency level of unselected geometry in inverse transparency selection mode.

virtual HC_KEY HSelectionSet::GetSelectionSegment()

virtual

Returns the key to the selection segment

Returns

key to selection segment.
void HSelectionSet::ToggleHighlightStyle()

Unhighlights all selection items, toggles the highlight style between quickmoves and conditional highlighting, and re-highlights them all in the new style. This method is deprecated. It has no effect if the highlight mode is not either quickmoves or conditional.

virtual bool HSelectionSet::GetIsSelection(HC_KEY key)

virtual

Returns true if the key is the selection segment or a child of it

Parameters

key: key of the object to be queried.
virtual bool HSelectionSet::GetReferenceSelection() const

const virtual

Returns true if either inverse transparency or quickmoves highlighting are being used.reference selection is currently being used.

Returns

the current reference selection state.
virtual void HSelectionSet::SetReferenceSelection(bool ref_sel)

virtual

This function is deprecated. The correct way to do this is to call SetHighlightMode(HighlightQuickmoves) or SetHighlightMode(HighlightDefault).

Parameters

ref_sel: the new reference selection state.
void HSelectionSet::SetUseDefinedHighlight(bool use_defined_highlight)

If this is set then HighlightQuickmoves will use 3dgs built in defined highlighting rather than MVO highlighting code.

Parameters

use_defined_highlight: the new use defined highlight state.
bool HSelectionSet::GetUseDefinedHighlight()

Returns true if 3dgs built in defined highlighting is going to be used for HighlightQuickmoves.

Returns

the current use defined highlight state.
virtual void HSelectionSet::SetReferenceSelectionType(HRefSelType type)

virtual

Overwrites the default quick moves type (spriting) with type

Parameters

type: the new reference selection type.
virtual HRefSelType HSelectionSet::GetReferenceSelectionType()

virtual

virtual void HSelectionSet::UpdateHighlightStyle()

virtual

Updates all the attributes of the highlight style segment from the members

HVHashPShowCache *HSelectionSet::GetPShowCache()

Gets a pointer to the PShow cache hash table used for improving performance of area selection.

Returns

PShow cache hash pointer
void HSelectionSet::SetPShowCache(HVHashPShowCache *new_cache)

Replaces the current PShow cache (if any) with a new one. If one already exists, FlushPShowCache() should be called before replacing it.

Parameters

new_cache: the new cache hash table to use
void HSelectionSet::FlushPShowCache()

Discards the current PShow cache hash and frees all the elements.

void HSelectionSet::UpdateHighlighting()

Updates all reference highlighting. This can be slow with large selection sets.

HBaseView *HSelectionSet::GetView()
void HSelectionSet::SetSortSelectionList(bool sort)

If set, the selection list will be sorted before it is returned via GetSelectionList()

bool HSelectionSet::GetSortSelectionList()

If set, the selection list will be sorted before it is returned via GetSelectionList()

virtual bool HSelectionSet::GetSubentityFaceSelection()

virtual

Will faces be highlighted if subentity selection is enabled?

virtual void HSelectionSet::SetSubentityFaceSelection(bool select)

virtual

Set whether faces be highlighted if subentity selection is enabled.

virtual bool HSelectionSet::GetSubentityEdgeSelection()

virtual

Will edges be highlighted if subentity selection is enabled?

virtual void HSelectionSet::SetSubentityEdgeSelection(bool select)

virtual

Set whether edges be highlighted if subentity selection is enabled.

virtual bool HSelectionSet::GetSubentityVertexSelection()

virtual

Will vertices be highlighted if subentity selection is enabled?

virtual void HSelectionSet::SetSubentityVertexSelection(bool select)

virtual

Set whether vertices be highlighted if subentity selection is enabled.

virtual void HSelectionSet::SetAllowSubentityDeselection(bool allow)

virtual

Alias for SetSubentityTracking().

virtual bool HSelectionSet::GetAllowSubentityDeselection()

virtual

Alias for GetSubentityTracking().

virtual void HSelectionSet::SetSubentityTracking(bool allow)

virtual

This method controls whether subentity selections can be deleted or partially deselected. By default this is set to true which means selection information for the source geometry will be retained. If this is set to false, no deletion can occur and subentity selections can only be de-selected as a whole. Doing so does, however, reduce memory requirements which can be potentially large, depending on the size of the source geometry and the number of subentity selections.

virtual bool HSelectionSet::GetSubentityTracking()

virtual

Returns whether subentity selections can be deleted or partially deselected. See SetSubentityTracking() for details.

void HSelectionSet::GetSelectionBounding(HPoint *minimum, HPoint *maximum) const

const

Retrieves a bounding box for the currently selected geometry in world space.

Parameters

minimum: the minimum values for the x, y, and z components of the bounding box.

maximum: the maximum values for the x, y, and z components of the bounding box.

virtual void HSelectionSet::SetSelectWillNotify(bool notify)

virtual

Parameters

allow: If true, then Select() will notify is enabled.
virtual bool HSelectionSet::GetSelectWillNotify() const

const virtual

Returns

A boolean indicating whether Select() will notify.
int HSelectionSet::GetAttrLookupID(char const *attribute_string)
HSelectionSegmentConditionInfo *HSelectionSet::GetSelectionSegmentConditionInfo()
HConditionStyleKeyInfoHash *HSelectionSet::GetConditionStyleKeyInfo()
Segment_Key_Set &HSelectionSet::highlighted_segments()
void HSelectionSet::BuildPath(int &num_include_keys, HC_KEY *&include_keys, HC_KEY *&old_include_keys)

private

void HSelectionSet::HoopsRemove(HC_KEY key)

private

void HSelectionSet::DeselectSegment(HC_KEY key, char const *keytype)

private

void HSelectionSet::DeselectGeometry(HC_KEY key)

private

bool HSelectionSet::is_selected(HC_KEY key) const

private const

common implementation function for overloaded IsSelected(HC_KEY) variants

void HSelectionSet::ensure_is_segment(HC_KEY &key) const

private const

Variables

HBaseView *HSelectionSet::m_pView

protected

The HOOPS HBaseView associated with to this HSelectionSet.

HSelList *HSelectionSet::m_pSelItemsList

protected

HSelList

The list of selected HOOPS entities (HSelectionItem pointers).

struct vhash_s *HSelectionSet::m_pHighlightSegsHash

protected

struct vhash_s

The list of highlighted segment keys.

HC_KEY HSelectionSet::m_SelectionSegment

protected

HC_KEY

The key of the reference selection segment.

HC_KEY HSelectionSet::m_TransparencyStyle

protected

HC_KEY

The key to a style used in inverse transparency highlighting.

HPixelRGBA HSelectionSet::m_selectedFaceColor

protected

The color used for selected faces.

HPixelRGBA HSelectionSet::m_selectedEdgeColor

protected

The color used for selected edges.

HPixelRGBA HSelectionSet::m_selectedCutEdgeColor

protected

The color used for selected cut edges.

HPixelRGBA HSelectionSet::m_selectedCutFaceColor

protected

The color used for selected cut faces.

HPixelRGBA HSelectionSet::m_selectedMarkerColor

protected

The color used for selected markers.

float HSelectionSet::m_fselectedEdgeWeight

protected

float

The line thickness used for selected edges.

float HSelectionSet::m_fselectedMarkerSize

protected

float

The marker size used for selected markers.

bool HSelectionSet::m_bForceGrayScale

protected

bool

This flag indicating whether to use gray scale selection.

bool HSelectionSet::m_bForceInvisible

protected

bool

This flag indicating whether to make the selected items invisible.

bool HSelectionSet::m_bAllowDisplacement

protected

bool

This indicates whether selected segments should be drawn in front of coincident geometry.

bool HSelectionSet::m_bHighlightRegionEdges

protected

bool

This indicates whether edges in a region should be highlighted.

bool HSelectionSet::m_bHighlightAnnotations

protected

bool

This indicates whether MVO annotations should be highlighted.

HRegionEdgeHighlightMode HSelectionSet::m_bHighlightRegionEdgesAutoVisibility

protected

HRegionEdgeHighlightMode

This indicates whether edges in a region should be automatically made visible when highlighted.

HRegionFaceHighlightMode HSelectionSet::m_bHighlightRegionFacesAutoVisibility

protected

HRegionFaceHighlightMode

This indicates whether faces in a region should be automatically made visible when highlighted.

HSelectionHighlightMode HSelectionSet::m_HighlightMode

protected

Stores the current highlighting mode.

float HSelectionSet::m_fTransmission

protected

float

the transmission value used in Inverse Transparency highlighting

bool HSelectionSet::m_bSortSelectionList

protected

bool

If this is set, the selection list will be sorted before returning it.

bool HSelectionSet::m_bNotify

protected

bool

If this is set Select() will send HSignalSelected for each item.

bool HSelectionSet::m_bUseDefinedHighlight

protected

bool
Segment_Key_Set *HSelectionSet::m_highlighted_segments

protected

Segment_Key_Set
int HSelectionSet::m_AttrID

private

int
struct vhash_s *HSelectionSet::m_pAttrLookupHash

private

struct vhash_s
HSelectionSegmentConditionInfo *HSelectionSet::m_pSelectionSegmentConditionInfo

private

HConditionStyleKeyInfoHash *HSelectionSet::m_pConditionStyleKeyInfoHash

private

HVHashPShowCache *HSelectionSet::m_pshow_cache

private

HSelHash *HSelectionSet::m_selected_hash

private

HSelHash
float HSelectionSet::m_hash_last_updated

private

float
float HSelectionSet::m_list_last_updated

private

float
HRefSelType HSelectionSet::m_quickmoves_type

private

HC_KEY HSelectionSet::m_keyHighlightStyle

private

HC_KEY
char HSelectionSet::m_keyHighlightStyleName[32]

private

char
HSelectLevel HSelectionSet::m_selection_level

private

bool HSelectionSet::m_subentity_face

private

bool
bool HSelectionSet::m_subentity_edge

private

bool
bool HSelectionSet::m_subentity_vertex

private

bool
bool HSelectionSet::m_subentity_maintain_maps

private

bool
bool HSelectionSet::m_bSubwindowPenetration

private

bool
bool HSelectionSet::m_currently_in_DeleteSelection

private

bool