在 ThreeJS 中用点和法向量绘制平面

问题描述

我想用一个点(例如 0、10、20)和一个平面方向的法向量在 ThreeJS 中绘制一个平面。我只是没有得到正确的位置或方向。请帮帮我。问候

以下是我尝试过的两种方法(使用 PlaneHelper):

const plane = new THREE.Plane(new THREE.Vector3(10,10,10),3)
// does not work: planeObj.translate(new THREE.Vector3(100,100,100))
const helper = new THREE.PlaneHelper(plane,50,0x00ffff);
this.scene.add( helper )

或者没有 PlaneHelper:

const geometry = new THREE.PlaneGeometry( 50,32 );
geometry.translate(100,0)
const material = new THREE.MeshBasicMaterial( {color: 0xffff00,side: THREE.DoubleSide} );
const plane = new THREE.Mesh( geometry,material );
scene.add( plane );
// normal orientation missing

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)