Package org.djutils.draw
Interface Drawable3d
- All Known Implementing Classes:
Bounds3d,DirectedPoint3d,LineSegment3d,OrientedPoint3d,Point3d,Polygon3d,PolyLine3d,Ray3d,Surface3d
Drawable3d is the Interface that all drawable objects that use 3D coordinates must implement.
Copyright (c) 2020-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the bounding box of the object in absolute coordinates.default intReturn the number of dimensions.project()Project the object onto the z=0 plane.Methods inherited from interface org.djutils.draw.Drawable
getPointList, size, toString, toString, toString, toStringMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getAbsoluteBounds
Bounds3d getAbsoluteBounds()Retrieve the bounding box of the object in absolute coordinates.- Returns:
- the bounding box of the object in absolute coordinates
-
getDimensions
default int getDimensions()Description copied from interface:DrawableReturn the number of dimensions.- Specified by:
getDimensionsin interfaceDrawable<Point3d>- Returns:
- the number of dimensions
-
project
Drawable2d project()Project the object onto the z=0 plane.- Returns:
- the projected object
- Throws:
InvalidProjectionException- when projecting onto thez=0plane results in an invalid object. E.g. a Line3d that consists of points that all have the exact samexandycoordinates cannot be a line after projecting on thez=0plane.
-