environment: Add stub for Get/SetPerformanceSettings
This commit is contained in:
parent
23bbdea910
commit
6c1ec77980
|
@ -182,6 +182,8 @@ JoltBPLayerInterfaceImpl JoltPhysicsEnvironment::s_BPLayerInterface;
|
||||||
JoltPhysicsEnvironment::JoltPhysicsEnvironment()
|
JoltPhysicsEnvironment::JoltPhysicsEnvironment()
|
||||||
: m_ContactListener( m_PhysicsSystem )
|
: m_ContactListener( m_PhysicsSystem )
|
||||||
{
|
{
|
||||||
|
m_PerformanceParams.Defaults();
|
||||||
|
|
||||||
m_PhysicsSystem.Init(
|
m_PhysicsSystem.Init(
|
||||||
kMaxBodies, kNumBodyMutexes, kMaxBodyPairs, kMaxContactConstraints,
|
kMaxBodies, kNumBodyMutexes, kMaxBodyPairs, kMaxContactConstraints,
|
||||||
s_BPLayerInterface, JoltBroadPhaseCanCollide, JoltObjectCanCollide );
|
s_BPLayerInterface, JoltBroadPhaseCanCollide, JoltObjectCanCollide );
|
||||||
|
@ -1176,12 +1178,20 @@ void JoltPhysicsEnvironment::SweepCollideable( const CPhysCollide *pCollide, con
|
||||||
|
|
||||||
void JoltPhysicsEnvironment::GetPerformanceSettings( physics_performanceparams_t *pOutput ) const
|
void JoltPhysicsEnvironment::GetPerformanceSettings( physics_performanceparams_t *pOutput ) const
|
||||||
{
|
{
|
||||||
Log_Stub( LOG_VJolt );
|
if ( pOutput )
|
||||||
|
*pOutput = m_PerformanceParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JoltPhysicsEnvironment::SetPerformanceSettings( const physics_performanceparams_t *pSettings )
|
void JoltPhysicsEnvironment::SetPerformanceSettings( const physics_performanceparams_t *pSettings )
|
||||||
{
|
{
|
||||||
Log_Stub( LOG_VJolt );
|
if ( pSettings )
|
||||||
|
{
|
||||||
|
m_PerformanceParams = *pSettings;
|
||||||
|
|
||||||
|
// Normalize these values to match VPhysics behaviour.
|
||||||
|
m_PerformanceParams.minFrictionMass = Clamp( m_PerformanceParams.minFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
||||||
|
m_PerformanceParams.maxFrictionMass = Clamp( m_PerformanceParams.maxFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -225,4 +225,6 @@ private:
|
||||||
bool m_EnableConstraintNotify = false;
|
bool m_EnableConstraintNotify = false;
|
||||||
|
|
||||||
mutable bool m_bActiveObjectCountFirst = true;
|
mutable bool m_bActiveObjectCountFirst = true;
|
||||||
|
|
||||||
|
physics_performanceparams_t m_PerformanceParams;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue