MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / toVirtualSource

Method toVirtualSource

core/src/core/path_data.cpp:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159Vector3f SoundPath::toVirtualSource(const ProbeBatch& probes,
160 int start,
161 int end) const
162{
163 if (direct)
164 {
165 return probes[start].influence.center;
166 }
167 else
168 {
169 auto totalDistance = distance(probes, start, end);
170 auto direction = Vector3f::unitVector(probes[lastProbe].influence.center - probes[end].influence.center);
171 return probes[end].influence.center + (totalDistance * direction);
172 }
173}
174
175Vector3f SoundPath::toVirtualSource(const ProbeBatch& probes,
176 const Vector3f& source,

Calls 2

distanceFunction · 0.85
unitVectorFunction · 0.50

Tested by

no test coverage detected