Thread: Points, vectors, matrices

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    47
    yep, that's what I needed to know. Thanks a lot. One more question about a code example.


    for (xIdx = 0; xIdx < 36; xIdx++) // x-direction
    { for (yIdx = 0; yIdx < 18; yIdx++) // y-direction
    { // calculate texture coordinates for current quad
    texLeft = float(xIdx) / 35.0f; // left texture coordinate
    texBottom = float(yIdx) / 18.0f; // bottom texture
    coordinate texRight = float(xIdx+1) / 35.0f; // right texture coordinate
    texTop = float(yIdx+1) / 18.0f; // top texture coordinate


    Can someone tell me why they are dividing by 35 and 18 here? This is a 36x20 field of points.
    Last edited by subnet_rx; 01-03-2002 at 10:36 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help it won't compile!!!!!
    By esbo in forum C Programming
    Replies: 58
    Last Post: 01-04-2009, 03:22 PM
  2. Replies: 8
    Last Post: 11-03-2008, 09:48 PM
  3. Vectors
    By naseerhaider in forum C++ Programming
    Replies: 11
    Last Post: 05-09-2008, 08:21 AM
  4. Yahtzee C++ programme help
    By kenneth_888 in forum C++ Programming
    Replies: 13
    Last Post: 09-05-2007, 02:14 PM
  5. CProg Fantasy Football version pi
    By Govtcheez in forum A Brief History of Cprogramming.com
    Replies: 155
    Last Post: 12-26-2006, 04:30 PM