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

网站代码模板免费网站打不开怎么解决

网站代码模板免费,网站打不开怎么解决,wordpress 排除指定分类,怎么样做网站页面开发环境#xff1a; Windows 11 家庭中文版Microsoft Visual Studio Community 2019VTK-9.3.0.rc0vtk-example参考代码目的#xff1a;学习与总结 demo解决问题#xff1a;通过自定义vtkInteractorStyle类中成员函数OnLeftButtonDown#xff0c;判断鼠标当前选中的是哪个… 开发环境 Windows 11 家庭中文版Microsoft Visual Studio Community 2019VTK-9.3.0.rc0vtk-example参考代码目的学习与总结 demo解决问题通过自定义vtkInteractorStyle类中成员函数OnLeftButtonDown判断鼠标当前选中的是哪个actor同理可自定义鼠标右键、滚轮、键盘等事件 关键类vtkInteractorStyleTrackballActor允许用户与场景中彼此独立的对象进行交互旋转、平移等根据实际应用场景有如下常见替换对象 vtkInteractorStyleTrackballActor作用对象actor; 形式TrackballvtkInteractorStyleTrackballCamera作用对象Camera; 形式TrackballvtkInteractorStyleJoystickActor作用对象actor; 形式JoystickvtkInteractorStyleJoystickCamera作用对象Camera; 形式JoystickvtkInteractorStyleImage作用对象vtkImageActor; 形式绑定使相机的视图平面垂直于x-y平面…… 参考vtkInteractorStyle详细介绍 #include vtkActor.h #include vtkCamera.h #include vtkCubeSource.h #include vtkInteractorStyleTrackballActor.h #include vtkNamedColors.h #include vtkNew.h #include vtkPolyDataMapper.h #include vtkProperty.h #include vtkRenderWindow.h #include vtkRenderWindowInteractor.h #include vtkRenderer.h #include vtkSphereSource.hnamespace {// Handle mouse events. class MouseInteractorStyle5 : public vtkInteractorStyleTrackballActor { public:static MouseInteractorStyle5* New();vtkTypeMacro(MouseInteractorStyle5, vtkInteractorStyleTrackballActor);virtual void OnLeftButtonDown() override{// Forward events.vtkInteractorStyleTrackballActor::OnLeftButtonDown();if (this-InteractionProp this-Cube){std::cout Picked cube. std::endl;}else if (this-InteractionProp this-Sphere){std::cout Picked sphere. std::endl;}}vtkActor* Cube;vtkActor* Sphere; };vtkStandardNewMacro(MouseInteractorStyle5);} // namespaceint main(int, char*[]) {vtkNewvtkNamedColors colors;// Create a cube.vtkNewvtkCubeSource cubeSource;cubeSource-Update();vtkNewvtkPolyDataMapper cubeMapper;cubeMapper-SetInputConnection(cubeSource-GetOutputPort());vtkNewvtkActor cubeActor;cubeActor-SetMapper(cubeMapper);cubeActor-GetProperty()-SetColor(colors-GetColor3d(MistyRose).GetData());// Create a sphere.vtkNewvtkSphereSource sphereSource;sphereSource-SetCenter(2, 0, 0);sphereSource-Update();// Create a mapper.vtkNewvtkPolyDataMapper sphereMapper;sphereMapper-SetInputConnection(sphereSource-GetOutputPort());// Create an actor.vtkNewvtkActor sphereActor;sphereActor-SetMapper(sphereMapper);sphereActor-GetProperty()-SetColor(colors-GetColor3d(LightGoldenrodYellow).GetData());// A renderer and render window.vtkNewvtkRenderer renderer;vtkNewvtkRenderWindow renderWindow;renderWindow-AddRenderer(renderer);renderWindow-SetWindowName(SelectAnActor);// An interactor.vtkNewvtkRenderWindowInteractor renderWindowInteractor;renderWindowInteractor-SetRenderWindow(renderWindow);// Set the custom stype to use for interaction.vtkNewMouseInteractorStyle5 style;style-SetDefaultRenderer(renderer);style-Cube cubeActor;style-Sphere sphereActor;renderWindowInteractor-SetInteractorStyle(style);renderer-AddActor(cubeActor);renderer-AddActor(sphereActor);renderer-SetBackground(colors-GetColor3d(SlateGray).GetData());renderer-ResetCamera();renderer-GetActiveCamera()-Zoom(0.9);// Render and interact.renderWindow-Render();renderWindowInteractor-Initialize();renderWindowInteractor-Start();return EXIT_SUCCESS; }
http://www.hkea.cn/news/14299981/

相关文章:

  • 专业的网站建设服务交易平台网站建设协议附件
  • 优化搜狗排名保定网站seo技术
  • 怎样营销建设网站网站怎么做营销
  • 网站后台怎么替换图片做ppt一般在什么网站好
  • 企业免费网站系统下载地址设计优秀网站作品
  • 企业在线设计网站销售外包
  • 企业网站管理系统php源码做房地产一级市场的看什么网站
  • 湖北网站建设搭建桂林生活网官网二手房
  • 工艺宣传网站建设wordpress 许愿墙
  • 沈阳建设工程信息网站兔展
  • 网站开发 周期个人注册公司的详细步骤
  • 苏州网站seo服务小制作 手工 简单
  • 网站建设公司首选网站建设维护 微信
  • 柳城企业网站建设公司引流推广话术文案
  • 沈阳市网站建设报价做网站要审核吗
  • 微信网站主题大尺寸图网站
  • 怎么做二维码网站建设监理杂志网站
  • 佛山个性化网站建设网站开发费用税
  • 建设工程报建备案网站网站改版换了域名
  • 网站用表格做的吗wordpress 捐助
  • 湘潭做网站 去磐石网络wordpress高级自适应主题下载
  • 营销网站制作流程网站解决访问量超载
  • 山西电力建设三公司网站如何查询网站备案时间查询
  • 建设厅网站2015154哪些网站有好的营销案例
  • vs网站界面是什么做的上海建筑设计院地址
  • 网站代理什么意思织梦网站字体
  • 网站建设的质量区别wordpress优惠券模板
  • 做网站公司经营范围淮安网站排名优化公司
  • 网站建设的方法有哪些方面网站猜你喜欢代码
  • 网站优化垂直化好还是扁平化好网站建设公司宣传语