User Tools

Site Tools


region

Description

Defines a hierarchy of regions using a series of vertex-weighted maps and region groups.

Parent Objects

Properties

Name Description Default Required
id A string representing the unique identifier within the region hierarchy. Must be unique within the region hierarchy. None yes
label A string representing the user-facing name of this region. None no
display_hint A string representing an application-specific hint about how to display the value for the region. Values can be “cards_on”, “cards_off”, etc. N/A no
map An int_array of indices for all the polygons that are members of this region. N/A no
children An array of child regions, either leaf nodes or group nodes. N/A no

Details

The map and children elements are mutually exclusive. If a map element is given, the region is a leaf node in the region hierarchy and may not have children. If a children element is present, the region is a group node in the region hierarchy and may not define its own map. All leaf nodes in the hierarchy must define a map element.

Polygons may exist in one and only one region. If a polygon index is given in multiple regions, the behavior is undefined.

Example

{
    "label" : "Root",
    "children" :
    [
        {
            "label" : "Torso",
            "map" : [ 7, 8, 4, 9, 2 ]
        },
        {
            "label" : "Lower Body",
            "children" :
            [
                {
                    "label" : "Left Leg",
                    "map" : [ 0, 1, 3, 23, 45 ]
                },
                {
                    "label" : "Right Leg",
                    "map" : [ 5, 6, 10, 12, 13 ]
                }
            ]
        }
    ]
}