Exemplo n.º 1
0
 public IColShape CreateColShapeCube(Position pos, Position pos2)
 {
     unsafe
     {
         CheckIfCallIsValid();
         CheckIfThreadIsValid();
         var ptr = Library.Server.Core_CreateColShapeCube(NativePointer, pos, pos2);
         if (ptr == IntPtr.Zero)
         {
             return(null);
         }
         return(ColShapePool.Create(this, ptr));
     }
 }
Exemplo n.º 2
0
 public IColShape CreateColShapeRectangle(float x1, float y1, float x2, float y2, float z)
 {
     unsafe
     {
         CheckIfCallIsValid();
         CheckIfThreadIsValid();
         var ptr = Library.Server.Core_CreateColShapeRectangle(NativePointer, x1, y1, x2, y2, z);
         if (ptr == IntPtr.Zero)
         {
             return(null);
         }
         return(ColShapePool.Create(this, ptr));
     }
 }
Exemplo n.º 3
0
 public IColShape CreateColShapeCylinder(Position pos, float radius, float height)
 {
     unsafe
     {
         CheckIfCallIsValid();
         CheckIfThreadIsValid();
         var ptr = Library.Server.Core_CreateColShapeCylinder(NativePointer, pos, radius, height);
         if (ptr == IntPtr.Zero)
         {
             return(null);
         }
         return(ColShapePool.Create(this, ptr));
     }
 }
Exemplo n.º 4
0
 public IColShape CreateColShapePolygon(float minZ, float maxZ, Vector2[] points)
 {
     unsafe
     {
         CheckIfCallIsValid();
         CheckIfThreadIsValid();
         int size = points.Count();
         var ptr  = Library.Server.Core_CreateColShapePolygon(NativePointer, minZ, maxZ, points, size);
         if (ptr == IntPtr.Zero)
         {
             return(null);
         }
         return(ColShapePool.Create(this, ptr));
     }
 }