|
|
#ifndef NMPEBIRESULTWELLANNOTATIONLAYER_H
|
|
|
#define NMPEBIRESULTWELLANNOTATIONLAYER_H
|
|
|
|
|
|
#include "nmSubWxs_global.h"
|
|
|
|
|
|
#include "nmVTKRenderLayer.h"
|
|
|
|
|
|
#include <QSharedPointer>
|
|
|
#include <vtkSmartPointer.h>
|
|
|
|
|
|
class nmPebiResultSnapshot;
|
|
|
class vtkPropAssembly;
|
|
|
|
|
|
/**
|
|
|
* @brief 显示快照中全部二维井位和井名的业务图层。
|
|
|
*
|
|
|
* 图层只读取快照冻结的 XY 和井名,不访问 DataManager,不伪造井深或轨迹。
|
|
|
* 稳定根 Assembly 始终挂在 Scene 中;新快照通过候选子 Assembly 无失败交换。
|
|
|
*/
|
|
|
class NM_SUB_WXS_EXPORT nmPebiResultWellAnnotationLayer
|
|
|
: public nmVTKRenderLayer
|
|
|
{
|
|
|
public:
|
|
|
/** @brief 创建稳定根 Assembly,初始不包含任何快照井标注。 */
|
|
|
explicit nmPebiResultWellAnnotationLayer(const QString& sLayerId);
|
|
|
/** @brief 先解除 Renderer,再释放活动和候选子 Assembly。 */
|
|
|
virtual ~nmPebiResultWellAnnotationLayer();
|
|
|
|
|
|
/**
|
|
|
* @brief 在未挂载候选对象中构造快照全部井位和井名。
|
|
|
* @note 失败时活动子 Assembly 完全不变;再次准备会丢弃旧候选。
|
|
|
*/
|
|
|
bool prepareCandidate(
|
|
|
const QSharedPointer<const nmPebiResultSnapshot>& pSnapshot);
|
|
|
/** @brief 丢弃尚未提交的候选对象,不影响当前画面。 */
|
|
|
void discardCandidate();
|
|
|
/**
|
|
|
* @brief 将已经验证的候选子 Assembly 替换为活动对象。
|
|
|
* @note 仅可在 prepareCandidate() 成功后调用;只执行无失败 VTK setter。
|
|
|
*/
|
|
|
void commitCandidate();
|
|
|
|
|
|
/** @brief 移除活动和候选井标注,稳定根 Assembly 保持不变。 */
|
|
|
void clear();
|
|
|
/** @brief 返回活动快照是否已有完整井标注子树。 */
|
|
|
bool hasActiveAnnotations() const;
|
|
|
|
|
|
/** @brief 独立设置约 9px 的二维井位标记显隐。 */
|
|
|
void setWellMarkersVisible(bool bVisible);
|
|
|
/** @brief 独立设置约 12px 的二维井名显隐。 */
|
|
|
void setWellNamesVisible(bool bVisible);
|
|
|
bool areWellMarkersVisible() const;
|
|
|
bool areWellNamesVisible() const;
|
|
|
|
|
|
private:
|
|
|
Q_DISABLE_COPY(nmPebiResultWellAnnotationLayer)
|
|
|
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pRootAssembly; ///< Scene 挂载的稳定根。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pActiveSnapshotAssembly; ///< 当前快照子树。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pActiveMarkerGroup; ///< 当前井位组。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pActiveNameGroup; ///< 当前井名组。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pCandidateSnapshotAssembly; ///< 待提交子树。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pCandidateMarkerGroup; ///< 候选井位组。
|
|
|
vtkSmartPointer<vtkPropAssembly> m_pCandidateNameGroup; ///< 候选井名组。
|
|
|
bool m_bWellMarkersVisible; ///< 跨快照保留的井位显隐偏好。
|
|
|
bool m_bWellNamesVisible; ///< 跨快照保留的井名显隐偏好。
|
|
|
};
|
|
|
|
|
|
#endif // NMPEBIRESULTWELLANNOTATIONLAYER_H
|