Advertisement
Guest User

Vertex.h

a guest
Mar 9th, 2015
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.02 KB | None | 0 0
  1. class Vertex {
  2.     public:
  3.         float x, y, z;
  4.         float nx, ny, nz;
  5.         float u, v;
  6.  
  7.         Vertex() {
  8.             x = 0; y = 0; z = 0;
  9.             nx = 0; ny = 0; nz = 0;
  10.             u = 0; v = 0;
  11.         }
  12.  
  13.         Vertex(float ix, float iy, float iz) {
  14.             x = ix; y = iy; z = iz;
  15.             nx = 0; ny = 0; nz = 0;
  16.             u = 0; v = 0;
  17.         }
  18.  
  19.         Vertex(float ix, float iy, float iz, float iu, float iv) {
  20.             x = ix; y = iy; z = iz;
  21.             nx = 0; ny = 0; nz = 0;
  22.             u = iu; v = iv;
  23.         }
  24.  
  25.         Vertex(float ix, float iy, float iz, float inx, float iny, float inz, float iu, float iv) {
  26.             x = ix; y = iy; z = iz;
  27.             nx = inx; ny = iny; nz = inz;
  28.             u = iu; v = iv;
  29.         }
  30.  
  31.         string ToString() {
  32.             stringstream ss;
  33.             ss << "x: " << x << " y: " << y << " z: " << z;
  34.             return ss.str();
  35.         }
  36.  
  37.         static unsigned int Size() {
  38.             return 32;
  39.         }
  40.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement