mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:56:45 +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) {
|
void Avatar::simulate(float deltaTime, bool inView) {
|
||||||
_simulationRate.increment();
|
_simulationRate.increment();
|
||||||
|
if (inView) {
|
||||||
|
_simulationInViewRate.increment();
|
||||||
|
}
|
||||||
|
|
||||||
PROFILE_RANGE(simulation, "simulate");
|
PROFILE_RANGE(simulation, "simulate");
|
||||||
PerformanceTimer perfTimer("simulate");
|
PerformanceTimer perfTimer("simulate");
|
||||||
|
@ -368,6 +371,8 @@ float Avatar::getSimulationRate(const QString& rateName) {
|
||||||
return _simulationRate.rate();
|
return _simulationRate.rate();
|
||||||
} else if (rateName == "avatar") {
|
} else if (rateName == "avatar") {
|
||||||
return _simulationRate.rate();
|
return _simulationRate.rate();
|
||||||
|
} else if (rateName == "avatarInView") {
|
||||||
|
return _simulationInViewRate.rate();
|
||||||
} else if (rateName == "skeletonModel") {
|
} else if (rateName == "skeletonModel") {
|
||||||
return _skeletonModelSimulationRate.rate();
|
return _skeletonModelSimulationRate.rate();
|
||||||
} else if (rateName == "jointData") {
|
} else if (rateName == "jointData") {
|
||||||
|
|
|
@ -263,6 +263,7 @@ protected:
|
||||||
|
|
||||||
// Some rate tracking support
|
// Some rate tracking support
|
||||||
RateCounter<> _simulationRate;
|
RateCounter<> _simulationRate;
|
||||||
|
RateCounter<> _simulationInViewRate;
|
||||||
RateCounter<> _skeletonModelSimulationRate;
|
RateCounter<> _skeletonModelSimulationRate;
|
||||||
RateCounter<> _jointDataSimulationRate;
|
RateCounter<> _jointDataSimulationRate;
|
||||||
|
|
||||||
|
|
|
@ -75,9 +75,10 @@ function updateOverlays() {
|
||||||
+" FT: " + AvatarManager.getAvatarDataRate(avatarID,"faceTracker").toFixed(2) + "kbps (" + AvatarManager.getAvatarUpdateRate(avatarID,"faceTracker").toFixed(2) + "hz)" + "\n"
|
+" 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"
|
+" JD: " + AvatarManager.getAvatarDataRate(avatarID,"jointData").toFixed(2) + "kbps (" + AvatarManager.getAvatarUpdateRate(avatarID,"jointData").toFixed(2) + "hz)" + "\n"
|
||||||
+"--- Simulation ---\n"
|
+"--- Simulation ---\n"
|
||||||
+"All: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatar").toFixed(2) + "\n"
|
+"All: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatar").toFixed(2) + "hz \n"
|
||||||
+" SM: " + AvatarManager.getAvatarSimulationRate(avatarID,"skeletonModel").toFixed(2) + "\n"
|
+" inView: " + AvatarManager.getAvatarSimulationRate(avatarID,"avatarInView").toFixed(2) + "hz \n"
|
||||||
+" JD: " + AvatarManager.getAvatarSimulationRate(avatarID,"jointData").toFixed(2) + "\n"
|
+" SM: " + AvatarManager.getAvatarSimulationRate(avatarID,"skeletonModel").toFixed(2) + "hz \n"
|
||||||
|
+" JD: " + AvatarManager.getAvatarSimulationRate(avatarID,"jointData").toFixed(2) + "hz \n"
|
||||||
|
|
||||||
if (avatarID in debugOverlays) {
|
if (avatarID in debugOverlays) {
|
||||||
// keep the overlay above the current position of this avatar
|
// keep the overlay above the current position of this avatar
|
||||||
|
|
Loading…
Reference in a new issue