Class WireframeBox
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.WireframeBox
- Direct Known Subclasses:
WireframeCube
A wireframe box (rectangular parallelepiped) composed of 12 line segments
representing the edges of the box. The box is axis-aligned, defined by two
diagonally opposite corner points.
The wireframe consists of four edges along each axis: four edges parallel to X, four parallel to Y, and four parallel to Z.
Vertex layout:
cornerB (max) ────────┐
/│ /│
/ │ / │
/ │ / │
┌───┼───────────┐ │
│ │ │ │
│ │ │ │
│ └───────────│───┘
│ / │ /
│ / │ /
│/ │/
└───────────────┘ cornerA (min)
Usage example:
LineAppearance appearance = new LineAppearance(2, Color.GREEN);
Point3D cornerA = new Point3D(-50, -50, -50);
Point3D cornerB = new Point3D(50, 50, 50);
WireframeBox box = new WireframeBox(cornerA, cornerB, appearance);
shapeCollection.addShape(box);
- See Also:
-
Field Summary
Fields inherited from class AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionWireframeBox(Box box, LineAppearance appearance) Constructs a wireframe box from aBoxgeometry object.WireframeBox(Point3D cornerA, Point3D cornerB, LineAppearance appearance) Constructs a wireframe box from two diagonally opposite corner points. -
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
-
WireframeBox
Constructs a wireframe box from aBoxgeometry object.- Parameters:
box- the axis-aligned box defining the two opposite cornersappearance- the line appearance (color, width) used for all 12 edges
-
WireframeBox
Constructs a wireframe box from two diagonally opposite corner points. The corners do not need to be in any particular min/max order; the constructor uses each coordinate independently to form all eight vertices of the box.- Parameters:
cornerA- the first corner point of the boxcornerB- the diagonally opposite corner point of the boxappearance- the line appearance (color, width) used for all 12 edges
-