Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ShapeSettings Class Referenceabstract

#include <Shape.h>

Inheritance diagram for ShapeSettings:
SerializableObject RefTarget< ShapeSettings > NonCopyable CompoundShapeSettings ConvexShapeSettings DecoratedShapeSettings EmptyShapeSettings HeightFieldShapeSettings MeshShapeSettings PlaneShapeSettings MutableCompoundShapeSettings StaticCompoundShapeSettings BoxShapeSettings CapsuleShapeSettings ConvexHullShapeSettings CylinderShapeSettings SphereShapeSettings TaperedCapsuleShapeSettings TaperedCylinderShapeSettings TriangleShapeSettings OffsetCenterOfMassShapeSettings RotatedTranslatedShapeSettings ScaledShapeSettings

Public Types

using ShapeResult = Result< Ref< Shape > >
 

Public Member Functions

virtual ShapeResult Create () const =0
 Create a shape according to the settings specified by this object.
 
void ClearCachedResult ()
 
- 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< ShapeSettings >
 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
 

Public Attributes

uint64 mUserData = 0
 User data (to be used freely by the application)
 

Protected Attributes

ShapeResult mCachedResult
 
- Protected Attributes inherited from RefTarget< ShapeSettings >
atomic< uint32mRefCount
 Current reference count.
 

Additional Inherited Members

- Static Public Member Functions inherited from RefTarget< ShapeSettings >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION.
 
- Static Protected Attributes inherited from RefTarget< ShapeSettings >
static constexpr uint32 cEmbedded
 A large value that gets added to the refcount to mark the object as embedded.
 

Detailed Description

Class that can construct shapes and that is serializable using the ObjectStream system. Can be used to store shape data in 'uncooked' form (i.e. in a form that is still human readable and authorable). Once the shape has been created using the Create() function, the data will be moved into the Shape class in a form that is optimized for collision detection. After this, the ShapeSettings object is no longer needed and can be destroyed. Each shape class has a derived class of the ShapeSettings object to store shape specific data.

Member Typedef Documentation

◆ ShapeResult

Member Function Documentation

◆ ClearCachedResult()

void ShapeSettings::ClearCachedResult ( )
inline

When creating a shape, the result is cached so that calling Create() again will return the same shape. If you make changes to the ShapeSettings you need to call this function to clear the cached result to allow Create() to build a new shape.

◆ Create()

Member Data Documentation

◆ mCachedResult

ShapeResult ShapeSettings::mCachedResult
mutableprotected

◆ mUserData

uint64 ShapeSettings::mUserData = 0

User data (to be used freely by the application)


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