Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HSelectionItem Class Reference

The HSelectionItem class is an interface definition for a selection item. More...

#include <HSelectionItem.h>

List of all members.

Public Member Functions

virtual bool Delete ()=0
virtual bool Equals (const HSelectionItem *i2) const
virtual int GetFullPathCount (HBaseView *view)
virtual const HC_KEYGetFullPathKeys (HBaseView *view)
virtual void GetFullPathKeys (HBaseView *view, HC_KEY *path)
virtual int GetIncludeCount () const =0
virtual const HC_KEY *const GetIncludeKeys () const =0
virtual void GetIncludeKeys (HC_KEY *includes) const =0
virtual HC_KEY GetKey () const
virtual const char * GetName () const
virtual HC_KEY GetSegmentKey () const
float GetTimeStamp ()
virtual bool Highlight ()=0
 HSelectionItem (HC_KEY key, HSelectionSet *selection_set)
virtual bool IsHighlighted () const =0
virtual bool IsInstanced () const =0
virtual bool QueryIncludeDependency (HC_KEY include_key, HC_KEY &ret_dependent_key)=0
void SetTimeStamp (float now)
virtual bool UnHighlight ()=0
virtual bool UpdateIncludeDependency (HC_KEY include_key, HC_KEY dependent_key, HC_KEY replacement_key)=0

Protected Attributes

HC_KEYm_FullPath
 The include path plus the selection item and view key. If the object is not a HSmartSelItem, the path may be incomplete.
int m_FullPathCount
 The length of the m_FullPath array of keys including the selection item and view key.
HC_KEY m_key
 The HOOPS key to the selection element.
HSelectionSetm_pSelectionSet
 The selection set which owns this selection item.
float m_TimeStamp
 Time the item was created. Used for sorting the selection list.

Detailed Description

The HSelectionItem class is an interface definition for a selection item.

This is the abstract base class for selection items held in a list the HSelectionSet class. It defines a set of interfaces for the HSelectionSet and operators like HOpSelectAperture to interact with selection items. Use this class as a base class when you want to implement new types of selection item classes. Note that you cannot create an instance of this class. It contains pure virtual functions which have no implementation.


Constructor & Destructor Documentation

HSelectionItem::HSelectionItem ( HC_KEY  key,
HSelectionSet selection_set 
)

Constructs.


Member Function Documentation

virtual bool HSelectionItem::Delete ( ) [pure virtual]

Call this function to delete the selection item. NOTE: If the selection is a non-instanced segment or entity, it will be deleted. If the selection is an instanced segment or entity, it's include link will be removed.

Returns:
True if the item was successfully deleted.

Implemented in HOldSelItem, HSubentitySelItem, and HSmartSelItem.

virtual bool HSelectionItem::Equals ( const HSelectionItem i2) const [virtual]
Returns:
True when the two selection elements are equal.
Parameters:
i2An HSelectionItem object to be compared with this object.

Reimplemented in HOldSelItem, HSubentitySelItem, HRegionSelItem, and HSmartSelItem.

virtual int HSelectionItem::GetFullPathCount ( HBaseView view) [virtual]
Returns:
A count of number of include keys in the include path plus 2 to account for the the selection item and view key.
virtual const HC_KEY* HSelectionItem::GetFullPathKeys ( HBaseView view) [virtual]
Returns:
An array of keys, suitable for passing to HOOPS' HC_PShow* or HC_Compute*By_Path functions
Parameters:
viewthe HBaseView in which this item is selected

Reimplemented in HSmartSelItem.

virtual void HSelectionItem::GetFullPathKeys ( HBaseView view,
HC_KEY path 
) [virtual]
Parameters:
viewThe HBaseView in which the item is selected
pathAn array of keys (returned to the user), suitable for passing to the PShow or By_Path functions. Note that the caller must ensure that the array is of the appropriate size, e.g., via the GetFullPathCount function.

Reimplemented in HSmartSelItem.

virtual int HSelectionItem::GetIncludeCount ( ) const [pure virtual]
Returns:
The number of include keys in the include path.

Implemented in HOldSelItem, and HSmartSelItem.

virtual const HC_KEY* const HSelectionItem::GetIncludeKeys ( ) const [pure virtual]
Returns:
An array to include keys. The return pointer is for read-only purposes.

Implemented in HOldSelItem, and HSmartSelItem.

virtual void HSelectionItem::GetIncludeKeys ( HC_KEY includes) const [pure virtual]
Parameters:
includesAn array of include keys (returned to the user). Note that the caller must ensure that the array is of the appropriate size, e.g, via the GetIncludeCount function.

Implemented in HOldSelItem, and HSmartSelItem.

virtual HC_KEY HSelectionItem::GetKey ( ) const [inline, virtual]
Returns:
The HOOPS key to the selection item.

References HC_KEY.

virtual const char* HSelectionItem::GetName ( ) const [inline, virtual]
Returns:
A character pointer denoting the name which is "HSelectionItem."

Reimplemented in HOldSelItem, HSubentitySelItem, HRegionSelItem, and HSmartSelItem.

virtual HC_KEY HSelectionItem::GetSegmentKey ( ) const [virtual]
Returns:
If the selection item is a segment, then the item key is returend. If the selection item is entity, then key to the owner segment is returned.
float HSelectionItem::GetTimeStamp ( ) [inline]

Retrieves a selection item's time stamp

Returns:
the time stamp
virtual bool HSelectionItem::Highlight ( ) [pure virtual]

This function highlights the selection item.

Returns:
True if the selection item was succesffuly highlighted.

Implemented in HOldSelItem, HSubentitySelItem, HRegionSelItem, and HSmartSelItem.

virtual bool HSelectionItem::IsHighlighted ( ) const [pure virtual]

Checks to see if an item is currently highlighted.

Returns:
True if the item is currently highlighted, false if the item is not highlighted.

Implemented in HOldSelItem, and HSmartSelItem.

virtual bool HSelectionItem::IsInstanced ( ) const [pure virtual]

Checks to see if the selection item has any segments/geometry which might be potentially shared. This is determined by checking the include keys in the selection path. If there is more than one (the model key), then it is instanced.

Returns:
True if the item is instanced.

Implemented in HOldSelItem, and HSmartSelItem.

virtual bool HSelectionItem::QueryIncludeDependency ( HC_KEY  include_key,
HC_KEY ret_dependent_key 
) [pure virtual]

Determines if the selection item has any dependency on the include key being provide. If it does have a dependency, this method returns true and returns which skey is dependent as the second argument.

Parameters:
include_keyHC_KEY to include key on which the dependency is wanted
ret_dependent_keyHC_KEY to segment/entity which depends on the include key
Returns:
True if the item has dependency on the given include_key.

Implemented in HOldSelItem, and HSmartSelItem.

void HSelectionItem::SetTimeStamp ( float  now) [inline]

Sets a selection item's time stamp

Parameters:
nowthe time stamp
virtual bool HSelectionItem::UnHighlight ( ) [pure virtual]

This method unhighlights the selection item.

Returns:
A true if the unhighlight is succesful

Implemented in HOldSelItem, HSubentitySelItem, HRegionSelItem, and HSmartSelItem.

virtual bool HSelectionItem::UpdateIncludeDependency ( HC_KEY  include_key,
HC_KEY  dependent_key,
HC_KEY  replacement_key 
) [pure virtual]

This method updates the given key's dependency on a given include key with a new include key.

Parameters:
include_keyHC_KEY of the include key which is deleted/going to be deleted.
dependent_keyHC_KEY of the segment/entity which depends on the include key.
replacement_keyThe new HC_KEY that will replace include_key for the given dependent_key.
Returns:
True if the dependency has been successfully updated.

Implemented in HOldSelItem, and HSmartSelItem.


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