载入中...
搜索中...
未找到
eve::graphics::hair::GuideSimulator类 参考

Lightweight Verlet + XPBD simulator for guide curves only. 更多...

#include <Simulation.h>

Public 成员函数

 GuideSimulator ()=default
 Guide simulator.
 
Result< void > reset (const StrandsDatas &guides, const GuideSimParams &params={})
 Capture rest topology and pin every curve root. @ownership Copies guides; caller retains the source.
 
void clear ()
 Clears .
 
void setParams (const GuideSimParams &params)
 Sets the params.
 
const GuideSimParams & params () const
 Params.
 
bool isReady () const
 True when ready.
 
size_t particleCount () const
 Particle count.
 
size_t curveCount () const
 Curve count.
 
Result< void > setPinnedRoots (const float *rootPositionsXYZ, int rootCount)
 Teleport pinned roots (e.g. after skin binding deform).
 
Result< void > step (float dt)
 Advance simulation by dt seconds (clamped by params.maxDt).
 
Result< StrandsDatas > snapshot () const
 Export current particle positions as StrandsDatas (same topology). @ownership Returned buffer uniquely owned by the caller.
 

详细描述

Lightweight Verlet + XPBD simulator for guide curves only.

Owns mutable particle state derived from a rest StrandsDatas. Call snapshot() to obtain a deformed guides buffer for interpolateStrands.

@thread Affine to the caller; not synchronized. @reentrancy Does not invoke callbacks. @determinism Tolerance-bounded for identical params/seeded inputs.

在文件 Simulation.h 第 52 行定义.

构造及析构函数说明

◆ GuideSimulator()

eve::graphics::hair::GuideSimulator::GuideSimulator ( )
default

Guide simulator.

成员函数说明

◆ clear()

void eve::graphics::hair::GuideSimulator::clear ( )

Clears .

在文件 Simulation.cpp 第 78 行定义.

◆ curveCount()

size_t eve::graphics::hair::GuideSimulator::curveCount ( ) const
inline

Curve count.

在文件 Simulation.h 第 77 行定义.

◆ isReady()

bool eve::graphics::hair::GuideSimulator::isReady ( ) const
inline

True when ready.

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

被这些函数引用 setPinnedRoots(), snapshot() , 以及 step().

◆ params()

const GuideSimParams & eve::graphics::hair::GuideSimulator::params ( ) const
inline

Params.

在文件 Simulation.h 第 70 行定义.

被这些函数引用 reset() , 以及 setParams().

◆ particleCount()

size_t eve::graphics::hair::GuideSimulator::particleCount ( ) const
inline

Particle count.

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

◆ reset()

◆ setParams()

void eve::graphics::hair::GuideSimulator::setParams ( const GuideSimParams &  params)

◆ setPinnedRoots()

Result< void > eve::graphics::hair::GuideSimulator::setPinnedRoots ( const float *  rootPositionsXYZ,
int  rootCount 
)

Teleport pinned roots (e.g. after skin binding deform).

参数
rootPositionsXYZPacked xyz, length = 3 * curveCount().

在文件 Simulation.cpp 第 95 行定义.

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

◆ snapshot()

◆ step()


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