NAME

hwQuads - define one or more quadrilaterals

INHERITS FROM

PROPERTIES

Data *F The list of vertices (4 for each quad), with from 3 to 11 floats per vertex
OptFlags 1I The optimization flags; see hw for details
GraphN 1I Sub-tesselation parameter for each Quad
GraphM 1I Sub-tesselation parameter for each Quad

DEFAULTS

OptFlags hwDefaultOptFlags
Data NULL
GraphN 1
GraphM 1

DESCRIPTION

The hwQuads class takes a list of vertices and displays them as a number of closed polygonal surfaces. The Data pointer is an array of hwFloat values; the number of values must be equal to 4*n*FPV, where FPV is the number of hwFloats present per vertex as described by the hwVertex man page. The number n is derived from the size of the Data array, and is the number of quadrilaterals, each of which must have 4 vertices.

C EXAMPLE

    /* Draw a square two-sided polygon, using one quadrilateral */
    hwObject
        quads;
    hwFloat
        verts[] = {0,0,0,  0,1,0,  1,1,0,  1,0,0};

    quads = hwQuads->create( hwQuads );
    quads->modify( quads, hwStrData, HW_MAKE_TYPE(HW_TYPE_FLOAT,4*3), verts );
    HW_MODIFY_1B( quads, hwStrTwoSided, HW_TRUE );
    quads->draw( quads );
    quads->destroy( quads );

OBJECT FILE EXAMPLE

    # A square two-sided polygon using two quadrilaterals
    hwQuads quads {
        TwoSided = True
        Data = {0,0,0,  0,1,0,  1,1,0,  1,0,0}
    }

SEE ALSO

hw, hwSurface, hwOrient, hwVertex