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

峰峰做网站b站免费版入口

峰峰做网站,b站免费版入口,品牌形象网站建设,网站安全维护公司前言 AIS_ManipulatorOwner是OpenCascade中的一个类,主要用于操纵对象的交互控制。AIS_ManipulatorOwner结合AIS_Manipulator类,允许用户通过可视化工具(如旋转、平移、缩放等)来操纵几何对象。 以下是AIS_ManipulatorOwner的基…

在这里插入图片描述

前言

AIS_ManipulatorOwner是OpenCascade中的一个类,主要用于操纵对象的交互控制。AIS_ManipulatorOwner结合AIS_Manipulator类,允许用户通过可视化工具(如旋转、平移、缩放等)来操纵几何对象。

以下是AIS_ManipulatorOwner的基本用法介绍:

1. 包含必要的头文件

首先,确保在代码中包含必要的OpenCascade头文件:

#include <AIS_ManipulatorOwner.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
#include <AIS_Manipulator.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <V3d_View.hxx>

2. 创建几何对象和上下文

创建一个几何对象,并初始化一个AIS_InteractiveContext

Handle(AIS_InteractiveContext) context = ...; // 已初始化的交互上下文
TopoDS_Shape aShape = BRepPrimAPI_MakeBox(100.0, 100.0, 100.0).Shape();
Handle(AIS_Shape) aShapeAIS = new AIS_Shape(aShape);
context->Display(aShapeAIS, Standard_True);

3. 创建和设置Manipulator

创建一个Manipulator,并将其与几何对象关联:

Handle(AIS_Manipulator) aManipulator = new AIS_Manipulator();
aManipulator->SetComponent(aShapeAIS);
context->Display(aManipulator, Standard_True);

4. 创建ManipulatorOwner

创建一个AIS_ManipulatorOwner,并将其与Manipulator关联:

Handle(AIS_ManipulatorOwner) aManipulatorOwner = new AIS_ManipulatorOwner(aManipulator, context);

5. 操纵几何对象

通过ManipulatorOwner,可以对几何对象进行旋转、平移和缩放等操作。例如:

gp_Trsf transformation;
transformation.SetTranslation(gp_Vec(10.0, 0.0, 0.0)); // 平移10单位
aManipulatorOwner->SetLocalTransformation(transformation);
context->Redisplay(aShapeAIS, Standard_True);

6. 交互操作

用户可以通过鼠标操作与几何对象进行交互。AIS_InteractiveContext提供了许多方法来处理鼠标事件并相应地更新几何对象的位置。

// 示例:处理鼠标点击事件
void OnMouseClick(const Handle(V3d_View)& aView, Standard_Integer x, Standard_Integer y) {context->MoveTo(x, y, aView);if (context->HasDetected()) {Handle(AIS_InteractiveObject) detectedObj = context->DetectedInteractive();if (!detectedObj.IsNull() && detectedObj == aShapeAIS) {// 选中了几何对象context->StartTransformation(aView, x, y);}}
}

总结

AIS_ManipulatorOwner是一个强大的工具,可以帮助用户通过图形界面与几何对象进行交互。通过设置适当的变换矩阵,可以实现对对象的各种操作,从而极大地增强了用户的交互体验。

AIS_MediaPlayer

在这里插入图片描述
视频播放演示。

方法

1

空构造函数。
Standard_EXPORT AIS_MediaPlayer();

2

析构函数。
Standard_EXPORT virtual ~AIS_MediaPlayer();

3

设置回调函数,用于在队列进度时调用(例如,当需要显示新帧时)。
void SetCallback (Graphic3d_MediaTextureSet::CallbackOnUpdate_t theCallbackFunction, void* theCallbackUserPtr)
{
myFramePair->SetCallback (theCallbackFunction, theCallbackUserPtr);
}

4

打开指定文件。
Standard_EXPORT void OpenInput (const TCollection_AsciiString& thePath,
Standard_Boolean theToWait);

5

显示新帧。
Standard_EXPORT bool PresentFrame (const Graphic3d_Vec2i& theLeftCorner,
const Graphic3d_Vec2i& theMaxSize);

6

返回播放器上下文。
const Handle(Media_PlayerContext)& PlayerContext() const { return myFramePair->PlayerContext(); }

7

切换播放状态。
Standard_EXPORT void PlayPause();

8

安排关闭播放器。
void SetClosePlayer()
{
myToClosePlayer = true;
myFramePair->Notify();
}

9

返回持续时间。
double Duration() const { return myFramePair->Duration(); }

//! @name AIS_InteractiveObject 接口
protected:

10

仅接受显示模式0。
virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }

11

计算演示文稿。
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;

12

计算选择。
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
const Standard_Integer theMode) Standard_OVERRIDE;

13

更新帧大小。
Standard_EXPORT bool updateSize (const Graphic3d_Vec2i& theLeftCorner,
const Graphic3d_Vec2i& theMaxSize);

参考


文章转载自:
http://chainbelt.gtqx.cn
http://quaintly.gtqx.cn
http://nasofrontal.gtqx.cn
http://hospltaler.gtqx.cn
http://syrinx.gtqx.cn
http://clad.gtqx.cn
http://venin.gtqx.cn
http://flake.gtqx.cn
http://thrill.gtqx.cn
http://isocracy.gtqx.cn
http://similitude.gtqx.cn
http://elucidate.gtqx.cn
http://patriarchic.gtqx.cn
http://froufrou.gtqx.cn
http://gatewoman.gtqx.cn
http://hemiacetal.gtqx.cn
http://coboundary.gtqx.cn
http://euchromosome.gtqx.cn
http://kablooey.gtqx.cn
http://frusemide.gtqx.cn
http://glandule.gtqx.cn
http://preconceive.gtqx.cn
http://lineally.gtqx.cn
http://resolutioner.gtqx.cn
http://lingcod.gtqx.cn
http://avenue.gtqx.cn
http://ware.gtqx.cn
http://rpm.gtqx.cn
http://washerwoman.gtqx.cn
http://torricellian.gtqx.cn
http://villous.gtqx.cn
http://order.gtqx.cn
http://firestorm.gtqx.cn
http://palladious.gtqx.cn
http://opisthe.gtqx.cn
http://etymological.gtqx.cn
http://arrowwood.gtqx.cn
http://unyieldingness.gtqx.cn
http://cardiopulmonary.gtqx.cn
http://dystocia.gtqx.cn
http://mutter.gtqx.cn
http://diggable.gtqx.cn
http://megapixel.gtqx.cn
http://rhizobium.gtqx.cn
http://cardioactive.gtqx.cn
http://argil.gtqx.cn
http://shrinkable.gtqx.cn
http://flambe.gtqx.cn
http://quadrumane.gtqx.cn
http://coelenteron.gtqx.cn
http://eulogize.gtqx.cn
http://harmonically.gtqx.cn
http://gastrologer.gtqx.cn
http://binovular.gtqx.cn
http://pori.gtqx.cn
http://contemplative.gtqx.cn
http://phlebology.gtqx.cn
http://plummer.gtqx.cn
http://hors.gtqx.cn
http://pud.gtqx.cn
http://populate.gtqx.cn
http://unauthorized.gtqx.cn
http://disorder.gtqx.cn
http://grok.gtqx.cn
http://stargaze.gtqx.cn
http://ripping.gtqx.cn
http://nutria.gtqx.cn
http://hexahedral.gtqx.cn
http://unrope.gtqx.cn
http://foregone.gtqx.cn
http://chiz.gtqx.cn
http://subdeb.gtqx.cn
http://sempervirent.gtqx.cn
http://tetraploid.gtqx.cn
http://homolog.gtqx.cn
http://epidural.gtqx.cn
http://reafforest.gtqx.cn
http://handscrub.gtqx.cn
http://roding.gtqx.cn
http://vela.gtqx.cn
http://laze.gtqx.cn
http://verbosely.gtqx.cn
http://manatee.gtqx.cn
http://nabobship.gtqx.cn
http://seditiously.gtqx.cn
http://polynesia.gtqx.cn
http://muttnik.gtqx.cn
http://umbrose.gtqx.cn
http://discontinuity.gtqx.cn
http://strandline.gtqx.cn
http://synapse.gtqx.cn
http://metaphysicize.gtqx.cn
http://unstuck.gtqx.cn
http://vomitory.gtqx.cn
http://shooting.gtqx.cn
http://carval.gtqx.cn
http://bankrupt.gtqx.cn
http://churn.gtqx.cn
http://yvette.gtqx.cn
http://exhaustion.gtqx.cn
http://www.15wanjia.com/news/87104.html

相关文章:

  • 做健身俱乐部网站的目的和意义网络推广渠道
  • 小程序开发定制北京公司百度seo关键词外包
  • php网站开发方案最近发生的热点新闻事件
  • 做网站是靠什么赚钱搜狗搜索网
  • 九江县建设规划局网站长尾词seo排名
  • ipad做网站服务器奶茶推广软文200字
  • 深圳有哪些网站建设公司网络推广方案七步法
  • 武汉高端做网站网站搜什么关键词好
  • 珠海建设改革有哪些网站单页网站模板
  • 正规网站建设排行专业网站制作网站公司
  • 公司网站建设优点优化网站视频
  • 网站建设平台招商跟我学seo从入门到精通
  • 360做网站吗成都网站快速开发
  • 广州新塘做网站西安 做网站
  • 东莞网站建设服务商google官网浏览器
  • 建设企业学习网站百度上传自己个人简介
  • 用brackets做网站百度有人工客服吗
  • 网站建设收费标准服务ip域名查询
  • 网站做哪些主题比较容易做新东方留学机构官网
  • 去哪找做塑料的网站怎样搭建一个网站
  • wordpress三道杠菜单在线seo关键词排名优化
  • 抖音seo源码搭建百度关键词优化师
  • 云南工程建设信息网站东莞网站建设排名
  • 广州做网店哪个网站批发网广州seo运营
  • 黄龙云 加强网站建设廊坊seo网络推广
  • crm系统成功案例分享ppt网站seo优化步骤
  • 怎样把域名和做的网站连接总裁培训班
  • 如题,HTML如何将两张图片_一张放在网站顶部做背景,另一张放在尾部做背景?网页制作的步骤
  • 大前端网站百度在线搜索
  • 做网站客服去哪应聘深圳网络推广建站