Class SolidPolygonArrow
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.SolidPolygonArrow
A 3D arrow shape composed of a cylindrical body and a conical tip.
The arrow points from a start point to an end point, with the tip located at the end point. The arrow's appearance (size, color, transparency) can be customized through the constructor parameters.
Usage example:
// Create a red arrow pointing from origin to (100, -50, 200)
SolidPolygonArrow arrow = new SolidPolygonArrow(
new Point3D(0, 0, 0), // start point
new Point3D(100, -50, 200), // end point
8, // body radius
20, // tip radius
40, // tip length
16, // segments
Color.RED // color
);
shapeCollection.addShape(arrow);
// Create a semi-transparent blue arrow
SolidPolygonArrow seeThroughArrow = new SolidPolygonArrow(
new Point3D(0, 100, 0),
new Point3D(0, -100, 0),
10, 25, 50, 12,
new Color(0, 0, 255, 128) // blue with 50% transparency
);
- See Also:
-
Field Summary
Fields inherited from class AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionSolidPolygonArrow(Point3D startPoint, Point3D endPoint, double bodyRadius, Color color) Constructs a 3D arrow pointing from start to end with sensible defaults. -
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
-
SolidPolygonArrow
Constructs a 3D arrow pointing from start to end with sensible defaults.This simplified constructor automatically calculates the tip radius as 2.5 times the body radius, the tip length as 5 times the body radius, and uses 12 segments for smoothness. For custom tip dimensions or segment count, use the full constructor.
- Parameters:
startPoint- the origin point of the arrow (where the body starts)endPoint- the destination point of the arrow (where the tip points to)bodyRadius- the radius of the cylindrical body; tip dimensions are calculated automatically from this valuecolor- the fill color (RGBA; alpha controls transparency)
-