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 > CompoundShapeSettings ConvexShapeSettings DecoratedShapeSettings HeightFieldShapeSettings MeshShapeSettings MutableCompoundShapeSettings StaticCompoundShapeSettings BoxShapeSettings CapsuleShapeSettings ConvexHullShapeSettings CylinderShapeSettings SphereShapeSettings TaperedCapsuleShapeSettings 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. More...
 
- Public Member Functions inherited from SerializableObject
virtual ~SerializableObject ()=default
 Constructor. More...
 
- Public Member Functions inherited from RefTarget< ShapeSettings >
 RefTarget ()=default
 Constructor. More...
 
 RefTarget (const RefTarget &)
 
 ~RefTarget ()
 assert no one is referencing us More...
 
void SetEmbedded () const
 
RefTargetoperator= (const RefTarget &)
 Assignment operator. More...
 
uint32 GetRefCount () const
 Get current refcount of this object. More...
 
void AddRef () const
 Add or release a reference to this object. More...
 
void Release () const
 

Public Attributes

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

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from RefTarget< ShapeSettings >
static int sInternalGetRefCountOffset ()
 INTERNAL HELPER FUNCTION USED BY SERIALIZATION. More...
 
- 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. More...
 

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

◆ 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: