Root-to-skin binding table (UE UGroomBindingAsset analogue, CPU-only).
更多...
#include <Binding.h>
Public 成员函数 | |
| Result< void > | build (const StrandsDatas &strands, const SkinTriMesh &restMesh) |
| Project every strand root onto the closest rest-mesh triangle. @ownership Overwrites this binding; strands remain caller-owned. | |
| void | clear () |
| size_t | rootCount () const |
| Root count. | |
| const RootAttach * | rootAt (size_t index) const |
| Root at. | |
| Result< StrandsDatas > | deform (const StrandsDatas &restStrands, const SkinTriMesh &deformedMesh, BindingDeformMode mode=BindingDeformMode::Rigid) const |
| Deform rest strands using this binding and a deformed skin mesh. | |
详细描述
Root-to-skin binding table (UE UGroomBindingAsset analogue, CPU-only).
Built once against a rest mesh; applied each frame (or on demand) against a deformed mesh that shares topology. Does not depend on the animation module — callers supply packed positions.
@thread Affine to the caller; not synchronized. @reentrancy Does not invoke callbacks.
成员函数说明
◆ build()
| Result< void > eve::graphics::hair::GroomBinding::build | ( | const StrandsDatas & | strands, |
| const SkinTriMesh & | restMesh | ||
| ) |
Project every strand root onto the closest rest-mesh triangle. @ownership Overwrites this binding; strands remain caller-owned.
在文件 Binding.cpp 第 164 行定义.
引用了 a, b, bary, eve::graphics::hair::RootAttach::barycentric, c, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), found, eve::graphics::hair::SkinTriMesh::indexCount, eve::InvalidArgument, eve::InvariantViolation, ok, eve::graphics::hair::RootAttach::restNormal, eve::graphics::hair::RootAttach::restRoot, root, strands, eve::Result< T >::success() , 以及 eve::graphics::hair::RootAttach::triangleIndex.
◆ clear()
| void eve::graphics::hair::GroomBinding::clear | ( | ) |
在文件 Binding.cpp 第 217 行定义.
◆ deform()
| Result< StrandsDatas > eve::graphics::hair::GroomBinding::deform | ( | const StrandsDatas & | restStrands, |
| const SkinTriMesh & | deformedMesh, | ||
| BindingDeformMode | mode = BindingDeformMode::Rigid |
||
| ) | const |
Deform rest strands using this binding and a deformed skin mesh.
- 返回
- A new
StrandsDatas(same curve topology); rest strands unchanged.
在文件 Binding.cpp 第 224 行定义.
引用了 a, b, eve::graphics::hair::RootAttach::barycentric, c, curve, eve::graphics::hair::StrandsDatas::curveCount(), eve::graphics::hair::StrandsDatas::curves(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::InvariantViolation, local, ok, eve::graphics::hair::StrandsDatas::points(), points, eve::graphics::hair::StrandPoint::position, eve::graphics::hair::RootAttach::restNormal, eve::graphics::hair::RootAttach::restRoot, eve::graphics::hair::Rigid, eve::graphics::hair::StrandsDatas::setCurves(), eve::graphics::hair::StrandsDatas::setPoints(), eve::Result< T >::success(), eve::graphics::hair::RootAttach::triangleIndex, valid , 以及 eve::graphics::hair::StrandsDatas::validate().
◆ rootAt()
| const RootAttach * eve::graphics::hair::GroomBinding::rootAt | ( | size_t | index | ) | const |
◆ rootCount()
|
inline |
该类的文档由以下文件生成:
- src/modules/graphics/hair/Binding.h
- src/modules/graphics/hair/Binding.cpp