public void Complex_GenerateTrackerMesh(Dictionary <Sliceable2D, Tracker.Object> trackerList, Transform transform, float lineWidth, float zPosition) { foreach (KeyValuePair <Sliceable2D, Tracker.Object> trackerPair in trackerList) { Tracker.Object tracker = trackerPair.Value; if (trackerPair.Key != null && tracker.tracking) { if (tracker.firstPosition == null || tracker.lastPosition == null) { continue; } List <Vector2D> points = Vector2DList.PointsToWorldSpace(trackerPair.Key.transform, tracker.GetLinearPoints()); foreach (Pair2 pair in Pair2.GetList(points, false)) { CreateLine(pair, transform.localScale, lineWidth, zPosition); } } } }
public void Linear_GenerateTrackerMesh(Vector2 pos, Dictionary <Sliceable2D, Tracker.Object> trackerList, Transform transform, float lineWidth, float zPosition, float size, LineEndingType endingType, int edges) { GenerateSquare(pos, size, transform, lineWidth, zPosition, endingType, edges); CreateLine(new Pair2(pos, pos), transform.localScale, lineWidth, zPosition); foreach (KeyValuePair <Sliceable2D, Tracker.Object> trackerPair in trackerList) { Tracker.Object tracker = trackerPair.Value; if (trackerPair.Key != null && tracker.tracking) { foreach (Pair2 pair in Pair2.GetList(Vector2DList.PointsToWorldSpace(trackerPair.Key.transform, tracker.GetLinearPoints()), false)) { CreateLine(pair, transform.localScale, lineWidth, zPosition); } } } }