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
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. The corner
points are automatically normalized so that p1 holds the minimum
coordinates and p2 holds the maximum coordinates.
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 corner1 = new Point3D(-100, -100, -100);
Point3D corner2 = new Point3D(100, 100, 100);
Grid3D grid = new Grid3D(corner1, corner2, 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 p1t, Point3D p2t, double step, LineAppearance appearance) Constructs a 3D grid filling the volume between two corner points. -
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
-
Grid3D
Constructs a 3D grid filling the volume between two corner points. The corner points are copied and normalized internally so that grid generation always proceeds from minimum to maximum coordinates.- Parameters:
p1t- the first corner point defining the volume (copied, not modified)p2t- the diagonally opposite corner point (copied, not modified)step- the spacing between grid lines along each axis; must be positiveappearance- the line appearance (color, width) used for all grid lines
-