MCPcopy Create free account
hub / github.com/carbonengine/trinity / UpdateRtMesh

Method UpdateRtMesh

trinity/Eve/Turret/EveTurretSet.cpp:3440–3473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3438}
3439
3440void EveTurretSet::UpdateRtMesh()
3441{
3442 USE_MAIN_THREAD_RENDER_CONTEXT();
3443 if( !renderContext.GetCaps().SupportsRaytracing() )
3444 {
3445 return;
3446 }
3447
3448 if( !m_visibleCount )
3449 {
3450 return;
3451 }
3452 if( !m_instanceBuffer.IsValid() )
3453 {
3454 return;
3455 }
3456 if( !m_geometryResource || !m_geometryResource->IsGood() || !m_turretEffect )
3457 {
3458 return;
3459 }
3460
3461 for( auto& turret : m_singleTurrets )
3462 {
3463 if( !turret.rtMesh )
3464 {
3465 turret.rtMesh = std::make_unique<Tr2RaytracingMesh>();
3466 }
3467 turret.rtMesh->UpdateRtMesh( m_geometryResource, 0, m_estimatedPixelDiameter );
3468 if( !turret.rtMeshArea )
3469 {
3470 turret.rtMeshArea = std::make_unique<Tr2RaytracingMeshArea>( 0 );
3471 }
3472 }
3473}
3474
3475void EveTurretSet::UpdateRtSkeleton()
3476{

Callers

nothing calls this directly

Calls 3

SupportsRaytracingMethod · 0.45
IsValidMethod · 0.45
IsGoodMethod · 0.45

Tested by

no test coverage detected