Using short integers as indices for a TriMesh?

Issue #81 resolved
Richard Bamford created an issue

Hi, the functions for creating a trimesh expect an unsigned int, but the data i have has short integer as the data type for the indicies. Is there a way to make them work together?

Thanks

Comments (2)

  1. Richard Bamford reporter

    In common.h there are macros that allow you to control the size of indices.

    /*
     * Define a type for indices, either 16 or 32 bit, based on build option
     * TODO: Currently GIMPACT only supports 32 bit indices.
     */
    #if dTRIMESH_16BIT_INDICES
    #if dTRIMESH_GIMPACT
    typedef duint32 dTriIndex;
    #else /* dTRIMESH_GIMPACT */
    typedef duint16 dTriIndex;
    #endif /* dTRIMESH_GIMPACT */
    #else /* dTRIMESH_16BIT_INDICES */
    typedef duint32 dTriIndex;
    #endif /* dTRIMESH_16BIT_INDICES */
    
  2. Log in to comment