Esempio n. 1
0
 public void _notifyOwner(SphereSet owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner cannot be null!");
     }
     Sphere__notifyOwner(nativePtr, owner.nativePtr);
 }
Esempio n. 2
0
 public Sphere(Mogre.Vector3 position, SphereSet owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner cannot be null!");
     }
     if (position == null)
     {
         throw new ArgumentNullException("position cannot be null!");
     }
     nativePtr = Sphere_New(position, owner.nativePtr);
     rendererInstances.Add(nativePtr, this);
 }
Esempio n. 3
0
        internal static SphereSet GetInstance(IntPtr ptr)
        {
            if (ptr == null || ptr == IntPtr.Zero)
            {
                return(null);
            }
            if (rendererInstances == null)
            {
                rendererInstances = new Dictionary <IntPtr, SphereSet>();
            }

            SphereSet newvalue;

            if (rendererInstances.TryGetValue(ptr, out newvalue))
            {
                return(newvalue);
            }
            newvalue = new SphereSet(ptr);
            rendererInstances.Add(ptr, newvalue);
            return(newvalue);
        }
 /** Access SphereSet in use */
 public SphereSet GetSphereSet()
 {
     return(SphereSet.GetInstance(SphereRenderer_GetSphereSet(nativePtr)));
 }