载入中...
搜索中...
未找到
MeshInstanceRange.cpp
浏览该文件的文档.
21 if (!std::isfinite(range.minimum[i]) || !std::isfinite(range.maximum[i]) || range.minimum[i] > range.maximum[i])
23 Diagnostic::error(DiagnosticCode::InvalidArgument, "Invalid instance bounds", "graphics.instances"));
26bool meshInstanceRangeVisible(const MeshInstanceRange& range, const glm::mat4& model, const glm::mat4& vp,
35 const glm::vec3 axes[]{glm::vec3(model[0]) * half.x, glm::vec3(model[1]) * half.y, glm::vec3(model[2]) * half.z};
58 if ((state.depthCompare != MeshDepthCompare::Less && state.depthCompare != MeshDepthCompare::LessEqual &&
74 DiagnosticCode::InvalidArgument, "vegetation factor stream must contain five values per mesh vertex"));
93 DiagnosticCode::InvalidArgument, "vegetation deformation stream must contain nine values per mesh vertex"));
133Result<void> Mesh::validateTangentFrame(std::span<const float> tangents, std::span<const float> bitangents) const {
142 if (gpuVertexCount <= 0 || tangents.size() != size_t(gpuVertexCount) * 3 || bitangents.size() != tangents.size())
157Result<void> Mesh::adoptTangentFrame(std::vector<float>&& tangents, std::vector<float>&& bitangents) {
168Result<void> Mesh::setTangentFrame(std::span<const float> tangents, std::span<const float> bitangents) {
172 std::vector<float> t(tangents.begin(), tangents.end()), b(bitangents.begin(), bitangents.end());
178 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Failed, "tangent frame allocation failed"));
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Result< void > adoptVegetationFactors(std::vector< float > &&values)
Validate and take ownership of interleaved vegetation variation/occlusion pairs.
Definition MeshInstanceRange.cpp:83
Result< void > validateMotionHighlights(std::span< const float > values) const
Validate an optional per-vertex motion-highlight stream without mutation.
Definition MeshInstanceRange.cpp:115
Result< void > adoptVegetationDeformationFactors(std::vector< float > &&values)
Validate and atomically take ownership of a TVE rest-deformation stream. Failure preserves the mesh a...
Definition MeshInstanceRange.cpp:109
Result< void > validateVegetationDeformationFactors(std::span< const float > values) const
Validate optional TVE rest-deformation data without mutation. Nine floats per vertex are pivot XYZ,...
Definition MeshInstanceRange.cpp:89
Result< void > adoptTangentFrame(std::vector< float > &&tangents, std::vector< float > &&bitangents)
Validate then take owning frame buffers without allocating on success.
Definition MeshInstanceRange.cpp:157
Result< void > validateVegetationFactors(std::span< const float > values) const
Validate optional interleaved vegetation variation/occlusion pairs without mutation.
Definition MeshInstanceRange.cpp:70
Result< void > adoptMotionHighlights(std::vector< float > &&values)
Validate and transfer an owning motion-highlight stream without allocating on success.
Definition MeshInstanceRange.cpp:127
Result< void > setTangentFrame(std::span< const float > tangents, std::span< const float > bitangents)
Atomically copy authored tangent and bitangent XYZ streams, or clear both with empty spans.
Definition MeshInstanceRange.cpp:168
Result< void > validateTangentFrame(std::span< const float > tangents, std::span< const float > bitangents) const
Validate a frame against current vertex count without mutation or allocation on success.
Definition MeshInstanceRange.cpp:133
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
bool meshInstanceRangeVisible(const MeshInstanceRange &range, const glm::mat4 &model, const glm::mat4 &vp, const glm::vec3 &eye)
Test transformed bounds against Vulkan clip planes and horizontal distance.
Definition MeshInstanceRange.cpp:26
Result< void > validateMeshInstanceRange(const MeshInstanceRange &range)
Worker-safe validation of value-owned range and culling metadata.
Definition MeshInstanceRange.cpp:14
Result< void > validateMeshShaderRasterState(const MeshShaderRasterState &state)
Validate a borrowed value without touching graphics state; safe on any thread.
Definition MeshInstanceRange.cpp:57
@ LessEqual
@ InvalidArgument
@ Failed
Value-owned subset of a resource shader's static instances.
Definition MeshInstanceRange.h:15
Value snapshot of custom mesh rasterization state, independent of blending/culling.
Definition MeshShaderRasterState.h:15