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 Summary

    Modifier and Type
    Method
    Description
    static ObjectMask
    circleAt(Point2i center, double radius)
    Creates a circular object mask at a specified center point with a given radius.
    static EnergyStack
    Creates an EnergyStack with the fixture's dimensions.
    static boolean
    sceneContains(Point2i point)
    Checks if a given 2D point is within the scene dimensions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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