2019-12-26 14:45:42 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-06-08 17:15:34 -04:00
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
|
ChaosPhysicalMaterial.cpp
|
|
|
|
|
=============================================================================*/
|
|
|
|
|
|
2020-08-11 01:36:57 -04:00
|
|
|
#include "Chaos/ChaosPhysicalMaterial.h"
|
2020-04-20 04:54:20 -04:00
|
|
|
#include "Chaos/Defines.h"
|
2019-06-08 17:15:34 -04:00
|
|
|
|
2022-09-24 13:57:58 -04:00
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(ChaosPhysicalMaterial)
|
|
|
|
|
|
2019-06-08 17:15:34 -04:00
|
|
|
UChaosPhysicalMaterial::UChaosPhysicalMaterial(const FObjectInitializer& ObjectInitializer)
|
|
|
|
|
: Super(ObjectInitializer)
|
|
|
|
|
{
|
2020-04-20 04:54:20 -04:00
|
|
|
// Initialize values from FChaosPhysicsMaterial
|
|
|
|
|
Chaos::FChaosPhysicsMaterial TmpMat;
|
|
|
|
|
|
|
|
|
|
Friction = TmpMat.Friction;
|
|
|
|
|
StaticFriction = TmpMat.StaticFriction;
|
|
|
|
|
Restitution = TmpMat.Restitution;
|
|
|
|
|
LinearEtherDrag = TmpMat.LinearEtherDrag;
|
|
|
|
|
AngularEtherDrag = TmpMat.AngularEtherDrag;
|
|
|
|
|
SleepingAngularVelocityThreshold = TmpMat.SleepingAngularThreshold;
|
|
|
|
|
SleepingLinearVelocityThreshold = TmpMat.SleepingLinearThreshold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void UChaosPhysicalMaterial::CopyTo(Chaos::FChaosPhysicsMaterial& Mat) const
|
|
|
|
|
{
|
|
|
|
|
Mat.Friction = Friction;
|
|
|
|
|
Mat.StaticFriction = StaticFriction;
|
|
|
|
|
Mat.Restitution = Restitution;
|
|
|
|
|
Mat.LinearEtherDrag = LinearEtherDrag;
|
|
|
|
|
Mat.AngularEtherDrag = AngularEtherDrag;
|
|
|
|
|
Mat.SleepingLinearThreshold = SleepingLinearVelocityThreshold;
|
|
|
|
|
Mat.SleepingAngularThreshold = SleepingAngularVelocityThreshold;
|
2019-06-08 17:15:34 -04:00
|
|
|
}
|
2022-09-24 13:57:58 -04:00
|
|
|
|