![]() |
fCraft
0.638
Custom Minecraft Server
|
Abstract class representing a drawing operation. More...
Inheritance diagram for fCraft.Drawing.DrawOperation:
Collaboration diagram for fCraft.Drawing.DrawOperation:Public Member Functions | |
| virtual bool | Prepare ([NotNull] Vector3I[] marks) |
| Prepares DrawOperation to start. Called after the player made a selection, usually on player's I/O thread. Brush property must be set before calling Prepare. | |
| virtual bool | Begin () |
| Begins the execution of this DrawOperation. Raises DrawOperation.Beginning (cancelable) and DrawOperation.Began events. | |
| abstract int | DrawBatch (int maxBlocksToDraw) |
| void | Cancel () |
| Asynchronously cancels this draw operation. | |
Public Attributes | |
| readonly Player | Player |
| Player who is executing this command. Used for both permission checks and messaging. | |
| readonly Map | Map |
| Map to draw blocks to. | |
| Vector3I | Coords |
| Coordinates that are currently being processed. | |
Protected Member Functions | |
| DrawOperation ([NotNull] Player player) | |
| bool | DrawOneBlock () |
Static Protected Member Functions | |
| static IEnumerable< Vector3I > | LineEnumerator (Vector3I a, Vector3I b) |
| static bool | RaiseBeginningEvent (DrawOperation op) |
| static void | RaiseBeganEvent (DrawOperation op) |
| static void | RaiseEndedEvent (DrawOperation op) |
Protected Attributes | |
| UndoState | UndoState |
| Undo state associated with this operation. Created by DrawOperation.Begin(). | |
Properties | |
| abstract int | ExpectedMarks [get] |
| Expected number of marks to pass to DrawOperation.Prepare() | |
| IBrushInstance | Brush [get, set] |
| Brush used to determine which blocks to place. Must be assigned before DrawOperation.Prepare() is called. | |
| BlockChangeContext | Context [get, set] |
| Block change context, to be reported to BlockDB and Player.PlacingBlock/PlacedBlock events. Should include BlockChangeContext.Drawn flag. | |
| Vector3I[] | Marks [get, set] |
| Marks given by the player to this command. Marks could come from either clicks or /Mark command. Set by DrawOperation.Prepare() | |
| DateTime | StartTime [get, set] |
| Time when the draw operatation began. Set by DrawOperation.Begin() | |
| BoundingBox | Bounds [get, set] |
| Area that bounds the DrawOperation's extent, if possible to estimate in advance. Used for logging. Should be assigned, as accurately as possible, before DrawOp finishes. | |
| bool | HasBegun [get, set] |
| Whether this operation has been started (queued for processing on the Map). | |
| bool | IsDone [get, set] |
| Whether this operation is done (has finished or had been cancelled). | |
| bool | IsCancelled [get, set] |
| Whether this operation has been cancelled (e.g. by /Undo or /WLock). | |
| int | BlocksProcessed [get, set] |
| Number of blocks/coordinates that were considered for drawing. | |
| int | BlocksUpdated [get, set] |
| Number of blocks/coordinates that ended up being changed/updated. | |
| int | BlocksDenied [get, set] |
| Number of blocks/coordinates that were supposed to be changed/updated, but were left untouched due to permission issues. | |
| int | BlocksSkipped [get, set] |
| Number of blocks/coordinates that were processed, and left untouched: either because the Brush decided to skip it, or because map's current block matched the desired blocktype. | |
| int | BlocksTotalEstimate [get, set] |
| Estimate of total number of blocks that will be processed by this command. Should be as accurate as reasonably possible by DrawOperation.Prepare(). Used for volume permission checks. Must not be negative. | |
| int | BlocksLeftToProcess [get] |
| Estimated total blocks left to process. | |
| int | PercentDone [get] |
| Approximate completion percentage of this command. | |
| int | AlternateBlockIndex [get, set] |
| Whether the brush should use alternate block (if available) for filling insides of hollow DrawOps. Currently only supported by NormalBrush. Used with CuboidH/CuboidW/EllipsoidH drawops. | |
| abstract string | Name [get] |
| General name of this type of draw operation. Should be same for all instances. | |
| virtual string | Description [get] |
| Compact description of this specific draw operation, with any instance-specific parameters, and the brush's instance description. | |
| bool | AnnounceCompletion [get, set] |
| Whether completion or cancellation of this DrawOperation should be announced to Player. | |
| bool | LogCompletion [get, set] |
| Whether completion or cancellation of this DrawOperation should be logged. | |
| bool | TimeToEndBatch [get] |
Events | |
| static EventHandler < DrawOperationBeginningEventArgs > | Beginning |
| static EventHandler < DrawOperationEventArgs > | Began |
| static EventHandler < DrawOperationEventArgs > | Ended |
Abstract class representing a drawing operation.
|
protected |
|
virtual |
Begins the execution of this DrawOperation. Raises DrawOperation.Beginning (cancelable) and DrawOperation.Began events.
Reimplemented in fCraft.Drawing.UndoDrawOperation, and fCraft.Drawing.CutDrawOperation.
| void fCraft.Drawing.DrawOperation.Cancel | ( | ) |
Asynchronously cancels this draw operation.
|
pure virtual |
Implemented in fCraft.Drawing.Fill2DDrawOperation, fCraft.Drawing.PasteDrawOperation, fCraft.Drawing.BlockDBDrawOperation, fCraft.Drawing.CutDrawOperation, fCraft.Drawing.TriangleDrawOperation, fCraft.Drawing.UndoDrawOperation, fCraft.Drawing.EllipsoidHollowDrawOperation, fCraft.Drawing.TorusDrawOperation, fCraft.Drawing.CuboidWireframeDrawOperation, fCraft.Drawing.EllipsoidDrawOperation, fCraft.Drawing.TriangleWireframeDrawOperation, fCraft.Drawing.CuboidHollowDrawOperation, fCraft.Drawing.LineDrawOperation, and fCraft.Drawing.CuboidDrawOperation.
|
protected |
|
staticprotected |
|
virtual |
Prepares DrawOperation to start. Called after the player made a selection, usually on player's I/O thread. Brush property must be set before calling Prepare.
| marks | Array of marks given by the player. |
| ArgumentNullException | marks is null. |
| ArgumentException | Wrong number of marks is given. |
| NullReferenceException | DrawOperation's Brush property is not set before calling Prepare. |
Reimplemented in fCraft.Drawing.Fill2DDrawOperation, fCraft.Drawing.BlockDBDrawOperation, fCraft.Drawing.PasteDrawOperation, fCraft.Drawing.UndoDrawOperation, fCraft.Drawing.CutDrawOperation, fCraft.Drawing.TriangleDrawOperation, fCraft.Drawing.TorusDrawOperation, fCraft.Drawing.CuboidWireframeDrawOperation, fCraft.Drawing.CuboidHollowDrawOperation, fCraft.Drawing.EllipsoidDrawOperation, fCraft.Drawing.EllipsoidHollowDrawOperation, fCraft.Drawing.LineDrawOperation, fCraft.Drawing.TriangleWireframeDrawOperation, fCraft.Drawing.CuboidDrawOperation, fCraft.Drawing.QuickPasteDrawOperation, fCraft.Drawing.SphereHollowDrawOperation, and fCraft.Drawing.SphereDrawOperation.
|
staticprotected |
|
staticprotected |
|
staticprotected |
| Vector3I fCraft.Drawing.DrawOperation.Coords |
Coordinates that are currently being processed.
| readonly Player fCraft.Drawing.DrawOperation.Player |
Player who is executing this command. Used for both permission checks and messaging.
|
protected |
Undo state associated with this operation. Created by DrawOperation.Begin().
|
getset |
Whether the brush should use alternate block (if available) for filling insides of hollow DrawOps. Currently only supported by NormalBrush. Used with CuboidH/CuboidW/EllipsoidH drawops.
|
getset |
Whether completion or cancellation of this DrawOperation should be announced to Player.
|
getset |
Number of blocks/coordinates that were supposed to be changed/updated, but were left untouched due to permission issues.
|
get |
Estimated total blocks left to process.
|
getset |
Number of blocks/coordinates that were considered for drawing.
|
getset |
Number of blocks/coordinates that were processed, and left untouched: either because the Brush decided to skip it, or because map's current block matched the desired blocktype.
|
getset |
Estimate of total number of blocks that will be processed by this command. Should be as accurate as reasonably possible by DrawOperation.Prepare(). Used for volume permission checks. Must not be negative.
|
getset |
Number of blocks/coordinates that ended up being changed/updated.
|
getset |
Area that bounds the DrawOperation's extent, if possible to estimate in advance. Used for logging. Should be assigned, as accurately as possible, before DrawOp finishes.
|
getset |
Brush used to determine which blocks to place. Must be assigned before DrawOperation.Prepare() is called.
|
getset |
Block change context, to be reported to BlockDB and Player.PlacingBlock/PlacedBlock events. Should include BlockChangeContext.Drawn flag.
|
get |
Compact description of this specific draw operation, with any instance-specific parameters, and the brush's instance description.
|
get |
Expected number of marks to pass to DrawOperation.Prepare()
|
getset |
Whether this operation has been started (queued for processing on the Map).
|
getset |
Whether this operation has been cancelled (e.g. by /Undo or /WLock).
|
getset |
Whether this operation is done (has finished or had been cancelled).
|
getset |
Whether completion or cancellation of this DrawOperation should be logged.
|
getset |
Marks given by the player to this command. Marks could come from either clicks or /Mark command. Set by DrawOperation.Prepare()
|
get |
General name of this type of draw operation. Should be same for all instances.
|
get |
Approximate completion percentage of this command.
|
getset |
Time when the draw operatation began. Set by DrawOperation.Begin()
|
getprotected |
|
static |
|
static |
|
static |