修改三维cctv站台轨计算方式

This commit is contained in:
sunzhenyu 2021-09-18 09:56:20 +08:00
parent f748202bef
commit fdd2701512

View File

@ -148,15 +148,19 @@ export function PasserStation() {
if(scope.stationlist[i].topsection == sections[j].code){ if(scope.stationlist[i].topsection == sections[j].code){
let points = []; let points = [];
points.push(new THREE.Vector3(60.73-sections[j].lengthFact,0.06,-6.3)); let lo = -71 - (sections[j].leftStopPointOffset);
points.push(new THREE.Vector3(60.73,0.06,-6.3)); let ro = 60.73+(sections[j].lengthFact - sections[j].rightStopPointOffset);
points.push(new THREE.Vector3(lo,0.06,-6.3));
points.push(new THREE.Vector3(ro,0.06,-6.3));
scope.stationlist[i].topcurve = new THREE.CatmullRomCurve3(points); scope.stationlist[i].topcurve = new THREE.CatmullRomCurve3(points);
topOver = true; topOver = true;
} }
if(scope.stationlist[i].downsection == sections[j].code){ if(scope.stationlist[i].downsection == sections[j].code){
let points = []; let points = [];
points.push(new THREE.Vector3(-71,0.06,28.68)); let lo = -71 - (sections[j].leftStopPointOffset);
points.push(new THREE.Vector3(-71+sections[j].lengthFact,0.06,28.68)); let ro = 60.73+(sections[j].lengthFact - sections[j].rightStopPointOffset);
points.push(new THREE.Vector3(lo ,0.06,28.68));
points.push(new THREE.Vector3(ro,0.06,28.68));
scope.stationlist[i].downcurve = new THREE.CatmullRomCurve3(points); scope.stationlist[i].downcurve = new THREE.CatmullRomCurve3(points);
downOver = true; downOver = true;
} }