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. | |
Public Member Functions inherited from SerializableObject | |
virtual | ~SerializableObject ()=default |
Constructor. | |
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>> |
|
pure virtual |
Create a shape according to the settings specified by this object.
Implemented in BoxShapeSettings, ConvexHullShapeSettings, CylinderShapeSettings, HeightFieldShapeSettings, MeshShapeSettings, MutableCompoundShapeSettings, OffsetCenterOfMassShapeSettings, RotatedTranslatedShapeSettings, SphereShapeSettings, StaticCompoundShapeSettings, and TriangleShapeSettings.
|
mutableprotected |
uint64 ShapeSettings::mUserData = 0 |
User data (to be used freely by the application)