Jolt Physics
A multi core friendly Game Physics Engine
|
#include <Shape.h>
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 |
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 |
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< uint32 > | mRefCount |
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. | |
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.
using ShapeSettings::ShapeResult = Result<Ref<Shape> > |
|
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.
|
pure virtual |
Create a shape according to the settings specified by this object.
Implemented in BoxShapeSettings, CapsuleShapeSettings, ConvexHullShapeSettings, CylinderShapeSettings, EmptyShapeSettings, HeightFieldShapeSettings, MeshShapeSettings, MutableCompoundShapeSettings, OffsetCenterOfMassShapeSettings, PlaneShapeSettings, RotatedTranslatedShapeSettings, ScaledShapeSettings, SphereShapeSettings, StaticCompoundShapeSettings, TaperedCapsuleShapeSettings, TaperedCylinderShapeSettings, and TriangleShapeSettings.
|
mutableprotected |
uint64 ShapeSettings::mUserData = 0 |
User data (to be used freely by the application)