载入中...
搜索中...
未找到
MeshUvProjection.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4#include "procgen/MeshBuild.h"
5
6#include <cstdint>
7#include <string_view>
8
9namespace eve::procgen {
10
12struct MeshSurfaceUv { float u = 0.f, v = 0.f; };
13
21[[nodiscard]] EVENGINE_API_DOMAINS Result<MeshBuild> projectMeshUvResult(const MeshBuild& input, std::string_view mode,
22 float scale = 1.f, float offsetU = 0.f,
23 float offsetV = 0.f);
24
33 int triangleIndex, float x,
34 float y, float z);
35
36} // namespace eve::procgen
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
EvpackChunkInput input
Definition Evpack.cpp:170
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::array< float, 3 > scale
Mesh * mesh
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packe...
Definition MeshBuild.h:19
Result< MeshSurfaceUv > mapMeshSurfacePointToUvResult(const MeshBuild &mesh, int triangleIndex, float x, float y, float z)
Map a surface point on a dynamic-mesh triangle to its interpolated UV.
Result< MeshBuild > projectMeshUvResult(const MeshBuild &input, std::string_view mode, float scale, float offsetU, float offsetV)
Generate topology-preserving UVs for a procedural or deformed mesh.
UV coordinate resolved from a dynamic-mesh triangle hit.