Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HSelectionSet Class Reference

The HSelectionSet class manages a list of selected items. More...

#include <HSelectionSet.h>

List of all members.

Public Member Functions

bool DeInstance (HSelectionItem *sel_item)
bool DeInstance (unsigned int index)
virtual bool DeleteSelection (bool emit_message=false)
virtual void DeSelect (HC_KEY key, bool emit_message=false)
virtual void DeSelect (HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message=false)
virtual void DeSelect (HSelectionItem *remove_sel, bool emit_message=false)
virtual void DeSelectAll ()
virtual bool DeSelectOOC (HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message=false)
virtual void DeSelectRegion (HShellObject const &oShell, int region, bool emit_messag)
virtual void DeSelectRegion (HShellObject const &oShell, int num_include_keys, HC_KEY include_keys[], int region, bool emit_message=false)
virtual void DeSelectSubentity (HC_KEY key, int num_include_keys, HC_KEY include_keys[], int count, const int faces[], const int vertex1[], const int vertex2[], bool emit_message=false)
void FlushPShowCache ()
virtual bool GetAll (HC_KEY out_array[])
virtual bool GetAllowDisplacement ()
virtual bool GetAllowEntitySelection ()
virtual bool GetAllowRegionSelection () const
virtual bool GetAllowSubentityDeselection ()
virtual bool GetAllowSubentitySelection ()
virtual HC_KEY GetAt (unsigned int index)
int GetAttrLookupID (const char *attribute_string)
HConditionStyleKeyInfoHashGetConditionStyleKeyInfo ()
virtual const
HSelectionHighlightMode 
GetHighlightMode ()
HC_KEY GetHighlightStyle () const
const char * GetHighlightStyleName () const
virtual bool GetInvisible ()
virtual bool GetIsSelection (HC_KEY key)
HVHashPShowCacheGetPShowCache ()
virtual bool GetReferenceSelection () const
virtual HRefSelType GetReferenceSelectionType ()
void GetSelectionBounding (HPoint *minimum, HPoint *maximum) const
virtual void GetSelectionCutEdgeColor (HPixelRGBA &rgba)
virtual void GetSelectionCutFaceColor (HPixelRGBA &rgba)
virtual void GetSelectionEdgeColor (HPixelRGBA &rgba)
virtual float GetSelectionEdgeWeight ()
virtual void GetSelectionFaceColor (HPixelRGBA &rgba)
const HSelectionItemGetSelectionItem (HC_KEY key)
const HSelectionItemGetSelectionItemAt (unsigned int index)
virtual HSelectLevel GetSelectionLevel () const
virtual HSelList * GetSelectionList ()
virtual void GetSelectionMarkerColor (HPixelRGBA &rgba)
virtual float GetSelectionMarkerSize ()
virtual HC_KEY GetSelectionSegment ()
HSelectionSegmentConditionInfoGetSelectionSegmentConditionInfo ()
virtual bool GetSelectWillNotify () const
unsigned int GetSize () const
bool GetSortSelectionList ()
virtual bool GetSubentityEdgeSelection ()
virtual bool GetSubentityFaceSelection ()
virtual bool GetSubentityTracking ()
virtual bool GetSubentityVertexSelection ()
virtual bool GetSubwindowPenetration ()
bool GetUseDefinedHighlight ()
HBaseViewGetView ()
virtual bool HighlightAnnotations ()
virtual void HighlightAnnotations (bool yesno)
virtual bool HighlightRegionEdges ()
virtual void HighlightRegionEdges (bool yesno)
virtual HRegionEdgeHighlightMode HighlightRegionEdgesAutoVisibility ()
virtual void HighlightRegionEdgesAutoVisibility (bool yesno)
virtual void HighlightRegionEdgesAutoVisibility (HRegionEdgeHighlightMode edge_state)
virtual void HighlightRegionFacesAutoVisibility (HRegionFaceHighlightMode face_state)
virtual HRegionFaceHighlightMode HighlightRegionFacesAutoVisibility ()
 HSelectionSet (HBaseView *view, bool bReferenceSelection=false)
virtual void Init ()
virtual bool IsHighlightSegment (HC_KEY segment_key) const
virtual bool IsRegionSelected (HC_KEY key, int num_include_keys, const HC_KEY include_keys[], int region) const
virtual bool IsSelected (HC_KEY key) const
virtual bool IsSelected (HC_KEY key, int num_include_keys, const HC_KEY include_keys[]) const
virtual bool IsSelected (const HSelectionItem *item) const
void RegisterHighlightSeg (HC_KEY seg_key)
virtual void Reset ()
virtual void Select (HC_KEY key, int num_include_keys, HC_KEY include_keys[], bool emit_message=false)
virtual void Select (HSelectionItem *new_sel, bool emit_message=false)
virtual void Select (HC_KEY key, const char *segpath, HC_KEY include_key, HC_KEY includer_key, bool emit_message=false)
virtual void SelectRegion (HShellObject const &oShell, int num_include_keys, HC_KEY include_keys[], int region, bool emit_message)
virtual void SelectSubentity (HC_KEY key, int num_include_keys, HC_KEY include_keys[], int count, const int faces[]=0, const int vertex1[]=0, const int vertex2[]=0, bool emit_message=false)
virtual bool 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 void SetAllowDisplacement (bool allowDisplacement)
virtual void SetAllowEntitySelection (bool allow)
virtual void SetAllowRegionSelection (bool allow)
virtual void SetAllowSubentityDeselection (bool allow)
virtual void SetAllowSubentitySelection (bool allow)
virtual void SetGrayScale (bool grayScale)
virtual void SetHighlightMode (HSelectionHighlightMode m)
void SetHighlightStyle (HC_KEY key)
virtual void SetHighlightTransparency (float trans)
virtual void SetInvisible (bool Invisible)
void SetPShowCache (HVHashPShowCache *new_cache)
virtual void SetReferenceSelection (bool ref_sel)
virtual void SetReferenceSelectionType (HRefSelType type)
virtual void SetSelectionCutEdgeColor (HPixelRGBA &rgb)
virtual void SetSelectionCutFaceColor (HPixelRGBA &rgb)
virtual void SetSelectionEdgeColor (HPixelRGBA &rgb)
virtual void SetSelectionEdgeWeight (float weight)
virtual void SetSelectionFaceColor (HPixelRGBA &rgba)
virtual void SetSelectionLevel (HSelectLevel level)
virtual void SetSelectionMarkerColor (HPixelRGBA &rgb)
virtual void SetSelectionMarkerSize (float size)
virtual void SetSelectWillNotify (bool notify)
void SetSortSelectionList (bool sort)
virtual void SetSubentityEdgeSelection (bool select)
virtual void SetSubentityFaceSelection (bool select)
virtual void SetSubentityTracking (bool allow)
virtual void SetSubentityVertexSelection (bool select)
virtual void SetSubwindowPenetration (bool allow)
void SetUseDefinedHighlight (bool use_defined_highlight)
void ToggleHighlightStyle ()
void UnRegisterHighlightSeg (HC_KEY seg_key)
void UpdateHighlighting ()
virtual void UpdateHighlightStyle ()

Protected Member Functions

virtual void UpdateTransparency (bool force_flush=false)

Protected Attributes

bool m_bAllowDisplacement
 This indicates whether selected segments should be drawn in front of coincident geometry.
bool m_bForceGrayScale
 This flag indicating whether to use gray scale selection.
bool m_bForceInvisible
 This flag indicating whether to make the selected items invisible.
bool m_bHighlightAnnotations
 This indicates whether MVO annotations should be highlighted.
bool m_bHighlightRegionEdges
 This indicates whether edges in a region should be highlighted.
HRegionEdgeHighlightMode m_bHighlightRegionEdgesAutoVisibility
 This indicates whether edges in a region should be automatically made visible when highlighted.
HRegionFaceHighlightMode m_bHighlightRegionFacesAutoVisibility
 This indicates whether faces in a region should be automatically made visible when highlighted.
bool m_bNotify
 If this is set Select() will send HSignalSelected for each item.
bool m_bSortSelectionList
 If this is set, the selection list will be sorted before returning it.
bool m_bUseDefinedHighlight
float m_fselectedEdgeWeight
 The line thickness used for selected edges.
float m_fselectedMarkerSize
 The marker size used for selected markers.
float m_fTransmission
 the transmission value used in Inverse Transparency highlighting
HSelectionHighlightMode m_HighlightMode
 Stores the current highlighting mode.
struct vhash_s * m_pHighlightSegsHash
 The list of highlighted segment keys.
HSelList * m_pSelItemsList
 The list of selected HOOPS entities (HSelectionItem pointers).
HBaseViewm_pView
 The HOOPS HBaseView associated with to this HSelectionSet.
HPixelRGBA m_selectedCutEdgeColor
 The color used for selected cut edges.
HPixelRGBA m_selectedCutFaceColor
 The color used for selected cut faces.
HPixelRGBA m_selectedEdgeColor
 The color used for selected edges.
HPixelRGBA m_selectedFaceColor
 The color used for selected faces.
HPixelRGBA m_selectedMarkerColor
 The color used for selected markers.
HC_KEY m_SelectionSegment
 The key of the reference selection segment.
HC_KEY m_TransparencyStyle
 The key to a style used in inverse transparency highlighting.

Friends

class HBaseView

Detailed Description

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).


Constructor & Destructor Documentation

HSelectionSet::HSelectionSet ( HBaseView view,
bool  bReferenceSelection = false 
)

Construct an HSelectionSet object.


Member Function Documentation

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.

Parameters:
sel_itemThe 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:
indexthe index in the selection list of the item you wish to deinstance.
Returns:
True if successful and false if otherwise.
virtual bool HSelectionSet::DeleteSelection ( bool  emit_message = false) [virtual]

Deletes all the items currently selected.

Parameters:
emit_messageIndicates 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.
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:
keyThe HOOPS key to the item to be deselected.
emit_messageIndicates 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::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:
keyThe HOOPS key to the item to be deselected.
num_include_keysThe number of include keys in the path upto the driver key
include_keysAn array of include keys
emit_messageIndicates 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::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_selA pointer to a selection item.
emit_messageIndicates 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::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 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:
oShellThe HShellObject to which the region belongs.
regionThe region in the shell to deselect
emit_messageIndicates 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:
oShellThe HShellObject to which the region belongs.
num_include_keysThe number of include keys in the path upto the driver key
include_keysAn array of include keys
regionThe region in the shell to deselect
emit_messageIndicates 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,
const int  faces[],
const int  vertex1[],
const int  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().

void HSelectionSet::FlushPShowCache ( )

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

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_arrayA key array that is pre-sized to receive all the selection keys.
Returns:
This returns true if it succeeds or false if it fails.
virtual bool HSelectionSet::GetAllowDisplacement ( ) [inline, 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 bool HSelectionSet::GetAllowEntitySelection ( ) [inline, virtual]
Returns:
A boolean indicating whether the HSelectionSet allows Entity Selection.

References HSelectEntity.

virtual bool HSelectionSet::GetAllowRegionSelection ( ) const [inline, virtual]
Returns:
A boolean indicating whether the HSelectionSet allows Region Selection.

References HSelectRegion.

virtual bool HSelectionSet::GetAllowSubentityDeselection ( ) [inline, virtual]
virtual bool HSelectionSet::GetAllowSubentitySelection ( ) [inline, virtual]
Returns:
A boolean indicating whether the HSelectionSet allows Subentity Selection.

References HSelectSubentity.

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:
indexThe index into the list.
Returns:
The item at a given offset within the list. Returns INVALID_KEY if no item is found.
virtual const HSelectionHighlightMode HSelectionSet::GetHighlightMode ( ) [inline, virtual]
Returns:
The selection highlight mode.
HC_KEY HSelectionSet::GetHighlightStyle ( ) const [inline]

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

Returns:
HC_KEY to highlight style segment.

References HC_KEY.

virtual bool HSelectionSet::GetInvisible ( ) [inline, virtual]

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

Returns:
True if HOOPS will hide selected items.
virtual bool HSelectionSet::GetIsSelection ( HC_KEY  key) [virtual]

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

Parameters:
keykey of the object to be queried.
HVHashPShowCache* HSelectionSet::GetPShowCache ( ) [inline]

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

Returns:
PShow cache hash pointer
virtual bool HSelectionSet::GetReferenceSelection ( ) const [inline, 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.

References HighlightDefault, and HSelectSubentity.

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

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

Parameters:
minimumthe minimum values for the x, y, and z components of the bounding box.
maximumthe maximum values for the x, y, and z components of the bounding box.
virtual void HSelectionSet::GetSelectionCutEdgeColor ( HPixelRGBA rgba) [inline, virtual]

Returns the current color for selected cutting edges.

Parameters:
rgbaThis method populates this parameter with the color used to highlight selected cutting edges.
virtual void HSelectionSet::GetSelectionCutFaceColor ( HPixelRGBA rgba) [inline, virtual]

Returns the current color for selected cutting faces.

Parameters:
rgbaThis method populates this parameter with the color used to highlight selected cutting faces.
virtual void HSelectionSet::GetSelectionEdgeColor ( HPixelRGBA rgba) [inline, virtual]

Returns the current color for selected Edges.

Parameters:
rgbaThis method populates this parameter with the color used to highlight selected edges.
virtual float HSelectionSet::GetSelectionEdgeWeight ( ) [inline, virtual]

Returns the current edge weight used to highlight selected edges.

Returns:
Selection edge weight.
virtual void HSelectionSet::GetSelectionFaceColor ( HPixelRGBA rgba) [inline, virtual]

Returns the current color for selected faces

Parameters:
rgbaThis method populates this parameter with the color used to highlight selected faces.
const HSelectionItem* HSelectionSet::GetSelectionItem ( HC_KEY  key)

Returns the selection item object pointer with the given key.

Parameters:
keyThe 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.
const HSelectionItem* HSelectionSet::GetSelectionItemAt ( unsigned int  index)

Returns the selection item object pointer at the given offset.

Parameters:
indexThe index into the list.
Returns:
The item at a given offset within the list. Returns 0, if no item is found.
virtual HSelectLevel HSelectionSet::GetSelectionLevel ( ) const [inline, virtual]
Returns:
An enumeration indicating whether the HSelectionSet allows segment, entity, region, or subentity selection.
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::GetSelectionMarkerColor ( HPixelRGBA rgba) [inline, virtual]

Returns the current color for selected Markers.

Parameters:
rgbaThe method populates this parameter with the highlight color for selected markers.
virtual float HSelectionSet::GetSelectionMarkerSize ( ) [inline, virtual]

Returns the current marker size used to highlight selected markers.

Returns:
Selection marker size
virtual HC_KEY HSelectionSet::GetSelectionSegment ( ) [inline, virtual]

Returns the key to the selection segment

Returns:
key to selection segment.

References HC_KEY.

virtual bool HSelectionSet::GetSelectWillNotify ( ) const [inline, virtual]
Returns:
A boolean indicating whether Select() will notify.
unsigned int HSelectionSet::GetSize ( ) const
Returns:
The length of the current selection list.
bool HSelectionSet::GetSortSelectionList ( ) [inline]

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

virtual bool HSelectionSet::GetSubentityEdgeSelection ( ) [inline, virtual]

Will edges be highlighted if subentity selection is enabled?

virtual bool HSelectionSet::GetSubentityFaceSelection ( ) [inline, virtual]

Will faces be highlighted if subentity selection is enabled?

virtual bool HSelectionSet::GetSubentityTracking ( ) [inline, virtual]

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

virtual bool HSelectionSet::GetSubentityVertexSelection ( ) [inline, virtual]

Will vertices be highlighted if subentity selection is enabled?

virtual bool HSelectionSet::GetSubwindowPenetration ( ) [inline, 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.
bool HSelectionSet::GetUseDefinedHighlight ( ) [inline]

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

Returns:
the current use defined highlight state.
virtual bool HSelectionSet::HighlightAnnotations ( ) [inline, virtual]

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

virtual void HSelectionSet::HighlightAnnotations ( bool  yesno) [inline, virtual]

Sets whether or MVO annotations will be highlighted.

virtual bool HSelectionSet::HighlightRegionEdges ( ) [inline, virtual]

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

virtual void HSelectionSet::HighlightRegionEdges ( bool  yesno) [inline, virtual]

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

virtual HRegionEdgeHighlightMode HSelectionSet::HighlightRegionEdgesAutoVisibility ( ) [inline, virtual]

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

virtual void HSelectionSet::HighlightRegionEdgesAutoVisibility ( bool  yesno) [inline, virtual]

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

virtual void HSelectionSet::HighlightRegionEdgesAutoVisibility ( HRegionEdgeHighlightMode  edge_state) [inline, virtual]

Sets the state of the edges in region selection.

virtual void HSelectionSet::HighlightRegionFacesAutoVisibility ( HRegionFaceHighlightMode  face_state) [inline, virtual]

Sets the state of the edges in region selection.

virtual HRegionFaceHighlightMode HSelectionSet::HighlightRegionFacesAutoVisibility ( ) [inline, virtual]

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

virtual void HSelectionSet::Init ( ) [virtual]

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

virtual bool HSelectionSet::IsHighlightSegment ( HC_KEY  segment_key) const [virtual]

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

Parameters:
segment_keyThe HOOPS segment key to be checked.
Returns:
true if the segment key is a temporary highlight segment
virtual bool HSelectionSet::IsRegionSelected ( HC_KEY  key,
int  num_include_keys,
const HC_KEY  include_keys[],
int  region 
) 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:
keyThe HOOPS *shell* key to the item to be checked.
num_include_keysThe number of include keys in the path upto the driver key
include_keysAn array of include keys
regionthe region number we're checking for
Returns:
True if the item is already selected, false if not.
virtual bool HSelectionSet::IsSelected ( HC_KEY  key) 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:
keyThe 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 [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:
keyThe HOOPS key to the item to be checked.
num_include_keysThe number of include keys in the path upto the driver key.
include_keysAn array of include keys.
Returns:
True if the item is already selected, false if not.
virtual bool HSelectionSet::IsSelected ( const HSelectionItem item) 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:
itemThe HSelectionItem (or derived class) to be searched for.
Returns:
True if the item is already selected, false if not.
void HSelectionSet::RegisterHighlightSeg ( HC_KEY  seg_key)

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

Parameters:
segment_keyThe HOOPS segment key to be registered.
virtual void HSelectionSet::Reset ( ) [virtual]

Resets the selection list length to zero.

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:
keyThe key of the item to add.
num_include_keysThe number of include keys in the path upto the driver key.
include_keysAn array of include keys.
emit_messageIndicates 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::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_selA pointer to a selection item.
emit_messageIndicates 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::Select ( HC_KEY  key,
const char *  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:
keyThe key of the item to add.
segpathThe full name of the segment. Passed by reference.
include_keyThe key to the include segment that owns geometry in the scene.
includer_keyThe key to the segment in which 'include_segment' has been included.
emit_messageIndicates 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::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:
oShellThe HShellObject to which the region belongs.
num_include_keysThe number of include keys in the path upto the driver key
include_keysAn array of include keys
regionThe region in the shell to select
emit_messageIndicates 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::SelectSubentity ( HC_KEY  key,
int  num_include_keys,
HC_KEY  include_keys[],
int  count,
const int  faces[] = 0,
const int  vertex1[] = 0,
const int  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:
keyThe key of the geometry with sub-elements to be highlighted.
num_include_keysThe number of include keys in the path up to the driver key.
include_keysAn array of include keys.
countThe 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.
facesThe face numbers to be highlighted. Each one of these represents a face in the geometry associated with key.
vertex1Array of indices into the points array of the geometry specified by key. Each of these indices represents a vertex to be highlighted.
vertex2Array 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_messageIndicates 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::SetAllowDisplacement ( bool  allowDisplacement) [inline, virtual]

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

virtual void HSelectionSet::SetAllowEntitySelection ( bool  allow) [virtual]

Sets the entity selection mode for the HSelectionSet.

Parameters:
allowIf true, then Entity Selection is enabled.
virtual void HSelectionSet::SetAllowRegionSelection ( bool  allow) [virtual]

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

Parameters:
allowIf true, then Region Selection is allowed.
virtual void HSelectionSet::SetAllowSubentityDeselection ( bool  allow) [inline, virtual]
virtual void HSelectionSet::SetAllowSubentitySelection ( bool  allow) [virtual]

Sets the subentity selection mode for the HSelectionSet.

Parameters:
allowIf true, then Subentity Selection is enabled.
virtual void HSelectionSet::SetGrayScale ( bool  grayScale) [virtual]

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

Parameters:
grayScalePass if true if you wish the scene to be drawn in grayscale and false if otherwise.
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:
mthe 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 void HSelectionSet::SetInvisible ( bool  Invisible) [virtual]

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

Parameters:
InvisiblePass if true if you wish the items to beinvisible and false if otherwise.
void HSelectionSet::SetPShowCache ( HVHashPShowCache new_cache) [inline]

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

Parameters:
new_cachethe new cache hash table to use
virtual void HSelectionSet::SetReferenceSelection ( bool  ref_sel) [inline, virtual]

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

Parameters:
ref_selthe new reference selection state.

References HighlightDefault, and HighlightQuickmoves.

virtual void HSelectionSet::SetReferenceSelectionType ( HRefSelType  type) [virtual]

Overwrites the default quick moves type (spriting) with type

Parameters:
typethe new reference selection type.
virtual void HSelectionSet::SetSelectionCutEdgeColor ( HPixelRGBA rgb) [inline, virtual]

Sets the color to use for selected cutting edges.

Parameters:
rgbThe color used to highlight selected cutting edges.
virtual void HSelectionSet::SetSelectionCutFaceColor ( HPixelRGBA rgb) [inline, virtual]

Sets the color to use for selected cutting faces.

Parameters:
rgbThe highlight color for selected cutting faces.
virtual void HSelectionSet::SetSelectionEdgeColor ( HPixelRGBA rgb) [inline, virtual]

Sets the color to use for selected edges

Parameters:
rgbThe color used to highlight selected edges.
virtual void HSelectionSet::SetSelectionEdgeWeight ( float  weight) [inline, virtual]

Sets the weight to use for highlighting selected edges.

Parameters:
weightThe edge weight used for highlighting.
virtual void HSelectionSet::SetSelectionFaceColor ( HPixelRGBA rgba) [inline, virtual]

Sets the color to use for selected faces

Parameters:
rgbaThe color used to highlight selected faces.
virtual void HSelectionSet::SetSelectionLevel ( HSelectLevel  level) [virtual]
Parameters:
levelAn enumeration indicating whether the HSelectionSet should allow segment, entity, region, or subentity selection.
virtual void HSelectionSet::SetSelectionMarkerColor ( HPixelRGBA rgb) [inline, virtual]

Sets the color to use for selected markers.

Parameters:
rgbThe highlight color you want to use for selected markers.
virtual void HSelectionSet::SetSelectionMarkerSize ( float  size) [inline, virtual]

Sets the size to use for selected markers.

Parameters:
sizeSize of the current marker used for highlighting
virtual void HSelectionSet::SetSelectWillNotify ( bool  notify) [inline, virtual]
Parameters:
allowIf true, then Select() will notify is enabled.
void HSelectionSet::SetSortSelectionList ( bool  sort) [inline]

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

virtual void HSelectionSet::SetSubentityEdgeSelection ( bool  select) [inline, virtual]

Set whether edges be highlighted if subentity selection is enabled.

virtual void HSelectionSet::SetSubentityFaceSelection ( bool  select) [inline, virtual]

Set whether faces be highlighted if subentity selection is enabled.

virtual void HSelectionSet::SetSubentityTracking ( bool  allow) [inline, 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 void HSelectionSet::SetSubentityVertexSelection ( bool  select) [inline, virtual]

Set whether vertices be highlighted if subentity selection is enabled.

virtual void HSelectionSet::SetSubwindowPenetration ( bool  allow) [virtual]

Sets the entity selection mode for the HSelectionSet.

Parameters:
allowIf 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.
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_highlightthe new use defined highlight state.
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.

void HSelectionSet::UnRegisterHighlightSeg ( HC_KEY  seg_key)

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

Parameters:
segment_keyThe HOOPS segment key to be unregistered.
void HSelectionSet::UpdateHighlighting ( )

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

virtual void HSelectionSet::UpdateHighlightStyle ( ) [virtual]

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

virtual void HSelectionSet::UpdateTransparency ( bool  force_flush = false) [protected, virtual]

Used internally to update the transparency used in inverse transparency highlighting

Parameters:
force_flushIf true, the transparency will be removed even if there are still selected items.

The documentation for this class was generated from the following file: