Ignore:
Timestamp:
12/16/05 18:52:33 (19 years ago)
Author:
mattausch
Message:

updated view cells, view cell manager. changed rendersimulator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp

    r468 r469  
    7575{ 
    7676        // cast ray to KD tree to find intersection with other objects 
    77   mKdTree->CastRay(ray); 
    78   VssRay vssRay(ray); 
    79   mViewCellsManager->ComputeSampleContributions(vssRay); 
    80   return vssRay.mPvsContribution; 
     77        mKdTree->CastRay(ray); 
     78        VssRay vssRay(ray); 
     79 
     80        mViewCellsManager->ComputeSampleContributions(vssRay); 
     81         
     82        return vssRay.mPvsContribution; 
    8183} 
    8284 
     
    149151                // pickup a random face of each mesh  
    150152                Mesh *mesh = mi->GetMesh(); 
    151                 int face = RandomValue(0, mesh->mFaces.size()-1); 
     153                int face = (int)Random((int)mesh->mFaces.size()); 
    152154                 
    153155                Polygon3 poly(mesh->mFaces[face], mesh); 
    154                 poly.Scale(1.001); 
     156                poly.Scale(1.001f); 
    155157                // now extend a random edge of the face 
    156                 int edge = RandomValue(0, poly.mVertices.size()-1); 
    157                 float t = RandomValue(0.0f,1.0f); 
     158                int edge = Random((int)poly.mVertices.size()); 
     159                float t = RandomValue(0.0f, 1.0f); 
    158160                Vector3 target = t*poly.mVertices[edge] + (1.0f-t)*poly.mVertices[(edge + 1)% 
    159161                        poly.mVertices.size()]; 
     
    190192                Debug << "Finding random neighbour" << endl;     
    191193                for (int tries = 0; tries < 10; tries++) { 
    192                         int index = RandomValue(0, pvsSize - 1); 
     194                        int index = Random(pvsSize); 
    193195                        KdPvsData data; 
    194196                        KdNode *node; 
Note: See TracChangeset for help on using the changeset viewer.