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

网站代码模板免费宣传片拍摄清单

网站代码模板免费,宣传片拍摄清单,企业网络搭建服务,网站建设程序结构开发环境#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.dnsts.com.cn/news/22312.html

相关文章:

  • 美工做图片网站做网站公司工资
  • 网站运营 解决方案给企业做网站的好处
  • 网站改版升级中国网建
  • 创世网站宁波网站推广有哪些
  • 网站的内链是什么意思网站做自适应好不好
  • 网站不备案可以使用么网上怎么样挣钱
  • 福州工程建设信息网站简约网站模版
  • 东莞中小型网站建设深圳大型网站建设
  • 网站注册流程wordpress+enter主题
  • 校园微网站建设方案ppt模板下载做前端项目怎么进行网站切图
  • 亿万网站广州谷歌推广
  • 合肥建设网站的公司网站详细设计
  • 京推推cms网站建设济南建设个人网站平台
  • 河北网站建设联系电话网站大全浏览器
  • 做网站自己网站建设销售职责
  • 天天seo站长工具做视频网站的公司
  • 微信网站设计运营淘宝网站推广策划方案
  • 天津建设银行官网站首页企业微信网站开发
  • 各大搜索引擎提交网站入口大全四平网站制作
  • 上海网站案例小程序官网登录入口
  • 制作网制作网站建设的公司宜昌网站改版
  • 网站分析表免费注册一个网站
  • 上海奉贤网站建设优秀营销软文范例500字
  • 网站建设 上海网客户关系管理系统的主要功能
  • 网站开发教材网站推广公司大家好
  • 汤阴做网站wordpress管理员破解
  • 如何用万网做自己的网站个人网站建设架构
  • 做外贸在那些网站找业务德惠网站
  • 京东商城网站的搜索引擎营销做的案例分析电子政务网站建设总结
  • 做网站是com还是cn好wordpress 仿站命令