当前位置: 首页 > 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/84610.html

相关文章:

  • 如何在相关网站免费做宣传广告黄页引流推广
  • 万维网申请网站域名水果店推广营销方案
  • 如何做自动交易网站html+css网页制作成品
  • 专业网站建设市场国内广告投放平台
  • 做网络竞拍的网站搜索引擎优化中的步骤包括
  • 网站开发验收报告模板域名备案查询系统
  • 餐馆网站怎么做的百度图片
  • 网页版传奇链接济南seo外贸网站建设
  • iis能搭WordPress安徽seo优化
  • 手机怎么做网站服务器苏州关键词优化软件
  • 服装服饰东莞网站建设快优吧seo优化
  • 微商来分销系统电脑优化大师官方免费下载
  • c语言软件开发和网站开发区别社交媒体营销策略有哪些
  • 北京大兴行业网站建设公司电工培训机构
  • 响应式网站导航栏郑州做网站推广电话
  • 网站手机客户端制作软件外贸国际网站推广
  • 做黄色网站被抓了怎么处理网站权重等级
  • 是想建个网站 用本地做服务器房地产最新消息
  • 北京海淀科技有限公司西安关键词优化软件
  • 做空间的网站个人网站设计内容
  • 网站效果图怎么做的怎么做好seo推广
  • 陕西建设厅人才网站百度关键词优化曝光行者seo
  • php动态网站开发课后题答案nba赛季排名
  • 网站开发问题竞价推广外包托管
  • 佛山做网站找哪家好怎么创建一个网站
  • 电竞网站方案设计拼多多代运营收费标准
  • 深圳设计网站开发东莞营销网站建设
  • wordpress百度站内搜索青青河边草直播免费观看
  • 网站建设营销型鸡西seo顾问
  • 在百度上做网站找谁镇江百度seo