中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

如何做網(wǎng)站的源碼23歲老牌網(wǎng)站

如何做網(wǎng)站的源碼,23歲老牌網(wǎng)站,淘寶做流量的網(wǎng)站可靠嗎,四川省住房與城鄉(xiāng)建設(shè)廳官方網(wǎng)站前言 AIS_ManipulatorOwner是OpenCascade中的一個類,主要用于操縱對象的交互控制。AIS_ManipulatorOwner結(jié)合AIS_Manipulator類,允許用戶通過可視化工具(如旋轉(zhuǎn)、平移、縮放等)來操縱幾何對象。 以下是AIS_ManipulatorOwner的基…

在這里插入圖片描述

前言

AIS_ManipulatorOwner是OpenCascade中的一個類,主要用于操縱對象的交互控制。AIS_ManipulatorOwner結(jié)合AIS_Manipulator類,允許用戶通過可視化工具(如旋轉(zhuǎn)、平移、縮放等)來操縱幾何對象。

以下是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. 創(chuàng)建幾何對象和上下文

創(chuàng)建一個幾何對象,并初始化一個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. 創(chuàng)建和設(shè)置Manipulator

創(chuàng)建一個Manipulator,并將其與幾何對象關(guān)聯(lián):

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

4. 創(chuàng)建ManipulatorOwner

創(chuàng)建一個AIS_ManipulatorOwner,并將其與Manipulator關(guān)聯(lián):

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

5. 操縱幾何對象

通過ManipulatorOwner,可以對幾何對象進行旋轉(zhuǎn)、平移和縮放等操作。例如:

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提供了許多方法來處理鼠標事件并相應(yīng)地更新幾何對象的位置。

// 示例:處理鼠標點擊事件
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);}}
}

總結(jié)

AIS_ManipulatorOwner是一個強大的工具,可以幫助用戶通過圖形界面與幾何對象進行交互。通過設(shè)置適當(dāng)?shù)淖儞Q矩陣,可以實現(xiàn)對對象的各種操作,從而極大地增強了用戶的交互體驗。

AIS_MediaPlayer

在這里插入圖片描述
視頻播放演示。

方法

1

空構(gòu)造函數(shù)。
Standard_EXPORT AIS_MediaPlayer();

2

析構(gòu)函數(shù)。
Standard_EXPORT virtual ~AIS_MediaPlayer();

3

設(shè)置回調(diào)函數(shù),用于在隊列進度時調(diào)用(例如,當(dāng)需要顯示新幀時)。
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

切換播放狀態(tài)。
Standard_EXPORT void PlayPause();

8

安排關(guān)閉播放器。
void SetClosePlayer()
{
myToClosePlayer = true;
myFramePair->Notify();
}

9

返回持續(xù)時間。
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://www.risenshineclean.com/news/7765.html

相關(guān)文章:

  • wordpress 留言板 插件seo排名查詢
  • 攝影網(wǎng)站 蜂鳥seo網(wǎng)址
  • 長沙網(wǎng)站建設(shè)有限公司網(wǎng)絡(luò)推廣的概念
  • wap網(wǎng)站開發(fā)實例seo程序
  • 怎么推廣平臺江北seo頁面優(yōu)化公司
  • 網(wǎng)站報價模板如何聯(lián)系百度人工客服電話
  • 合肥網(wǎng)站建設(shè)技術(shù)支持廣州權(quán)威發(fā)布
  • wordpress用戶名長度河北網(wǎng)站seo外包
  • 上海網(wǎng)站開發(fā)定制seox
  • 如何架設(shè)內(nèi)部網(wǎng)站太原seo霸屏
  • 文字圖片在線生成器谷歌seo怎么做
  • 如何測試網(wǎng)站的跨瀏覽器兼容性抖音搜索關(guān)鍵詞排名
  • 國外做動運服裝的網(wǎng)站襄陽seo
  • 一個公司可以做兩個網(wǎng)站嗎新聞頭條最新消息
  • 讓百度收錄自己的網(wǎng)站百度熱詞搜索指數(shù)
  • 網(wǎng)站登錄驗證碼怎么做百度競價搜索
  • 找圖做素材啥網(wǎng)站好優(yōu)化整站
  • 備案用的網(wǎng)站建設(shè)方案書怎么寫推廣文案怎么寫
  • 天河建網(wǎng)站網(wǎng)站內(nèi)容seo
  • 創(chuàng)建網(wǎng)站根目錄優(yōu)化搜索引擎營銷
  • web前端真實工資seo公司資源
  • 做網(wǎng)站 還是淘寶店北京十大最靠譜it培訓(xùn)機構(gòu)
  • web網(wǎng)站設(shè)計分辨率外包網(wǎng)
  • 北京網(wǎng)站建設(shè)seo2baidu網(wǎng)站的推廣方法
  • 搜索引擎網(wǎng)站提交推廣賺錢
  • 做網(wǎng)站開發(fā)的有哪些公司好電商怎么做如何從零開始
  • 怎么看網(wǎng)站有沒有做競價網(wǎng)站關(guān)鍵詞怎么快速上排名
  • 網(wǎng)站建設(shè) 月嫂 模板網(wǎng)站建設(shè)優(yōu)化公司
  • 做代碼的網(wǎng)站廣告招商
  • 天津百度網(wǎng)站排名優(yōu)化網(wǎng)絡(luò)推廣技巧