public class Annotator extends Object implements ITestCaseObserver
Modifier and Type | Field and Description |
---|---|
private Annotation |
annotation |
private File |
annotationOutputDir |
private static double |
BALL_Z_AXIS_DEFAULT |
private File |
dest |
private List<Vector3> |
initBallPositions |
private Circle |
initCircle |
private Logger |
logger |
private int |
loops |
private static double |
MIN_DISTANCE |
private List<AnnotatorTestCaseResult> |
moveInfos |
private String |
moveName |
private static File |
XSD_FILE |
Constructor and Description |
---|
Annotator(int loops,
Circle circle,
String moveName,
File annotationOutputDir) |
Modifier and Type | Method and Description |
---|---|
void |
annotate()
Testing player moves using TestCase
This method only inserts testCases into queue
and starts testing.
|
private void |
annotateAfterTest()
Create new annotation from original annotation
using new info from testing
|
private static void |
computeBallDispersion(Annotation annotation,
List<AnnotatorTestCaseResult> results) |
private static void |
computeBallDistance(Annotation annotation,
List<AnnotatorTestCaseResult> results) |
private static void |
computeBallMove(Annotation anot,
List<AnnotatorTestCaseResult> results) |
private static void |
computeBallPrecondicions(Annotation annotation,
List<AnnotatorTestCaseResult> results) |
private static void |
computeEndStateBallPositionsCircle(Annotation annotation,
List<AnnotatorTestCaseResult> results) |
private static void |
computeMoveDuration(Annotation anot,
List<AnnotatorTestCaseResult> results) |
private static void |
computePlayerFall(Annotation anot,
List<AnnotatorTestCaseResult> results) |
private static void |
computePlayerMove(Annotation anot,
List<AnnotatorTestCaseResult> results) |
private static void |
computePlayerRotation(Annotation anot,
List<AnnotatorTestCaseResult> results) |
private static File |
getDestFile(File dir,
String moveToTest)
Find name for next annotation (+1 after biggest number)
|
private List<Vector3> |
initPositionsFromCircle(Circle initCircle)
Computes several 3D points on borders of circle
and one in the center of circle
|
private static Annotation |
remakeAnot(Annotation annotation,
List<AnnotatorTestCaseResult> results)
Count final Annotation from resulted Annotations
|
private void |
test()
Testing player moves using TestCase
This function only insert testCases into queue
|
void |
testFinished(TestCaseResult result)
method called after each testCase
|
private static double MIN_DISTANCE
private static double BALL_Z_AXIS_DEFAULT
private static File XSD_FILE
private int loops
private Circle initCircle
private String moveName
private File dest
private File annotationOutputDir
private Annotation annotation
private List<AnnotatorTestCaseResult> moveInfos
private Logger logger
public void annotate()
annotSource
- is source annotation file wrote by humanprivate static File getDestFile(File dir, String moveToTest)
dir
- annotations directorymoveToTest
- name of move (also annotation without counter)private void test()
private void annotateAfterTest()
public void testFinished(TestCaseResult result)
testFinished
in interface ITestCaseObserver
Exception
private static Annotation remakeAnot(Annotation annotation, List<AnnotatorTestCaseResult> results)
private List<Vector3> initPositionsFromCircle(Circle initCircle)
initCircle
- private static void computeBallDispersion(Annotation annotation, List<AnnotatorTestCaseResult> results)
private static void computeEndStateBallPositionsCircle(Annotation annotation, List<AnnotatorTestCaseResult> results)
private static void computeBallDistance(Annotation annotation, List<AnnotatorTestCaseResult> results)
private static void computeBallPrecondicions(Annotation annotation, List<AnnotatorTestCaseResult> results)
private static void computePlayerRotation(Annotation anot, List<AnnotatorTestCaseResult> results)
private static void computeMoveDuration(Annotation anot, List<AnnotatorTestCaseResult> results)
private static void computeBallMove(Annotation anot, List<AnnotatorTestCaseResult> results)
private static void computePlayerFall(Annotation anot, List<AnnotatorTestCaseResult> results)
private static void computePlayerMove(Annotation anot, List<AnnotatorTestCaseResult> results)