载入中...
搜索中...
未找到
PrimitiveTypes.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
6#include "graphics/Color.h"
7
8#include <glm/glm.hpp>
9
10#include <cstddef>
11#include <cstdint>
12#include <optional>
13#include <vector>
14
15namespace eve::graphics {
16
18enum class PaintMode : std::uint8_t { Fill, Stroke, FillAndStroke };
20enum class LineCap : std::uint8_t { Butt, Square, Round };
22enum class LineJoin : std::uint8_t { Miter, Bevel, Round };
24enum class WidthSpace : std::uint8_t { ScreenPixels, WorldUnits };
26enum class DashSpace : std::uint8_t { ScreenPixels, WorldUnits };
28enum class PrimitiveDepthMode : std::uint8_t { TestAndWrite, TestOnly, Ignore };
30enum class PrimitiveCullMode : std::uint8_t { None, Back, Front };
32enum class PrimitiveQuality : std::uint8_t { Low, Medium, High, Adaptive };
34enum class PrimitiveRecordStatus : std::uint8_t { Recorded };
35
42
44[[nodiscard]] EVENGINE_API_BACKENDS std::uint32_t resolveRadialSegments(const RadialTessellation& tessellation,
45 float projectedRadiusPixels);
46
49 std::vector<float> intervals;
50 float phase = 0.f;
51 DashSpace space = DashSpace::ScreenPixels;
52
54 void validate() const;
56 [[nodiscard]] float period() const;
57};
58
61 float width = 1.f;
65 float miterLimit = 4.f;
66 std::optional<DashPattern> dash;
67
69 void validate() const;
70};
71
74 Color color = Color(1.f, 1.f, 1.f, 1.f);
78 bool antialias = true;
79
81 void validate() const;
82};
83
91
99 glm::mat4 view{1.f};
100 glm::mat4 projection{1.f};
101 glm::vec3 cameraPosition{0.f};
102 glm::ivec2 viewportSize{0};
103 float nearPlane = 0.1f;
104 float farPlane = 1000.f;
105
107 void validate() const;
108};
109
112 std::size_t commandCount = 0;
113 std::size_t segmentCount = 0;
114 std::size_t triangleCount = 0;
115 std::size_t batchCount = 0;
116 std::size_t uploadBytes = 0;
117 std::size_t cacheHits = 0;
118 std::size_t droppedCommands = 0;
119};
120
121} // namespace eve::graphics
float phase
Definition CaveMesh.cpp:58
#define EVENGINE_API_BACKENDS
Definition Export.h:108
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
LineCap
Shape applied to each open line endpoint.
PrimitiveCullMode
Face culling used by filled 3D primitives.
PrimitiveQuality
Reusable quality policy for radial primitive tessellation.
PaintMode
Whether a primitive paints its interior, boundary, or both.
eve::Color Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13
PrimitiveRecordStatus
Successful outcome of one atomic primitive recording operation.
LineJoin
Shape used where adjacent line segments meet.
DashSpace
Coordinate space in which dash intervals are measured.
WidthSpace
Coordinate space in which stroke width is measured.
std::uint32_t resolveRadialSegments(const RadialTessellation &tessellation, float projectedRadiusPixels)
Resolves a radial tessellation policy to a validated segment count.
PrimitiveDepthMode
Depth behavior of one 3D primitive.
BlendMode
Render-neutral 2D blend mode shared by graphics-facing modules.
Definition RenderTypes.h:11
Owning alternating draw/gap pattern for stroked primitives.
std::vector< float > intervals
Per-frame observable primitive workload.
Backend-neutral fill and stroke paint.
void validate() const
Validates paint state used by a draw command.
Quality and screen-error policy used by circles and curved spatial primitives.
Immutable camera and viewport facts used to resolve one 3D draw list. Projection uses the engine's RH...
void validate() const
Validates viewport and clip-plane values.
Additional scene-pass state carried by every 3D command.
Backend-neutral stroke state shared by 2D and 3D canvases.
void validate() const
Validates all scalar and optional dash state.
std::optional< DashPattern > dash