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

想做网店怎么做福州seo技术培训

想做网店怎么做,福州seo技术培训,做网页的网站叫什么软件,青岛外贸网站建设开发环境: Windows 11 家庭中文版Microsoft Visual Studio Community 2019VTK-9.3.0.rc0vtk-example参考代码目的:学习与总结 demo解决问题:通过自定义vtkInteractorStyle类中成员函数OnLeftButtonDown,判断鼠标当前选中的是哪个…

开发环境:

  1. Windows 11 家庭中文版
  2. Microsoft Visual Studio Community 2019
  3. VTK-9.3.0.rc0
  4. vtk-example
  5. 参考代码
  6. 目的:学习与总结

demo解决问题:通过自定义vtkInteractorStyle类中成员函数OnLeftButtonDown,判断鼠标当前选中的是哪个actor;同理可自定义鼠标右键、滚轮、键盘等事件
关键类:vtkInteractorStyleTrackballActor允许用户与场景中彼此独立的对象进行交互(旋转、平移等);根据实际应用场景有如下常见替换对象:

vtkInteractorStyleTrackballActor作用对象:actor; 形式:Trackball
vtkInteractorStyleTrackballCamera作用对象:Camera; 形式:Trackball
vtkInteractorStyleJoystickActor作用对象:actor; 形式:Joystick
vtkInteractorStyleJoystickCamera作用对象:Camera; 形式:Joystick
vtkInteractorStyleImage作用对象: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.h>namespace {// 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*[])
{vtkNew<vtkNamedColors> colors;// Create a cube.vtkNew<vtkCubeSource> cubeSource;cubeSource->Update();vtkNew<vtkPolyDataMapper> cubeMapper;cubeMapper->SetInputConnection(cubeSource->GetOutputPort());vtkNew<vtkActor> cubeActor;cubeActor->SetMapper(cubeMapper);cubeActor->GetProperty()->SetColor(colors->GetColor3d("MistyRose").GetData());// Create a sphere.vtkNew<vtkSphereSource> sphereSource;sphereSource->SetCenter(2, 0, 0);sphereSource->Update();// Create a mapper.vtkNew<vtkPolyDataMapper> sphereMapper;sphereMapper->SetInputConnection(sphereSource->GetOutputPort());// Create an actor.vtkNew<vtkActor> sphereActor;sphereActor->SetMapper(sphereMapper);sphereActor->GetProperty()->SetColor(colors->GetColor3d("LightGoldenrodYellow").GetData());// A renderer and render window.vtkNew<vtkRenderer> renderer;vtkNew<vtkRenderWindow> renderWindow;renderWindow->AddRenderer(renderer);renderWindow->SetWindowName("SelectAnActor");// An interactor.vtkNew<vtkRenderWindowInteractor> renderWindowInteractor;renderWindowInteractor->SetRenderWindow(renderWindow);// Set the custom stype to use for interaction.vtkNew<MouseInteractorStyle5> 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.ds6.com.cn/news/90726.html

相关文章:

  • 哪哪个网站可以做兼职全国疫情最新消息今天实时
  • 网站开发岗位属于seo网站优化
  • 网站主页制作教程如何设计一个网站页面
  • 网站的主色调江苏疫情最新消息
  • 做效果图的网站有哪些软件友情链接查询友情链接检测
  • 网络公司网站设计多少钱百度搜索关键词排名
  • 珠海网站制作公司需要留电话号码的广告
  • 独立电商网站开发南昌网站seo
  • 如何开发微信小程序商店sem推广优化
  • 网站的数据库怎么建立google关键词优化
  • 建站模板有操作后台的吗搜索引擎营销优化的方法
  • php动态网站开发项目模板seo如何优化关键词上首页
  • 怎样做instergram网站营销关键词如何优化排名
  • 在网上做黑彩网站会怎样百度投诉中心入口
  • 邯郸市疫情宁波专业seo服务
  • 自动化优化系统网站建设如何推广seo
  • 网站检测报告哪里做seo管理系统
  • 杭州建设网 工程信息网站黄页引流推广链接
  • wordpress插件改名厦门seo推广公司
  • 网站建设做的人多吗软件外包公司有哪些
  • 给素材网站做签约设计不想做了网络销售模式有哪些
  • 现在有人还做网站吗搜索引擎在线观看
  • 公司网站建设公鸿星尔克网络营销
  • 小姐姐做我对象好不好网站5g网络优化培训
  • 电商网站建设费用seo算法入门教程
  • 网站开发开发需求各类资源关键词
  • 个人注什么域名的网站软文营销的本质
  • wordpress无插件对接公众号朝阳seo排名
  • 做网站送邮箱关于进一步优化落实疫情防控措施
  • 邳州微网站开发网络公司网站建设