Changeset 3241 for GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter/VisibilitySolutionConverter.h
- Timestamp:
- 01/02/09 13:47:05 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter/VisibilitySolutionConverter.h
r3240 r3241 3 3 4 4 5 #include "SimpleVec.h" 5 #include "Vector3.h" 6 #include "Triangle3.h" 6 7 #include <string> 7 8 #include <vector> 8 9 #include "AxisAlignedBox3.h" 9 10 11 10 12 11 typedef std::vector< SimpleVec> VertexArray;13 typedef std::vector<CHCDemoEngine::Vector3> VertexArray; 12 14 typedef std::pair<float, float> TexCoord; 13 15 … … 15 17 16 18 struct BvhInterior; 19 20 21 22 struct Geometry 23 { 24 CHCDemoEngine::Vector3 *mVertices; 25 CHCDemoEngine::Vector3 *mNormals; 26 TexCoord *mTexCoords; 27 28 int mVertexCount; 29 int mTexcoordCount; 30 }; 31 17 32 18 33 struct BvhNode … … 36 51 int Count() const { return last - first + 1; } 37 52 38 SimpleVec bmin; 39 SimpleVec bmax; 53 CHCDemoEngine::AxisAlignedBox3 box; 40 54 41 55 BvhInterior *parent; … … 54 68 struct BvhLeaf: public BvhNode 55 69 { 56 //Color color; 57 int texture; 70 Geometry *geometry; 58 71 59 BvhLeaf(): BvhNode(), texture(0) {}72 BvhLeaf(): BvhNode(), geometry(NULL) {} 60 73 }; 61 74 … … 79 92 protected: 80 93 81 struct Geometry82 {83 SimpleVec *mVertices;84 SimpleVec *mNormals;85 TexCoord *mTexCoords;86 87 int mVertexCount;88 int mTexcoordCount;89 };90 94 91 95 void LoadShape(const VertexArray &vertices, … … 136 140 void WriteNextNode(ogzstream &stream, BvhNode *parent); 137 141 142 void UpdateLeafBox(BvhLeaf *leaf); 143 144 void UpdateNodeBox(BvhNode *node); 138 145 139 146 … … 146 153 std::vector<int> mGlobalTriangleIds; 147 154 148 std::vector<Bvh Node *> mBvhNodes;155 std::vector<BvhLeaf *> mBvhLeaves; 149 156 150 157 BvhNode *mRoot;
Note: See TracChangeset
for help on using the changeset viewer.