home *** CD-ROM | disk | FTP | other *** search
/ Cutting-Edge 3D Game Programming with C++ / CE3DC++.ISO / BOOK / CHAP12 / POINT2D.HPP < prev    next >
C/C++ Source or Header  |  1996-01-24  |  672b  |  29 lines

  1. //
  2. // File name: Point2D.HPP
  3. //
  4. // Description: The header file a 2D point structure
  5. //
  6. // Author: John De Goes
  7. //
  8. // Project: Cutting Edge 3D Game Programming
  9. //
  10.  
  11. #ifndef POINT2DHPP
  12. #define POINT2DHPP
  13.  
  14. struct Point2D {
  15.   long X, Y;   // The screen X and Y of point
  16.   long Z;      // The 1/Z value
  17.   long U, V;   // The texture's position
  18.   long I;      // The texture's intensity
  19.   int operator == ( Point2D &V )
  20.     {
  21.     return ( ( X == V.X ) && ( Y == V.Y ) );
  22.     }
  23. };
  24.  
  25. int UniqueVert ( Point2D &V, Point2D *List, int Range );
  26. unsigned int GetVertIndex ( Point2D &V, Point2D *List,
  27.                             unsigned int Range );
  28.  
  29. #endif