// Create a shape protected ComparisonShape CreateTarget(ComparisonShape.Shapes shape) { SizeF size = GetSize(TSHints[SCALE_SHAPE] == 1); PointF location = GetRandomLocation(size); float rotation = GetRotation(TSHints[ROTATE_SHAPE] == 1); ComparisonShape target = new ComparisonShape(shape, location, size, rotation); WrappedWorld.AddGameObject(target); return(target); }
public override void PresentNewTrainingUnit() { WrappedWorld.CreateNonVisibleAgent(); targetA = CreateTarget(ComparisonShape.GetRandomShape(m_rand, (int)TSHints[NUMBER_OF_DIFFERENT_OBJECTS])); if (GuaranteePositiveExample()) { targetB = CreateTarget(targetA.Shape); } else { targetB = CreateTarget(ComparisonShape.GetRandomShape(m_rand, (int)TSHints[NUMBER_OF_DIFFERENT_OBJECTS])); } }
// Test for shape equivalence public bool IsSameShape(ComparisonShape otherShape) { return(Shape == otherShape.Shape); }