MCPcopy Create free account
hub / github.com/DFHack/dfhack / applyMaterial

Method applyMaterial

plugins/rendermax/renderer_light.cpp:450–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448 }
449}
450void lightingEngineViewscreen::applyMaterial(int tileId,const matLightDef& mat,float size, float thickness)
451{
452 if(mat.isTransparent)
453 {
454 addOclusion(tileId,mat.transparency,thickness);
455 }
456 else
457 ocupancy[tileId]=rgbf(0,0,0);
458 if(mat.isEmiting)
459 addLight(tileId,mat.makeSource(size));
460}
461bool lightingEngineViewscreen::applyMaterial(int tileId,int matType,int matIndex,float size,float thickness,const matLightDef* def)
462{
463 matLightDef* m=getMaterialDef(matType,matIndex);

Callers

nothing calls this directly

Calls 2

rgbfClass · 0.85
makeSourceMethod · 0.80

Tested by

no test coverage detected