2 Star 1 Fork 1

liuzhongtu/HelloQocct

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Viewer.h 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <Aspect_Handle.hxx>
#include <Standard_Handle.hxx>
class AIS_InteractiveContext;
class AIS_InteractiveObject;
class V3d_View;
//! Creates main visu elements.
class Viewer
{
public:
//! Constructor.
Viewer();
//! Creates context, viewer and view. View here is not fully filled.
//! It requires posponed initView with window id.
void init();
//! Fill view with UI window identifier.
//! @param windowHandle
void initView(Aspect_Handle windowHandle);
//! Returns current context.
const Handle(AIS_InteractiveContext)& context() const;
//! Redraw active view in viewer.
void redrawView();
//! Force the active view to react on window resize.
void resizeView();
//! Fit all scene.
void fitAll();
void updateTrihedron();
void showTrihedron(Standard_Boolean bShow);
Standard_Boolean isTrihedronShowed() { return m_bShowTrihedron; }
//! Visualizes presentation in context.
//! @param presentation object to display
//! @param displayMode presentation display mode
//! @param selectionMode selection mode, if -1 do not activate in selection
void displayPresentation(const Handle(AIS_InteractiveObject)& presentation,
const int displayMode,
const int selectionMode = -1);
//! Returns an active/defined view of the context. Gets the context viewer, find the first active view.
//! If no active view, returns the first defined viewer.
//! @param context visu context
static Handle(V3d_View) activeView(const Handle(AIS_InteractiveContext)& context);
private:
Handle(AIS_InteractiveContext) m_context; //!< visu context
Standard_Boolean m_bShowTrihedron;
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/liuzhongtu/hello-qocct.git
git@gitee.com:liuzhongtu/hello-qocct.git
liuzhongtu
hello-qocct
HelloQocct
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385