Przeglądaj źródła

Splines: revert modifications

lviguier 1 rok temu
rodzic
commit
de42b0eb24
1 zmienionych plików z 1 dodań i 23 usunięć
  1. 1 23
      hrt/prefab/l3d/Spline.hx

+ 1 - 23
hrt/prefab/l3d/Spline.hx

@@ -66,10 +66,6 @@ class SplinePoint extends Object3D {
 	var spline(get, default) : Spline;
 	var obj : SplinePointObject;
 	public var offset : h3d.Matrix;
-
-	static var tmpMat : h3d.Matrix = new h3d.Matrix();
-	static var tmpMatBis : h3d.Matrix = new h3d.Matrix();
-
 	function get_spline() {
 		return parent.to(Spline);
 	}
@@ -180,23 +176,7 @@ class SplinePoint extends Object3D {
 	#end
 
 	override public function getAbsPos( followRefs : Bool = false ) {
-		var result = tmpMatBis;
-
-		if (obj != null)
-			result = obj.getAbsPos();
-		else @:privateAccess {
-			result.load(this.getTransform(tmpMat));
-
-			var p = Std.downcast(this.parent, Object3D);
-			while (p != null)  {
-				p.getTransform(tmpMat);
-				tmpMat.multiply(result, tmpMat);
-				result.load(tmpMat);
-
-				p = Std.downcast(p.parent, Object3D);
-			}
-		}
-
+		var result = obj != null ? obj.getAbsPos() : super.getAbsPos(followRefs);
 		if (offset != null) result.multiply(result, offset);
 		return result;
 	}
@@ -285,8 +265,6 @@ class Spline extends Object3D {
 	@:s public var color : Int = 0xFFFFFFFF;
 	@:s public var loop : Bool = false;
 
-	static var tmpVec : h3d.Vector = new h3d.Vector();
-
 	#if editor
 	public var editor : hide.prefab.SplineEditor;
 	#end