Class WireframeCylinder
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.wireframe.WireframeCylinder
A wireframe cylinder defined by two end points.
The cylinder extends from startPoint to endPoint with circular rings at both ends. The number of segments determines the smoothness of the circular rings. The wireframe consists of:
- Two circular rings at the start and end points
- Vertical lines connecting corresponding vertices between the rings
Usage example:
// Create a vertical cylinder from Y=100 to Y=200
LineAppearance appearance = new LineAppearance(2, Color.RED);
WireframeCylinder cylinder = new WireframeCylinder(
new Point3D(0, 100, 0), // start point (bottom)
new Point3D(0, 200, 0), // end point (top)
10, // radius
16, // segments
appearance
);
// Create a horizontal cylinder along X axis
WireframeCylinder pipe = new WireframeCylinder(
new Point3D(-50, 0, 0),
new Point3D(50, 0, 0),
5, 12, appearance
);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionWireframeCylinder(Point3D startPoint, Point3D endPoint, double radius, int segments, LineAppearance appearance) Constructs a wireframe 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
-
WireframeCylinder
public WireframeCylinder(Point3D startPoint, Point3D endPoint, double radius, int segments, LineAppearance appearance) Constructs a wireframe cylinder between two end points.The cylinder has circular rings at both startPoint and endPoint, connected by lines between corresponding vertices. The orientation is automatically calculated from the direction between the two points.
- Parameters:
startPoint- the center of the first ringendPoint- the center of the second ringradius- the radius of the cylindersegments- the number of segments around the circumference. Higher values create smoother cylinders. Minimum is 3.appearance- the line appearance (color, width) used for all lines
-