Example #1
0
 public static TransformDT Zero(this TransformDT self)
 {
     self = new TransformDT();
     self.PositionDT.Zero();
     self.RotationDT.Zero();
     self.ScaleDT.Zero();
     return(self);
 }
Example #2
0
        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);
        }
Example #3
0
 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);
 }