Class SolidPolygonCylinder
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.SolidPolygonCylinder
A solid cylinder defined by two end points.
The cylinder extends from startPoint to endPoint with circular caps at both ends. The number of segments determines the smoothness of the curved surface.
Usage example:
// Create a vertical cylinder from Y=100 to Y=200
SolidPolygonCylinder cylinder = new SolidPolygonCylinder(
new Point3D(0, 100, 0), // start point (bottom)
new Point3D(0, 200, 0), // end point (top)
10, // radius
16, // segments
Color.RED // color
);
// Create a horizontal cylinder along X axis
SolidPolygonCylinder pipe = new SolidPolygonCylinder(
new Point3D(-50, 0, 0),
new Point3D(50, 0, 0),
5, 12, Color.BLUE
);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionSolidPolygonCylinder(Point3D startPoint, Point3D endPoint, double radius, int segments, Color color) Constructs a solid cylinder between two end points. -
Method Summary
Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape
addShape, addShape, beforeTransformHook, extractSolidPolygons, getGroup, getLocation, getOriginalSubShapes, getViewSpaceTracker, hideGroup, removeGroup, setBackfaceCulling, setColor, setGroupForUngrouped, setMouseInteractionController, setShadingEnabled, setTransform, showGroup, transform
-
Constructor Details
-
SolidPolygonCylinder
public SolidPolygonCylinder(Point3D startPoint, Point3D endPoint, double radius, int segments, Color color) Constructs a solid cylinder between two end points.The cylinder has circular caps at both startPoint and endPoint, connected by a curved side surface. The orientation is automatically calculated from the direction between the two points.
- Parameters:
startPoint- the center of the first capendPoint- the center of the second capradius- the radius of the cylindersegments- the number of segments around the circumference. Higher values create smoother cylinders. Minimum is 3.color- the fill color applied to all polygons
-