Ignore:
Timestamp:
01/02/09 13:47:05 (15 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter/VisibilitySolutionConverter.h

    r3240 r3241  
    33 
    44 
    5 #include "SimpleVec.h" 
     5#include "Vector3.h" 
     6#include "Triangle3.h" 
    67#include <string> 
    78#include <vector> 
    89#include "AxisAlignedBox3.h" 
    910 
     11         
    1012 
    11 typedef std::vector<SimpleVec> VertexArray; 
     13typedef std::vector<CHCDemoEngine::Vector3> VertexArray; 
    1214typedef std::pair<float, float> TexCoord; 
    1315 
     
    1517 
    1618struct BvhInterior; 
     19 
     20 
     21 
     22struct Geometry 
     23{ 
     24        CHCDemoEngine::Vector3 *mVertices; 
     25        CHCDemoEngine::Vector3 *mNormals; 
     26        TexCoord *mTexCoords; 
     27 
     28        int mVertexCount; 
     29        int mTexcoordCount; 
     30}; 
     31 
    1732 
    1833struct BvhNode 
     
    3651        int Count() const { return last - first + 1; } 
    3752 
    38         SimpleVec bmin; 
    39         SimpleVec bmax; 
     53        CHCDemoEngine::AxisAlignedBox3 box; 
    4054 
    4155        BvhInterior *parent; 
     
    5468struct BvhLeaf: public BvhNode 
    5569{ 
    56         //Color color; 
    57         int texture; 
     70        Geometry *geometry; 
    5871 
    59         BvhLeaf(): BvhNode(), texture(0) {} 
     72        BvhLeaf(): BvhNode(), geometry(NULL) {} 
    6073}; 
    6174 
     
    7992protected: 
    8093 
    81         struct Geometry 
    82         { 
    83                 SimpleVec *mVertices; 
    84                 SimpleVec *mNormals; 
    85                 TexCoord *mTexCoords; 
    86  
    87                 int mVertexCount; 
    88                 int mTexcoordCount; 
    89         }; 
    9094 
    9195        void LoadShape(const VertexArray &vertices, 
     
    136140        void WriteNextNode(ogzstream &stream, BvhNode *parent); 
    137141 
     142        void UpdateLeafBox(BvhLeaf *leaf); 
     143 
     144        void UpdateNodeBox(BvhNode *node); 
    138145 
    139146 
     
    146153        std::vector<int> mGlobalTriangleIds; 
    147154 
    148         std::vector<BvhNode *> mBvhNodes; 
     155        std::vector<BvhLeaf *> mBvhLeaves; 
    149156 
    150157        BvhNode *mRoot; 
Note: See TracChangeset for help on using the changeset viewer.