public static TransformDT Zero(this TransformDT self) { self = new TransformDT(); self.PositionDT.Zero(); self.RotationDT.Zero(); self.ScaleDT.Zero(); return(self); }
public static TransformDT ToLocalTransformDT(this Transform self) { TransformDT transformDt = new TransformDT(); transformDt.PositionDT.SetVector3(self.localPosition); transformDt.RotationDT.SetQuaternion(self.localRotation); transformDt.ScaleDT.SetVector3(self.localScale); return(transformDt); }
public static void ToLocalTransformUnity(this TransformDT self, Transform transform) { transform.localPosition = new Vector3(self.PositionDT.x, self.PositionDT.y, self.PositionDT.z); transform.localRotation = new Quaternion(self.RotationDT.x, self.RotationDT.y, self.RotationDT.z, self.RotationDT.w); //transform.localScale = new Vector3(self.ScaleDT.x, self.ScaleDT.y, self.ScaleDT.z); }