Loading [MathJax]/extensions/tex2jax.js
Jolt Physics
A multi core friendly Game Physics Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PhysicsMaterialSimple Class Reference

Sample implementation of PhysicsMaterial that just holds the needed properties directly. More...

#include <PhysicsMaterialSimple.h>

Inheritance diagram for PhysicsMaterialSimple:
PhysicsMaterial SerializableObject RefTarget< PhysicsMaterial >

Public Member Functions

 PhysicsMaterialSimple ()=default
 Constructor.
 
 PhysicsMaterialSimple (const string_view &inName, ColorArg inColor)
 
virtual const char * GetDebugName () const override
 
virtual Color GetDebugColor () const override
 
virtual void SaveBinaryState (StreamOut &inStream) const override
 Saves the contents of the material in binary form to inStream.
 
- Public Member Functions inherited from PhysicsMaterial
 PhysicsMaterial ()=default
 Constructor.
 
virtual ~PhysicsMaterial () override=default
 
- Public Member Functions inherited from SerializableObject
virtual ~SerializableObject ()=default
 Destructor.
 
- Public Member Functions inherited from RefTarget< PhysicsMaterial >
 RefTarget ()=default
 Constructor.
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us
 
void SetEmbedded () const
 
RefTargetoperator= (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
 

Protected Member Functions

virtual void RestoreBinaryState (StreamIn &inStream) override
 This function should not be called directly, it is used by sRestoreFromBinaryState.
 
- Protected Member Functions inherited from PhysicsMaterial
 PhysicsMaterial (const PhysicsMaterial &)=default
 Don't allow copy constructing this base class, but allow derived classes to copy themselves.
 
PhysicsMaterialoperator= (const PhysicsMaterial &)=default
 
- Protected Member Functions inherited from SerializableObject
 SerializableObject ()=default
 Don't allow (copy) constructing this base class, but allow derived classes to (copy) construct themselves.
 
 SerializableObject (const SerializableObject &)=default
 
SerializableObjectoperator= (const SerializableObject &)=default
 

Additional Inherited Members

- Public Types inherited from PhysicsMaterial
using PhysicsMaterialResult = Result<Ref<PhysicsMaterial>>
 
- Static Public Member Functions inherited from PhysicsMaterial
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 inherited from PhysicsMaterial
static RefConst< PhysicsMaterialsDefault
 Default material that is used when a shape has no materials defined.
 
- Protected Attributes inherited from RefTarget< PhysicsMaterial >
atomic< uint32mRefCount
 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.
 

Detailed Description

Sample implementation of PhysicsMaterial that just holds the needed properties directly.

Constructor & Destructor Documentation

◆ PhysicsMaterialSimple() [1/2]

PhysicsMaterialSimple::PhysicsMaterialSimple ( )
default

Constructor.

◆ PhysicsMaterialSimple() [2/2]

PhysicsMaterialSimple::PhysicsMaterialSimple ( const string_view & inName,
ColorArg inColor )
inline

Member Function Documentation

◆ GetDebugColor()

virtual Color PhysicsMaterialSimple::GetDebugColor ( ) const
inlineoverridevirtual

Reimplemented from PhysicsMaterial.

◆ GetDebugName()

virtual const char * PhysicsMaterialSimple::GetDebugName ( ) const
inlineoverridevirtual

Reimplemented from PhysicsMaterial.

◆ RestoreBinaryState()

void PhysicsMaterialSimple::RestoreBinaryState ( StreamIn & inStream)
overrideprotectedvirtual

This function should not be called directly, it is used by sRestoreFromBinaryState.

Reimplemented from PhysicsMaterial.

◆ SaveBinaryState()

void PhysicsMaterialSimple::SaveBinaryState ( StreamOut & inStream) const
overridevirtual

Saves the contents of the material in binary form to inStream.

Reimplemented from PhysicsMaterial.


The documentation for this class was generated from the following files: