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

Owns multiple cloth sheets and advances their contacts synchronously. @ownership Owns every layer; no external runtime pointers are retained. @thread All operations run on the owning physics thread, between draw calls. @reentrancy No callbacks. No concurrent calls or layer updates during update(). Runtime-only state; no persistence or GPU parity is claimed. Replays use fixed dt and stable layer order, with a 1e-5 metre tolerance on the same CPU build. 更多...

#include <LayeredCloth3D.h>

Public 成员函数

 LayeredCloth3D (int count, int cols, int rows, float spacing, float gap, float x, float y, float z)
 Construct parallel XZ grids, separated along +Y.
 
 LayeredCloth3D (std::span< const ClothModel > models)
 Copy validated arbitrary mesh models; source span is borrowed only during construction.
 
 ~LayeredCloth3D ()
 Release owned runtime layers; render resources follow the graphics owner.
 
 LayeredCloth3D (const LayeredCloth3D &)=delete
 Owned layers cannot be copied between groups.
 
LayeredCloth3D & operator= (const LayeredCloth3D &)=delete
 Owned layers cannot be copy-assigned between groups.
 
Cloth3D & layer (int index)
 Borrow a layer for synchronous configuration; valid until owner destruction. Do not destroy or independently update it while the group is active.
 
int getLayerCount () const
 Return the number of owned sheets.
 
void update (float dt)
 Advance all layers by finite dt in [0,0.05], without dropping time.
 
void setSolver (int substeps, int passes)
 Configure substeps [1,32] and coupling passes [1,16]; throws on invalid input.
 
void setInterCollision (bool enabled)
 Enable or disable only contacts between different sheets.
 
bool getInterCollision () const
 Return whether inter-layer contacts are enabled.
 
int getContactCount () const
 Return projected contacts in the most recent update, including repeated passes.
 
void setWindVelocity (float x, float y, float z)
 Set the air velocity of every sheet; throws on nonfinite input.
 
void reset ()
 Restore every layer's authored pose and clear contact statistics.
 
void draw (graphics::Graphics *gfx)
 Draw owned cloth surfaces in an open 3D frame.
 

详细描述

Owns multiple cloth sheets and advances their contacts synchronously. @ownership Owns every layer; no external runtime pointers are retained. @thread All operations run on the owning physics thread, between draw calls. @reentrancy No callbacks. No concurrent calls or layer updates during update(). Runtime-only state; no persistence or GPU parity is claimed. Replays use fixed dt and stable layer order, with a 1e-5 metre tolerance on the same CPU build.

在文件 LayeredCloth3D.h 第 15 行定义.

构造及析构函数说明

◆ LayeredCloth3D() [1/3]

eve::physics::LayeredCloth3D::LayeredCloth3D ( int  count,
int  cols,
int  rows,
float  spacing,
float  gap,
float  x,
float  y,
float  z 
)

Construct parallel XZ grids, separated along +Y.

异常
eve::Exceptionfor invalid grid, count, gap or coordinates. @cost Allocation and constraint baking scale with total grid particles; construct once and amortize over simulation frames.

在文件 Cloth3D.cpp 第 1368 行定义.

引用了 cols, count, gap, rows, spacing, t, x, y , 以及 z.

◆ LayeredCloth3D() [2/3]

eve::physics::LayeredCloth3D::LayeredCloth3D ( std::span< const ClothModel >  models)
explicit

Copy validated arbitrary mesh models; source span is borrowed only during construction.

异常
eve::Exceptionif the model span is empty. @cost Copies topology and allocates each runtime once, amortized over frames.

在文件 Cloth3D.cpp 第 1385 行定义.

引用了 model.

◆ ~LayeredCloth3D()

eve::physics::LayeredCloth3D::~LayeredCloth3D ( )
default

Release owned runtime layers; render resources follow the graphics owner.

◆ LayeredCloth3D() [3/3]

eve::physics::LayeredCloth3D::LayeredCloth3D ( const LayeredCloth3D &  )
delete

Owned layers cannot be copied between groups.

成员函数说明

◆ draw()

void eve::physics::LayeredCloth3D::draw ( graphics::Graphics *  gfx)

Draw owned cloth surfaces in an open 3D frame.

参数
gfxBorrowed graphics ABI pointer, used only for this call; must be nonnull.

在文件 Cloth3D.cpp 第 1412 行定义.

◆ getContactCount()

int eve::physics::LayeredCloth3D::getContactCount ( ) const

Return projected contacts in the most recent update, including repeated passes.

在文件 Cloth3D.cpp 第 1403 行定义.

◆ getInterCollision()

bool eve::physics::LayeredCloth3D::getInterCollision ( ) const

Return whether inter-layer contacts are enabled.

在文件 Cloth3D.cpp 第 1402 行定义.

◆ getLayerCount()

int eve::physics::LayeredCloth3D::getLayerCount ( ) const

Return the number of owned sheets.

在文件 Cloth3D.cpp 第 1394 行定义.

被这些函数引用 layer().

◆ layer()

Cloth3D & eve::physics::LayeredCloth3D::layer ( int  index)

Borrow a layer for synchronous configuration; valid until owner destruction. Do not destroy or independently update it while the group is active.

异常
eve::Exceptionfor invalid index.

在文件 Cloth3D.cpp 第 1390 行定义.

引用了 getLayerCount() , 以及 index.

◆ operator=()

LayeredCloth3D & eve::physics::LayeredCloth3D::operator= ( const LayeredCloth3D &  )
delete

Owned layers cannot be copy-assigned between groups.

◆ reset()

void eve::physics::LayeredCloth3D::reset ( )

Restore every layer's authored pose and clear contact statistics.

在文件 Cloth3D.cpp 第 1408 行定义.

◆ setInterCollision()

void eve::physics::LayeredCloth3D::setInterCollision ( bool  enabled)

Enable or disable only contacts between different sheets.

在文件 Cloth3D.cpp 第 1401 行定义.

引用了 enabled.

◆ setSolver()

void eve::physics::LayeredCloth3D::setSolver ( int  substeps,
int  passes 
)

Configure substeps [1,32] and coupling passes [1,16]; throws on invalid input.

在文件 Cloth3D.cpp 第 1395 行定义.

◆ setWindVelocity()

void eve::physics::LayeredCloth3D::setWindVelocity ( float  x,
float  y,
float  z 
)

Set the air velocity of every sheet; throws on nonfinite input.

在文件 Cloth3D.cpp 第 1404 行定义.

引用了 x, y , 以及 z.

◆ update()

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

Advance all layers by finite dt in [0,0.05], without dropping time.

异常
eve::Exceptionon invalid dt or a destroyed layer, before mutation. @cost Substeps times constraint iterations plus broad-phase candidate triangle contacts; dense overlaps can be quadratic in triangle count.

在文件 Cloth3D.cpp 第 1415 行定义.

引用了 a, b, c, dt, h, p , 以及 step.


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