|
@@ -40,20 +40,19 @@ class JoltShapedObject3D;
|
|
class JoltShape3D;
|
|
class JoltShape3D;
|
|
|
|
|
|
class JoltShapeInstance3D {
|
|
class JoltShapeInstance3D {
|
|
- // This RAII helper exists solely to avoid needing to maintain copy construction/assignment in the shape instance.
|
|
|
|
- // Ideally this would be move-only instead, but Godot's containers don't support that at the moment.
|
|
|
|
|
|
+ // This RAII helper exists solely to avoid needing to maintain move construction/assignment in `JoltShapeInstance3D`.
|
|
struct ShapeReference {
|
|
struct ShapeReference {
|
|
JoltShapedObject3D *parent = nullptr;
|
|
JoltShapedObject3D *parent = nullptr;
|
|
JoltShape3D *shape = nullptr;
|
|
JoltShape3D *shape = nullptr;
|
|
|
|
|
|
ShapeReference() = default;
|
|
ShapeReference() = default;
|
|
ShapeReference(JoltShapedObject3D *p_parent, JoltShape3D *p_shape);
|
|
ShapeReference(JoltShapedObject3D *p_parent, JoltShape3D *p_shape);
|
|
- ShapeReference(const ShapeReference &p_other);
|
|
|
|
- ShapeReference(ShapeReference &&p_other) = delete;
|
|
|
|
|
|
+ ShapeReference(const ShapeReference &p_other) = delete;
|
|
|
|
+ ShapeReference(ShapeReference &&p_other);
|
|
~ShapeReference();
|
|
~ShapeReference();
|
|
|
|
|
|
- ShapeReference &operator=(const ShapeReference &p_other);
|
|
|
|
- ShapeReference &operator=(ShapeReference &&p_other) = delete;
|
|
|
|
|
|
+ ShapeReference &operator=(const ShapeReference &p_other) = delete;
|
|
|
|
+ ShapeReference &operator=(ShapeReference &&p_other);
|
|
|
|
|
|
JoltShape3D *operator*() const { return shape; }
|
|
JoltShape3D *operator*() const { return shape; }
|
|
JoltShape3D *operator->() const { return shape; }
|
|
JoltShape3D *operator->() const { return shape; }
|