Changeset 464 for trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp
- Timestamp:
- 12/14/05 15:25:44 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VssRay.cpp
r459 r464 158 158 159 159 void 160 GenerateExtendedConvexCombinationWeights2(float &w1, 161 float &w2, 162 const float overlap 163 ) 164 { 165 w1 = RandomValue(-overlap, 1.0f + overlap); 166 w2 = 1.0f - w1; 167 } 168 169 void 160 170 GenerateExtendedConvexCombinationWeights(float &w1, 161 171 float &w2, … … 164 174 ) 165 175 { 166 w1 = RandomValue(-overlap, 1.0f + overlap); 167 w2 = RandomValue(-overlap, 1.0f + overlap); 168 w3 = 1.0f - w1 - w2; 176 177 while (1) { 178 w1 = RandomValue(-overlap, 1.0f + overlap); 179 w2 = RandomValue(-overlap, 1.0f + overlap); 180 w3 = 1.0f + overlap - w1 - w2; 181 if (w3 >= -overlap && w3 <= 1.0f + overlap) 182 break; 183 /* 184 w3 = RandomValue(0.0f, 1.0f + overlap); 185 186 float sum = w1 + w2 + w3; 187 if (sum>0.0f) { 188 w1/=sum; 189 w2/=sum; 190 w3/=sum; 191 break; 192 } 193 */ 194 } 169 195 }
Note: See TracChangeset
for help on using the changeset viewer.