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 AbstractShape
cachedBoundingBox, 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 AbstractCompositeShape
addShape, addShape, beforeTransformHook, extractSolidPolygons, getBoundingBox, getGroup, getLocation, getSubShapesRegistry, getTransform, getViewSpaceTracker, hideGroup, intersect, removeGroup, setBackfaceCulling, setCacheNeedsRebuild, setColor, setGroupForUngrouped, setMouseInteractionController, setRootComposite, setShadingEnabled, setTransform, showGroup, subtract, transform, unionMethods inherited from class AbstractShape
invalidateBounds
-
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
-