|
@@ -552,6 +552,18 @@ class Object implements hxd.impl.Serializable {
|
|
return absPos;
|
|
return absPos;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ Returns the position matrix relative to another scene object
|
|
|
|
+ **/
|
|
|
|
+ public function getRelPos( obj : Object ) {
|
|
|
|
+ if( obj == null )
|
|
|
|
+ return getAbsPos();
|
|
|
|
+ syncPos();
|
|
|
|
+ var m = new h3d.Matrix();
|
|
|
|
+ m.multiply(absPos, obj.getInvPos());
|
|
|
|
+ return m;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
Tell if the object is a Mesh.
|
|
Tell if the object is a Mesh.
|
|
**/
|
|
**/
|