#include <JoltShape.h>
Public 成员函数 | |
| ShapeBackend (std::shared_ptr< ShapeState > value) | |
| ~ShapeBackend () override | |
| eve::Result< ShapePlane3D > | oneWayPlane (const ShapeGeometry3D &geometry, PhysicsVector3D normal, float offset) const override |
| Computes an owning world-space plane using the current body pose; no callbacks. | |
| bool | isValid () const noexcept override |
| Native shape liveness. | |
| void | destroy () noexcept override |
| Idempotent native resource release after dependent records have been detached. | |
| void | invalidate () noexcept override |
| Detaches native identity before parent teardown; retains cooked data until destruction. | |
| void | bindOwner (Shape3D &owner) noexcept override |
| Binds the owning facade for internal collision attribution; no callbacks. @ownership Borrows its exclusive owner; owner calls invalidate before destruction. @lifetime Reference remains valid until invalidation; cannot be rebound while stepping. | |
| eve::Result< void > | rebuild (const ShapeGeometry3D &geometry, ShapeBehavior3D behavior, std::span< const SurfaceMaterial3D > materials) override |
| Atomically replaces cooked geometry, preserving material, density and filter. @cost One geometry cook and shape replacement per edit; input views are consumed synchronously. | |
| eve::Result< float > | density () const override |
| density; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setDensity (float value, bool updateMass) override |
| setDensity; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< float > | friction () const override |
| friction; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setFriction (float value) override |
| setFriction; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< float > | restitution () const override |
| restitution; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setRestitution (float value) override |
| setRestitution; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< SurfaceMaterial3D > | material () const override |
| material; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setMaterial (SurfaceMaterial3D value) override |
| setMaterial; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< ShapeFilter3D > | filter () const override |
| filter; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setFilter (ShapeFilter3D value, bool updatePairs) override |
| setFilter; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< bool > | isSensor () const override |
| isSensor; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | enableHitEvents (bool enabled) override |
| enableHitEvents; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | enablePreSolveEvents (bool enabled) override |
| enablePreSolveEvents; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< int > | meshMaterialCount () const override |
| meshMaterialCount; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< SurfaceMaterial3D > | meshMaterial (int slot) const override |
| meshMaterial; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< void > | setMeshMaterial (SurfaceMaterial3D value, int slot) override |
| setMeshMaterial; synchronous owning-value operation under the class lifetime contract. | |
| eve::Result< bool > | testPoint (float x, float y, float z) const override |
| testPoint; synchronous owning-value operation under the class lifetime contract. | |
Public 成员函数 继承自 eve::physics::IShapeBackend3D | |
| virtual | ~IShapeBackend3D ()=default |
Public 属性 | |
| std::shared_ptr< ShapeState > | shape |
详细描述
在文件 JoltShape.h 第 8 行定义.
构造及析构函数说明
◆ ShapeBackend()
|
inlineexplicit |
在文件 JoltShape.h 第 11 行定义.
◆ ~ShapeBackend()
|
override |
在文件 JoltShape.cpp 第 116 行定义.
引用了 destroy().
成员函数说明
◆ bindOwner()
|
overridevirtualnoexcept |
Binds the owning facade for internal collision attribution; no callbacks. @ownership Borrows its exclusive owner; owner calls invalidate before destruction. @lifetime Reference remains valid until invalidation; cannot be rebound while stepping.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShape.cpp 第 118 行定义.
◆ density()
|
overridevirtual |
density; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 22 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
被这些函数引用 setDensity().
◆ destroy()
|
overridevirtualnoexcept |
Idempotent native resource release after dependent records have been detached.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShape.cpp 第 123 行定义.
引用了 b, invalidate(), isValid(), eve::physics::jolt::replaceShapes(), result , 以及 shape.
被这些函数引用 ~ShapeBackend().
◆ enableHitEvents()
|
overridevirtual |
enableHitEvents; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 120 行定义.
引用了 enabled, isValid(), eve::StaleHandle , 以及 eve::physics::jolt::success().
◆ enablePreSolveEvents()
|
overridevirtual |
enablePreSolveEvents; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 126 行定义.
引用了 body, enabled, isValid(), shape, eve::StaleHandle , 以及 eve::physics::jolt::success().
◆ filter()
|
overridevirtual |
filter; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 100 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
◆ friction()
|
overridevirtual |
friction; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 52 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
◆ invalidate()
|
overridevirtualnoexcept |
Detaches native identity before parent teardown; retains cooked data until destruction.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShape.cpp 第 119 行定义.
引用了 shape.
被这些函数引用 destroy().
◆ isSensor()
|
overridevirtual |
isSensor; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 115 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
◆ isValid()
|
overridevirtualnoexcept |
Native shape liveness.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShape.cpp 第 117 行定义.
引用了 shape.
被这些函数引用 density(), destroy(), enableHitEvents(), enablePreSolveEvents(), filter(), friction(), isSensor(), material(), meshMaterial(), meshMaterialCount(), oneWayPlane(), rebuild(), restitution(), setDensity(), setFilter(), setFriction(), setMaterial(), setMeshMaterial(), setRestitution() , 以及 testPoint().
◆ material()
|
overridevirtual |
material; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 78 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
被这些函数引用 rebuild().
◆ meshMaterial()
|
overridevirtual |
meshMaterial; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 139 行定义.
引用了 eve::InvalidArgument, isValid(), shape, slot, eve::StaleHandle , 以及 eve::Result< T >::success().
◆ meshMaterialCount()
|
overridevirtual |
meshMaterialCount; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 135 行定义.
引用了 isValid(), shape, eve::StaleHandle , 以及 eve::Result< T >::success().
◆ oneWayPlane()
|
overridevirtual |
Computes an owning world-space plane using the current body pose; no callbacks.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 11 行定义.
引用了 body, g, isValid(), n, normal, offset, point, pose, shape, eve::StaleHandle , 以及 eve::Result< T >::success().
◆ rebuild()
|
overridevirtual |
Atomically replaces cooked geometry, preserving material, density and filter. @cost One geometry cook and shape replacement per edit; input views are consumed synchronously.
- 返回
- InvalidArgument/Unsupported/Failed without replacing the previous native shape.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShape.cpp 第 136 行定义.
引用了 b, eve::physics::force_detail::checked(), eve::physics::jolt::cook(), eve::Result< T >::failure(), geometry, eve::InvalidArgument, isValid(), material(), eve::physics::jolt::replaceShapes(), result, eve::physics::ShapeBehavior3D::sensor, shape, eve::StaleHandle, eve::physics::jolt::success() , 以及 eve::physics::jolt::validateMaterial().
◆ restitution()
|
overridevirtual |
restitution; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 65 行定义.
引用了 isValid(), shape , 以及 eve::StaleHandle.
◆ setDensity()
|
overridevirtual |
setDensity; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 27 行定义.
引用了 body, eve::physics::jolt::cook(), density(), eve::Result< T >::failure(), eve::InvalidArgument, isValid(), previous, eve::physics::jolt::replaceShapes(), shape, eve::StaleHandle , 以及 eve::physics::jolt::success().
◆ setFilter()
|
overridevirtual |
setFilter; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 105 行定义.
引用了 b, isValid(), shape, eve::StaleHandle, eve::physics::jolt::success() , 以及 value.
◆ setFriction()
|
overridevirtual |
setFriction; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 57 行定义.
引用了 eve::InvalidArgument, isValid(), shape, eve::StaleHandle, eve::physics::jolt::success() , 以及 value.
◆ setMaterial()
|
overridevirtual |
setMaterial; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 92 行定义.
引用了 eve::physics::force_detail::checked(), isValid(), shape, eve::StaleHandle, eve::physics::jolt::success(), eve::physics::jolt::validateMaterial() , 以及 value.
◆ setMeshMaterial()
|
overridevirtual |
setMeshMaterial; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 145 行定义.
引用了 eve::physics::force_detail::checked(), eve::InvalidArgument, isValid(), shape, slot, eve::StaleHandle, eve::physics::jolt::success(), eve::physics::jolt::validateMaterial() , 以及 value.
◆ setRestitution()
|
overridevirtual |
setRestitution; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 70 行定义.
引用了 eve::InvalidArgument, isValid(), shape, eve::StaleHandle, eve::physics::jolt::success() , 以及 value.
◆ testPoint()
|
overridevirtual |
testPoint; synchronous owning-value operation under the class lifetime contract.
实现了 eve::physics::IShapeBackend3D.
在文件 JoltShapeOperations.cpp 第 155 行定义.
引用了 body, g, eve::InvalidArgument, eve::physics::jolt::isFinite(), isValid(), local, pose, shape, eve::StaleHandle, eve::Result< T >::success(), x, y , 以及 z.
类成员变量说明
◆ shape
| std::shared_ptr<ShapeState> eve::physics::jolt::ShapeBackend::shape |
在文件 JoltShape.h 第 10 行定义.
被这些函数引用 density(), destroy(), enablePreSolveEvents(), filter(), friction(), invalidate(), isSensor(), isValid(), material(), meshMaterial(), meshMaterialCount(), oneWayPlane(), rebuild(), restitution(), setDensity(), setFilter(), setFriction(), setMaterial(), setMeshMaterial(), setRestitution() , 以及 testPoint().
该类的文档由以下文件生成:
- src/modules/physics/jolt/JoltShape.h
- src/modules/physics/jolt/JoltShape.cpp
- src/modules/physics/jolt/JoltShapeOperations.cpp
Public 成员函数 继承自