载入中...
搜索中...
未找到
JoltShapeOperations.cpp
浏览该文件的文档.
11eve::Result<ShapePlane3D> ShapeBackend::oneWayPlane(const ShapeGeometry3D& g, PhysicsVector3D n, float offset) const {
12 if (!isValid()) return rejected<ShapePlane3D>("Shape expired", eve::DiagnosticCode::StaleHandle);
80 if (!isValid()) return rejected<SurfaceMaterial3D>("Object expired", eve::DiagnosticCode::StaleHandle);
102 if (!isValid()) return rejected<ShapeFilter3D>("Object expired", eve::DiagnosticCode::StaleHandle);
140 if (!isValid()) return rejected<SurfaceMaterial3D>("Shape expired", eve::DiagnosticCode::StaleHandle);
142 return rejected<SurfaceMaterial3D>("Invalid material slot", eve::DiagnosticCode::InvalidArgument);
157 if (!isFinite(x, y, z)) return rejected<bool>("Invalid point", eve::DiagnosticCode::InvalidArgument);
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
eve::Result< float > density() const override
density; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:22
eve::Result< ShapeFilter3D > filter() const override
filter; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:100
eve::Result< void > setDensity(float value, bool updateMass) override
setDensity; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:27
eve::Result< bool > testPoint(float x, float y, float z) const override
testPoint; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:155
eve::Result< void > enablePreSolveEvents(bool enabled) override
enablePreSolveEvents; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:126
eve::Result< SurfaceMaterial3D > material() const override
material; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:78
eve::Result< void > setFriction(float value) override
setFriction; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:57
eve::Result< void > enableHitEvents(bool enabled) override
enableHitEvents; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:120
eve::Result< void > setRestitution(float value) override
setRestitution; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:70
eve::Result< int > meshMaterialCount() const override
meshMaterialCount; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:135
eve::Result< bool > isSensor() const override
isSensor; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:115
eve::Result< SurfaceMaterial3D > meshMaterial(int slot) const override
meshMaterial; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:139
eve::Result< float > friction() const override
friction; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:52
eve::Result< void > setMaterial(SurfaceMaterial3D value) override
setMaterial; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:92
eve::Result< void > setFilter(ShapeFilter3D value, bool updatePairs) override
setFilter; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:105
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.
Definition JoltShapeOperations.cpp:11
eve::Result< float > restitution() const override
restitution; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:65
eve::Result< void > setMeshMaterial(SurfaceMaterial3D value, int slot) override
setMeshMaterial; synchronous owning-value operation under the class lifetime contract.
Definition JoltShapeOperations.cpp:145
Result< ForceVector > checked(ForceVector value)
Definition ForceMath.h:21
Definition JoltBody.cpp:7
eve::Result< void > replaceShapes(BodyState &, const std::vector< std::shared_ptr< ShapeState > > &)
Definition JoltShape.cpp:77
eve::Result< JPH::RefConst< JPH::Shape > > cook(const ShapeGeometry3D &, float density, JPH::uint64 userData)
Definition JoltShape.cpp:16
eve::Result< void > validateMaterial(SurfaceMaterial3D)
Definition JoltShapeOperations.cpp:83
@ InvalidArgument
@ StaleHandle
Allocation-free owning three-dimensional physics value.
Definition RigidTypes3D.h:4
Collision filter; negative groups never collide, positive groups always collide.
Definition ShapeBackend3D.h:41
Owning, backend-independent shape source; metres, local quaternion XYZW.
Definition ShapeBackend3D.h:13
Owning surface values; userMaterialId contains the engine material ID and combine policy encoding.
Definition ShapeBackend3D.h:34