Class CircleObjectFixture

Object
CircleObjectFixture

public class CircleObjectFixture extends Object
A fixture for creating circular objects and related utilities for testing purposes.

This class provides methods to create circular object masks, energy stacks, and to check if points are within the scene dimensions.

  • Method Details

    • circleAt

      public static ObjectMask circleAt(Point2i center, double radius)
      Creates a circular object mask at a specified center point with a given radius.
      Parameters:
      center - the center point of the circle in 2D coordinates
      radius - the radius of the circle
      Returns:
      an ObjectMask representing the circular object
    • energyStack

      public static EnergyStack energyStack()
      Creates an EnergyStack with the fixture's dimensions.
      Returns:
      a new EnergyStack instance
    • sceneContains

      public static boolean sceneContains(Point2i point)
      Checks if a given 2D point is within the scene dimensions.
      Parameters:
      point - the 2D point to check
      Returns:
      true if the point is within the scene dimensions, false otherwise