<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>C&#43;&#43; on Logic&#39;s Lab</title>
    <link>https://logmagic.top/tags/c&#43;&#43;/</link>
    <description>Recent content in C&#43;&#43; on Logic&#39;s Lab</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Tue, 12 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://logmagic.top/tags/c++/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>棋子检测方案升级：YOLO 目标检测替代传统 ROI 阈值</title>
      <link>https://logmagic.top/posts/yolo-stone-detection/</link>
      <pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/yolo-stone-detection/</guid>
      <description>Phase: P1 升级 — 棋子识别方案演进 | 依赖: P0 棋盘矫正 目标: 用 YOLO 深度学习模型替代 ROI 双阈值方案，提升棋子检测准确率和光照鲁棒性。 0. 升级背景 当前的 ROI 双阈值</description>
    </item>
    
    <item>
      <title>C&#43;&#43; 跨线程数据同步方法完全指南</title>
      <link>https://logmagic.top/posts/cpp-thread-sync/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/cpp-thread-sync/</guid>
      <description>多线程编程最难的从来不是创建线程——std::thread t(foo) 谁都会写。真正让人半夜抓头发的是：两个线程同时碰到同一块数据时，怎么让它们不打架</description>
    </item>
    
    <item>
      <title>Part 1: 规则引擎 &#43; 虚拟棋盘 —— 从检测到对弈</title>
      <link>https://logmagic.top/courses/go-board-assistant/part1-game-engine/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/go-board-assistant/part1-game-engine/</guid>
      <description>构建完整的围棋规则引擎和虚拟棋盘 UI，实现可交互的完整对弈程序</description>
    </item>
    
    <item>
      <title>Qt6 安卓开发环境部署完全指南</title>
      <link>https://logmagic.top/posts/qt6-android-setup/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/qt6-android-setup/</guid>
      <description>从零到 APK：在 Ubuntu 20.04 上搭建 Qt6 Android 交叉编译环境，覆盖 JDK、Android SDK/NDK、Qt6 for Android 安装，以及 CMake 配置、交叉编译、APK 打包全流程</description>
    </item>
    
    <item>
      <title>SGF 棋谱：格式解析与 C&#43;&#43; 读写实现</title>
      <link>https://logmagic.top/posts/sgf-format/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/sgf-format/</guid>
      <description>SGF（Smart Game Format）是围棋棋谱的通用交换格式，所有主流围棋软件和 AI 都认它。这篇文章把 SGF 的树形结构、核心属性、解析策略讲清楚，并</description>
    </item>
    
    <item>
      <title>三点星位透视矫正：最少点击量的数学最优解</title>
      <link>https://logmagic.top/posts/three-star-rectify/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/three-star-rectify/</guid>
      <description>上篇文章提出了 2 点斜对角方案，用中点凑第三点来做仿射预估。但这篇文章要指出：这个方案存在一个无法修复的数学缺陷——三个点共线导致仿射矩阵退化</description>
    </item>
    
    <item>
      <title>两点星位透视矫正：用最少标记完成棋盘校正</title>
      <link>https://logmagic.top/posts/two-star-rectify/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/two-star-rectify/</guid>
      <description>核心问题：9 星位标记虽然精度最高，但用户操作繁琐。能否只用 2 个斜对角星位完成矫正，同时保持可接受的精度？答案是：可以。通过仿射预估 → 引导搜索</description>
    </item>
    
    <item>
      <title>四点角星位透视矫正：一键直达全单应</title>
      <link>https://logmagic.top/posts/four-star-rectify/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/four-star-rectify/</guid>
      <description>三点三角方案有一个痛点：点完 3 次后，可能停留在仿射阶段，透视校正要碰运气（guided search 能不能搜到额外星位）。四点角方案用 4 个角星位，多 1 次</description>
    </item>
    
    <item>
      <title>围棋打谱辅助系统：4&#43;1 架构视图与功能设计</title>
      <link>https://logmagic.top/posts/go-board-architecture/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-board-architecture/</guid>
      <description>本文从架构师视角，用 4+1 视图完整描述围棋打谱辅助系统的顶层设计。核心决策：引入命令模式解耦输入源（人类 / 摄像头 / AI / SGF），统一 GoBoard 不可变状态</description>
    </item>
    
    <item>
      <title>围棋打谱辅助系统：4&#43;1 架构设计 V2</title>
      <link>https://logmagic.top/posts/go-board-architecture-v2/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-board-architecture-v2/</guid>
      <description>智能围棋盘 —— 系统架构设计文档 版本: v2.0 | 架构师: Magic_GT | 修订: Magic_HK | 方法论: 4+1 View Model (Kruchten) 设计目标: 构建一个高内聚、低耦合、可扩展的围棋系统，支持：命令</description>
    </item>
    
    <item>
      <title>围棋打谱辅助系统：4&#43;1 架构设计 V3</title>
      <link>https://logmagic.top/posts/go-board-architecture-v3/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-board-architecture-v3/</guid>
      <description>智能围棋盘 —— 系统架构设计文档 版本: v3.0 | 架构师: Magic_GT | 修订: Magic_HK | 方法论: 4+1 View Model (Kruchten) 设计目标: 构建一个高内聚、低耦合、可扩展的围棋系统，支持：命令</description>
    </item>
    
    <item>
      <title>围棋棋盘标定：基于 9 星位点的透视校正方案</title>
      <link>https://logmagic.top/posts/go-board-calibration/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-board-calibration/</guid>
      <description>核心思想：围棋棋盘有 9 个固定位置的星位标记点（座子点），它们构成一个已知的 3×3 网格。检测这 9 个点即可直接求解透视变换，一步到位地映射出全部</description>
    </item>
    
    <item>
      <title>围棋棋盘透视矫正算法：从倾斜照片到正方形俯视图</title>
      <link>https://logmagic.top/posts/go-rectify-algorithm/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-rectify-algorithm/</guid>
      <description>1. 问题定义 输入: 任意角度拍摄包含围棋棋盘的彩色照片（倾斜、透视畸变） 输出: 正方形俯视校正图（19×19 标准棋盘，含网格线与星位标记） 2. 算法流</description>
    </item>
    
    <item>
      <title>围棋规则引擎：代码级逻辑描述</title>
      <link>https://logmagic.top/posts/go-rules-engine/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/go-rules-engine/</guid>
      <description>用途: 作为围棋打谱辅助系统对弈引擎模块的参考设计文档。 覆盖规则: 落子合法性、气与提子、劫争、终局判定（中日规则对比）。 目标语言: C++（可移</description>
    </item>
    
    <item>
      <title>棋子检测系统设计：ROI 双阈值 &#43; 帧差法落子识别</title>
      <link>https://logmagic.top/posts/stone-detection-design/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/stone-detection-design/</guid>
      <description>Phase: P1 — 棋子识别 + 局面感知 | 依赖: P0 棋盘矫正 输入: 透视矫正后的 600×600 正方形棋盘图，已知 361 个交点像素坐标 输出: 19×19 局面字符串 (B/W/.) + 落</description>
    </item>
    
    <item>
      <title>第1课：QStyle 体系基础 — 继承链、绘制机制与 QStyleOption</title>
      <link>https://logmagic.top/courses/custom-qstyle/01-qstyle-basics/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/01-qstyle-basics/</guid>
      <description>继承 QCommonStyle（非 QProxyStyle）、绘制三剑客、qstyleoption_cast、State 标志映射</description>
    </item>
    
    <item>
      <title>第2课：Theme 系统设计 — 颜色体系、JSON 序列化与热切换</title>
      <link>https://logmagic.top/courses/custom-qstyle/02-theme-system/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/02-theme-system/</guid>
      <description>深入解析 QStyle Theme 系统的四层颜色模型、JSON 序列化/反序列化方案与 ThemeManager 热切换机制</description>
    </item>
    
    <item>
      <title>第3课：polish / EventFilter — 样式生命周期与事件拦截</title>
      <link>https://logmagic.top/courses/custom-qstyle/03-polish-eventfilter/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/03-polish-eventfilter/</guid>
      <description>拆解 polish() 生命周期钩子与 EventFilter 事件拦截机制，覆盖 7 种 Filter 类型及完整代码示例</description>
    </item>
    
    <item>
      <title>第4课：绘制引擎核心 — drawPrimitive/drawControl 全景解剖</title>
      <link>https://logmagic.top/courses/custom-qstyle/04-drawing-engine/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/04-drawing-engine/</guid>
      <description>全面剖析 QStyle 三层绘制架构：drawPrimitive 最小单元、drawControl 复合控件、drawComplexControl 多子控件</description>
    </item>
    
    <item>
      <title>第5课：动画系统 — WidgetAnimationManager 与焦点动画</title>
      <link>https://logmagic.top/courses/custom-qstyle/05-animation/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/05-animation/</guid>
      <description>WidgetAnimationManager 三层动画架构、焦点指示动画、Switch 控件动画与 QEasingCurve 选择指南</description>
    </item>
    
    <item>
      <title>第6课：扩展与集成 — 自定义控件、SVG 图标与 Qt5/Qt6 双版本</title>
      <link>https://logmagic.top/courses/custom-qstyle/06-integration-qt5-qt6/</link>
      <pubDate>Mon, 11 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/custom-qstyle/06-integration-qt5-qt6/</guid>
      <description>自定义枚举扩展 QStyle 绘制、SVG 图标缓存与着色引擎、Qt5/Qt6 双版本编译兼容层完整方案</description>
    </item>
    
    <item>
      <title>C&#43;&#43; 组件化基础：模板、CRTP、Policy-Based Design、类型擦除</title>
      <link>https://logmagic.top/posts/cpp-component-basics/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/cpp-component-basics/</guid>
      <description>四块 C&#43;&#43; 组件化基石，从原理到实战</description>
    </item>
    
    <item>
      <title>C&#43;&#43;20 Concepts：如何约束组件接口</title>
      <link>https://logmagic.top/posts/cpp20-concepts-guide/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/cpp20-concepts-guide/</guid>
      <description>告别 300 行模板编译错误，Concepts 让接口清晰如文档</description>
    </item>
    
    <item>
      <title>第11章：成品打磨 — 性能剖析与跨平台发布</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-11-release/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-11-release/</guid>
      <description>用 RenderDoc 找到瓶颈、用 windeployqt/AppImage 打包——让你的体素引擎跑在别人电脑上</description>
    </item>
    
    <item>
      <title>组件契约：concept &#43; static_assert &#43; 编译期测试</title>
      <link>https://logmagic.top/posts/component-contracts/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/component-contracts/</guid>
      <description>三层防御体系，让你的组件「用错就编译不过」而不是「跑了才崩」</description>
    </item>
    
    <item>
      <title>编译期 vs 运行期：何时用哪种</title>
      <link>https://logmagic.top/posts/compile-time-vs-runtime/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/compile-time-vs-runtime/</guid>
      <description>编译期派发和运行期派发不是对立面，是工具箱里的两把扳手</description>
    </item>
    
    <item>
      <title>QStyle 内核解剖：从像素到框架的深度之旅</title>
      <link>https://logmagic.top/posts/qstyle-internals/</link>
      <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/qstyle-internals/</guid>
      <description>为什么你应该关心 QStyle 的内部机制 大多数 Qt 开发者对 QStyle 的认知停留在 QApplication::setStyle(&amp;quot;Fusion&amp;quot;) 或者换个主题色。但如果你正在做以下任何一件事，理解 QStyle 内核就不是&amp;quot;加分项</description>
    </item>
    
    <item>
      <title>QStyle 枚举值完全参考手册：PixelMetric、StyleHint 与全部绘制元素</title>
      <link>https://logmagic.top/posts/qstyle-enums-reference/</link>
      <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/qstyle-enums-reference/</guid>
      <description>前言 上一篇文章我们剖析了 QStyle 的内核架构。这篇文章是它的「字典」——把 QStyle 中定义的每一个枚举值列出来，给出中文说明、实际使用场景和代码示例。你可以</description>
    </item>
    
    <item>
      <title>Qt Style Sheets 与 QStyle：两种外观系统的关系、冲突与共存之道</title>
      <link>https://logmagic.top/posts/qss-vs-qstyle/</link>
      <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/qss-vs-qstyle/</guid>
      <description>为什么你需要搞懂这两者的关系 几乎所有 Qt 开发者都经历过这个困惑时刻： &amp;ldquo;我用 setStyleSheet 给按钮改了个颜色，为什么之前自定义 QStyle 的圆角效果全没了？</description>
    </item>
    
    <item>
      <title>Qt 渲染管线底层剖析：QPainter vs OpenGL vs QML 场景图</title>
      <link>https://logmagic.top/posts/qt-rendering-pipeline/</link>
      <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/posts/qt-rendering-pipeline/</guid>
      <description>前言 上一篇文章讲到 QSS 在每次重绘时都要走 CSS 解析和盒模型计算，而 QStyle 直接用 C++ 计算。这只是冰山一角——Qt 的渲染管线远比&amp;quot;画出来&amp;quot</description>
    </item>
    
    <item>
      <title>第10章：渲染加速 — 实例化与视锥体剔除</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-10-rendering-optimization/</link>
      <pubDate>Thu, 07 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-10-rendering-optimization/</guid>
      <description>草、花、树叶用实例化一次画完，视锥体外的 Chunk 直接跳过——两招把 FPS 翻倍</description>
    </item>
    
    <item>
      <title>第9章：存储与回溯 — 世界持久化格式设计</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-09-persistence/</link>
      <pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-09-persistence/</guid>
      <description>不要让玩家的创造毁于一次崩溃。设计一个省空间、可扩展、支持版本升级的二进制存档格式</description>
    </item>
    
    <item>
      <title>第四部分：综合实战</title>
      <link>https://logmagic.top/courses/design-patterns/part4-integrated-projects/</link>
      <pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/design-patterns/part4-integrated-projects/</guid>
      <description>用多个组件组合出迷你 GUI 框架和 ECS 引擎</description>
    </item>
    
    <item>
      <title>第三部分：行为型组件</title>
      <link>https://logmagic.top/courses/design-patterns/part3-behavioral-components/</link>
      <pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/design-patterns/part3-behavioral-components/</guid>
      <description>对象之间的通信方式——谁调用谁、数据怎么流动、责任怎么分配，9 个即插即用组件</description>
    </item>
    
    <item>
      <title>第二部分：结构型组件</title>
      <link>https://logmagic.top/courses/design-patterns/part2-structural/</link>
      <pubDate>Sat, 02 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/design-patterns/part2-structural/</guid>
      <description>从「能用」到「零开销封装」，六个结构型模式，每个给运行期和编译期两套方案</description>
    </item>
    
    <item>
      <title>第一部分：创建型组件</title>
      <link>https://logmagic.top/courses/design-patterns/part1-toolbox/</link>
      <pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/design-patterns/part1-toolbox/</guid>
      <description>Singleton、Factory、Builder、Strategy、Observer — 5 个即插即用的 C&#43;&#43; 组件</description>
    </item>
    
    <item>
      <title>第7章：让世界生动 — 光照与 AO</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-07-lighting-ao/</link>
      <pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-07-lighting-ao/</guid>
      <description>漫反射 &#43; 环境光遮蔽 &#43; 天空光，三道光让方块世界从平面变立体</description>
    </item>
    
    <item>
      <title>第6章：精准打击 — 射线拾取</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-06-ray-picking/</link>
      <pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-06-ray-picking/</guid>
      <description>用一条射线穿过方块世界，找到玩家正在看的那一个方块</description>
    </item>
    
    <item>
      <title>第5章：草方块从哪来 — 程序化地形生成</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-05-terrain-generation/</link>
      <pubDate>Sun, 26 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-05-terrain-generation/</guid>
      <description>从一维噪声到三维地形，把数学公式变成看得见摸得着的方块世界</description>
    </item>
    
    <item>
      <title>第4章：无限世界的幻觉 — Chunk 动态加载卸载</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-04-chunk-loading/</link>
      <pubDate>Fri, 24 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-04-chunk-loading/</guid>
      <description>一个 256×256 的地面要装 65536 个 Chunk，全加载内存直接爆炸。多线程按需加载，只渲染玩家周围一圈</description>
    </item>
    
    <item>
      <title>第3章：方块管理术 — 高性能 Chunk 系统</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-03-chunk-system/</link>
      <pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-03-chunk-system/</guid>
      <description>数据结构的选择决定了你的体素引擎能跑 60 FPS 还是 6 FPS</description>
    </item>
    
    <item>
      <title>第2章：第一个方块 — 顶点缓冲到纹理映射</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-02-first-cube/</link>
      <pubDate>Mon, 20 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-02-first-cube/</guid>
      <description>VBO/VAO/面剔除/纹理图集 — 从「六个面全画」到「只画看得见的面」</description>
    </item>
    
    <item>
      <title>第1章：启程 — Qt &#43; OpenGL 渲染基石</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-01-opengl-foundation/</link>
      <pubDate>Sat, 18 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-01-opengl-foundation/</guid>
      <description>初始化 OpenGL 谁都会写，但主循环怎么设计、渲染接口怎么抽象，才是拉开差距的地方</description>
    </item>
    
    <item>
      <title>第0章：启程之前 — 工程化地基</title>
      <link>https://logmagic.top/courses/voxel-engine/ch-00-foundation/</link>
      <pubDate>Thu, 16 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://logmagic.top/courses/voxel-engine/ch-00-foundation/</guid>
      <description>CMake 一键构建、架构全景图、编码规范 — 三件事做完再写第一行渲染代码</description>
    </item>
    
  </channel>
</rss>
