You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
#ifndef NMVTKVIEWSTATE_H
|
|
#define NMVTKVIEWSTATE_H
|
|
|
|
#include "nmRender_global.h"
|
|
#include <vtkSmartPointer.h>
|
|
class vtkCamera;
|
|
class nmWxVTKRenderContainerWidget;
|
|
|
|
/** @brief 可复制的视图快照;只由渲染容器写入,不保存可能悬空的拾取 Actor。 */
|
|
class NM_RENDER_EXPORT nmVTKViewState
|
|
{
|
|
public:
|
|
/** @brief 初始化为尚未捕获的无效状态。 */
|
|
nmVTKViewState();
|
|
/** @brief 释放独立相机副本的引用,不影响实际 Renderer。 */
|
|
~nmVTKViewState();
|
|
/** @brief 判断是否已从有效容器捕获视图。 */
|
|
bool isValid() const;
|
|
|
|
private:
|
|
friend class nmWxVTKRenderContainerWidget;
|
|
vtkSmartPointer<vtkCamera> m_pCamera; ///< 独立冻结的相机副本,含投影及裁剪范围。
|
|
bool m_bHasBounds; ///< 是否存在业务主模型边界。
|
|
double m_dBounds[6]; ///< 主模型边界副本,用于恢复适配视图的行为。
|
|
bool m_bHasRotationCenter; ///< 是否存在独立于相机焦点的旋转中心。
|
|
double m_dRotationCenter[3]; ///< 已捕获的世界坐标旋转中心。
|
|
bool m_bMarkerVisible; ///< 旋转中心标记的用户显隐偏好。
|
|
};
|
|
|
|
#endif // NMVTKVIEWSTATE_H
|