载入中...
搜索中...
未找到
BodyBackend3D.h
浏览该文件的文档.
23 [[nodiscard]] virtual eve::Result<std::unique_ptr<IShapeBackend3D>> createShape(const ShapeGeometry3D& geometry,
75 [[nodiscard]] virtual eve::Result<std::vector<float>> localToWorldPoint(float x, float y, float z) const = 0;
77 [[nodiscard]] virtual eve::Result<PhysicsVector3D> localToWorldPointOwned(float x, float y, float z) const = 0;
80 [[nodiscard]] virtual eve::Result<std::vector<float>> worldToLocalPoint(float x, float y, float z) const = 0;
82 [[nodiscard]] virtual eve::Result<PhysicsVector3D> worldToLocalPointOwned(float x, float y, float z) const = 0;
85 [[nodiscard]] virtual eve::Result<std::vector<float>> localToWorldVector(float x, float y, float z) const = 0;
87 [[nodiscard]] virtual eve::Result<PhysicsVector3D> localToWorldVectorOwned(float x, float y, float z) const = 0;
90 [[nodiscard]] virtual eve::Result<std::vector<float>> worldToLocalVector(float x, float y, float z) const = 0;
93 [[nodiscard]] virtual eve::Result<std::vector<float>> getLocalPointVelocity(float x, float y, float z) const = 0;
95 [[nodiscard]] virtual eve::Result<PhysicsVector3D> getLocalPointVelocityOwned(float x, float y, float z) const = 0;
98 [[nodiscard]] virtual eve::Result<std::vector<float>> getWorldPointVelocity(float x, float y, float z) const = 0;
102 [[nodiscard]] virtual eve::Result<void> applyForceAt(float fx, float fy, float fz, float x, float y, float z) = 0;
108 [[nodiscard]] virtual eve::Result<void> applyLinearImpulseAt(float ix, float iy, float iz, float x, float y,
113 [[nodiscard]] virtual eve::Result<void> applyLocalForce(float fx, float fy, float fz, float x, float y,
116 [[nodiscard]] virtual eve::Result<void> applyLocalForceToCenter(float fx, float fy, float fz) = 0;
120 [[nodiscard]] virtual eve::Result<void> applyLocalLinearImpulse(float ix, float iy, float iz, float x, float y,
123 [[nodiscard]] virtual eve::Result<void> applyLocalLinearImpulseToCenter(float ix, float iy, float iz) = 0;
125 [[nodiscard]] virtual eve::Result<void> applyLocalAngularImpulse(float ix, float iy, float iz) = 0;
127 [[nodiscard]] virtual eve::Result<void> setTargetTransform(float x, float y, float z, float qx, float qy, float qz,
150 [[nodiscard]] virtual eve::Result<void> setMotionLocks(bool linearX, bool linearY, bool linearZ, bool angularX,
165 [[nodiscard]] virtual eve::Result<void> setMassProperties(float mass, float centerX, float centerY, float centerZ,
Move-only, checked operation results for the common layer.
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
Solver-independent control of a rigid body, exclusively owned by its facade. @ownership Implementatio...
Definition BodyBackend3D.h:17
virtual eve::Result< std::vector< float > > worldToLocalVector(float x, float y, float z) const =0
worldToLocalVector; inherits the class lifetime and failure contract. @cost Three scalar values copie...
virtual eve::Result< bool > isAngularXLocked() const =0
isAngularXLocked; inherits the class lifetime and failure contract.
virtual eve::Result< float > getAngularVelocityY() const =0
getAngularVelocityY; inherits the class lifetime and failure contract.
virtual eve::Result< void > resetMassProperties()=0
resetMassProperties; inherits the class lifetime and failure contract.
virtual eve::Result< float > getWorldCenterZ() const =0
getWorldCenterZ; inherits the class lifetime and failure contract.
virtual eve::Result< void > setSleepThreshold(float threshold)=0
setSleepThreshold; inherits the class lifetime and failure contract.
virtual eve::Result< std::vector< float > > localToWorldPoint(float x, float y, float z) const =0
localToWorldPoint; inherits the class lifetime and failure contract. @cost Three scalar values copied...
virtual eve::Result< float > getInertiaXZ() const =0
getInertiaXZ; inherits the class lifetime and failure contract.
virtual void invalidate() noexcept=0
Detaches before its parent world destroys the native body.
virtual eve::Result< void > applyLocalForce(float fx, float fy, float fz, float x, float y, float z)=0
applyLocalForce; inherits the class lifetime and failure contract.
virtual eve::Result< float > getInertiaXX() const =0
getInertiaXX; inherits the class lifetime and failure contract.
virtual ~IBodyBackend3D()=default
virtual eve::Result< bool > isLinearZLocked() const =0
isLinearZLocked; inherits the class lifetime and failure contract.
virtual eve::Result< void > setRotation(float qx, float qy, float qz, float qw)=0
setRotation; inherits the class lifetime and failure contract.
virtual eve::Result< PhysicsVector3D > localToWorldVectorOwned(float x, float y, float z) const =0
localToWorldVectorOwned; inherits the class lifetime and failure contract.
virtual eve::Result< std::vector< float > > getLocalPointVelocity(float x, float y, float z) const =0
getLocalPointVelocity; inherits the class lifetime and failure contract. @cost Three scalar values co...
virtual eve::Result< float > getInertiaYY() const =0
getInertiaYY; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLinearImpulse(float ix, float iy, float iz)=0
applyLinearImpulse; inherits the class lifetime and failure contract.
virtual eve::Result< float > getZ() const =0
getZ; inherits the class lifetime and failure contract.
virtual eve::Result< std::vector< float > > getWorldPointVelocity(float x, float y, float z) const =0
getWorldPointVelocity; inherits the class lifetime and failure contract. @cost Three scalar values co...
virtual eve::Result< float > getX() const =0
getX; inherits the class lifetime and failure contract.
virtual eve::Result< void > setPosition(float x, float y, float z)=0
setPosition; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isLinearYLocked() const =0
isLinearYLocked; inherits the class lifetime and failure contract.
virtual eve::Result< float > getAngularDamping() const =0
getAngularDamping; inherits the class lifetime and failure contract.
virtual eve::Result< void > setTargetTransform(float x, float y, float z, float qx, float qy, float qz, float qw, float timeStep)=0
setTargetTransform; inherits the class lifetime and failure contract.
virtual eve::Result< float > getAngularVelocityZ() const =0
getAngularVelocityZ; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isActive() const =0
isActive; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLocalLinearImpulse(float ix, float iy, float iz, float x, float y, float z)=0
applyLocalLinearImpulse; inherits the class lifetime and failure contract.
virtual eve::Result< void > setActive(bool active)=0
setActive; inherits the class lifetime and failure contract.
virtual eve::Result< void > setBullet(bool bullet)=0
setBullet; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLinearImpulseAt(float ix, float iy, float iz, float x, float y, float z)=0
applyLinearImpulseAt; inherits the class lifetime and failure contract.
virtual eve::Result< float > getY() const =0
getY; inherits the class lifetime and failure contract.
virtual eve::Result< std::string > getType() const =0
getType; inherits the class lifetime and failure contract.
virtual eve::Result< float > getRotZ() const =0
getRotZ; inherits the class lifetime and failure contract.
virtual eve::Result< float > getRotX() const =0
getRotX; inherits the class lifetime and failure contract.
virtual bool isValid() const noexcept=0
Whether the native body remains alive.
virtual eve::Result< bool > isAwake() const =0
isAwake; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLocalTorque(float tx, float ty, float tz)=0
applyLocalTorque; inherits the class lifetime and failure contract.
virtual eve::Result< std::vector< float > > worldToLocalPoint(float x, float y, float z) const =0
worldToLocalPoint; inherits the class lifetime and failure contract. @cost Three scalar values copied...
virtual eve::Result< void > setAwake(bool awake)=0
setAwake; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isAngularYLocked() const =0
isAngularYLocked; inherits the class lifetime and failure contract.
virtual eve::Result< float > getAngularVelocityX() const =0
getAngularVelocityX; inherits the class lifetime and failure contract.
virtual eve::Result< float > getInertiaZZ() const =0
getInertiaZZ; inherits the class lifetime and failure contract.
virtual eve::Result< void > setLinearVelocity(float vx, float vy, float vz)=0
setLinearVelocity; inherits the class lifetime and failure contract.
virtual eve::Result< void > setMassProperties(float mass, float centerX, float centerY, float centerZ, float inertiaXX, float inertiaYY, float inertiaZZ, float inertiaXY, float inertiaXZ, float inertiaYZ)=0
setMassProperties; inherits the class lifetime and failure contract.
virtual eve::Result< float > getSleepThreshold() const =0
getSleepThreshold; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLocalCenterX() const =0
getLocalCenterX; inherits the class lifetime and failure contract.
virtual eve::Result< void > setAngularDamping(float damping)=0
setAngularDamping; inherits the class lifetime and failure contract.
virtual eve::Result< PhysicsVector3D > getLocalPointVelocityOwned(float x, float y, float z) const =0
getLocalPointVelocityOwned; inherits the class lifetime and failure contract.
virtual eve::Result< PhysicsVector3D > worldToLocalPointOwned(float x, float y, float z) const =0
worldToLocalPointOwned; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLocalCenterY() const =0
getLocalCenterY; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLinearVelocityX() const =0
getLinearVelocityX; inherits the class lifetime and failure contract.
virtual eve::Result< float > getRotW() const =0
getRotW; inherits the class lifetime and failure contract.
virtual eve::Result< PhysicsVector3D > localToWorldPointOwned(float x, float y, float z) const =0
localToWorldPointOwned; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyAngularImpulse(float ix, float iy, float iz)=0
applyAngularImpulse; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyForceAt(float fx, float fy, float fz, float x, float y, float z)=0
applyForceAt; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isFixedRotation() const =0
isFixedRotation; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isLinearXLocked() const =0
isLinearXLocked; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLocalCenterZ() const =0
getLocalCenterZ; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isBullet() const =0
isBullet; inherits the class lifetime and failure contract.
virtual eve::Result< void > setLinearDamping(float damping)=0
setLinearDamping; inherits the class lifetime and failure contract.
virtual eve::Result< void > setFixedRotation(bool fixed)=0
setFixedRotation; inherits the class lifetime and failure contract.
virtual eve::Result< float > getRotY() const =0
getRotY; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLocalForceToCenter(float fx, float fy, float fz)=0
applyLocalForceToCenter; inherits the class lifetime and failure contract.
virtual eve::Result< float > getInertiaYZ() const =0
getInertiaYZ; inherits the class lifetime and failure contract.
virtual eve::Result< float > getWorldCenterY() const =0
getWorldCenterY; inherits the class lifetime and failure contract.
virtual eve::Result< bool > isAngularZLocked() const =0
isAngularZLocked; inherits the class lifetime and failure contract.
virtual eve::Result< float > getMass() const =0
getMass; inherits the class lifetime and failure contract.
virtual eve::Result< float > getGravityScale() const =0
getGravityScale; inherits the class lifetime and failure contract.
virtual eve::Result< void > setType(const std::string &bodyType)=0
setType; inherits the class lifetime and failure contract.
virtual eve::Result< void > setSleepEnabled(bool enabled)=0
setSleepEnabled; inherits the class lifetime and failure contract.
virtual eve::Result< std::unique_ptr< IShapeBackend3D > > createShape(const ShapeGeometry3D &geometry, float density, float friction, float restitution)=0
Creates and owns one shape for this body; no input references are retained. @cost One geometry cook p...
virtual eve::Result< bool > isSleepEnabled() const =0
isSleepEnabled; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyForce(float fx, float fy, float fz)=0
applyForce; inherits the class lifetime and failure contract.
virtual void bindOwner(Body3D &owner) noexcept=0
Binds its exclusive facade owner for internal attribution, on the simulation thread....
virtual eve::Result< std::vector< float > > localToWorldVector(float x, float y, float z) const =0
localToWorldVector; inherits the class lifetime and failure contract. @cost Three scalar values copie...
virtual eve::Result< float > getLinearVelocityY() const =0
getLinearVelocityY; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLinearDamping() const =0
getLinearDamping; inherits the class lifetime and failure contract.
virtual eve::Result< float > getInertiaXY() const =0
getInertiaXY; inherits the class lifetime and failure contract.
virtual eve::Result< void > setAngularVelocity(float wx, float wy, float wz)=0
setAngularVelocity; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLocalAngularImpulse(float ix, float iy, float iz)=0
applyLocalAngularImpulse; inherits the class lifetime and failure contract.
virtual eve::Result< float > getLinearVelocityZ() const =0
getLinearVelocityZ; inherits the class lifetime and failure contract.
virtual eve::Result< void > setMotionLocks(bool linearX, bool linearY, bool linearZ, bool angularX, bool angularY, bool angularZ)=0
setMotionLocks; inherits the class lifetime and failure contract.
virtual eve::Result< float > getWorldCenterX() const =0
getWorldCenterX; inherits the class lifetime and failure contract.
virtual void destroy() noexcept=0
Releases the native body idempotently without callbacks; children must be detached first.
virtual eve::Result< void > applyTorque(float tx, float ty, float tz)=0
applyTorque; inherits the class lifetime and failure contract.
virtual eve::Result< void > applyLocalLinearImpulseToCenter(float ix, float iy, float iz)=0
applyLocalLinearImpulseToCenter; inherits the class lifetime and failure contract.
virtual eve::Result< void > setGravityScale(float scale)=0
setGravityScale; inherits the class lifetime and failure contract.
Definition Container.h:602
Allocation-free owning three-dimensional physics value.
Definition RigidTypes3D.h:4
Owning, backend-independent shape source; metres, local quaternion XYZW.
Definition ShapeBackend3D.h:13