Class Grid3D
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.Grid3D
A 3D grid of line segments filling a rectangular volume defined by two
diagonally opposite corner points. Lines run along all three axes (X, Y, and Z)
at regular intervals determined by the step size.
At each grid intersection point, up to three line segments are created (one along each axis), forming a three-dimensional lattice.
This shape is useful for visualizing 3D space, voxel boundaries, or spatial reference grids in a scene.
Usage example:
LineAppearance appearance = new LineAppearance(1, Color.GRAY);
Point3D cornerA = new Point3D(-100, -100, -100);
Point3D cornerB = new Point3D(100, 100, 100);
Grid3D grid = new Grid3D(cornerA, cornerB, 50, appearance);
shapeCollection.addShape(grid);
- See Also:
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionGrid3D(Point3D cornerA, Point3D cornerB, double step, LineAppearance appearance) Constructs a 3D grid filling the volume between two diagonally opposite corner 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
-
Grid3D
Constructs a 3D grid filling the volume between two diagonally opposite corner points.The corner points do not need to be in any particular min/max order; the constructor automatically normalizes them so that grid generation always proceeds from minimum to maximum coordinates.
- Parameters:
cornerA- the first corner point defining the volumecornerB- the diagonally opposite corner pointstep- the spacing between grid lines along each axis; must be positiveappearance- the line appearance (color, width) used for all grid lines
-