DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IRefMap_KC Interface

GetCount
SetAt
Lookup
RemoveKey
RemoveAll
GetStartPosition
GetNext

Maps two lists of closely associated elements. A typical use: When a sub mesh is extracted using IMeshEx.Extract() the method also creates a map which associates a simplex of the extracted mesh with its geometrical copy in the original mesh. The mapping actually associates positions in the lists rather than the elements themselves

A map should be thought of as an array (set) of elements (of type POSNT) indexed also by POSNT. In the above example map[position of a simplex in the extracted mesh] is the 'position of the cloned simplex in the original mesh'

See also Interface List


HRESULT GetCount(int* count)

Parameters

count-[out, retval] the returned number of the elements in the map


HRESULT SetAt(POSNT key, POSNT value)

Remarks:

Sets map[key] = value


HRESULT Lookup(POSNT key, POSNT* value, VARIANT_BOOL* found)

Parameters

key - [in] Key (index) of the element to look up

value - [out] The returned position map[key]

found - [out,retval] The returned value. False if there is no element at the index key

Remarks:

Returns the element at the index key


HRESULT RemoveKey(POSNT key, VARIANT_BOOL* found)

Parameters

key - [in] Key (index) of the element to remove

found - [out,retval] The returned value. False if there was no element at the index key


HRESULT RemoveAll()

Remarks:

Empties the map


HRESULT GetStartPosition(POSNT* position)

Remarks:
Returns the start position of this map. This position is suppposed to be used as the first parameter in the GetNext() method below, which allows stepping through the map as a list

HRESULT GetNext(POSNT* position, POSNT* key, POSNT* value)

Remarks:
Allows stepping through the map as a list. The call returns the key and the value at position and shifts position to the next element in the map considered as a list. Use GetStartPosition() above to obtain the first position in the list