载入中...
搜索中...
未找到
Guides.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
5
6#include <cstddef>
7#include <cstdint>
8#include <vector>
9
10namespace eve::graphics::hair {
11
19enum class InterpolationMode : uint8_t { Rigid = 0, Offset = 1, Smooth = 2 };
20
23 uint32_t guideIndex = 0;
24 float weight = 0.f;
25};
26
32 static constexpr int kMaxInfluences = 4;
34 int count = 0;
35};
36
46 float guideFraction);
47
57buildGuideWeights(const StrandsDatas &strands, const StrandsDatas &guides, int maxInfluences = 3,
59
65interpolateStrands(const StrandsDatas &strandsRest, const StrandsDatas &guidesRest, const StrandsDatas &guidesDeformed,
66 const std::vector<StrandGuideWeights> &weights, InterpolationMode mode);
67
68} // namespace eve::graphics::hair
int strands
#define EVENGINE_API_BACKENDS
Definition Export.h:108
Move-only, checked operation results for the common layer.
float weights[3]
Move-only operation result carrying either a value or Status.
Definition Result.h:155
CPU-authoritative strand buffer (UE FHairStrandsDatas analogue).
Procedural hair/fur card meshes + material/LOD helpers (no strand simulation).
Definition Graphics.h:58
InterpolationMode
How render strands follow deformed guides (UE interpolation analogue).
Definition Guides.h:19
Result< StrandsDatas > extractGuides(const StrandsDatas &strands, float guideFraction)
Pick a deterministic subset of curves as guides (density thinning).
Definition Guides.cpp:56
Result< StrandsDatas > interpolateStrands(const StrandsDatas &strandsRest, const StrandsDatas &guidesRest, const StrandsDatas &guidesDeformed, const std::vector< StrandGuideWeights > &weights, InterpolationMode mode)
Drive rest render strands with deformed guides using precomputed weights. @ownership Returned datas u...
Definition Guides.cpp:154
Result< std::vector< StrandGuideWeights > > buildGuideWeights(const StrandsDatas &strands, const StrandsDatas &guides, int maxInfluences, InterpolationMode mode)
Build k-nearest guide weights for every render strand (by root distance).
Definition Guides.cpp:103
One guide contributing to a render strand.
Definition Guides.h:22
Up to kMaxInfluences guides influencing one render strand. @ownership Owned by the weights table retu...
Definition Guides.h:31
GuideInfluence influencers[kMaxInfluences]
Definition Guides.h:33
static constexpr int kMaxInfluences
Definition Guides.h:32