BitmapMesh.java android example some things i dont understand


  1. borghild.hedda

    borghild.hedda New Member

    Hi,

    What do they exactly mean by mesh?
    I'm looking at the source code of this example and i see:

    Code (Text):
    1.            
    2.             float w = mBitmap.getWidth();
    3.             float h = mBitmap.getHeight();
    4.             // construct our mesh
    5.             int index = 0;
    6.             for (int y = 0; y <= HEIGHT; y++) {
    7.                 float fy = h * y / HEIGHT;
    8.                 for (int x = 0; x <= WIDTH; x++) {
    9.                     float fx = w * x / WIDTH;                    
    10.                     setXY(mVerts, index, fx, fy);
    11.                     setXY(mOrig, index, fx, fy);
    12.                     index += 1;
    13.                 }
    14.             }
    15.  
    Can someone please explain to me what it means?

    Advertisement

Share This Page