示例#1
0
 public void _notifyOwner(BoxSet owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner cannot be null!");
     }
     Box__notifyOwner(nativePtr, owner.NativePointer);
 }
示例#2
0
 /// <summary>
 /// Constructor as called by BoxSet.
 /// </summary>
 /// <param name="position"></param>
 /// <param name="owner"></param>
 public Box(Mogre.Vector3 position, BoxSet owner)
 {
     if (position == null)
     {
         throw new ArgumentNullException("position cannot be null!");
     }
     if (owner == null)
     {
         nativePtr = Box_New2(position, IntPtr.Zero);
     }
     else
     {
         nativePtr = Box_New2(position, owner.NativePointer);
     }
     rendererInstances.Add(nativePtr, this);
 }
示例#3
0
        internal static BoxSet GetInstance(IntPtr ptr)
        {
            if (ptr == null || ptr == IntPtr.Zero)
            {
                return(null);
            }
            if (rendererInstances == null)
            {
                rendererInstances = new Dictionary <IntPtr, BoxSet>();
            }

            BoxSet newvalue;

            if (rendererInstances.TryGetValue(ptr, out newvalue))
            {
                return(newvalue);
            }
            newvalue = new BoxSet(ptr);
            rendererInstances.Add(ptr, newvalue);
            return(newvalue);
        }
示例#4
0
 public BoxSet GetParentSet()
 {
     return(BoxSet.GetInstance(Box_GetParentSet(nativePtr)));
 }
示例#5
0
 /** Access BoxSet in use */
 public BoxSet GetBoxSet()
 {
     return(BoxSet.GetInstance(BoxRenderer_GetBoxSet(nativePtr)));
 }