Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+24 votes

My group is trying to implement the getNearestUnassignedSegment method in our code but we're unsure what our start and end frames should be.

asked in CSC285_Fall2018 by (1 point)

2 Answers

+5 votes
 
Best answer

Not sure what's best... probably a fairly short time range, near the current frame being displayed? Maybe currentFrame-30 up to currentFrame+30? I'm just guessing here...

Maybe it should relate to how much of the unassigned segments are being displayed on the screen for the user to see?

There isn't one correct answer -- it's about choosing something that works conveniently enough for the user.

answered by (508 points)
selected by
+6 votes

If your method is set up like the one from the shared code, the start and end frames are the times it will search between to find the closest unassigned points. The reason for this is that the List in the method, ptsInInterval, will return the timePoints between the start and end frames that you pass in.

List<TimePoint> ptsInInterval = segment.getTimePointsWithinInterval(startFrame, endFrame);

It then searches through those points as signified here:

for (TimePoint pt : ptsInInterval) {
answered by (1 point)
...