Item Creation UI/Engine Interface
Page last edited 3,999 days ago
From Artisan
Jump to navigation
Jump to search
Item Creation Controller[edit | edit source]
All interaction between the UI and the model will take place through a ModelUITranslator singleton/static class. This class will need to be able to perform the following operations on the model:
Item Interface[edit | edit source]
This is where we get the Item's geometry and other physical and decorative attributes. Item Interface
Controller Methods[edit | edit source]
The controller modifies the Item's geometry and other attributes retrieved through the interface above.
- SetWeaponFacing(direction): called when the blade is flipped. The idea is that the model stores this as a necessary setting on many of these other calls. Alternatively, this could be a parameter to those methods.
- SetCurrentWeaponPart(weaponPart): indicates the user is now editing a different weapon part. Similarly to the above, this could be a parameter to pretty much all other methods instead.
- ChangeMaterial(weaponPart)
- InsertVertex(index, startPosition)
- DeleteVertex(vertexId)
- MoveVertex(vertexId, newPosition)
- ThickenWeapon(vertices)/FlattenWeapon(vertices): The result of the thicken/flatten tool. Thickens or flattens the portion of the blade corresponding to the set of vertices in the parameter (brings corresponding points closer to or further from the blade center). Happens in a set increment. Could be replaced by a single ChangeThickness(vertices, amount) method that accepts both positive and negative amount.
- PunchHole(position, radius, holeType): TODO: need a way to undo this method for undo/redo
- SetEdgeType(edgeType, vertexBefore, vertexAfter, lineStart, lineEnd): result of edge operations. Parameters specify an edge to operate on with the two vertices the edge is between, and the start and end positions of the line segment along that edge to apply the edge change to. TODO: would it be preferable to just apply edge operations to the entire length between two vertices?
- Fuller(isSubtract, shapeType, startPoint, endPoint): Applies fuller/drawing operations. TODO: should this be applied once to a line, or several times to successive points?
- SetCurve(): method signature TBD (low priority item)