载入中...
搜索中...
未找到
eve::physics::Rope3D类 参考final

Renderer-independent particle rope with XPBD stretch and bend constraints. 更多...

#include <Rope3D.h>

类 eve::physics::Rope3D 继承关系图:
eve::physics::ISimulationBackend

类

struct  Vec3
 Compact solver vector exposed only as a value type. 更多...
 

Public 成员函数

 Rope3D (int particleCount, float startX, float startY, float startZ, float endX, float endY, float endZ)
 Creates a straight rope including both endpoints.
 
void update (float dt)
 Advances using a compatibility-generated monotonic fixed tick.
 
eve::Result< void > step (const eve::SimulationStep &step, const SimulationSettings &settings) override
 Advances the rope atomically under the shared simulation contract.
 
SimulationObservation observation () const noexcept override
 Returns completed-step observables by value.
 
SimulationBackendKind kind () const noexcept override
 Identifies the provider family.
 
SimulationDeterminism determinism () const noexcept override
 Returns the provider's replay/determinism guarantee.
 
eve::Result< void > restoreObservation (const SimulationObservation &observation) override
 Restores progress metadata after the owner restores its state.
 
void setGravity (float x, float y, float z)
 Sets uniform acceleration in meters per second squared.
 
float getGravityX () const
 
float getGravityY () const
 
float getGravityZ () const
 
void setStretchCompliance (float compliance)
 Sets stretch compliance in inverse newtons; zero is inextensible.
 
float getStretchCompliance () const noexcept
 
void setDistanceConstraintsEnabled (bool enabled)
 Enables or disables structural distance constraints without changing topology.
 
bool getDistanceConstraintsEnabled () const
 
void setBendCompliance (float compliance)
 Sets bend compliance; larger values make the rope easier to bend.
 
float getBendCompliance () const noexcept
 
void setBendConstraintsEnabled (bool enabled)
 Enables or disables bend constraints independently from stretch constraints.
 
bool getBendConstraintsEnabled () const
 
void setMaxBending (float fraction)
 Sets fractional bend slack in [0,0.5] before bend resistance activates.
 
float getMaxBending () const
 
void setPlasticity (float yield, float creep)
 Configures local permanent bend absorption; zero creep disables plasticity.
 
float getPlasticYield () const
 
float getPlasticCreep () const
 
float getBendPlasticity (int bendIndex) const
 Returns absorbed local bend fraction, or zero for an invalid bend index.
 
void setMaxCompression (float fraction)
 Sets the maximum fractional compression in [0,1].
 
float getMaxCompression () const noexcept
 
void setDamping (float damping)
 Sets Verlet velocity damping in [0,1].
 
float getDamping () const
 
void setParticleMass (float mass)
 Sets each particle's mass in kilograms.
 
float getParticleMass () const
 
void setRadius (float radius)
 Sets collision radius in meters.
 
float getRadius () const
 
void setSelfCollision (bool enabled)
 Enables non-neighbour particle self collision.
 
bool getSelfCollision () const
 
void setBounds (float x, float y, float z, float width, float height, float depth)
 Constrains particles to an axis-aligned box (origin plus positive extents).
 
void clearBounds ()
 Disables the axis-aligned collision box.
 
void setCollisionFriction (float friction)
 Sets tangential contact damping in [0,1].
 
float getCollisionFriction () const
 
eve::Result< RopeColliderId > addSphereCollider (float x, float y, float z, float radius)
 Adds a sphere collider owned by this rope.
 
eve::Result< RopeColliderId > addPlaneCollider (float x, float y, float z, float nx, float ny, float nz)
 Adds a one-sided plane collider using a normalized outward normal.
 
eve::Result< RopeColliderChange > moveSphereCollider (RopeColliderId id, float x, float y, float z)
 Moves a previously created sphere without changing its radius.
 
eve::Result< RopeColliderChange > removeCollider (RopeColliderId id)
 Removes a rope-owned analytic collider.
 
void clearColliders ()
 Removes every rope-owned analytic collider.
 
void setCollideWorld (World3D *world)
 Attaches a borrowed rigid-body world for mesh/shape collision and reaction impulses.
 
World3D * getCollideWorld () const
 Returns the borrowed rigid-body collision world, or null.
 
void setCollideSdf (DistanceField3D *field)
 Attaches a borrowed signed-distance field for static environment collision.
 
DistanceField3D * getCollideSdf () const
 Returns the borrowed signed-distance collision field, or null.
 
void setContinuousCollision (bool enabled)
 Enables swept-sphere continuous collision against World3D and SDF geometry.
 
bool getContinuousCollision () const
 Reports whether continuous collision is enabled.
 
void setCollisionRestitution (float restitution)
 Sets particle/world normal restitution in [0,1].
 
float getCollisionRestitution () const
 Returns particle/world normal restitution.
 
eve::Result< RopeTopologyChange > pin (int particleIndex)
 Pins a particle at its current position.
 
eve::Result< RopeTopologyChange > attach (int particleIndex, float x, float y, float z)
 Pins a particle at an explicit animated target.
 
eve::Result< RopeTopologyChange > moveAttachment (int particleIndex, float x, float y, float z)
 Moves an existing attachment target.
 
eve::Result< RopeTopologyChange > detach (int particleIndex)
 Releases a pinned particle.
 
bool isAttached (int particleIndex) const
 
void applyForce (float x, float y, float z)
 Applies a one-frame acceleration to every free particle.
 
eve::Result< RopeTopologyChange > setRestLength (float length)
 Scales all active element rest lengths, supporting reel/winch behavior.
 
eve::Result< RopeTopologyChange > changeLength (float length, float particleSpacing, bool fromEnd=true)
 Changes material length at one endpoint by adding/removing particles near the requested spacing.
 
float getRestLength () const
 
float calculateLength () const
 
eve::Result< RopeTopologyChange > cut (int elementIndex)
 Deactivates one structural element and splits the simulated chain.
 
eve::Result< RopeTopologyChange > repair (int elementIndex)
 Re-enables a cut element using its current endpoint distance.
 
bool isElementActive (int elementIndex) const
 
float getElementForce (int elementIndex) const
 
eve::Result< RopeTopologyChange > setElementTearResistance (int elementIndex, float multiplier)
 Sets a positive per-element multiplier for the global tearing threshold.
 
void setTearing (float resistance, int maxTearsPerStep)
 Enables automatic tearing above a tensile-force threshold in newtons.
 
void disableTearing ()
 Disables automatic tearing.
 
std::uint64_t getTopologyRevision () const
 Monotonic revision incremented by cut, repair, resize, and automatic tears.
 
int getLastTornElementCount () const
 Number of elements automatically torn by the most recent update/step.
 
int getLastTornElement (int eventIndex) const
 Returns a torn element index, or -1 for an invalid event index.
 
int getParticleCount () const
 
int getElementCount () const
 
float getParticleX (int index) const
 
float getParticleY (int index) const
 
float getParticleZ (int index) const
 
float getParticleVelocityX (int index, float dt) const
 
float getParticleVelocityY (int index, float dt) const
 
float getParticleVelocityZ (int index, float dt) const
 
float getSampleX (float mu) const
 Samples current rope position by normalized active material length.
 
float getSampleY (float mu) const
 
float getSampleZ (float mu) const
 
float getSampleTangentX (float mu) const
 Samples a normalized current tangent by active material length.
 
float getSampleTangentY (float mu) const
 
float getSampleTangentZ (float mu) const
 
- Public 成员函数 继承自 eve::physics::ISimulationBackend
virtual ~ISimulationBackend ()=default
 Releases the backend; borrowed domain state is not destroyed.
 

详细描述

Renderer-independent particle rope with XPBD stretch and bend constraints.

The rope owns an ordered particle chain and its structural elements. All coordinates are meters in a +Y-up space. The instance is simulation-thread affine; it invokes no callbacks and owns no graphics or rigid-body resources. Floating-point replay is tolerance-bounded for identical fixed steps and inputs.

在文件 Rope3D.h 第 38 行定义.

构造及析构函数说明

◆ Rope3D()

eve::physics::Rope3D::Rope3D ( int  particleCount,
float  startX,
float  startY,
float  startZ,
float  endX,
float  endY,
float  endZ 
)

Creates a straight rope including both endpoints.

参数
particleCountNumber of particles, at least two.
startXStart point X in meters.
startYStart point Y in meters.
startZStart point Z in meters.
endXEnd point X in meters.
endYEnd point Y in meters.
endZEnd point Z in meters.
异常
eve::Exceptionwhen inputs are invalid.

在文件 Rope3D.cpp 第 20 行定义.

引用了 count, end, finite, length, p, start, sx, sy, sz , 以及 t.

成员函数说明

◆ addPlaneCollider()

eve::Result< RopeColliderId > eve::physics::Rope3D::addPlaneCollider ( float  x,
float  y,
float  z,
float  nx,
float  ny,
float  nz 
)

Adds a one-sided plane collider using a normalized outward normal.

在文件 Rope3DCollision.cpp 第 47 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, normal, nx, ny, nz, eve::Status::success(), eve::Result< T >::success(), x, y , 以及 z.

◆ addSphereCollider()

eve::Result< RopeColliderId > eve::physics::Rope3D::addSphereCollider ( float  x,
float  y,
float  z,
float  radius 
)

Adds a sphere collider owned by this rope.

在文件 Rope3DCollision.cpp 第 33 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, eve::Status::success(), eve::Result< T >::success(), x, y , 以及 z.

◆ applyForce()

void eve::physics::Rope3D::applyForce ( float  x,
float  y,
float  z 
)

Applies a one-frame acceleration to every free particle.

在文件 Rope3D.cpp 第 204 行定义.

引用了 finite, x, y , 以及 z.

◆ attach()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::attach ( int  particleIndex,
float  x,
float  y,
float  z 
)

Pins a particle at an explicit animated target.

在文件 Rope3D.cpp 第 174 行定义.

引用了 eve::physics::Changed, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, p, eve::Result< T >::success(), eve::physics::Unchanged, x, y , 以及 z.

被这些函数引用 moveAttachment() , 以及 pin().

◆ calculateLength()

float eve::physics::Rope3D::calculateLength ( ) const

在文件 Rope3D.cpp 第 229 行定义.

引用了 length.

◆ changeLength()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::changeLength ( float  length,
float  particleSpacing,
bool  fromEnd = true 
)

Changes material length at one endpoint by adding/removing particles near the requested spacing.

参数
lengthPositive target rest length.
particleSpacingPositive preferred spacing for inserted particles.
fromEndTrue edits the last endpoint; false edits the first.
返回
Whether topology or material length changed. Torn ropes are rejected.

在文件 Rope3DTopology.cpp 第 21 行定义.

引用了 eve::physics::Changed, eve::Conflict, direction, edge, element, eve::Diagnostic::error(), eve::Result< T >::failure(), getParticleCount(), getRestLength(), heading, eve::InvalidArgument, position, eve::PreconditionViolation, previous, removed, spacing, eve::Result< T >::success() , 以及 eve::physics::Unchanged.

◆ clearBounds()

void eve::physics::Rope3D::clearBounds ( )
inline

Disables the axis-aligned collision box.

在文件 Rope3D.h 第 117 行定义.

◆ clearColliders()

void eve::physics::Rope3D::clearColliders ( )
inline

Removes every rope-owned analytic collider.

在文件 Rope3D.h 第 134 行定义.

◆ cut()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::cut ( int  elementIndex)

Deactivates one structural element and splits the simulated chain.

在文件 Rope3D.cpp 第 236 行定义.

引用了 eve::physics::Changed, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 eve::physics::Unchanged.

◆ detach()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::detach ( int  particleIndex)

◆ determinism()

SimulationDeterminism eve::physics::Rope3D::determinism ( ) const
inlineoverridevirtualnoexcept

Returns the provider's replay/determinism guarantee.

返回
The declared determinism level.

实现了 eve::physics::ISimulationBackend.

在文件 Rope3D.h 第 65 行定义.

◆ disableTearing()

void eve::physics::Rope3D::disableTearing ( )
inline

Disables automatic tearing.

在文件 Rope3D.h 第 198 行定义.

◆ getBendCompliance()

float eve::physics::Rope3D::getBendCompliance ( ) const
inlinenoexcept

在文件 Rope3D.h 第 85 行定义.

◆ getBendConstraintsEnabled()

bool eve::physics::Rope3D::getBendConstraintsEnabled ( ) const
inline

在文件 Rope3D.h 第 88 行定义.

◆ getBendPlasticity()

float eve::physics::Rope3D::getBendPlasticity ( int  bendIndex) const

Returns absorbed local bend fraction, or zero for an invalid bend index.

在文件 Rope3D.cpp 第 137 行定义.

引用了 index.

◆ getCollideSdf()

DistanceField3D * eve::physics::Rope3D::getCollideSdf ( ) const
inline

Returns the borrowed signed-distance collision field, or null.

在文件 Rope3D.h 第 142 行定义.

◆ getCollideWorld()

World3D * eve::physics::Rope3D::getCollideWorld ( ) const
inline

Returns the borrowed rigid-body collision world, or null.

在文件 Rope3D.h 第 138 行定义.

◆ getCollisionFriction()

float eve::physics::Rope3D::getCollisionFriction ( ) const
inline

在文件 Rope3D.h 第 120 行定义.

◆ getCollisionRestitution()

float eve::physics::Rope3D::getCollisionRestitution ( ) const
inline

Returns particle/world normal restitution.

在文件 Rope3D.h 第 150 行定义.

◆ getContinuousCollision()

bool eve::physics::Rope3D::getContinuousCollision ( ) const
inline

Reports whether continuous collision is enabled.

在文件 Rope3D.h 第 146 行定义.

◆ getDamping()

float eve::physics::Rope3D::getDamping ( ) const
inline

在文件 Rope3D.h 第 103 行定义.

◆ getDistanceConstraintsEnabled()

bool eve::physics::Rope3D::getDistanceConstraintsEnabled ( ) const
inline

在文件 Rope3D.h 第 82 行定义.

◆ getElementCount()

int eve::physics::Rope3D::getElementCount ( ) const
inline

在文件 Rope3D.h 第 207 行定义.

◆ getElementForce()

float eve::physics::Rope3D::getElementForce ( int  elementIndex) const

在文件 Rope3D.cpp 第 260 行定义.

◆ getGravityX()

float eve::physics::Rope3D::getGravityX ( ) const
inline

在文件 Rope3D.h 第 73 行定义.

◆ getGravityY()

float eve::physics::Rope3D::getGravityY ( ) const
inline

在文件 Rope3D.h 第 74 行定义.

◆ getGravityZ()

float eve::physics::Rope3D::getGravityZ ( ) const
inline

在文件 Rope3D.h 第 75 行定义.

◆ getLastTornElement()

int eve::physics::Rope3D::getLastTornElement ( int  eventIndex) const

Returns a torn element index, or -1 for an invalid event index.

在文件 Rope3DTopology.cpp 第 111 行定义.

引用了 getLastTornElementCount().

◆ getLastTornElementCount()

int eve::physics::Rope3D::getLastTornElementCount ( ) const
inline

Number of elements automatically torn by the most recent update/step.

在文件 Rope3D.h 第 202 行定义.

被这些函数引用 getLastTornElement().

◆ getMaxBending()

float eve::physics::Rope3D::getMaxBending ( ) const
inline

在文件 Rope3D.h 第 91 行定义.

◆ getMaxCompression()

float eve::physics::Rope3D::getMaxCompression ( ) const
inlinenoexcept

在文件 Rope3D.h 第 100 行定义.

◆ getParticleCount()

int eve::physics::Rope3D::getParticleCount ( ) const
inline

在文件 Rope3D.h 第 206 行定义.

被这些函数引用 changeLength().

◆ getParticleMass()

float eve::physics::Rope3D::getParticleMass ( ) const
inline

在文件 Rope3D.h 第 106 行定义.

◆ getParticleVelocityX()

float eve::physics::Rope3D::getParticleVelocityX ( int  index,
float  dt 
) const

在文件 Rope3D.cpp 第 285 行定义.

◆ getParticleVelocityY()

float eve::physics::Rope3D::getParticleVelocityY ( int  index,
float  dt 
) const

在文件 Rope3D.cpp 第 288 行定义.

◆ getParticleVelocityZ()

float eve::physics::Rope3D::getParticleVelocityZ ( int  index,
float  dt 
) const

在文件 Rope3D.cpp 第 291 行定义.

◆ getParticleX()

float eve::physics::Rope3D::getParticleX ( int  index) const

在文件 Rope3D.cpp 第 282 行定义.

◆ getParticleY()

float eve::physics::Rope3D::getParticleY ( int  index) const

在文件 Rope3D.cpp 第 283 行定义.

◆ getParticleZ()

float eve::physics::Rope3D::getParticleZ ( int  index) const

在文件 Rope3D.cpp 第 284 行定义.

◆ getPlasticCreep()

float eve::physics::Rope3D::getPlasticCreep ( ) const
inline

在文件 Rope3D.h 第 95 行定义.

◆ getPlasticYield()

float eve::physics::Rope3D::getPlasticYield ( ) const
inline

在文件 Rope3D.h 第 94 行定义.

◆ getRadius()

float eve::physics::Rope3D::getRadius ( ) const
inline

在文件 Rope3D.h 第 109 行定义.

◆ getRestLength()

float eve::physics::Rope3D::getRestLength ( ) const

在文件 Rope3D.cpp 第 223 行定义.

被这些函数引用 changeLength() , 以及 setRestLength().

◆ getSampleTangentX()

float eve::physics::Rope3D::getSampleTangentX ( float  mu) const

Samples a normalized current tangent by active material length.

在文件 Rope3DSampling.cpp 第 54 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::x.

◆ getSampleTangentY()

float eve::physics::Rope3D::getSampleTangentY ( float  mu) const

在文件 Rope3DSampling.cpp 第 55 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::y.

◆ getSampleTangentZ()

float eve::physics::Rope3D::getSampleTangentZ ( float  mu) const

在文件 Rope3DSampling.cpp 第 56 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::z.

◆ getSampleX()

float eve::physics::Rope3D::getSampleX ( float  mu) const

Samples current rope position by normalized active material length.

在文件 Rope3DSampling.cpp 第 51 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::x.

◆ getSampleY()

float eve::physics::Rope3D::getSampleY ( float  mu) const

在文件 Rope3DSampling.cpp 第 52 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::y.

◆ getSampleZ()

float eve::physics::Rope3D::getSampleZ ( float  mu) const

在文件 Rope3DSampling.cpp 第 53 行定义.

引用了 mu , 以及 eve::physics::Rope3D::Vec3::z.

◆ getSelfCollision()

bool eve::physics::Rope3D::getSelfCollision ( ) const
inline

在文件 Rope3D.h 第 112 行定义.

◆ getStretchCompliance()

float eve::physics::Rope3D::getStretchCompliance ( ) const
inlinenoexcept

在文件 Rope3D.h 第 79 行定义.

◆ getTopologyRevision()

std::uint64_t eve::physics::Rope3D::getTopologyRevision ( ) const
inline

Monotonic revision incremented by cut, repair, resize, and automatic tears.

在文件 Rope3D.h 第 200 行定义.

◆ isAttached()

bool eve::physics::Rope3D::isAttached ( int  particleIndex) const

在文件 Rope3D.cpp 第 203 行定义.

◆ isElementActive()

bool eve::physics::Rope3D::isElementActive ( int  elementIndex) const

在文件 Rope3D.cpp 第 259 行定义.

引用了 active.

◆ kind()

SimulationBackendKind eve::physics::Rope3D::kind ( ) const
inlineoverridevirtualnoexcept

Identifies the provider family.

返回
CPU, GPU, or a named test accelerator.

实现了 eve::physics::ISimulationBackend.

在文件 Rope3D.h 第 64 行定义.

◆ moveAttachment()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::moveAttachment ( int  particleIndex,
float  x,
float  y,
float  z 
)

Moves an existing attachment target.

在文件 Rope3D.cpp 第 186 行定义.

引用了 attach(), eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, x, y , 以及 z.

◆ moveSphereCollider()

eve::Result< RopeColliderChange > eve::physics::Rope3D::moveSphereCollider ( RopeColliderId  id,
float  x,
float  y,
float  z 
)

◆ observation()

SimulationObservation eve::physics::Rope3D::observation ( ) const
inlineoverridevirtualnoexcept

Returns completed-step observables by value.

返回
A snapshot that remains valid after the backend changes.

实现了 eve::physics::ISimulationBackend.

在文件 Rope3D.h 第 63 行定义.

被这些函数引用 restoreObservation().

◆ pin()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::pin ( int  particleIndex)

Pins a particle at its current position.

在文件 Rope3D.cpp 第 167 行定义.

引用了 attach(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 p.

◆ removeCollider()

eve::Result< RopeColliderChange > eve::physics::Rope3D::removeCollider ( RopeColliderId  id)

◆ repair()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::repair ( int  elementIndex)

Re-enables a cut element using its current endpoint distance.

在文件 Rope3D.cpp 第 248 行定义.

引用了 eve::physics::Changed, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, length, eve::Result< T >::success() , 以及 eve::physics::Unchanged.

◆ restoreObservation()

eve::Result< void > eve::physics::Rope3D::restoreObservation ( const SimulationObservation &  )
overridevirtual

Restores progress metadata after the owner restores its state.

参数
observationCompleted-step observation to install.
返回
Applied when supported, or Unsupported when the backend cannot restore metadata without rebuilding its state.
备注
This operation changes only backend-owned progress metadata; callers must restore the domain state atomically as one unit.

Failure.

重载 eve::physics::ISimulationBackend .

在文件 Rope3D.cpp 第 106 行定义.

引用了 observation() , 以及 eve::Result< T >::success().

◆ setBendCompliance()

void eve::physics::Rope3D::setBendCompliance ( float  compliance)

Sets bend compliance; larger values make the rope easier to bend.

在文件 Rope3D.cpp 第 122 行定义.

引用了 value.

◆ setBendConstraintsEnabled()

void eve::physics::Rope3D::setBendConstraintsEnabled ( bool  enabled)
inline

Enables or disables bend constraints independently from stretch constraints.

在文件 Rope3D.h 第 87 行定义.

引用了 enabled.

◆ setBounds()

void eve::physics::Rope3D::setBounds ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth 
)

Constrains particles to an axis-aligned box (origin plus positive extents).

在文件 Rope3D.cpp 第 159 行定义.

引用了 d, finite, h, w, x, y , 以及 z.

◆ setCollideSdf()

void eve::physics::Rope3D::setCollideSdf ( DistanceField3D *  field)
inline

Attaches a borrowed signed-distance field for static environment collision.

在文件 Rope3D.h 第 140 行定义.

◆ setCollideWorld()

void eve::physics::Rope3D::setCollideWorld ( World3D *  world)
inline

Attaches a borrowed rigid-body world for mesh/shape collision and reaction impulses.

在文件 Rope3D.h 第 136 行定义.

引用了 world.

◆ setCollisionFriction()

void eve::physics::Rope3D::setCollisionFriction ( float  friction)

Sets tangential contact damping in [0,1].

在文件 Rope3DCollision.cpp 第 21 行定义.

引用了 value.

◆ setCollisionRestitution()

void eve::physics::Rope3D::setCollisionRestitution ( float  restitution)

Sets particle/world normal restitution in [0,1].

在文件 Rope3DCollision.cpp 第 27 行定义.

引用了 value.

◆ setContinuousCollision()

void eve::physics::Rope3D::setContinuousCollision ( bool  enabled)
inline

Enables swept-sphere continuous collision against World3D and SDF geometry.

在文件 Rope3D.h 第 144 行定义.

引用了 enabled.

◆ setDamping()

void eve::physics::Rope3D::setDamping ( float  damping)

Sets Verlet velocity damping in [0,1].

在文件 Rope3D.cpp 第 147 行定义.

引用了 value.

◆ setDistanceConstraintsEnabled()

void eve::physics::Rope3D::setDistanceConstraintsEnabled ( bool  enabled)
inline

Enables or disables structural distance constraints without changing topology.

在文件 Rope3D.h 第 81 行定义.

引用了 enabled.

◆ setElementTearResistance()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::setElementTearResistance ( int  elementIndex,
float  multiplier 
)

Sets a positive per-element multiplier for the global tearing threshold.

在文件 Rope3D.cpp 第 263 行定义.

引用了 eve::physics::Changed, element, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success() , 以及 eve::physics::Unchanged.

◆ setGravity()

void eve::physics::Rope3D::setGravity ( float  x,
float  y,
float  z 
)

Sets uniform acceleration in meters per second squared.

在文件 Rope3D.cpp 第 113 行定义.

引用了 finite, x, y , 以及 z.

◆ setMaxBending()

void eve::physics::Rope3D::setMaxBending ( float  fraction)

Sets fractional bend slack in [0,0.5] before bend resistance activates.

在文件 Rope3D.cpp 第 127 行定义.

引用了 value.

◆ setMaxCompression()

void eve::physics::Rope3D::setMaxCompression ( float  fraction)

Sets the maximum fractional compression in [0,1].

在文件 Rope3D.cpp 第 142 行定义.

引用了 value.

◆ setParticleMass()

void eve::physics::Rope3D::setParticleMass ( float  mass)

Sets each particle's mass in kilograms.

在文件 Rope3D.cpp 第 151 行定义.

引用了 value.

◆ setPlasticity()

void eve::physics::Rope3D::setPlasticity ( float  yield,
float  creep 
)

Configures local permanent bend absorption; zero creep disables plasticity.

在文件 Rope3D.cpp 第 131 行定义.

◆ setRadius()

void eve::physics::Rope3D::setRadius ( float  radius)

Sets collision radius in meters.

在文件 Rope3D.cpp 第 155 行定义.

引用了 value.

◆ setRestLength()

eve::Result< RopeTopologyChange > eve::physics::Rope3D::setRestLength ( float  length)

Scales all active element rest lengths, supporting reel/winch behavior.

在文件 Rope3D.cpp 第 209 行定义.

引用了 eve::physics::Changed, current, eve::Diagnostic::error(), eve::Result< T >::failure(), getRestLength(), eve::InvalidArgument, scale, eve::Result< T >::success() , 以及 eve::physics::Unchanged.

◆ setSelfCollision()

void eve::physics::Rope3D::setSelfCollision ( bool  enabled)
inline

Enables non-neighbour particle self collision.

在文件 Rope3D.h 第 111 行定义.

引用了 enabled.

◆ setStretchCompliance()

void eve::physics::Rope3D::setStretchCompliance ( float  compliance)

Sets stretch compliance in inverse newtons; zero is inextensible.

在文件 Rope3D.cpp 第 117 行定义.

引用了 value.

◆ setTearing()

void eve::physics::Rope3D::setTearing ( float  resistance,
int  maxTearsPerStep 
)

Enables automatic tearing above a tensile-force threshold in newtons.

在文件 Rope3D.cpp 第 274 行定义.

◆ step()

eve::Result< void > eve::physics::Rope3D::step ( const eve::SimulationStep &  step,
const SimulationSettings &  settings 
)
overridevirtual

Advances the rope atomically under the shared simulation contract.

实现了 eve::physics::ISimulationBackend.

在文件 Rope3D.cpp 第 66 行定义.

引用了 element, eve::Result< T >::failure(), h, settings, eve::Result< T >::success() , 以及 tick.

◆ update()

void eve::physics::Rope3D::update ( float  dt)

Advances using a compatibility-generated monotonic fixed tick.

在文件 Rope3D.cpp 第 41 行定义.

引用了 element , 以及 h.


该类的文档由以下文件生成: