Class ConvexPolygonRendererComponent

java.lang.Object
technology.sola.engine.graphics.components.ConvexPolygonRendererComponent
All Implemented Interfaces:
technology.sola.ecs.Component

@NullMarked public class ConvexPolygonRendererComponent extends Object implements technology.sola.ecs.Component
ConvexPolygonRendererComponent is a Component containing data for rendering 2d convex polygons.
  • Constructor Details

    • ConvexPolygonRendererComponent

      public ConvexPolygonRendererComponent(Color color, boolean isFilled, ConvexPolygon convexPolygon)
      Creates a ConvexPolygonRendererComponent of desired color that is either filled or not filled.
      Parameters:
      color - the Color of the convex polygon
      isFilled - whether the convex polygon should be filled or not
      convexPolygon - the shape of the convex polygon to be rendered
  • Method Details

    • getColor

      public Color getColor()
      Returns:
      the Color of the convex polygon
    • isFilled

      public boolean isFilled()
      Returns:
      true if the convex polygon should be filled when rendered
    • setColor

      public void setColor(Color color)
      Sets the Color for rendering.
      Parameters:
      color - the new color
    • setFilled

      public void setFilled(boolean filled)
      Sets whether the convex polygon should be filled or not.
      Parameters:
      filled - the new filled status
    • getConvexPolygon

      public ConvexPolygon getConvexPolygon()
      Returns:
      the shape of the convex polygon to be rendered