Ignore:
Timestamp:
12/22/05 01:36:06 (19 years ago)
Author:
mattausch
Message:

changed render simulator (probability that view cell is crossed)

File:
1 edited

Legend:

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

    r475 r477  
    151151                // pickup a random face of each mesh  
    152152                Mesh *mesh = mi->GetMesh(); 
    153                 int face = (int)RandomValue(0, (int)mesh->mFaces.size() - 1); 
     153                int face = (int)RandomValue(0, (Real)((int)mesh->mFaces.size() - 1)); 
    154154                 
    155155                Polygon3 poly(mesh->mFaces[face], mesh); 
    156156                poly.Scale(1.001f); 
    157157                // now extend a random edge of the face 
    158                 int edge = (int)RandomValue(0, (int)poly.mVertices.size() - 1); 
     158                int edge = (int)RandomValue(0, (Real)((int)poly.mVertices.size() - 1)); 
    159159                float t = RandomValue(0.0f, 1.0f); 
    160160                Vector3 target = t*poly.mVertices[edge] + (1.0f-t)*poly.mVertices[(edge + 1)% 
     
    192192                Debug << "Finding random neighbour" << endl;     
    193193                for (int tries = 0; tries < 10; tries++) { 
    194                         int index = (int)RandomValue(0, pvsSize - 1); 
     194                        int index = (int)RandomValue(0, (Real)(pvsSize - 1)); 
    195195                        KdPvsData data; 
    196196                        KdNode *node; 
Note: See TracChangeset for help on using the changeset viewer.