Class SolidPolygonSphere
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.renderer.raster.shapes.composite.solid.SolidPolygonSphere
A solid sphere composed of triangular polygons.
The sphere is constructed using a latitude-longitude grid (UV sphere). The number of segments determines the smoothness - more segments create a smoother sphere but require more polygons.
Usage example:
// Create a sphere with radius 50 and 16 segments (smooth)
SolidPolygonSphere sphere = new SolidPolygonSphere(
new Point3D(0, 0, 200), 50, 16, Color.RED);
shapeCollection.addShape(sphere);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionSolidPolygonSphere(Point3D center, double radius, int segments, Color color) Constructs a solid sphere centered at the given point. -
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
-
Constructor Details
-
SolidPolygonSphere
Constructs a solid sphere centered at the given point.- Parameters:
center- the center point of the sphere in 3D spaceradius- the radius of the spheresegments- the number of segments (latitude/longitude divisions). Higher values create smoother spheres. Minimum is 3.color- the fill color applied to all triangular polygons
-