当前位置: 首页 > news >正文

电动车行业网站建设wordpress主题idown

电动车行业网站建设,wordpress主题idown,包装设计公司有哪些呢,泾川县门户网站留言1、建模平台效果 2、三维控件OCCWidget 将V3d_View视图与控件句柄绑定即可实现3d视图嵌入Qt中#xff0c;为了方便也可以基于QOpenGLWidget控件进行封装#xff0c;方便嵌入各种窗体使用并自由缩放。 #ifndef OCCTWIDGET_H #define OCCTWIDGET_H#include QWidget #i…1、建模平台效果 2、三维控件OCCWidget 将V3d_View视图与控件句柄绑定即可实现3d视图嵌入Qt中为了方便也可以基于QOpenGLWidget控件进行封装方便嵌入各种窗体使用并自由缩放。 #ifndef OCCTWIDGET_H #define OCCTWIDGET_H#include QWidget #include QMouseEvent #include QWheelEvent #include QKeyEvent #include QApplication #include AIS_InteractiveContext.hxx #include OpenGl_GraphicDriver.hxx #include V3d_View.hxx #include Aspect_Handle.hxx #include Aspect_DisplayConnection.hxx #include Graphic3d_GraphicDriver.hxx #include QOpenGLWidget #include WNT_Window.hxx//三维显示窗口class OCCTWidget : public QOpenGLWidget {Q_OBJECTpublic:explicit OCCTWidget(QWidget *parent nullptr);// 获取三维环境交互对象Handle(AIS_InteractiveContext) getInteractiveContext(){return m_InteractiveContext;}// 获取三维显示界面Handle(V3d_View) get3dView(){return m_3dView;}private:// 初始化交互环境void initializeInteractiveContext();// 交互式上下文能够管理一个或多个查看器(viewer)中的图形行为和交互式对象的选择Handle(AIS_InteractiveContext) m_InteractiveContext;// 定义查看器(viewer)类型对象上的服务Handle(V3d_Viewer) m_3dViewer;// 创建一个视图Handle(V3d_View) m_3dView;// 创建3d接口定义图形驱动程序Handle(Graphic3d_GraphicDriver) m_graphicDriver;protected:// 覆写绘图事件void paintEvent(QPaintEvent *);// 覆写窗口尺寸变化事件void resizeEvent(QResizeEvent *);// 覆写鼠标按键按下事件void mousePressEvent(QMouseEvent *event);// 覆写鼠标按键释放事件void mouseReleaseEvent(QMouseEvent *event);// 覆写鼠标移动事件void mouseMoveEvent(QMouseEvent *event);// 覆写鼠标滚轮事件void wheelEvent(QWheelEvent *event); private:Standard_Integer m_xValue; // 记录鼠标平移坐标XStandard_Integer m_yValue; // 记录鼠标平移坐标YCurrentAction3d m_currentMode; // 三维场景转换模式 };#endif // OCCTWIDGET_Hvoid OCCTWidget::initializeInteractiveContext() {//若交互式上下文为空则创建对象if (m_InteractiveContext.IsNull()){//此对象提供与X server的连接在Windows和Mac OS中不起作用Handle(Aspect_DisplayConnection) m_display_donnection new Aspect_DisplayConnection();//创建OpenGl图形驱动if (m_graphicDriver.IsNull()){m_graphicDriver new OpenGl_GraphicDriver(m_display_donnection);}//获取QWidget的窗口系统标识符WId window_handle (WId) winId();// 创建Windows NT 窗口Handle(WNT_Window) wind new WNT_Window((Aspect_Handle) window_handle);//创建3D查看器m_3dViewer new V3d_Viewer(m_graphicDriver);//创建视图m_3dView m_3dViewer-CreateView();m_3dView-SetWindow(wind);//打开窗口if (!wind-IsMapped()){wind-Map();}//创建交互式上下文m_InteractiveContext new AIS_InteractiveContext(m_3dViewer); …………………………………………………………………………} }3、三维建模类OCCModeling 对OCC提供的各种建模函数进行验证并实现较为复杂的水瓶建模。 #include BRepPrimAPI_MakeSphere.hxx #include BRepPrimAPI_MakeCone.hxx #include BRepPrimAPI_MakeTorus.hxx #include BRepPrimAPI_MakeBox.hxx #include BRepOffsetAPI_MakePipe.hxx #include AIS_Shape.hxx#include Geom_TrimmedCurve.hxx #include GC_MakeArcOfCircle.hxx #include GC_MakeSegment.hxx #include BRepBuilderAPI_MakeEdge.hxx #include TopoDS_Wire.hxx #include BRepBuilderAPI_MakeWire.hxx #include BRepBuilderAPI_Transform.hxx #include BRepBuilderAPI_MakeFace.hxx #include BRepBuilderAPI_MakeEdge.hxx #include TopoDS.hxx #include BRepPrimAPI_MakePrism.hxx #include BRepFilletAPI_MakeFillet.hxx #include TopExp_Explorer.hxx #include BRepPrimAPI_MakeCylinder.hxx #include BRepAlgoAPI_Fuse.hxx #include Geom_Plane.hxx #include TopoDS_Edge.hxx #include BRepOffsetAPI_MakeThickSolid.hxx #include Geom_CylindricalSurface.hxx #include Geom2d_Ellipse.hxx #include Geom2d_TrimmedCurve.hxx #include GCE2d_MakeSegment.hxx #include BRepLib.hxx #include BRepOffsetAPI_ThruSections.hxx #include Geom_BezierCurve.hxxclass OCCTModeling { public:// 生成立方体static TopoDS_Shape CreateBoxModel(Standard_Real _dx 1.0, Standard_Real _dy 1.0, Standard_Real _dz 1.0);// 生成圆柱static TopoDS_Shape CreateCylinder(Standard_Real _R 0.5, Standard_Real _H 2.0);// 球体static TopoDS_Shape CreateSphere(Standard_Real _R 1.0);// 生成圆锥static TopoDS_Shape CreateCone(Standard_Real _R1 1.0, Standard_Real _R2 0.0, Standard_Real _H 2.0);// 生成圆环体static TopoDS_Shape CreateTorus(Standard_Real _R1 2.0, Standard_Real _R2 0.5);// 生成水瓶 static TopoDS_Shape CreateBottle(Standard_Real _Width 60.0, Standard_Real _Height 40.0, Standard_Real _Thickness 20.0);// 生成直管static TopoDS_Shape CreatePipe(const Standard_Real dRadius 20.0, const Standard_Real dThickness 2.0, const Standard_Real dLength 100.0); };4、源码地址
http://www.pierceye.com/news/560970/

相关文章:

  • 做网站挣钱吗营销导向的企业网站建设步骤
  • 优化网站 优帮云网站是意识形态建设
  • 网站内容建设运维服务wordpress envato主题
  • 响应式网站的几种尺寸推广网站的几种方法
  • php 打开网站东莞网站建设网页推广
  • 正品海外购网站有哪些公司网站开发费用兴田德润在哪儿
  • 怎样做编辑发到网站自由建网站的网络程序
  • 网站开发 卡片cms建站系统 下载
  • 新浪门户网站是谁做的科技网站建设
  • 免费网站建设合同书山西网站建设企业
  • 网站建设空间什么意思学做网站什么语言合适
  • 网站开发的形式有( )友情链接英文
  • 帝国网站管理系统前台免费photoshop下载
  • 深圳一百讯网站建设wordpress汉化包
  • 建设一个班级网站的具体步骤自己的网站源代码一片空白
  • 初创公司 建网站wordpress 模板获取数据库
  • 怎么在网站做推广不要钱六安网约车平台
  • 申晨推荐的营销网站做卖挖掘机的网站
  • 网站广告牌制作教程来几个好看的网站
  • php企业网站源码蓝色印度喜欢用什么框架做外贸网站
  • 网站建设教程最新资讯wordpress说说伪静态
  • 长春建站程序网络营销推广方法脑24金手指效率高
  • 专门做房地产设计的图片网站在安徽省住房和城乡建设厅网站
  • 怎样制作图片网站广告制作公司电话
  • 电子商城网站开发教程湖北网站建设路
  • 广告公司网站模版快速seo关键词优化技巧
  • whois哪个网站好WordPress判断文章形式
  • 昆明网站建设排名网站推广营销策划方案
  • 深圳网站建设中心手机端网站搭建
  • 提取卡密网站怎么做怎么更换网站的域名