From 0af5a2da205e19e648591b80bae7a8cf1a6e72e5 Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 26 Jan 2018 14:23:08 +0800 Subject: [PATCH] =?UTF-8?q?line=20=E5=A2=9E=E5=8A=A0=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E7=9F=A9=E9=98=B5=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DatabaseServices/Line.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/DatabaseServices/Line.ts b/src/DatabaseServices/Line.ts index f2c5c5eef..e3ca1c476 100644 --- a/src/DatabaseServices/Line.ts +++ b/src/DatabaseServices/Line.ts @@ -1,5 +1,5 @@ //直线对象 -import { Geometry, Object3D, Vector3 } from 'three'; +import { Geometry, Matrix4, Object3D, Vector3 } from 'three'; import * as THREE from 'three'; import { ColorMaterial } from '../Common/ColorPalette'; @@ -72,6 +72,13 @@ export class Line extends Curve } } + ApplyMatrix(m: Matrix4) + { + this.startPoint.applyMatrix4(m); + this.endPoint.applyMatrix4(m); + this.Update(); + } + //#region -----------------------------File----------------------------- //对象应该实现dataIn和DataOut的方法,为了对象的序列化和反序列化