- 博客(18)
- 资源 (3)
- 收藏
- 关注
原创 navisworks ViewControl在WPF中的使用
1、加载dll文件Autodesk.Navisworks.Api.dllAutodesk.Navisworks.ComApi.dllAutodesk.Navisworks.Controls.dllAutodesk.Navisworks.Interop.ComApi.dll2、xaml中添加引用以及加载控件xmlns:controls="clr-namespa
2017-04-28 09:48:37 1060
原创 navisworks 二次开发 使用Controls控件的同时可以获取Autodesk.Navisworks.Api.Interop.ComApi.InwOpState10 state
1、设置SetAsMainDocumentviewControl.DocumentControl.SetAsMainDocument();2、获取 Autodesk.Navisworks.Api.Interop.ComApi.InwOpState10 stateAutodesk.Navisworks.Api.Interop.ComApi.InwOpState10 state= Auto
2017-04-28 09:33:22 1576
原创 three.js 贴图
map_bump dmentia_bluebird.jpg map_Kd dmentia_bluebird.jpgmap_bump dmentia_bluebird.jpgmap_refl dmentia_bluebird.jpgmtl文件用记事本打开,输入以上文字。
2017-04-25 09:11:53 1090
原创 three.js 动画效果01
1、setInterval 方法每隔多长时间执行一次某个方法setInterval (方法名称,时间)2、创建元素位置改变的方法function draw() { newCubeMesh.rotation.y=(newCubeMesh.rotation.y+0.01)%(Math.PI*2); renderer.render(scene,came
2017-04-20 10:21:52 1036
原创 three.js 矩阵式贴图
创建贴图var texture = THREE.ImageUtils.loadTexture('../img/chess.png', {}, function() {renderer.render(scene, camera);});设置贴图的矩阵重复方式texture.wrapS = texture.wrapT = THREE.RepeatWrapping;设置行列的重复次数
2017-04-20 09:41:09 1465
原创 three.js 多面几何体进行多面贴图
使用MeshFaceMaterial材质var materials = [];for (var i = 0; i < 6; ++i) {materials.push(new THREE.MeshBasicMaterial({map: THREE.ImageUtils.loadTexture('../img/' + i + '.png',//图片的路径{}, function() {ren
2017-04-20 09:36:01 5884 1
原创 three.js 灯光的代替模型
var lightHelper = new THREE.SpotLightHelper( spotLight ); scene.add(lightHelper);
2017-04-18 11:32:41 1680
原创 three.js 网格 GridHelper
var size = 100;var divisions = 100;var gridHelper = new THREE.GridHelper( size, divisions );scene.add( gridHelper );
2017-04-18 11:31:12 3013
转载 Three.js 阴影效果
明暗是相对的,阴影的形成也就是因为比周围获得的光照更少。因此,要形成阴影,光源必不可少。在Three.js中,能形成阴影的光源只有THREE.DirectionalLight与THREE.SpotLight;而相对地,能表现阴影效果的材质只有THREE.LambertMaterial与THREE.PhongMaterial。因而在设置光源和材质的时候,一定要注意这一点。下面,我们以
2017-04-18 11:25:10 3711
原创 three.js 共面的问题
如果两个面进行了重叠则显卡不知道该首先渲染哪个面,所以就会出现闪烁的现象。解决此问题可以强制设置某个面距离相机的渲染距离减小,即首先对其进行渲染。对元素的材质进行设置一下属性值。plane.material.polygonOffset=true;//开启偏移plane.material.polygonOffsetFactor=-2;//与相机距离减2plane.material
2017-04-18 10:24:00 2400
原创 three.js旋转元素
旋转元素:plane.rotateX(Math.PI/2);//沿着X轴旋转90度plane.rotateY(Math.PI/2);plane.rotateZ(Math.PI/2);参数为弧度数。
2017-04-18 10:04:42 3228
原创 threejs中的坐标系
在threejs中采用的是右手坐标系。大拇指为X轴正方向朝向为右。食指为Y轴正方向,朝向为向上。中指为Z轴正方向,朝向为从屏幕指向程序员。
2017-04-18 09:52:30 2918
原创 navisworks 设置相机的位置
1、添加引用dllAutodesk.Navisworks.Api.Controls.dll-----wpf中可能在UI上出现异常,可以忽略。编译是能通过的。2、实例化控件DocumentControl documentControl = new DocumentControl(); public Window1() { App
2017-04-17 16:41:46 1964
原创 如何选择链接文件中的实例
1、过滤public class Filter : ISelectionFilter { public Document doc = null; public bool AllowElement(Element elem) { return true; } public bool
2017-04-17 16:21:47 592
原创 navisworks 将元素进行定位并将视角转到元素位置
APIState.CurrentSelection.SelectAll();//将元素全部选中 APIState.OverrideTransparency(APIState.CurrentSelection, 0.9);//将全部元素设置为0.9透明 APIState.CurrentSelection.SelectNone();//取
2017-04-06 14:56:22 1836
原创 navisworks 将视角转到主视图视角
double dAngle = 1.2171160059237; InwLUnitVec3f vAxis = (InwLUnitVec3f)APIState.ObjectFactory(nwEObjectType.eObjectType_nwLUnitVec3f, null, null); vAxis.SetValue(0.7429060560310
2017-04-06 14:45:25 1454 1
原创 WPF 加载H5页面
1、加载Html5页面创建控件2、加载页面m_webFrame.Source = new Uri("网页地址");3、隐藏网页的菜单 m_webFrame.NavigationUIVisibility = System.Windows.Navigation.NavigationUIVisibility.Hidden;
2017-04-06 14:34:12 4346 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人