Esempio n. 1
0
        public UsdObject GetObjectAtPath(SdfPath path)
        {
            UsdObject ret = new UsdObject(UsdCsPINVOKE.UsdPrim_GetObjectAtPath(swigCPtr, SdfPath.getCPtr(path)), true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 2
0
        public static bool Equals(UsdObject lhs, UsdObject rhs)
        {
            bool ret = UsdCsPINVOKE.UsdObject_Equals(UsdObject.getCPtr(lhs), UsdObject.getCPtr(rhs));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 3
0
        public static bool operator==(UsdObject lhs, UsdObject rhs)
        {
            // The Swig binding glew will re-enter this operator comparing to null, so
            // that case must be handled explicitly to avoid an infinite loop. This is still
            // not great, since it crosses the C#/C++ barrier twice. A better approache might
            // be to return a simple value from C++ that can be compared in C#.
            bool lnull = lhs as object == null;
            bool rnull = rhs as object == null;

            return((lnull == rnull) && ((lnull && rnull) || UsdObject.Equals(lhs, rhs)));
        }
Esempio n. 4
0
 override public bool Equals(object rhs)
 {
     return(UsdObject.Equals(this, rhs as UsdObject));
 }
Esempio n. 5
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(UsdObject obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }