Class WireframeDrawing
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.WireframeDrawing
A freeform polyline drawing tool that connects sequential points with line
segments. Points are added one at a time via
addPoint(Point3D);
each new point is connected to the previously added point by a line.
The first point added establishes the starting position without drawing a line. Each subsequent point creates a new line segment from the previous point to the new one.
This shape is useful for drawing paths, trails, trajectories, or arbitrary wireframe shapes that are defined as a sequence of vertices.
Usage example:
LineAppearance appearance = new LineAppearance(2, Color.YELLOW);
WireframeDrawing drawing = new WireframeDrawing(appearance);
drawing.addPoint(new Point3D(0, 0, 0));
drawing.addPoint(new Point3D(100, 50, 0));
drawing.addPoint(new Point3D(200, 0, 0));
shapeCollection.addShape(drawing);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionWireframeDrawing(LineAppearance lineAppearance) Constructs a new empty wireframe drawing with the given line appearance. -
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
-
WireframeDrawing
Constructs a new empty wireframe drawing with the given line appearance.- Parameters:
lineAppearance- the line appearance (color, width) used for all line segments added to this drawing
-
-
Method Details
-
addPoint
Adds a new point to the drawing. If this is the first point, it sets the starting position. Otherwise, a line segment is created from the previous point to this new point.The point is defensively copied, so subsequent modifications to the passed
point3dobject will not affect the drawing.- Parameters:
point3d- the point to add to the polyline
-