The application has a possibility to specify certain parameters on a per-island basis for some operations. In order to do that it has to use the m_IntParams member of the UvFaceT object.
An input UV map is always specified using UV vertices and UV faces, that is why the application initially specifies island parameters on a per-face basis. During an operation, the packer determines the division of UV faces into islands, after that it translates per-face parameters originally specified by the application to actual per-island parameters.
The translation is done in the following manner: if all UV faces forming the given UV island have exactly the same parameter value specified, then the given value is used as the parameter value for the UV island itself. If there are two UV faces in a single island with different values of the parameter specified, then such an island will be reported as invalid and the operation will fail with an INVLAID_ISLANDS return code. All islands with inconsistent parameter values will be reported using a UvpInvalidIslandIndiciesMessageT message with m_InvCode set to INT_PARAM and m_SubCode set to a parameter index for whom the inconsistent values were detected.
An element at the given index of the m_IntParams array always carries a value of the specific parameter. Currently there are 3 island parameters defined:
- GROUP (index 0) - allows the application to specify custom island grouping. Two islands will be assigned to the same group, if they have the same value of this parameter. GROUP island parameter is used only if the given packer operation is based on grouping (e.g. m_PackingMode is set to GROUPS_TO_TILES or GROUPS_TOGETHER) and m_GroupingMethod is set to EXTERNAL.
- ROTATION_STEP (index 1) - specifies a rotation step (as defined by the m_RotationStep parameter) on a per-island basis. If the application assigns the value -1 for an island, then this island will use the global m_RotationStep value). In order to enable this parameter, m_IslandRotationStepEnable must be set to true.
- LOCK_GROUP (index 2) - islands having the same non-zero value of this parameter will be locked together during packing (their relative positions will be maintained). Islands with a value set to 0 will not be affected by this behaviour. In order to enable this parameter, m_LockGroupsEnable must be set to true.