91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5.44MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-08-16
  • 語言: 其他
  • 標簽: AnyCAD??C#??

資源簡介

基于AnyCAD進行開發,集成三維模型展示功能、支持拖拽、平移、旋轉等操作。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;

using?AnyCAD.Platform;

namespace?AnyCAD.Basic
{
????public?partial?class?FormMain?:?Form
????{
????????//?The?global?application?object
????????Platform.Application?theApplication?=?new?Platform.Application();
????????//?BREP?tool?to?create?geometries.
????????BrepTools?shapeMaker?=?new?BrepTools();
????????//?Default?3d?View
????????Platform.View3d?theView;


????????public?FormMain()
????????{
????????????InitializeComponent();
????????????this.MouseWheel?+=?new?System.Windows.Forms.MouseEventHandler(this.onmousewheel);
????????}

????????private?void?FormMain_Load(object?sender?EventArgs?e)
????????{
????????????//?Initialize?the?Application.
????????????theApplication.Initialize();
????????????Size?size?=?panel3d.Size;

????????????//?Create?the?3d?View
????????????theView?=?theApplication.CreateView(panel3d.Handle.ToInt32()?size.Width?size.Height);

????????????theView.RequestDraw();

????????????this.timerDraw.Enabled?=?true;
????????}
????????private?void?FormMain_SizeChanged(object?sender?EventArgs?e)
????????{
????????????Size?size?=?panel3d.Size;
????????????if(theView?!=?null)
????????????????theView.OnSize(size.Width?size.Height);
????????}
????????private?void?panel3d_Paint(object?sender?PaintEventArgs?e)
????????{
????????????if?(theView?==?null)
????????????????return;

????????????theView.Redraw();
????????}

????????private?void?timerDraw_Tick(object?sender?EventArgs?e)
????????{
????????????theView.RequestDraw();
????????????theView.Redraw();
????????}

????????private?SceneNode?ShowTopoShape(TopoShape?topoShape?int?id)
????????{
????????????//?Add?the?TopoShape?to?Scene.
????????????TopoShapeConvert?convertor?=?new?TopoShapeConvert();
????????????SceneNode?faceNode?=?convertor.ToFaceNode(topoShape?0.5f);
????????????faceNode.SetId(id);
????????????theView.GetSceneManager().AddNode(faceNode);
????????????return?faceNode;
????????}

????????private?void?ClearScene()
????????{
????????????theView.GetSceneManager().ClearNodes();
????????}

????????private?void?sphereToolStripMenuItem_Click(object?sender?EventArgs?e)
????????{
????????????TopoShape?sphere?=?shapeMaker.MakeSphere(new?Vector3(0?0?0)?40);
????????????ShowTopoShape(sphere?100);
????????}

????????private?void?boxToolStripMenuItem_Click(object?sender?EventArgs?e)
????????{
????????????TopoShape?box?=?shapeMaker.MakeBox(new?Vector3(40?-20?0)?new?Vector3(0?0?1)?new?Vector3(30?40?60));
?????????????
????????????SceneNode?sceneNode?=?ShowTopoShape(box?101);

????????????Facestyle?style?=?new?Facestyle();
????????????style.SetColor(new?ColorValue(0.5f?0.3f?0?1));
????????????sceneNode.SetFacestyle(style);
????????}

????????private?void?cylinderToolStripMenuItem_Click(object?sender?EventArgs?e)
????????{
????????????TopoShape?cylinder?=?shapeMaker.MakeCylinder(new?V

評論

共有 條評論