iMackshun

Vertex.h

Jul 26th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #ifndef VERTEX_H
  2. #define VERTEX_H
  3.  
  4. struct Vertex{
  5. public:
  6.     //Vertex Position (x, y, z, w)
  7.     struct Position{
  8.         float x = 0.0f;
  9.         float y = 0.0f;
  10.         float z = 0.0f;
  11.         float w = 1.0f;
  12.     } position;
  13.     //Vertex Color (r, g, b, a)
  14.     struct Color{
  15.         float r = 1.0f;
  16.         float g = 1.0f;
  17.         float b = 1.0f;
  18.         float a = 1.0f;
  19.     } color;
  20.     //Normal Coordinates (x, y, z)
  21.     struct NormalCoordinates{
  22.         float x = 0.0f;
  23.         float y = 0.0f;
  24.         float z = 0.0f;
  25.     } normals;
  26.     //Vertex UV Coordinates (x, y)
  27.     struct UVCoordinates{
  28.         float x = 0.0f;
  29.         float y = 0.0f;
  30.     } uvs;
  31. };
  32.  
  33. #endif
Advertisement
Add Comment
Please, Sign In to add comment