Class Galaxy
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
FieldsModifier and TypeFieldDescriptionstatic final intThe number of unique colors used in the galaxy.Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionGalaxy(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
-
Field Details
-
UNIQUE_COLORS_COUNT
public static final int UNIQUE_COLORS_COUNTThe 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 galaxytailCount- the number of spiral armsstarsCount- the total number of stars to generatetransform- the position and orientation of the galaxy
-