org.djutils.draw.Drawable3d Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of djutils-draw Show documentation
Show all versions of djutils-draw Show documentation
DJUTILS - Delft Java Utilities Drawing and animation primitives
The newest version!
package org.djutils.draw;
import org.djutils.draw.bounds.Bounds3d;
import org.djutils.draw.point.Point3d;
/**
* Drawable3d is the Interface that all drawable objects that use 3D coordinates must implement.
*
* Copyright (c) 2020-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See DJUTILS License.
*
* @author Alexander Verbraeck
* @author Peter Knoppers
*/
public interface Drawable3d extends Drawable
{
/**
* Retrieve the bounding box of the object.
* @return Bounds3d; the bounding box of the object
*/
Bounds3d getBounds();
@Override
default int getDimensions()
{
return 3;
}
/**
* Project the object onto the z=0 plane.
* @return Drawable2d; the projected object
* @throws InvalidProjectionException when projecting onto the z=0 plane results in an invalid object. E.g. a Line3d that
* consists of points that all have the exact same x and y coordinates cannot be a line after projecting on the
* z=0 plane.
*/
Drawable2d project() throws InvalidProjectionException;
}