载入中...
搜索中...
未找到
eve::procgen::MeshDeformationSession类 参考

Stateful CPU sculpting session with explicit bake, restore, and undo semantics. 更多...

#include <MeshDeformationSession.h>

Public 成员函数

Result< void > initializeResult (const MeshBuild &mesh)
 Replace the session with an owning copy of a valid source mesh.
 
Result< void > applyBrushResult (std::string_view mode, float x, float y, float z, float radius, float strength, float falloff, float directionX=0.f, float directionY=1.f, float directionZ=0.f)
 Apply a localized brush to the current mesh.
 
Result< void > applyBrushGpuResult (std::string_view mode, float x, float y, float z, float radius, float strength, float falloff, float directionX=0.f, float directionY=1.f, float directionZ=0.f)
 Apply a sculpt brush through the registered GPU provider; absence returns Unsupported.
 
Result< void > applyImpactResult (float x, float y, float z, float impulseX, float impulseY, float impulseZ, float radius, float plasticity, float hardness, float maxDisplacement)
 Apply one collision-neutral plastic impact to the current mesh.
 
Result< void > applyImpactGpuResult (float x, float y, float z, float impulseX, float impulseY, float impulseZ, float radius, float plasticity, float hardness, float maxDisplacement)
 Apply plastic damage through the registered GPU provider; absence returns Unsupported.
 
Result< void > prepareImpactVertexBlocksResult (int divisionsPerAxis)
 Build a bounded uniform vertex-block index for repeated high-density impact queries.
 
int impactVertexBlockCount () const noexcept
 Return the number of non-empty prepared impact blocks.
 
bool hasImpactVertexBlocks () const noexcept
 Report whether impact queries currently use a prepared vertex-block index.
 
Result< void > applySurfaceContactResult (float x, float y, float z, float normalX, float normalY, float normalZ, float velocityX, float velocityY, float velocityZ, float radius, float depth, float drag, float falloff, float plasticity=0.f)
 Apply one Interactive Surface contact using caller-supplied local-space values.
 
Result< void > recoverSurfaceResult (float dt, float recoveryRate)
 Advance elastic recovery using explicit simulation time.
 
Result< void > applySlimeImpulseResult (float x, float y, float z, float impulseX, float impulseY, float impulseZ, float radius, float falloff)
 Inject one localized velocity impulse into the Mesh Slime simulation state.
 
Result< void > stepSlimeResult (float dt, float stiffness, float damping, float maxSpeed)
 Advance deterministic spring-damper Mesh Slime dynamics using injected time.
 
Result< void > configureColliderRefreshResult (std::string_view mode, float intervalSeconds, float offsetX=0.f, float offsetY=0.f, float offsetZ=0.f)
 Configure collider refresh scheduling and local position offset.
 
Result< void > requestColliderRefreshResult ()
 Mark a manual or once collider refresh as pending.
 
Result< bool > updateColliderRefreshResult (float dt)
 Advance the refresh scheduler and consume at most one pending refresh.
 
Result< MeshBuild > colliderMeshResult () const
 Return an owning current triangle-mesh collider snapshot with configured offset applied.
 
Result< int > selectVerticesSphereResult (float x, float y, float z, float radius, bool replace=true)
 Replace or extend vertex selection using a world/local-space sphere.
 
Result< int > selectVerticesBoxResult (float minX, float minY, float minZ, float maxX, float maxY, float maxZ, bool replace=true)
 Replace or extend vertex selection using an axis-aligned world/local-space box.
 
void clearVertexSelection () noexcept
 Clear runtime vertex selection.
 
int selectedVertexCount () const noexcept
 Return selected vertex count.
 
Result< MeshVertexSelectionCenter > selectedVertexCenterResult () const
 Return the arithmetic center of selected vertices for gizmo adapters.
 
Result< void > moveSelectedVerticesResult (float x, float y, float z)
 Translate selected vertices by a finite axis-gizmo delta as one undoable edit.
 
Result< void > manipulateSelectedVerticesResult (std::string_view mode, float originX, float originY, float originZ, float directionX, float directionY, float directionZ, float distance)
 Apply pull, push, or grab to selected vertices as one undoable edit.
 
Result< void > restoreResult ()
 Restore the initial mesh and clear undo history.
 
Result< void > bakeResult ()
 Make the current mesh the new restore point and clear undo history.
 
Result< void > undoResult ()
 Restore the most recent pre-edit snapshot.
 
Result< MeshBuild > currentMeshResult () const
 Return an independent owning snapshot of the current mesh.
 
std::uint64_t revision () const noexcept
 Return the monotonic state revision.
 
int undoCount () const noexcept
 Return the number of available undo snapshots.
 
bool isInitialized () const noexcept
 Report whether the session has been initialized.
 

详细描述

Stateful CPU sculpting session with explicit bake, restore, and undo semantics.

The session owns original, current, and bounded undo mesh snapshots. Calls are synchronous, graph-owning-thread only, and never retain caller memory. Failed edits preserve current state.

在文件 MeshDeformationSession.h 第 25 行定义.

成员函数说明

◆ applyBrushGpuResult()

Result< void > eve::procgen::MeshDeformationSession::applyBrushGpuResult ( std::string_view  mode,
float  x,
float  y,
float  z,
float  radius,
float  strength,
float  falloff,
float  directionX = 0.f,
float  directionY = 1.f,
float  directionZ = 0.f 
)

◆ applyBrushResult()

Result< void > eve::procgen::MeshDeformationSession::applyBrushResult ( std::string_view  mode,
float  x,
float  y,
float  z,
float  radius,
float  strength,
float  falloff,
float  directionX = 0.f,
float  directionY = 1.f,
float  directionZ = 0.f 
)

Apply a localized brush to the current mesh.

参数
modeinflate, dent, flatten, smooth, or directional.
xBrush center X.
yBrush center Y.
zBrush center Z.
radiusPositive world-space radius.
strengthSigned displacement scale.
falloffPositive radial exponent.
directionXDirectional brush X.
directionYDirectional brush Y.
directionZDirectional brush Z.
返回
Applied or a structured diagnostic; failure leaves the mesh unchanged.

在文件 MeshDeformationSession.cpp 第 152 行定义.

引用了 distance, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::MeshBuild::getVertexCount(), eve::procgen::MeshBuild::indices(), eve::InvalidArgument, eve::procgen::MeshBuild::normals(), positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, radius, size, strength, eve::Result< T >::success(), triangle, vx, vy, vz, weight, x, y , 以及 z.

◆ applyImpactGpuResult()

Result< void > eve::procgen::MeshDeformationSession::applyImpactGpuResult ( float  x,
float  y,
float  z,
float  impulseX,
float  impulseY,
float  impulseZ,
float  radius,
float  plasticity,
float  hardness,
float  maxDisplacement 
)

◆ applyImpactResult()

Result< void > eve::procgen::MeshDeformationSession::applyImpactResult ( float  x,
float  y,
float  z,
float  impulseX,
float  impulseY,
float  impulseZ,
float  radius,
float  plasticity,
float  hardness,
float  maxDisplacement 
)

Apply one collision-neutral plastic impact to the current mesh.

参数
xImpact center X.
yImpact center Y.
zImpact center Z.
impulseXWorld/local impulse X.
impulseYImpulse Y.
impulseZImpulse Z.
radiusPositive influence radius.
plasticityNon-negative impulse-to-displacement scale.
hardnessPositive radial falloff exponent.
maxDisplacementPositive distance each vertex may move from the baked baseline.
返回
Applied atomically, or a diagnostic without changing mesh or history.

Physics adapters remain responsible for coordinate conversion and impulse filtering. This session consumes plain values, retains no contact pointers, and is synchronous/thread-affine.

在文件 MeshDeformationSession.cpp 第 293 行定义.

引用了 distance, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, radius, scale, eve::Result< T >::success(), x, y , 以及 z.

◆ applySlimeImpulseResult()

Result< void > eve::procgen::MeshDeformationSession::applySlimeImpulseResult ( float  x,
float  y,
float  z,
float  impulseX,
float  impulseY,
float  impulseZ,
float  radius,
float  falloff 
)

◆ applySurfaceContactResult()

Result< void > eve::procgen::MeshDeformationSession::applySurfaceContactResult ( float  x,
float  y,
float  z,
float  normalX,
float  normalY,
float  normalZ,
float  velocityX,
float  velocityY,
float  velocityZ,
float  radius,
float  depth,
float  drag,
float  falloff,
float  plasticity = 0.f 
)

Apply one Interactive Surface contact using caller-supplied local-space values.

参数
xContact X.
yContact Y.
zContact Z.
normalXSurface normal X.
normalYSurface normal Y.
normalZSurface normal Z.
velocityXContact velocity X.
velocityYContact velocity Y.
velocityZContact velocity Z.
radiusPositive influence radius.
depthNon-negative indentation distance.
dragNon-negative tangential velocity scale.
falloffPositive radial exponent.
plasticityPermanent displacement fraction in [0, 1].
返回
Applied atomically, or a diagnostic preserving mesh, equilibrium state, and history.

在文件 MeshDeformationSession.cpp 第 384 行定义.

引用了 depth, distance, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::MeshBuild::getVertexCount(), eve::InvalidArgument, positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, radius, source, eve::Result< T >::success(), weight, x, y , 以及 z.

◆ bakeResult()

Result< void > eve::procgen::MeshDeformationSession::bakeResult ( )

Make the current mesh the new restore point and clear undo history.

在文件 MeshDeformationSession.cpp 第 749 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::MeshBuild::positions(), eve::PreconditionViolation , 以及 eve::Result< T >::success().

◆ clearVertexSelection()

void eve::procgen::MeshDeformationSession::clearVertexSelection ( )
noexcept

Clear runtime vertex selection.

在文件 MeshDeformationSession.cpp 第 640 行定义.

引用了 u.

◆ colliderMeshResult()

Result< MeshBuild > eve::procgen::MeshDeformationSession::colliderMeshResult ( ) const

Return an owning current triangle-mesh collider snapshot with configured offset applied.

在文件 MeshDeformationSession.cpp 第 580 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, eve::procgen::MeshBuild::setMeta() , 以及 eve::Result< T >::success().

◆ configureColliderRefreshResult()

Result< void > eve::procgen::MeshDeformationSession::configureColliderRefreshResult ( std::string_view  mode,
float  intervalSeconds,
float  offsetX = 0.f,
float  offsetY = 0.f,
float  offsetZ = 0.f 
)

Configure collider refresh scheduling and local position offset.

在文件 MeshDeformationSession.cpp 第 527 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, offsetX, offsetY, eve::PreconditionViolation , 以及 eve::Result< T >::success().

◆ currentMeshResult()

Result< MeshBuild > eve::procgen::MeshDeformationSession::currentMeshResult ( ) const

Return an independent owning snapshot of the current mesh.

在文件 MeshDeformationSession.cpp 第 774 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::PreconditionViolation , 以及 eve::Result< T >::success().

◆ hasImpactVertexBlocks()

bool eve::procgen::MeshDeformationSession::hasImpactVertexBlocks ( ) const
inlinenoexcept

Report whether impact queries currently use a prepared vertex-block index.

在文件 MeshDeformationSession.h 第 72 行定义.

◆ impactVertexBlockCount()

int eve::procgen::MeshDeformationSession::impactVertexBlockCount ( ) const
noexcept

Return the number of non-empty prepared impact blocks.

在文件 MeshDeformationSession.cpp 第 119 行定义.

◆ initializeResult()

Result< void > eve::procgen::MeshDeformationSession::initializeResult ( const MeshBuild &  mesh)

Replace the session with an owning copy of a valid source mesh.

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

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

◆ isInitialized()

bool eve::procgen::MeshDeformationSession::isInitialized ( ) const
inlinenoexcept

Report whether the session has been initialized.

在文件 MeshDeformationSession.h 第 149 行定义.

◆ manipulateSelectedVerticesResult()

Result< void > eve::procgen::MeshDeformationSession::manipulateSelectedVerticesResult ( std::string_view  mode,
float  originX,
float  originY,
float  originZ,
float  directionX,
float  directionY,
float  directionZ,
float  distance 
)

Apply pull, push, or grab to selected vertices as one undoable edit.

参数
modepull, push, or grab.
originXManipulator origin X.
originYManipulator origin Y.
originZManipulator origin Z.
directionXGrab direction X.
directionYGrab direction Y.
directionZGrab direction Z.
distanceSigned manipulation distance.

在文件 MeshDeformationSession.cpp 第 698 行定义.

引用了 distance, dx, dy, dz, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::MeshBuild::getVertexCount(), eve::InvalidArgument, length, moveSelectedVerticesResult(), positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, selectedVertexCount() , 以及 eve::Result< T >::success().

◆ moveSelectedVerticesResult()

Result< void > eve::procgen::MeshDeformationSession::moveSelectedVerticesResult ( float  x,
float  y,
float  z 
)

◆ prepareImpactVertexBlocksResult()

Result< void > eve::procgen::MeshDeformationSession::prepareImpactVertexBlocksResult ( int  divisionsPerAxis)

◆ recoverSurfaceResult()

Result< void > eve::procgen::MeshDeformationSession::recoverSurfaceResult ( float  dt,
float  recoveryRate 
)

Advance elastic recovery using explicit simulation time.

参数
dtNon-negative injected step duration.
recoveryRatePositive exponential recovery rate.
返回
Success without adding undo history; invalid input leaves state unchanged.

在文件 MeshDeformationSession.cpp 第 435 行定义.

引用了 blend, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation , 以及 eve::Result< T >::success().

◆ requestColliderRefreshResult()

Result< void > eve::procgen::MeshDeformationSession::requestColliderRefreshResult ( )

Mark a manual or once collider refresh as pending.

在文件 MeshDeformationSession.cpp 第 549 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::PreconditionViolation , 以及 eve::Result< T >::success().

◆ restoreResult()

Result< void > eve::procgen::MeshDeformationSession::restoreResult ( )

◆ revision()

std::uint64_t eve::procgen::MeshDeformationSession::revision ( ) const
inlinenoexcept

Return the monotonic state revision.

在文件 MeshDeformationSession.h 第 145 行定义.

◆ selectedVertexCenterResult()

Result< MeshVertexSelectionCenter > eve::procgen::MeshDeformationSession::selectedVertexCenterResult ( ) const

◆ selectedVertexCount()

int eve::procgen::MeshDeformationSession::selectedVertexCount ( ) const
noexcept

◆ selectVerticesBoxResult()

Result< int > eve::procgen::MeshDeformationSession::selectVerticesBoxResult ( float  minX,
float  minY,
float  minZ,
float  maxX,
float  maxY,
float  maxZ,
bool  replace = true 
)

◆ selectVerticesSphereResult()

Result< int > eve::procgen::MeshDeformationSession::selectVerticesSphereResult ( float  x,
float  y,
float  z,
float  radius,
bool  replace = true 
)

◆ stepSlimeResult()

Result< void > eve::procgen::MeshDeformationSession::stepSlimeResult ( float  dt,
float  stiffness,
float  damping,
float  maxSpeed 
)

Advance deterministic spring-damper Mesh Slime dynamics using injected time.

参数
dtPositive simulation step.
stiffnessNon-negative equilibrium attraction.
dampingNon-negative exponential velocity damping.
maxSpeedPositive velocity bound.

在文件 MeshDeformationSession.cpp 第 488 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::MeshBuild::getVertexCount(), index, eve::InvalidArgument, positions, eve::procgen::MeshBuild::positions(), eve::PreconditionViolation, scale , 以及 eve::Result< T >::success().

◆ undoCount()

int eve::procgen::MeshDeformationSession::undoCount ( ) const
inlinenoexcept

Return the number of available undo snapshots.

在文件 MeshDeformationSession.h 第 147 行定义.

◆ undoResult()

Result< void > eve::procgen::MeshDeformationSession::undoResult ( )

Restore the most recent pre-edit snapshot.

在文件 MeshDeformationSession.cpp 第 762 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 eve::Result< T >::success().

◆ updateColliderRefreshResult()

Result< bool > eve::procgen::MeshDeformationSession::updateColliderRefreshResult ( float  dt)

Advance the refresh scheduler and consume at most one pending refresh.

在文件 MeshDeformationSession.cpp 第 557 行定义.

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


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