载入中...
搜索中...
未找到
ArrowGenerator.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4#include "common/Result.h"
5#include "procgen/MeshBuild.h"
6
7#include <array>
8#include <string_view>
9
10namespace eve::procgen {
11
20public:
30 [[nodiscard]] Result<void> setEndpoints(float ax, float ay, float az, float bx, float by, float bz);
37 [[nodiscard]] Result<void> setBend(float x, float y, float z);
42 [[nodiscard]] Result<void> setMode(std::string_view mode);
49 [[nodiscard]] Result<void> setSize(float shaftWidth, float headWidth, float headLength);
56 [[nodiscard]] Result<void> setBevel(float thickness, float radius, int segments);
63 [[nodiscard]] Result<void> setFlatProfile(std::string_view profile);
68 [[nodiscard]] Result<void> setHeadThicknessScale(float scale);
74 [[nodiscard]] Result<void> setResolution(int curveSegments, int radialSides);
85 [[nodiscard]] Result<MeshBuild> buildMeshResult() const;
86
87private:
88 std::array<double, 3> a_{0., 0., 0.};
89 std::array<double, 3> b_{1., 0., 0.};
90 std::array<double, 3> bend_{};
91 double shaftWidth_ = 0.04;
92 double headWidth_ = 0.12;
93 double headLength_ = 0.2;
94 int segments_ = 32;
95 int sides_ = 12;
96 bool planar_ = true;
97 bool flat_ = false;
98 bool flowing_ = false;
99 double thickness_ = 0.02;
100 double bevelRadius_ = 0.004;
101 int bevelSegments_ = 4;
102 double headThicknessScale_ = 1.;
103};
104
105} // namespace eve::procgen
double z
double y
double x
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::array< float, 3 > scale
float thickness
double radius
Definition MeleeHit.cpp:42
Move-only, checked operation results for the common layer.
int segments
Definition TreeMesh.cpp:281
Move-only operation result carrying either a value or Status.
Definition Result.h:176
CPU geometry builder for A-to-B selection indicators, independent of object lifetime....