MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetExitanceForSurface

Function SetExitanceForSurface

editor/rad_init.cpp:219–234  ·  view source on GitHub ↗

Sets all the elements of a surface to their initial unshot exitance values

Source from the content-addressed store, hash-verified

217
218// Sets all the elements of a surface to their initial unshot exitance values
219void SetExitanceForSurface(rad_surface *surf) {
220 int i;
221
222 surf->exitance = surf->emittance;
223
224 for (i = 0; i < surf->xresolution * surf->yresolution; i++) {
225 if (Shoot_from_patch) {
226 surf->elements[i].exitance.r = 0;
227 surf->elements[i].exitance.g = 0;
228 surf->elements[i].exitance.b = 0;
229 } else
230 surf->elements[i].exitance = surf->emittance;
231 }
232
233 rad_TotalFlux += GetUnsentFlux(surf);
234}
235
236// Find the surface we want to shoot from
237void UpdateUnsentValues() {

Callers 1

InitExitanceFunction · 0.85

Calls 1

GetUnsentFluxFunction · 0.85

Tested by

no test coverage detected