Class WireframeCube
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
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.WireframeCube
A wireframe cube (equal-length sides) centered at a given point in 3D space.
This is a convenience subclass of
WireframeBox that constructs an
axis-aligned cube from a center point and a half-side length.
The cube extends size units in each direction from the center,
resulting in a total edge length of 2 * size.
Usage example:
LineAppearance appearance = new LineAppearance(1, Color.CYAN);
WireframeCube cube = new WireframeCube(new Point3D(0, 0, 200), 50, appearance);
shapeCollection.addShape(cube);
- See Also:
-
Field Summary
Fields inherited from class AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionWireframeCube(Point3D center, double size, LineAppearance appearance) Constructs a wireframe cube centered at the given point. -
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
-
WireframeCube
Constructs a wireframe cube centered at the given point.- Parameters:
center- the center point of the cube in 3D spacesize- the half-side length; the cube extends this distance from the center along each axis, giving a total edge length of2 * sizeappearance- the line appearance (color, width) used for all 12 edges
-