Geometry file

.gwa

The .gwa files are used to represent any geometrical object. It is based on the same format than the .opf (and is an XML too), but without the topology.

A simple example of a virtual table is available here:

  • table.gwa (12 kb)
  • And here is a 3d render of this file:

    If you open the file, you’ll see several sections. First, there is the header:

    <?xml version="1.0" encoding="UTF-8" ?>
    <gwa version="1.0">

    The first line defines the xml format, and the second one defines the gwa format.

    Then comes the attributes:

    <attributes>
        <attribute name="Color" class="Color"/>
    </attributes>

    It is the same as for the attributeBDD from the opf format (go there for more details).

    Then the meshes are defined one after another with their respective data: points, normals, faces:

    <mesh id="2" label="Cylinder">
        <points>
            -245.0  -500.0  0.0 -245.0  -500.0  60.0    -245.0  -500.0  120.0   -245.0  -500.0  180.0   -245.0  -500.0  240.0   -245.0  -500.0  300.0   -250.0  -495.0  0.0 -250.0  -495.0  60.0    -250.0  -495.0  120.0   -250.0  -495.0  180.0   -250.0  -495.0  240.0   -250.0  -495.0  300.0   -255.0  -500.0  0.0 -255.0  -500.0  60.0    -255.0  -500.0  120.0   -255.0  -500.0  180.0   -255.0  -500.0  240.0   -255.0  -500.0  300.0   -250.0  -505.0  0.0 -250.0  -505.0  60.0    -250.0  -505.0  120.0   -250.0  -505.0  180.0   -250.0  -505.0  240.0   -250.0  -505.0  300.0
        </points>
        <normals>
            -1.0    -2.683151E-7    0.0 -1.0    0.0 0.0 -1.0    0.0 0.0 -1.0    0.0 0.0 -1.0    0.0 0.0 -1.0    2.683151E-7 0.0 2.7502296E-7    -1.0    0.0 -2.3477572E-8   -1.0    0.0 -2.3477572E-8   -1.0    0.0 -2.3477572E-8   -1.0    0.0 -2.3477572E-8   -1.0    0.0 -2.683151E-7    -1.0    0.0 1.0 2.7502296E-7    0.0 1.0 -2.3477572E-8   0.0 1.0 -2.3477572E-8   0.0 1.0 -2.3477572E-8   0.0 1.0 -2.3477572E-8   0.0 1.0 -2.683151E-7    0.0 -2.7502296E-7   1.0 0.0 2.3477572E-8    1.0 0.0 2.3477572E-8    1.0 0.0 2.3477572E-8    1.0 0.0 2.3477572E-8    1.0 0.0 2.683151E-7 1.0 0.0
        </normals>
        <faces>
            <face Id="0">
                0   6   7
            </face>
            <face Id="1">
                7   1   0
            </face>
          [...]
        </faces>        
        <Color>Color 0 0 255</Color>
    </mesh>

    where [...] denotes data that is not displayed here for clarity.

    The format of the meshes follows the one from the meshBDD in the opf format, see this documentation for more details.

    More information about the .gwa files are available from the AMAPStudio documentation).