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

Method RegisterAudioGeometry

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:4067–4092  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4065}
4066
4067void EveSpaceObject2::RegisterAudioGeometry()
4068{
4069 if( !m_isAudioOccluder )
4070 {
4071 return;
4072 }
4073 if( !m_audioGeometryRegistered && m_audioGeometry && m_mesh && m_geometryResFromMesh && m_geometryResFromMesh->IsGood() )
4074 {
4075 int meshIx = m_mesh->GetMeshIndex();
4076 const AudioGeometryResData* audioGeo = m_geometryResFromMesh->GetAudioGeometry( meshIx );
4077
4078 if( audioGeo && !audioGeo->m_vertices.empty() )
4079 {
4080 Tr2AudGeometryData data;
4081
4082 data.m_vertices = audioGeo->m_vertices;
4083 data.m_indices = audioGeo->m_indices;
4084 data.m_maxBounds = audioGeo->m_maxBounds;
4085 data.m_minBounds = audioGeo->m_minBounds;
4086
4087 m_audioGeometry->SetGeometry( audioGeo->m_id, m_audioInstanceId, data, m_worldTransform );
4088 m_audioGeometrySetId = audioGeo->m_id;
4089 m_audioGeometryRegistered = true;
4090 }
4091 }
4092}

Callers

nothing calls this directly

Calls 5

GetMeshIndexMethod · 0.80
emptyMethod · 0.80
SetGeometryMethod · 0.80
IsGoodMethod · 0.45
GetAudioGeometryMethod · 0.45

Tested by

no test coverage detected