Restore depricated method in PatchBlockModel

This commit is contained in:
Mike Primm 2022-01-30 16:12:46 -06:00
parent e729a02c41
commit 18740c4c2b
2 changed files with 42 additions and 3 deletions

View File

@ -47,8 +47,17 @@ public class PatchBlockModelImpl extends BlockModelImpl implements PatchBlockMod
}
@Override
@Deprecated
public String addPatch(double x0, double y0, double z0, double xu, double yu,
double zu, double xv, double yv, double zv, SideVisible sidevis) {
double zu, double xv, double yv, double zv, double umin,
double umax, double vmin, double vmax, double uplusvmax,
SideVisible sidevis) {
return addPatch(x0, y0, z0, xu, yu, zu, xv, yv, zv, umin, umax, vmin, vmin, vmax, ((uplusvmax - umax) < vmax) ? uplusvmax - umax : vmax, sidevis);
}
@Override
public String addPatch(double x0, double y0, double z0, double xu, double yu, double zu, double xv, double yv,
double zv, SideVisible sidevis) {
return addPatch(x0, y0, z0, xu, yu, zu, xv, yv, zv, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, sidevis);
}

View File

@ -6,6 +6,36 @@ import org.dynmap.renderer.RenderPatchFactory.SideVisible;
* Patch block model
*/
public interface PatchBlockModel extends BlockModel {
/**
* Add patch with given attributes.
*
* Definition is a 2D parallelogram surface, with origin &lt;x0,y0,z0&gt; within the block, and defined by two edge vectors -
* one with and end point of &lt;xu,yu,zu&gt;, and a second with an end point of &lt;xv,yv,zv&gt;. The patch is
* defined within the unit vector range umin to umax (parallel to the U vecotr) and vmin to vmax
* (parallel to the V vector).
* The surface can be visible via one side (SideVisible.TOP, SideVisible.BOTTOM) or both sides (SideVisible.BOTH).
*
* @param x0 - X coordinate of origin of patch
* @param y0 - Y coordinate of origin of patch
* @param z0 - Z coordinate of origin of patch
* @param xu - X coordinate of end of U vector
* @param yu - Y coordinate of end of U vector
* @param zu - Z coordinate of end of U vector
* @param xv - X coordinate of end of V vector
* @param yv - Y coordinate of end of V vector
* @param zv - Z coordinate of end of V vector
* @param umin - lower bound for visibility along U vector (use 0.0 by default)
* @param umax - upper bound for visibility along U vector (use 1.0 by default)
* @param vmin - lower bound for visibility along V vector (use 0.0 by default)
* @param vmax - upper bound for visibility along V vector (use 1.0 by default)
* @param uplusvmax - upper bound for visibility for U+V (use 100.0 by default: &lt;=1.0 for triangle)
* @param sidevis - Controls which sides of the surface are visible (U cross V defines normal - TOP is from that side, BOTTOM is opposite side)
* @return patch ID
*/
@Deprecated
public String addPatch(double x0, double y0, double z0, double xu,
double yu, double zu, double xv, double yv, double zv, double umin,
double umax, double vmin, double vmax, double uplusvmax, SideVisible sidevis);
/**
* Add patch with given attributes.
*