Esempio n. 1
0
 public VtValue(VtFloatArray obj) : this(UsdCsPINVOKE.new_VtValue__SWIG_28(VtFloatArray.getCPtr(obj)), true)
 {
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 2
0
 public VtFloatArray(VtFloatArray other) : this(UsdCsPINVOKE.new_VtFloatArray__SWIG_3(VtFloatArray.getCPtr(other)), true)
 {
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 3
0
 public void swap(VtFloatArray other)
 {
     UsdCsPINVOKE.VtFloatArray_swap(swigCPtr, VtFloatArray.getCPtr(other));
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 4
0
        public static bool Equals(VtFloatArray lhs, VtFloatArray rhs)
        {
            bool ret = UsdCsPINVOKE.VtFloatArray_Equals(VtFloatArray.getCPtr(lhs), VtFloatArray.getCPtr(rhs));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public bool ComputeJointInfluences(VtIntArray indices, VtFloatArray weights, UsdTimeCode time)
        {
            bool ret = UsdCsPINVOKE.UsdSkelSkinningQuery_ComputeJointInfluences__SWIG_0(swigCPtr, VtIntArray.getCPtr(indices), VtFloatArray.getCPtr(weights), UsdTimeCode.getCPtr(time));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 6
0
        public static bool ComputeExtent(VtVec3fArray points, VtFloatArray widths, GfMatrix4d transform, VtVec3fArray extent)
        {
            bool ret = UsdCsPINVOKE.UsdGeomPoints_ComputeExtent__SWIG_1(VtVec3fArray.getCPtr(points), VtFloatArray.getCPtr(widths), GfMatrix4d.getCPtr(transform), VtVec3fArray.getCPtr(extent));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 7
0
        public bool ComputeBlendShapeWeights(VtFloatArray weights, UsdTimeCode time)
        {
            bool ret = UsdCsPINVOKE.UsdSkelAnimQuery_ComputeBlendShapeWeights__SWIG_0(swigCPtr, VtFloatArray.getCPtr(weights), UsdTimeCode.getCPtr(time));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 8
0
        public bool IsIdentical(VtFloatArray other)
        {
            bool ret = UsdCsPINVOKE.VtFloatArray_IsIdentical(swigCPtr, VtFloatArray.getCPtr(other));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        static public float[] FromVtArray(VtFloatArray input)
        {
            var output = UsdIo.ArrayAllocator.Malloc <float>(input.size());

            unsafe
            {
                fixed(float *p = output)
                {
                    input.CopyToArray((IntPtr)p);
                }
            }
            return(output);
        }
        static public VtFloatArray ToVtArray(float[] input)
        {
            var output = new VtFloatArray((uint)input.Length);

            unsafe
            {
                fixed(float *p = input)
                {
                    output.CopyFromArray((IntPtr)p);
                }
            }
            return(output);
        }
        static public UnityEngine.Color[] FromVtArray(VtVec3fArray rgbIn, VtFloatArray alphaIn)
        {
            var ret = UsdIo.ArrayAllocator.Malloc <UnityEngine.Color>(rgbIn.size());

            float[] alpha             = FromVtArray(alphaIn);
            UnityEngine.Vector3[] rgb = FromVtArray(rgbIn);

            for (int i = 0; i < rgbIn.size(); i++)
            {
                ret[i].r = rgb[i][0];
                ret[i].g = rgb[i][1];
                ret[i].b = rgb[i][2];
                ret[i].a = alpha[i];
            }

            return(ret);
        }
        // ----------------------------------------------------------------------------------------- //
        // Color / Vec3f,Float
        // ----------------------------------------------------------------------------------------- //
        static public void ToVtArray(UnityEngine.Color[] input,
                                     out VtVec3fArray rgb,
                                     out VtFloatArray alpha)
        {
            // Unfortunate, but faster than using the USD bindings currently.
            var unityRgb   = UsdIo.ArrayAllocator.Malloc <UnityEngine.Vector3>((uint)input.Length);
            var unityAlpha = UsdIo.ArrayAllocator.Malloc <float>((uint)input.Length);

            for (int i = 0; i < input.Length; i++)
            {
                unityAlpha[i] = input[i].a;
                unityRgb[i]   = new UnityEngine.Vector3(input[i].r, input[i].g, input[i].b);
            }

            // Convert to Vt.
            rgb   = ToVtArray(unityRgb);
            alpha = ToVtArray(unityAlpha);
        }
 static public void ToVtArray(List <UnityEngine.Color> input,
                              out VtVec3fArray rgb,
                              out VtFloatArray alpha)
 {
     ToVtArray(input.ToArray(), out rgb, out alpha);
 }
Esempio n. 14
0
        public bool ComputeBlendShapeWeights(VtFloatArray weights)
        {
            bool ret = UsdCsPINVOKE.UsdSkelAnimQuery_ComputeBlendShapeWeights__SWIG_1(swigCPtr, VtFloatArray.getCPtr(weights));

            return(ret);
        }
        public bool ComputeVaryingJointInfluences(uint numPoints, VtIntArray indices, VtFloatArray weights)
        {
            bool ret = UsdCsPINVOKE.UsdSkelSkinningQuery_ComputeVaryingJointInfluences__SWIG_1(swigCPtr, numPoints, VtIntArray.getCPtr(indices), VtFloatArray.getCPtr(weights));

            return(ret);
        }
Esempio n. 16
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VtFloatArray obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 17
0
 static public List <float> ListFromVtArray(VtFloatArray input)
 {
     return(FromVtArray(input).ToList());
 }