wpf中用viewport3d如何实现实时阴影?
答案:2 悬赏:50 手机版
解决时间 2021-01-29 05:53
- 提问者网友:寂寞撕碎了回忆
- 2021-01-29 01:00
wpf中用viewport3d如何实现实时阴影?
最佳答案
- 五星知识达人网友:何以畏孤独
- 2021-01-29 01:58
看机型配置吧
全部回答
- 1楼网友:执傲
- 2021-01-29 02:46
不清楚类定义兼手打,可能有错,仅供参考
var interactive3ddecorator = new interactive3ddecorator();
grid.setrow(interactive3ddecorator, 0); // 这句可以省略
var perspectivecamera = new perspectivecamera();
perspectivecamera.position = new point(0d, 0.8d);
// 如果 viewport3d 为已内建的对象或只读属性,则无需定义,直接使用
// interactive3ddecorator.viewport3d.camera = perspectivecamera;
var viewport3d = new viewport3d();
viewport3d.camera = perspectivecamera;
interactive3ddecorator.viewport3d = viewport3d;
var ambientlight = new ambientlight();
ambientlight.color = colors.black;
var directionlight = new directionlight();
directionlight.color = colors.white;
var model3dgroup = new model3dgroup();
model3dgroup.add(ambientlight);
model3dgroup.add(directionlight);
// 该对象的处理同上
var modelvisual3d = new modelvisual3d();
modelvisual3d.content = model3dgroup;
interactive3ddecorator.modelvisual3d = modelvisual3d;擦,先前居然用了 xml 代码的模版
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯