| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include <Jolt/Physics/Collision/PhysicsMaterial.h> |
| 8 |
|
| 9 |
JPH_NAMESPACE_BEGIN |
| 10 |
|
| 11 |
|
| 12 |
class JPH_EXPORT PhysicsMaterialSimple : public PhysicsMaterial |
| 13 |
{ |
| 14 |
JPH_DECLARE_SERIALIZABLE_VIRTUAL(JPH_EXPORT, PhysicsMaterialSimple) |
| 15 |
|
| 16 |
public: |
| 17 |
|
| 18 |
PhysicsMaterialSimple() = default; |
| 19 |
PhysicsMaterialSimple(const string_view &inName, ColorArg inColor) : mDebugName(inName), mDebugColor(inColor) { } |
| 20 |
|
| 21 |
|
| 22 |
virtual const char * GetDebugName() const override { return mDebugName.c_str(); } |
| 23 |
virtual Color GetDebugColor() const override { return mDebugColor; } |
| 24 |
|
| 25 |
|
| 26 |
virtual void SaveBinaryState(StreamOut &inStream) const override; |
| 27 |
|
| 28 |
protected: |
| 29 |
|
| 30 |
virtual void RestoreBinaryState(StreamIn &inStream) override; |
| 31 |
|
| 32 |
private: |
| 33 |
String mDebugName; |
| 34 |
Color mDebugColor = Color::sGrey; |
| 35 |
}; |
| 36 |
|
| 37 |
JPH_NAMESPACE_END |