Displaying Meshes

Overview

This page describes the elements used to bind defined model shapes and materials and define the display. Shapes as described in Defining Model Shapes and Vertex Attribute Data are used as the unit for model shapes. The element for materials is described in Defining Materials.

The <Mesh> element is used to define the binding between a single shape and material and their display. Referencing between the shape and material is defined in the child of this element. The <SeparateShapeReference> element is use for referencing a shape. This reference is defined in the following form: Nth shape (<SeparateDataShapeCtr>) in the list of shapes (<Shapes>) already defined. The second shape is referenced in the example below. The <MaterialReference> element is use for referencing a material. This reference references materials (<Materials>) by material name. The material name "MatePlane" is referenced in the example below.

<Mesh>
<SeparateShapeReference>Shapes[2]</SeparateShapeReference>
<MaterialReference>Materials["MatePlane"]</MaterialReference>
</Mesh>

Materials referenced here are enumerated using the format used for the child hierarchy of the <Materials> elements that define the list of materials referenced from the model.

XML Hierarchical Structure

The <SkeletalModel> element contains only a single <Meshes> element, which specifies the start of the definition of the <Mesh> elements. If a scene includes more than one shape, multiple <Mesh> elements can be defined. In addition, materials referenced inside <Meshes> are enumerated inside the <Materials> element.

<NintendoWareIntermediateFile>
<GraphicsContentCtr>
<Models>
<SkeletalModel>
<Meshes>
<Mesh>
<SeparateShapeReference>
<MaterialReference>
: <Materials>
<MaterialReference>
:

Visibility Control

You can set visibility at the shape level. If the IsVisible attribute of the <Mesh> element is true, the shape is displayed. If false, the shape is not displayed.

Render Priority

You can set the render priority among shapes. Specify an integer value for the RenderPriority attribute of the <Mesh> element.