- Timestamp:
- 12/22/05 01:36:06 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
r475 r477 151 151 // pickup a random face of each mesh 152 152 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)); 154 154 155 155 Polygon3 poly(mesh->mFaces[face], mesh); 156 156 poly.Scale(1.001f); 157 157 // 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)); 159 159 float t = RandomValue(0.0f, 1.0f); 160 160 Vector3 target = t*poly.mVertices[edge] + (1.0f-t)*poly.mVertices[(edge + 1)% … … 192 192 Debug << "Finding random neighbour" << endl; 193 193 for (int tries = 0; tries < 10; tries++) { 194 int index = (int)RandomValue(0, pvsSize - 1);194 int index = (int)RandomValue(0, (Real)(pvsSize - 1)); 195 195 KdPvsData data; 196 196 KdNode *node;
Note: See TracChangeset
for help on using the changeset viewer.