HIndexManager

Functions

HIndexManager

~HIndexManager

HC_KEY

KInsertShell

void

DeleteByKey

void

EditShellPoints

void

EditShellFaces

int

GetPairCount

bool

GetPair

bool

GetPairs

bool

GetIndex

Detailed Description

class HIndexManager

Public Functions

HIndexManager(bool needPairToIndex, bool needIndexToPair)
virtual ~HIndexManager()
HC_KEY KInsertShell(int point_count, HPoint const *points, int face_list_length, int const *face_list)

Compacts a sparsely-referenced points array into its minimal subset, records the translation information from the original specification. Requires that a HOOPS segment be open.

Parameters
  • point_count – the number of points in the master points list.

  • points – the master points list.

  • face_list_length – the length of the face_list array.

  • face_list – the vertex indices that connect to form faces (see docs for HC_Insert_Shell.

Returns

the key to the HOOPS shell that was inserted.

void DeleteByKey(HC_KEY key)

Calls through to HOOPS to remove the item. If the item was inserted by HIndexManager::KInsertShell, this function additionally removes the translation information

Parameters

key – the key to the item to be deleted, as returned from this->KInsertShell.

void EditShellPoints(HC_KEY key, int littleIndexOffset, int ndelete, int insert, HPoint const *points)
inline void EditShellFaces(HC_KEY key, int ioffset, int ndelete, int insert_list_length, int const *insert_list)

just a simple call through to HC_Edit_Shell_Faces. Nothing needs to be done here, but it provides consistency in the calling conventions.

Parameters

key – the key to the item to be deleted, as returned from this->KInsertShell.

int GetPairCount(int bigIndex) const

returns the number of times vertex bigIndex is shared into littleIndex values

bool GetPair(int bigIndex, int n, HC_KEY *key, int *littleIndex) const

retrieves the nth key/littleIndex pair that inherits from bigIndex

Parameters
  • bigIndex – the index into the master points array

  • n – which of the shared vertices to return (e.g. the i in a for(i=0;;i++) loop)

  • key – returned to user

  • littleIndex – returned to user

Returns

true if successful

bool GetPairs(int bigIndex, HC_KEY *keys, int *littleIndices) const

retrieves all key/littleIndex pairs that inherit from bigIndex

Parameters
  • bigIndex – the index into the master points array

  • keys – returned to user. Caller must be allocate to length GetPairCount()

  • littleIndices – returned to user. Caller must be allocate to length GetPairCount()

Returns

true if successful

bool GetIndex(HC_KEY key, int littleIndex, int *bigIndex) const

returns the bigIndex from which the key/littleIndex pair came