示例#1
0
        public void SetLookAt(GodotVector3 eye, GodotVector3 target, GodotVector3 up)
        {
            GodotVector3 vector3_1 = eye - target;

            vector3_1.Normalize();
            GodotVector3 vector3_2 = up.Cross(vector3_1);
            GodotVector3 yAxis     = vector3_1.Cross(vector3_2);

            vector3_2.Normalize();
            yAxis.Normalize();
            basis  = GodotBasis.CreateFromAxes(vector3_2, yAxis, vector3_1);
            origin = eye;
        }
示例#2
0
 public GodotTransform Translated(GodotVector3 ofs)
 {
     GodotBasis       basis  = this.basis;
     ref GodotVector3 local1 = ref this.origin;
示例#3
0
        public GodotTransform Inverse()
        {
            GodotBasis basis = this.basis.Transposed();

            return(new GodotTransform(basis, basis.Xform(-origin)));
        }
示例#4
0
        public GodotTransform AffineInverse()
        {
            GodotBasis basis = this.basis.Inverse();

            return(new GodotTransform(basis, basis.Xform(-origin)));
        }