public void SelectVertices(List <apVertex> vertices, apGizmos.SELECT_TYPE selectType) { if (selectType == apGizmos.SELECT_TYPE.New) { _curVertex = null; _curVertices.Clear(); } switch (selectType) { case apGizmos.SELECT_TYPE.Add: case apGizmos.SELECT_TYPE.New: for (int i = 0; i < vertices.Count; i++) { if (!_curVertices.Contains(vertices[i])) { _curVertices.Add(vertices[i]); } } break; case apGizmos.SELECT_TYPE.Subtract: for (int i = 0; i < vertices.Count; i++) { if (_curVertices.Contains(vertices[i])) { _curVertices.Remove(vertices[i]); } } break; } if (_curVertices.Count > 0) { if (_curVertex == null || !_curVertices.Contains(_curVertex)) { _curVertex = _curVertices[0]; } } else { _curVertex = null; } UnselectNextVertex(); _isTmpEdgeWire = false; _isTmpEdgeWireCrossEdge = false; //_tmpEdgeWire_MousePos = Vector2.zero; _isTmpEdgeWireCrossEdge_Multiple = false; _tmpEdgeWireMultipleCrossPoints.Clear(); //_isTmpEdgeWire_SnapToEdge = false; //_tmpEdgeWire_SnapToEdge = Vector2.zero; _curPolygon = null; }
public void Init() { _mesh = null; _curVertex = null; _curPolygon = null; _nextVertex = null; _isTmpEdgeWire = false; _tmpEdgeWire_MousePos = Vector2.zero; }
public void SelectPolygon(apMeshPolygon polygon) { _curPolygon = polygon; _curVertex = null; UnselectNextVertex(); _isTmpEdgeWire = false; _isTmpEdgeWireCrossEdge = false; _tmpEdgeWire_MousePos = Vector2.zero; _isTmpEdgeWireCrossEdge_Multiple = false; _tmpEdgeWireMultipleCrossPoints.Clear(); }
public void SelectVertex(apVertex vertex) { _curVertex = vertex; UnselectNextVertex(); _isTmpEdgeWire = false; _isTmpEdgeWireCrossEdge = false; _tmpEdgeWire_MousePos = Vector2.zero; _isTmpEdgeWireCrossEdge_Multiple = false; _tmpEdgeWireMultipleCrossPoints.Clear(); _curPolygon = null; }
// Functions //----------------------------------------------- public void SetMesh(apMesh mesh) { if (_mesh != mesh) { _mesh = mesh; _curVertex = null; _curPolygon = null; UnselectNextVertex(); _isTmpEdgeWire = false; _isTmpEdgeWireCrossEdge = false; _isTmpEdgeWireCrossEdge_Multiple = false; _tmpEdgeWire_MousePos = Vector2.zero; _tmpEdgeWireMultipleCrossPoints.Clear(); } }
public void UnselectVertex() { _curVertex = null; _curVertices.Clear(); UnselectNextVertex(); _isTmpEdgeWire = false; _isTmpEdgeWireCrossEdge = false; //_tmpEdgeWire_MousePos = Vector2.zero; _isTmpEdgeWireCrossEdge_Multiple = false; _tmpEdgeWireMultipleCrossPoints.Clear(); //_isTmpEdgeWire_SnapToEdge = false; //_tmpEdgeWire_SnapToEdge = Vector2.zero; _curPolygon = null; }