java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
eu.svjatoslav.sixth.e3d.examples.galaxy_demo.Galaxy

public class Galaxy extends eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
Represents a spiral galaxy composed of glowing points. Uses a mathematical spiral distribution to create a realistic galaxy shape with multiple spiral arms. Points are colored from a limited palette to enable texture reuse optimization.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The number of unique colors used in the galaxy.

    Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape

    mouseInteractionController
  • Constructor Summary

    Constructors
    Constructor
    Description
    Galaxy(int galaxySize, int tailCount, int starsCount, eu.svjatoslav.sixth.e3d.math.Transform transform)
    Constructs a galaxy with the specified parameters.
  • Method Summary

    Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape

    addShape, addShape, beforeTransformHook, getGroup, getLocation, getOriginalSubShapes, getViewSpaceTracker, hideGroup, removeGroup, setBackfaceCulling, setColor, setGroupForUngrouped, setLightingManager, setMouseInteractionController, setShadingEnabled, setTransform, showGroup, transform

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • UNIQUE_COLORS_COUNT

      public static final int UNIQUE_COLORS_COUNT
      The number of unique colors used in the galaxy. Used to reuse textures of glowing points of the same color.
      See Also:
  • Constructor Details

    • Galaxy

      public Galaxy(int galaxySize, int tailCount, int starsCount, eu.svjatoslav.sixth.e3d.math.Transform transform)
      Constructs a galaxy with the specified parameters.
      Parameters:
      galaxySize - the overall size scale of the galaxy
      tailCount - the number of spiral arms
      starsCount - the total number of stars to generate
      transform - the position and orientation of the galaxy