package protobj; // 4D Vertex message Vertex { optional float x = 1 [default=0]; optional float y = 2 [default=0]; optional float z = 3 [default=0]; optional float w = 4 [default=1]; } // RGB color (each color in [0,255]) message Color { optional uint32 r = 1 [default=255]; optional uint32 g = 2 [default=255]; optional uint32 b = 3 [default=255]; } // Texture coordinate message UV { optional float u = 1 [default=0]; optional float v = 2 [default=0]; optional float w = 3 [default=1]; } // Polygonal face message Face { optional uint32 poly_type = 1 [default=3]; //polygonal type = number of sides repeated uint32 vert_index = 2 [packed=true]; //vertex array index repeated uint32 uv_index = 3 [packed=true]; //uv array index repeated uint32 norm_index = 4 [packed=true]; //normal array index repeated uint32 order = 5 [packed=true]; //Original order (to preserve original array order) } // Mesh data message Mesh { optional string name = 1; optional string comments = 2; // Core repeated Vertex vertices = 3; //Vertex array, Should *never* be empty repeated Face faces = 4; //Face array, can be empty repeated Vertex normals = 5; //Normal array, can be empty repeated Color colors = 6; //Color array, can be empty repeated UV uvs = 7; //UV array, can be empty // Extension support extensions 2000 to max; }