1 回答

www說
TA貢獻(xiàn)1775條經(jīng)驗 獲得超8個贊
可以的,你可以透過 viewer.setCutPlanes()
這個函數(shù)來設(shè)置剖切面,它接受的是 THREE.Vector4
的數(shù)組 (array),也就是剖切面的數(shù)組。 每個 THREE.Vector4
都代表一個高等數(shù)學(xué)的面方程 ax + by + cz + d = 0
,這個面方程的法向為 (a,b,c)
且與距離坐標(biāo)原點(diǎn) d
單位。此外, Forge Viewer 還以 THREE.Vector4
的 (x, y, z)
來表示面的法向 (a, b, c)
,w
代表與原點(diǎn)的距離 d
。調(diào)用示例如下:
var cutplanes = [
new THREE.Vector4( 0, 0, -1, -17 ),
new THREE.Vector4( 0, 0, 1, 0 ),
];
veiwer.setCutPlanes( cutplanes );
結(jié)果截圖:
如果要取消剖切的話,只要再調(diào)用一次 viewer.setCutPlanes()
且不傳入任何參數(shù)即可,取消后房子就回復(fù)原狀了:
添加回答
舉報
0/150
提交
取消