This little inline routine just implements triangle storage. Maybe it will be more sophisticated in the future.
static inline int storetri ( PetscScalar x0, PetscScalar y0, PetscScalar z0, PetscScalar x1, PetscScalar y1, PetscScalar z1, PetscScalar x2, PetscScalar y2, PetscScalar z2, PetscScalar* color )
inline int storetri Returns 0 or an error code.