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

Method getReflectionMaterial

Engine/source/scene/reflectionManager.cpp:323–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323BaseMatInstance* ReflectionManager::getReflectionMaterial( BaseMatInstance *inMat ) const
324{
325 // See if we have an existing material hook.
326 ReflectionMaterialHook *hook = static_cast<ReflectionMaterialHook*>( inMat->getHook( ReflectionMaterialHook::Type ) );
327 if ( !hook )
328 {
329 // Create a hook and initialize it using the incoming material.
330 hook = new ReflectionMaterialHook;
331 hook->init( inMat );
332 inMat->addHook( hook );
333 }
334
335 return hook->getReflectMat();
336}
337
338bool ReflectionManager::_handleDeviceEvent( GFXDevice::GFXDeviceEventType evt )
339{

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected