geopro/src/render/actors/AnomalyActor.hpp

26 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <vector>
#include <vtkActor.h>
#include <vtkSmartPointer.h>
#include "model/Anomaly.hpp"
namespace geopro::render {
// 异常圈定叠加(#18 剖面上):按 markType 渲染——
// Point(1) = 各点方块标记;
// Polyline(2)= 经各点的折线(dashed 时虚线);
// Polygon(3) = 闭合多边形轮廓(首尾相连)。
// 坐标与数据详情 #18 一致x=距离、y=深度取负(向下)、z=0。每个异常产一个 actor
// 带其自身 lineColor / lineWidth / dashed便于按需逐个加入/移除与叠加纵向夸张。
// 调用方应对返回的每个 actor 施加与剖面相同的 SetScale 以对齐。空输入返回空 vector。
std::vector<vtkSmartPointer<vtkActor>> buildAnomalies(
const std::vector<geopro::core::Anomaly>& anomalies);
// 单个异常 → 世界坐标 3D actorVTK 三维视图):用 worldPts 直接建点/折线/闭合多边形(不翻 y、不压 z=0
// 空几何(worldPts 为空)返回 nullptr。样式同 buildAnomalies(lineColor/width/dashed)。
vtkSmartPointer<vtkActor> buildAnomaly3D(const geopro::core::Anomaly& anomaly);
} // namespace geopro::render