//========= Copyright 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#ifndef PERFORMANCE_H
#define PERFORMANCE_H
#ifdef _WIN32
#pragma once
#endif
struct physics_performanceparams_t
{
int maxCollisionsPerObjectPerTimestep; // object will be frozen after this many collisions (visual hitching vs. CPU cost)
int maxCollisionChecksPerTimestep; // objects may penetrate after this many collision checks (can be extended in AdditionalCollisionChecksThisTick)
float maxVelocity; // limit world space linear velocity to this (in / s)
float maxAngularVelocity; // limit world space angular velocity to this (degrees / s)
float lookAheadTimeObjectsVsWorld; // predict collisions this far (seconds) into the future
float lookAheadTimeObjectsVsObject; // predict collisions this far (seconds) into the future
void Defaults()
{
maxCollisionsPerObjectPerTimestep = 6;
maxCollisionChecksPerTimestep = 250;
maxVelocity = 2000.0f;
maxAngularVelocity = 360.0f * 10.0f;
lookAheadTimeObjectsVsWorld = 1.0f;
lookAheadTimeObjectsVsObject = 0.5f;
}
};
#endif // PERFORMANCE_H