mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
add inView simulation stats
This commit is contained in:
parent
c2171ca08f
commit
41dc498888
3 changed files with 10 additions and 3 deletions
|
@ -307,6 +307,9 @@ bool Avatar::shouldDie() const {
|
|||
|
||||
void Avatar::simulate(float deltaTime, bool inView) {
|
||||
_simulationRate.increment();
|
||||
if (inView) {
|
||||
_simulationInViewRate.increment();
|
||||
}
|
||||
|
||||
PROFILE_RANGE(simulation, "simulate");
|
||||
PerformanceTimer perfTimer("simulate");
|
||||
|
@ -368,6 +371,8 @@ float Avatar::getSimulationRate(const QString& rateName) {
|
|||
return _simulationRate.rate();
|
||||
} else if (rateName == "avatar") {
|
||||
return _simulationRate.rate();
|
||||
} else if (rateName == "avatarInView") {
|
||||
return _simulationInViewRate.rate();
|
||||
} else if (rateName == "skeletonModel") {
|
||||
return _skeletonModelSimulationRate.rate();
|
||||
} else if (rateName == "jointData") {
|
||||
|
|
|
@ -263,6 +263,7 @@ protected:
|
|||
|
||||
// Some rate tracking support
|
||||
RateCounter<> _simulationRate;
|
||||
RateCounter<> _simulationInViewRate;
|
||||
RateCounter<> _skeletonModelSimulationRate;
|
||||
RateCounter<> _jointDataSimulationRate;
|
||||
|
||||
|
|
|
@ -75,9 +75,10 @@ function updateOverlays() {
|
|||
+" FT: " + AvatarManager.getAvatarDataRate(avatarID,"faceTracker").toFixed(2) + "kbps (" + AvatarManager.getAvatarUpdateRate(avatarID,"faceTracker").toFixed(2) + "hz)" + "\n"
|
||||
+" JD: " + AvatarManager.getAvatarDataRate(avatarID,"jointData").toFixed(2) + "kbps (" + AvatarManager.getAvatarUpdateRate(avatarID,"jointData").toFixed(2) + "hz)" + "\n"
|
||||
+"--- Simulation ---\n"
|
||||
+"All: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatar").toFixed(2) + "\n"
|
||||
+" SM: " + AvatarManager.getAvatarSimulationRate(avatarID,"skeletonModel").toFixed(2) + "\n"
|
||||
+" JD: " + AvatarManager.getAvatarSimulationRate(avatarID,"jointData").toFixed(2) + "\n"
|
||||
+"All: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatar").toFixed(2) + "hz \n"
|
||||
+" inView: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatarInView").toFixed(2) + "hz \n"
|
||||
+" SM: " + AvatarManager.getAvatarSimulationRate(avatarID,"skeletonModel").toFixed(2) + "hz \n"
|
||||
+" JD: " + AvatarManager.getAvatarSimulationRate(avatarID,"jointData").toFixed(2) + "hz \n"
|
||||
|
||||
if (avatarID in debugOverlays) {
|
||||
// keep the overlay above the current position of this avatar
|
||||
|
|
Loading…
Reference in a new issue