Processing unselected islands
Logic of some packer operations is based on dividing islands into two sets: selected islands and unselected islands. If such a division is required, then the application has to set m_ProcessUnselected to true and also specify for every UV face in the input UV map whether it should be considered as selected or not. This distinction is being made by setting the UVP_FACE_INPUT_FLAGS::SELECTED flag in m_InputFlags member of UvFaceT object (faces which have this flag set will be considered as selected, face without this flag - as unselected).
Using the division of the UV faces into selected/unselected, made by the application, the packer determines two sets of islands: selected islands and unselected islands. This division is later reflected in the UvpIslandsMessageT message sent by the packer (using the m_SelectedIslandCount member).
If m_ProcessedUnselected is set to false (the default state), then the SELECTED flag of the UV faces is ignored by the packer and every island is considered as selected (the application doesn’t have to set this flag in such a case).
The selected/unselected distinction is currently used in the following situations:
- a PACK operation is executed and m_PackToOthers is set to true: in such a case the selected islands are considered as new islands, which are to be added to islands already packed (unselected islands).
- a SELECT_SIMILAR operation is executed: the packer searches for all islands among the unselected islands which have a similar shape to at least one island from the selected islands.