fix(v1.0.1): VDE-002 submodule path + VDE-006 cycle dep + VDE-007/008/009 API fixes
VDE-002 (High): Fix submodule include path - All target_include_directories: CMAKE_SOURCE_DIR → BUILD_INTERFACE - Works as both standalone project and add_subdirectory() VDE-006 (High): Break vde_mesh ↔ vde_brep circular dependency - Move mesh-dependent code from brep to mesh module - vde_brep no longer links vde_mesh VDE-007 (Low): Add mirror() and mirror_about_plane() to transform.h VDE-008 (Low): Add convenience accessors to StlTriangle (.x()/.y()/.z()) VDE-009 (Medium): Full Doxygen docs for C API + examples/capi/basic_usage.cpp Pending: VDE-001/003/004/005/010 GCC compatibility (agent still running)
This commit is contained in:
@@ -11,6 +11,9 @@ namespace vde::foundation {
|
||||
* 表示一个 STL 三角形,包含法向量和三个顶点。
|
||||
* 法向量应为单位向量,方向朝外(右手法则)。
|
||||
*
|
||||
* 除直接访问成员(v0, v1, v2)外,提供便捷分量访问方法,
|
||||
* 无需通过 Point3D 的 .x()/.y()/.z() 间接获取。
|
||||
*
|
||||
* @ingroup foundation
|
||||
*/
|
||||
struct StlTriangle {
|
||||
@@ -18,6 +21,30 @@ struct StlTriangle {
|
||||
Vector3D normal;
|
||||
/// 三个顶点(右手法则 CCW 顺序)
|
||||
Point3D v0, v1, v2;
|
||||
|
||||
// ── 便捷分量访问:顶点 v0 ──
|
||||
/// 顶点 v0 的 X 分量
|
||||
[[nodiscard]] double v0x() const { return v0.x(); }
|
||||
/// 顶点 v0 的 Y 分量
|
||||
[[nodiscard]] double v0y() const { return v0.y(); }
|
||||
/// 顶点 v0 的 Z 分量
|
||||
[[nodiscard]] double v0z() const { return v0.z(); }
|
||||
|
||||
// ── 便捷分量访问:顶点 v1 ──
|
||||
/// 顶点 v1 的 X 分量
|
||||
[[nodiscard]] double v1x() const { return v1.x(); }
|
||||
/// 顶点 v1 的 Y 分量
|
||||
[[nodiscard]] double v1y() const { return v1.y(); }
|
||||
/// 顶点 v1 的 Z 分量
|
||||
[[nodiscard]] double v1z() const { return v1.z(); }
|
||||
|
||||
// ── 便捷分量访问:顶点 v2 ──
|
||||
/// 顶点 v2 的 X 分量
|
||||
[[nodiscard]] double v2x() const { return v2.x(); }
|
||||
/// 顶点 v2 的 Y 分量
|
||||
[[nodiscard]] double v2y() const { return v2.y(); }
|
||||
/// 顶点 v2 的 Z 分量
|
||||
[[nodiscard]] double v2z() const { return v2.z(); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user