1 /* 2 * Copyright 2009, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Alexandre Deckner <alex@zappotek.com> 7 */ 8 #ifndef _MESH_H 9 #define _MESH_H 10 11 #include <Referenceable.h> 12 #include <SupportDefs.h> 13 14 #include "Vector3.h" 15 16 17 struct Vertex { 18 Vector3 p; 19 float u; 20 float v; 21 }; 22 23 24 struct Face { 25 Vertex v[4]; 26 uint16 vertexCount; 27 }; 28 29 30 class Mesh : public BReferenceable { 31 public: 32 virtual ~Mesh(); 33 34 virtual Face& GetFace(uint32 index) const = 0; 35 virtual uint32 FaceCount() const = 0; 36 }; 37 38 39 #endif /* _MESH_H */ 40