Add model element rotation to modellist
This commit is contained in:
parent
d8cf759671
commit
ea79274938
6 changed files with 52 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package org.dynmap.modsupport;
|
||||
|
||||
import org.dynmap.modsupport.ModelBlockModel.ModelBlock;
|
||||
|
||||
// Model for more direct translation of MC models
|
||||
// All coordinates are 0-16 range per block, and 0-16 range for UV
|
||||
|
||||
|
|
@ -26,7 +28,10 @@ public interface ModelBlockModel extends BlockModel {
|
|||
*
|
||||
* @param from - vector of lower left corner of box (0-16 range for coordinates - min x, y, z)
|
||||
* @param to - vector of upper right corner of box (0-16 range for coordinates max x, y, z)
|
||||
* @param xrot - degrees of rotation of block around X
|
||||
* @param yrot - degrees of rotation of block around Y
|
||||
* @param zrot - degrees of rotation of block around Z
|
||||
* @return model block to add faces to
|
||||
*/
|
||||
public ModelBlock addModelBlock(double[] from, double[] to);
|
||||
public ModelBlock addModelBlock(double[] from, double[] to, double xrot, double yrot, double zrot);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,19 @@ public interface RenderPatchFactory {
|
|||
*/
|
||||
@Deprecated
|
||||
public RenderPatch getPatch(double x0, double y0, double z0, double xu, double yu, double zu, double xv, double yv, double zv, double uplusvmax, SideVisible sidevis, int textureidx);
|
||||
/**
|
||||
* Get/create patch with given attributes.
|
||||
*
|
||||
* Generate from existing patch, after rotating xrot degrees around the X axis then yrot degrees around the Y axis, and then zrot degrees arond Z.
|
||||
*
|
||||
* @param patch - original patch
|
||||
* @param xrot - degrees to rotate around X
|
||||
* @param yrot - degrees to rotate around Y
|
||||
* @param zrot - degrees to rotate around Z
|
||||
* @param textureidx - texture index to be used for rotated patch (-1 means same as original patch)
|
||||
* @return patch requested
|
||||
*/
|
||||
public RenderPatch getRotatedPatch(RenderPatch patch, double xrot, double yrot, double zrot, int textureidx);
|
||||
/**
|
||||
* Get/create patch with given attributes.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue