Jolt Physics
A multi core friendly Game Physics Engine
|
#include <PhysicsMaterial.h>
Public Types | |
using | PhysicsMaterialResult = Result<Ref<PhysicsMaterial>> |
Public Member Functions | |
virtual | ~PhysicsMaterial () override=default |
Virtual destructor. | |
virtual const char * | GetDebugName () const |
virtual Color | GetDebugColor () const |
virtual void | SaveBinaryState (StreamOut &inStream) const |
Saves the contents of the material in binary form to inStream. | |
Public Member Functions inherited from SerializableObject | |
virtual | ~SerializableObject ()=default |
Constructor. | |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Public Member Functions inherited from RefTarget< PhysicsMaterial > | |
RefTarget ()=default | |
Constructor. | |
RefTarget (const RefTarget &) | |
~RefTarget () | |
assert no one is referencing us | |
void | SetEmbedded () const |
RefTarget & | operator= (const RefTarget &) |
Assignment operator. | |
uint32 | GetRefCount () const |
Get current refcount of this object. | |
void | AddRef () const |
Add or release a reference to this object. | |
void | Release () const |
Static Public Member Functions | |
static PhysicsMaterialResult | sRestoreFromBinaryState (StreamIn &inStream) |
Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream inStream. | |
Static Public Member Functions inherited from RefTarget< PhysicsMaterial > | |
static int | sInternalGetRefCountOffset () |
INTERNAL HELPER FUNCTION USED BY SERIALIZATION. | |
Static Public Attributes | |
static RefConst< PhysicsMaterial > | sDefault |
Default material that is used when a shape has no materials defined. | |
Protected Member Functions | |
virtual void | RestoreBinaryState (StreamIn &inStream) |
This function should not be called directly, it is used by sRestoreFromBinaryState. | |
Additional Inherited Members | |
Protected Attributes inherited from RefTarget< PhysicsMaterial > | |
atomic< uint32 > | mRefCount |
Current reference count. | |
Static Protected Attributes inherited from RefTarget< PhysicsMaterial > | |
static constexpr uint32 | cEmbedded |
A large value that gets added to the refcount to mark the object as embedded. | |
This structure describes the surface of (part of) a shape. You should inherit from it to define additional information that is interesting for the simulation. The 2 materials involved in a contact could be used to decide which sound or particle effects to play.
If you inherit from this material, don't forget to create a suitable default material in sDefault
|
overridevirtualdefault |
Virtual destructor.
Reimplemented in PhysicsMaterialSimple.
Reimplemented in PhysicsMaterialSimple.
This function should not be called directly, it is used by sRestoreFromBinaryState.
Reimplemented in PhysicsMaterialSimple.
Saves the contents of the material in binary form to inStream.
Reimplemented in PhysicsMaterialSimple.
|
static |
Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream inStream.
|
static |
Default material that is used when a shape has no materials defined.