C++
virtual ACDBCORE2D_PORT void setSelectionMarkers( const Adesk::LongPtr* pSelectionMarkers );
Description
Sets pSelectionMarkers to be the array of graphics system selection markers (gsmarkers) used by the AcGiFaceData object. The array must have exactly the same number of elements as there are faces in the mesh or shell it is used with. The array elements control the graphic system selection markers (gsmarkers) used for the mesh or shell faces--the first array element specifies the gsmarker used for the first face, the second element for the second face, etc.
A selection marker value of zero has special meaning to the AutoCAD display system and should not be used for any of the elements in the pSelectionMarkers array.
The caller of this function is responsible for allocating and de-allocating the memory for the array. This function accepts a pointer to the array and then uses the array directly--it does not make a copy of the array.
AcGi only uses this array for the duration of the current worldDraw() or viewportDraw() function call, so the memory for this array should be deallocated just before returning from the worldDraw() or viewportDraw() function. It is safe to allocate the array memory on the stack (that is, a local array).
Prematurely freeing or deleting the array passed into this function terminates AutoCAD.
Due to AutoCAD graphics system performance optimization, custom entity classes that set selection markers in their worldDraw() or viewportDraw() method must set the first selection marker via a call to AcGiSubEntityTraits::setSelectionMarker()before any calls are made to any of the AcGiWorldGeometry or AcGiViewportGeometry geometry creation methods (including mesh() or shell()).
This means that even if your mesh or shell is the first (or only) geometry generated, you have to call AcGiSubEntityTraits::setSelectionMarker() beforehand with a dummy marker value in order to let the graphics system know that selection markers are used.
Parameters
| Parameters | Description |
|---|---|
| pSelectionMarkers | Input array of non-zero graphic system selection markers |