/// <summary>
 /// Performs a ranged set operation of ellipsoid shape
 /// </summary>
 /// <param name="blockData">BlockData to place at the given location</param>
 /// <param name="min">Starting positon in local chunk coordinates</param>
 /// <param name="max">Ending position in local chunk coordinates</param>
 /// <param name="offset"></param>
 /// <param name="a2inv"></param>
 /// <param name="b2inv"></param>
 /// <param name="setBlockModified">Set to true to mark chunk data as modified</param>
 /// <param name="parentContext">Context of a parent which performed this operation</param>
 public ModifyOpEllipsoid(BlockData blockData, Vector3Int min, Vector3Int max, Vector3Int offset, float a2inv,
                          float b2inv, bool setBlockModified, ModifyBlockContext parentContext = null)
     : base(blockData, min, max, setBlockModified, parentContext)
 {
     this.offset = offset;
     this.a2inv  = a2inv;
     this.b2inv  = b2inv;
 }
Example #2
0
        protected ModifyOp(BlockData blockData, bool setBlockModified, ModifyBlockContext parentContext = null)
        {
            this.parentContext    = parentContext;
            this.blockData        = blockData;
            this.setBlockModified = setBlockModified;

            if (parentContext != null)
            {
                parentContext.RegisterChildAction();
            }
        }
Example #3
0
 /// <summary>
 /// Performs a ranged set operation of cuboid shape
 /// </summary>
 /// <param name="blockData">BlockData to place at the given location</param>
 /// <param name="index">Index in local chunk data</param>
 /// <param name="setBlockModified">Set to true to mark chunk data as modified</param>
 /// <param name="parentContext">Context of a parent which performed this operation</param>
 public ModifyOpBlock(BlockData blockData, int index, bool setBlockModified,
                      ModifyBlockContext parentContext = null) : base(blockData, setBlockModified, parentContext)
 {
     this.index = index;
 }
Example #4
0
 /// <summary>
 /// Performs a ranged set operation of cuboid shape
 /// </summary>
 /// <param name="blockData">BlockData to place at the given location</param>
 /// <param name="min">Starting positon in local chunk coordinates</param>
 /// <param name="max">Ending position in local chunk coordinates</param>
 /// <param name="setBlockModified">Set to true to mark chunk data as modified</param>
 /// <param name="parentContext">Context of a parent which performed this operation</param>
 public ModifyOpCuboid(BlockData blockData, Vector3Int min, Vector3Int max, bool setBlockModified,
                       ModifyBlockContext parentContext = null) : base(blockData, min, max, setBlockModified, parentContext)
 {
 }
Example #5
0
 protected ModifyOpRange(BlockData blockData, Vector3Int min, Vector3Int max, bool setBlockModified,
                         ModifyBlockContext parentContext = null) : base(blockData, setBlockModified, parentContext)
 {
     this.min = min;
     this.max = max;
 }