Ignore:
Timestamp:
04/23/07 16:19:30 (17 years ago)
Author:
mattausch
Message:

implemented part of rendering estimation of wimmer et al. for view space / object space subdivision.
warning: not working with undersampling estimation + local visibility based subdivision.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspTree.h

    r2288 r2332  
    4545 
    4646 
    47 #define WORK_WITH_VIEWCELLS 0 
    4847 
    4948/** View space partition statistics. 
     
    573572                float mBackPvs; 
    574573 
     574                float mFrontTriangles; 
     575                float mBackTriangles; 
     576                 
    575577                float mCorrectedFrontRenderCost; 
    576578                float mCorrectedBackRenderCost; 
     
    733735        void SetViewCellsTree(ViewCellsTree *vt) { mViewCellsTree = vt; } 
    734736 
    735 #if WORK_WITH_VIEWCELLS 
    736         /** Remove the references of the parent view cell from the kd nodes associated with 
    737                 the objects. 
    738         */ 
    739         void RemoveParentViewCellReferences(ViewCell *parent) const; 
    740  
    741         /** Adds references to the view cell to the kd nodes associated with the objects. 
    742         */ 
    743         void AddViewCellReferences(ViewCell *vc) const; 
    744 #endif 
    745  
    746         VspNode *SubdivideAndCopy(SplitQueue &tQueue, SubdivisionCandidate *splitCandidate); 
    747737 
    748738        PerfTimer mSortTimer; 
     
    10751065                                                                ViewCell *back) const; 
    10761066 
    1077         void CreateViewCell(VspTraversalData &tData, const bool updatePvs); 
     1067        void CreateViewCell(VspTraversalData &tData,  
     1068                                                const bool updatePvs, 
     1069                                                const float renderCost, 
     1070                                                const int pvs); 
    10781071 
    10791072        /** Collect split candidates which are affected by the last split 
     
    11131106        */ 
    11141107        void Initialise(const VssRayContainer &rays, 
    1115                                         AxisAlignedBox3 *forcedBoundingBox); 
     1108                                        AxisAlignedBox3 *forcedBoundingBox, 
     1109                                        const ObjectContainer &objects); 
    11161110 
    11171111        int CompressObjects(); 
    11181112 
    11191113        int CompressObjects(VspLeaf *leaf); 
    1120  
    1121         void TraverseRayPacket(); 
    11221114 
    11231115#ifdef USE_SSE 
     
    11251117        struct RayPacket 
    11261118        { 
    1127                 union { float ox[4]; __m128 ox4; }; 
    1128                 union { float oy[4]; __m128 oy4; }; 
    1129                 union { float oz[4]; __m128 oz4; }; 
    1130                 union { float dx[4]; __m128 dx4; }; 
    1131                 union { float dy[4]; __m128 dy4; }; 
    1132                 union { float dz[4]; __m128 dz4; }; 
     1119                union { float mOriginX[4]; __m128 mOriginX4; }; 
     1120                union { float mOriginY[4]; __m128 mOriginY4; }; 
     1121                union { float mOriginZ[4]; __m128 mOriginZ4; }; 
     1122 
     1123                union { float mTerminationX[4]; __m128 mTerminationX4; }; 
     1124                union { float mTerminationY[4]; __m128 mTerminationY4; }; 
     1125                union { float mTerminationZ[4]; __m128 mTerminationZ4; }; 
     1126 
     1127                ViewCellContainer mViewCells[4]; 
    11331128        }; 
     1129 
     1130        struct PacketTraversalData 
     1131        { 
     1132                VspNode *mNode; 
     1133 
     1134                union { float mExitPointX[4]; __m128 mExitPointX4; }; 
     1135                union { float mExitPointY[4]; __m128 mExitPointY4; }; 
     1136                union { float mExitPointZ[4]; __m128 mExitPointZ4; }; 
     1137 
     1138                union { float mMaxT[4]; __m128 mMaxT4; }; 
     1139                union { float mMask[4]; __m128 mMask4; }; 
     1140 
     1141                PacketTraversalData () {} 
     1142                PacketTraversalData (VspNode *n,  
     1143                                                         const __m128 &px, const __m128 &py, const __m128 &pz,  
     1144                                                         const __m128 &maxt, 
     1145                                                         const __m128 &mask): 
     1146                mNode(n),  
     1147                mExitPointX4(px), mExitPointY4(py), mExitPointZ4(pz), 
     1148                mMaxT4(maxt), 
     1149                mMask4(mask) 
     1150                {} 
     1151        }; 
     1152 
     1153         
     1154        int TraverseRayPacket(RayPacket &rp, 
     1155                                                  const bool useMailboxing); 
     1156 
    11341157#endif 
    11351158 
     
    11411164        HierarchyManager *mHierarchyManager; 
    11421165        BvHierarchy *mBvHierarchy; 
    1143  
    1144         //OspTree *mOspTree; 
    1145         //bool mUseKdPvsForHeuristics; 
    11461166         
    11471167        ViewCellsManager *mViewCellsManager; 
Note: See TracChangeset for help on using the changeset viewer.