3D 第一个控件成功显示

This commit is contained in:
2026-08-14 11:07:38 +08:00
parent 02c60679e4
commit 38231dbc1c
28 changed files with 2758 additions and 28 deletions
+42 -5
View File
@@ -53,6 +53,8 @@ const std::vector<Case_Model>& cases() {
"鼠标框选、多区域保留、标注样式和清空。", 70},
{"constellation", "星座图", "Constellation_Diagram", "点图控件",
"PSK4/PSK8/PSK16 模式、相位、寿命、坐标范围和方形拟合。", 80}
,{"point_3d", "Datoviz 3D 点组件", "Point Visual", "3D",
"Kernel 状态双缓冲、实时批量点数据、单线程 Datoviz 渲染与 RGBA 回读。", 90}
};
return value;
}
@@ -93,6 +95,39 @@ std::size_t session_control_count(Gallery_Frame_Mode frame_mode) {
std::vector<Action_Model> registered_actions(std::string_view case_id,
Gallery_Frame_Mode frame_mode) {
std::vector<Action_Model> result;
if (case_id == "point_3d") {
const auto keep_frame_action = [frame_mode](std::string_view id) {
switch (frame_mode) {
case Gallery_Frame_Mode::Manual:
return id == "mode_prepare" || id == "mode_refresh" ||
id == "mode_render" || id == "mode_discard";
case Gallery_Frame_Mode::Low_Latency:
return id == "mode_prepare" || id == "mode_render" ||
id == "mode_discard";
case Gallery_Frame_Mode::Playback:
return id == "mode_enqueue" || id == "mode_dequeue";
}
return false;
};
for (auto& action : gallery_frame_actions(frame_mode)) {
if (keep_frame_action(action.id))
result.push_back(std::move(action));
}
const auto add = [&result](std::string id, std::string label,
std::string api, std::string description) {
result.push_back({std::move(id), std::move(label), std::move(api),
std::move(description), "Point Visual", {}, {}, 0.0,
true});
};
add("orbit_points", "移动点", "Point_Data::update",
"通过 Kernel Latest_Real_Time_Data 发布一批新位置");
add("add_point", "添加点", "Point_Data::update", "向批量点数据追加一个点");
add("remove_point", "移除点", "Point_Data::update", "移除最后追加的点");
add("point_churn", "点增删压力", "Point_Data::update",
"在帧快照前连续追加并移除临时点");
add("reset_points", "重置点", "Point_Data::update", "恢复 3D 点演示数据");
return result;
}
append_session_actions(frame_mode, result);
for (auto& action : gallery_frame_actions(frame_mode))
result.push_back(std::move(action));
@@ -520,8 +555,9 @@ std::string Gallery_Protocol::catalog_json() {
const std::size_t renderable_controls = gallery_renderable_control_count(item.id);
for (const auto mode : frame_modes) {
const std::string key = gallery_enum_id(mode);
const std::size_t controls =
gallery_detail::session_control_count(mode) + renderable_controls;
const std::size_t controls = item.id == "point_3d"
? 0U
: gallery_detail::session_control_count(mode) + renderable_controls;
const std::size_t actions =
gallery_detail::registered_actions(item.id, mode).size();
entry["control_count_by_mode"][key] = controls;
@@ -529,9 +565,10 @@ std::string Gallery_Protocol::catalog_json() {
controls_total += controls;
actions_total += actions;
}
entry["control_count"] =
gallery_detail::session_control_count(Gallery_Frame_Mode::Low_Latency) +
renderable_controls;
entry["control_count"] = item.id == "point_3d"
? 0U
: gallery_detail::session_control_count(Gallery_Frame_Mode::Low_Latency) +
renderable_controls;
entry["action_count"] =
gallery_detail::registered_actions(
item.id, Gallery_Frame_Mode::Low_Latency).size();