1 /* bzflag 2 * Copyright (c) 1993-2021 Tim Riker 3 * 4 * This package is free software; you can redistribute it and/or 5 * modify it under the terms of the license found in the file 6 * named COPYING that should have accompanied this file. 7 * 8 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 9 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 10 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11 */ 12 13 #ifndef __CUSTOM_MESH_H__ 14 #define __CUSTOM_MESH_H__ 15 16 /* interface header */ 17 #include "WorldFileObstacle.h" 18 19 /* system headers */ 20 #include <string> 21 #include <vector> 22 23 /* common interface headers */ 24 #include "BzMaterial.h" 25 #include "MeshObstacle.h" 26 27 /* local interface headers */ 28 #include "WorldInfo.h" 29 #include "CustomMeshFace.h" 30 31 32 class CustomMesh : public WorldFileObstacle 33 { 34 public: 35 CustomMesh(); 36 ~CustomMesh(); 37 virtual bool read(const char *cmd, std::istream& input); 38 virtual void writeToGroupDef(GroupDefinition*) const; 39 40 private: 41 42 BzMaterial material; // holds current defaults 43 44 std::vector<char> checkTypes; 45 std::vector<cfvec3> checkPoints; 46 std::vector<cfvec3> vertices; 47 std::vector<cfvec3> normals; 48 std::vector<cfvec2> texcoords; 49 50 int phydrv; 51 bool noclusters; 52 bool smoothBounce; 53 bool decorative; 54 55 std::vector<std::string> lodOptions; 56 class MeshDrawInfo* drawInfo; 57 58 CustomMeshFace* face; 59 std::vector<CustomMeshFace*> faces; 60 }; 61 62 63 #endif /* __CUSTOM_MESH_H__ */ 64 65 // Local variables: *** 66 // mode: C++ *** 67 // tab-width: 4*** 68 // c-basic-offset: 4 *** 69 // indent-tabs-mode: nil *** 70 // End: *** 71 // ex: shiftwidth=4 tabstop=4 72