MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getReflectionMaterial

Method getReflectionMaterial

Engine/source/scene/reflectionManager.cpp:309–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309BaseMatInstance* ReflectionManager::getReflectionMaterial( BaseMatInstance *inMat ) const
310{
311 // See if we have an existing material hook.
312 ReflectionMaterialHook *hook = static_cast<ReflectionMaterialHook*>( inMat->getHook( ReflectionMaterialHook::Type ) );
313 if ( !hook )
314 {
315 // Create a hook and initialize it using the incoming material.
316 hook = new ReflectionMaterialHook;
317 hook->init( inMat );
318 inMat->addHook( hook );
319 }
320
321 return hook->getReflectMat();
322}
323
324bool ReflectionManager::_handleDeviceEvent( GFXDevice::GFXDeviceEventType evt )
325{

Callers 1

initMatInstancesMethod · 0.80

Calls 4

addHookMethod · 0.80
getHookMethod · 0.45
initMethod · 0.45
getReflectMatMethod · 0.45

Tested by

no test coverage detected