|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.src.ModelRenderer
net.minecraft.src.ModelRendererTurbo
public class ModelRendererTurbo
An extension to the ModelRenderer class. It basically is a copy to ModelRenderer,
however, it contains various new methods to make your models.
Since the ModelRendererTurbo class gets loaded during startup, the models made
can be very complex. This is why I can afford to add, for example, Wavefont OBJ
support or have the addSprite method, methods that add a lot of vertices and
polygons.
Field Summary | |
---|---|
boolean |
field_1402_i
|
boolean |
flip
|
boolean |
forcedRecompile
|
boolean |
mirror
|
static int |
MR_BACK
|
static int |
MR_BOTTOM
|
static int |
MR_FRONT
|
static int |
MR_LEFT
|
static int |
MR_RIGHT
|
static int |
MR_TOP
|
boolean |
showModel
|
boolean |
useLegacyCompiler
|
Fields inherited from class net.minecraft.src.ModelRenderer |
---|
rotateAngleX, rotateAngleY, rotateAngleZ, rotationPointX, rotationPointY, rotationPointZ |
Constructor Summary | |
---|---|
ModelRendererTurbo(int textureX,
int textureY)
Creates a new ModelRenderTurbo object. |
|
ModelRendererTurbo(int textureX,
int textureY,
int textureU,
int textureV)
Creates a new ModelRenderTurbo object. |
Method Summary | |
---|---|
void |
addBox(float x,
float y,
float z,
int w,
int h,
int d)
Adds a new box to the model. |
void |
addBox(float x,
float y,
float z,
int w,
int h,
int d,
float expansion)
Adds a new box to the model. |
void |
addBox(float x,
float y,
float z,
int w,
int h,
int d,
float expansion,
float scale)
Adds a new box to the model. |
void |
addCone(float x,
float y,
float z,
float radius,
float length,
int segments)
Adds a cone. |
void |
addCone(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale)
Adds a cone. |
void |
addCone(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale,
int baseDirection)
Adds a cone. |
void |
addCone(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale,
int baseDirection,
int textureCircleDiameterW,
int textureCircleDiameterH)
Adds a cone. |
void |
addCylinder(float x,
float y,
float z,
float radius,
float length,
int segments)
Adds a cylinder. |
void |
addCylinder(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale,
float topScale)
Adds a cylinder. |
void |
addCylinder(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale,
float topScale,
int baseDirection)
Adds a cylinder. |
void |
addCylinder(float x,
float y,
float z,
float radius,
float length,
int segments,
float baseScale,
float topScale,
int baseDirection,
int textureCircleDiameterW,
int textureCircleDiameterH,
int textureH)
Adds a cylinder. |
void |
addModel(java.lang.String file,
java.lang.Class modelFormat)
Adds model format support. |
void |
addObj(java.lang.String file)
Adds a Waveform .obj file as a model. |
void |
addPixel(float x,
float y,
float z,
float[] scale,
int w,
int h)
Adds a cube the size of one pixel. |
void |
addPixel(float x,
float y,
float z,
float width,
float height,
float length)
Adds a cube the size of one pixel. |
void |
addPolygon(net.minecraft.src.PositionTextureVertex[] verts)
Creates a new polygon. |
void |
addPolygon(net.minecraft.src.PositionTextureVertex[] verts,
int[][] uv)
Creates a new polygon, and adds UV mapping to it. |
void |
addPolygon(net.minecraft.src.PositionTextureVertex[] verts,
int u1,
int v1,
int u2,
int v2)
Creates a new polygon with a given UV. |
void |
addRectShape(float[] v,
float[] v1,
float[] v2,
float[] v3,
float[] v4,
float[] v5,
float[] v6,
float[] v7,
int w,
int h,
int d)
Adds a rectangular shape. |
void |
addShape3D(float x,
float y,
float z,
java.util.ArrayList<Coord2D> coordinates,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
java.util.ArrayList<Coord2D> coordinates,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction,
float[] faceLengths)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
Coord2D[] coordinates,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
Coord2D[] coordinates,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction,
float[] faceLengths)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
Shape2D shape,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
float rotX,
float rotY,
float rotZ)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
Shape2D shape,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
float rotX,
float rotY,
float rotZ,
float[] faceLengths)
|
void |
addShape3D(float x,
float y,
float z,
Shape2D shape,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction)
Creates a shape from a 2D vector shape. |
void |
addShape3D(float x,
float y,
float z,
Shape2D shape,
float depth,
int shapeTextureWidth,
int shapeTextureHeight,
int sideTextureWidth,
int sideTextureHeight,
int direction,
float[] faceLengths)
Creates a shape from a 2D vector shape. |
void |
addSphere(float x,
float y,
float z,
float r,
int segs,
int rings,
int textureW,
int textureH)
Adds a spherical shape. |
void |
addSprite(float x,
float y,
float z,
int w,
int h,
boolean rotX,
boolean rotY,
boolean rotZ,
boolean mirrorX,
boolean mirrorY,
float expansion)
Creates a model shaped like the exact image on the texture. |
void |
addSprite(float x,
float y,
float z,
int w,
int h,
float expansion)
Creates a model shaped like the exact image on the texture. |
void |
addSprite(float x,
float y,
float z,
int w,
int h,
int d,
boolean rotX,
boolean rotY,
boolean rotZ,
boolean mirrorX,
boolean mirrorY,
float expansion)
Creates a model shaped like the exact image on the texture. |
void |
addSprite(float x,
float y,
float z,
int w,
int h,
int d,
float pixelScale,
boolean rotX,
boolean rotY,
boolean rotZ,
boolean mirrorX,
boolean mirrorY,
float expansion)
Creates a model shaped like the exact image on the texture. |
void |
addSprite(float x,
float y,
float z,
java.lang.String[] mask,
int d,
float pixelScale,
boolean rotX,
boolean rotY,
boolean rotZ,
boolean mirrorX,
boolean mirrorY,
float expansion)
Creates a model shaped like the exact image on the texture. |
void |
addTrapezoid(float x,
float y,
float z,
int w,
int h,
int d,
float scale,
float bottomScale,
int dir)
Adds a trapezoid-like shape. |
void |
clear()
Clears the current shape. |
void |
copyTo(net.minecraft.src.PositionTextureVertex[] verts,
net.minecraft.src.TexturedPolygon[] poly)
Copies an array of vertices and polygons to the current shape. |
void |
copyTo(net.minecraft.src.PositionTextureVertex[] verts,
net.minecraft.src.TexturedPolygon[] poly,
boolean copyGroup)
|
void |
copyTo(net.minecraft.src.PositionTextureVertex[] verts,
net.minecraft.src.TexturedQuad[] quad)
Copies an array of vertices and quads to the current shape. |
void |
doMirror(boolean x,
boolean y,
boolean z)
Mirrors the model in any direction. |
TransformGroup |
getGroup()
Gets the current transformation group. |
TransformGroup |
getGroup(java.lang.String groupName)
Gets the transformation group with a given group name. |
TextureGroup |
getTextureGroup()
Gets the current texture group. |
TextureGroup |
getTextureGroup(java.lang.String groupName)
Gets the texture group with the given name. |
void |
postRender(float f)
|
void |
render(float worldScale)
Renders the shape. |
void |
setDefaultTexture(java.lang.String s)
Sets the default texture. |
void |
setFlipped(boolean isFlipped)
Sets whether the shape's faces are flipped or not. |
void |
setGroup(java.lang.String groupName)
Sets the current transformation group. |
void |
setGroup(java.lang.String groupName,
Bone bone,
double weight)
Sets the current transformation group. |
void |
setGroupTexture(java.lang.String s)
Sets the texture of the current texture group. |
void |
setMirrored(boolean isMirrored)
Sets whether the shape is mirrored or not. |
void |
setPosition(float x,
float y,
float z)
Sets the position of the shape, relative to the model's origins. |
void |
setTextureGroup(java.lang.String groupName)
Sets the current texture group, which is used to switch the textures on a per-model base. |
void |
setTextureOffset(int x,
int y)
Sets a new position for the texture offset. |
Methods inherited from class net.minecraft.src.ModelRenderer |
---|
renderWithRotation, setRotationPoint |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean mirror
public boolean flip
public boolean showModel
public boolean field_1402_i
public boolean forcedRecompile
public boolean useLegacyCompiler
public static final int MR_FRONT
public static final int MR_BACK
public static final int MR_LEFT
public static final int MR_RIGHT
public static final int MR_TOP
public static final int MR_BOTTOM
Constructor Detail |
---|
public ModelRendererTurbo(int textureX, int textureY)
textureX
- the x-coordinate on the texturetextureY
- the y-coordinate on the texturepublic ModelRendererTurbo(int textureX, int textureY, int textureU, int textureV)
textureX
- textureY
- textureU
- textureV
- Method Detail |
---|
public void addPolygon(net.minecraft.src.PositionTextureVertex[] verts)
verts
- an array of verticespublic void addPolygon(net.minecraft.src.PositionTextureVertex[] verts, int[][] uv)
verts
- an array of verticesuv
- an array of UV coordinatespublic void addPolygon(net.minecraft.src.PositionTextureVertex[] verts, int u1, int v1, int u2, int v2)
verts
- an array of verticesu1
- v1
- u2
- v2
- public void addRectShape(float[] v, float[] v1, float[] v2, float[] v3, float[] v4, float[] v5, float[] v6, float[] v7, int w, int h, int d)
v
- a float array with three values, the x, y and z coordinates of the vertexv1
- a float array with three values, the x, y and z coordinates of the vertexv2
- a float array with three values, the x, y and z coordinates of the vertexv3
- a float array with three values, the x, y and z coordinates of the vertexv4
- a float array with three values, the x, y and z coordinates of the vertexv5
- a float array with three values, the x, y and z coordinates of the vertexv6
- a float array with three values, the x, y and z coordinates of the vertexv7
- a float array with three values, the x, y and z coordinates of the vertexw
- the width of the shape, used in determining the textureh
- the height of the shape, used in determining the textured
- the depth of the shape, used in determining the texturepublic void addBox(float x, float y, float z, int w, int h, int d)
addBox
in class net.minecraft.src.ModelRenderer
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width (over the x-direction)h
- the height (over the y-direction)d
- the depth (over the z-direction)public void addBox(float x, float y, float z, int w, int h, int d, float expansion)
addBox
in class net.minecraft.src.ModelRenderer
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width (over the x-direction)h
- the height (over the y-direction)d
- the depth (over the z-direction)expansion
- the expansion of the box. It increases the size in each direction by that many.public void addBox(float x, float y, float z, int w, int h, int d, float expansion, float scale)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width (over the x-direction)h
- the height (over the y-direction)d
- the depth (over the z-direction)expansion
- the expansion of the box. It increases the size in each direction by that many. It's independent from the scale.scale
- public void addTrapezoid(float x, float y, float z, int w, int h, int d, float scale, float bottomScale, int dir)
MR_RIGHT
, MR_LEFT
,
MR_FRONT
, MR_BACK
, MR_TOP
and
MR_BOTTOM
.
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width (over the x-direction)h
- the height (over the y-direction)d
- the depth (over the z-direction)scale
- the "scale" of the box. It only increases the size in each direction by that many.bottomScale
- the "scale" of the bottomdir
- the side the scaling is applied topublic void addShape3D(float x, float y, float z, Coord2D[] coordinates, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction)
x
- the starting x positiony
- the starting y positionz
- the starting z positioncoordinates
- an array of coordinates that form the shapedepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingpublic void addShape3D(float x, float y, float z, Coord2D[] coordinates, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction, float[] faceLengths)
x
- the starting x positiony
- the starting y positionz
- the starting z positioncoordinates
- an array of coordinates that form the shapedepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingfaceLengths
- An array with the length of each face. Used to set
the texture width of each face on the side manually.public void addShape3D(float x, float y, float z, java.util.ArrayList<Coord2D> coordinates, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction)
x
- the starting x positiony
- the starting y positionz
- the starting z positioncoordinates
- an ArrayList of coordinates that form the shapedepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingpublic void addShape3D(float x, float y, float z, java.util.ArrayList<Coord2D> coordinates, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction, float[] faceLengths)
x
- the starting x positiony
- the starting y positionz
- the starting z positioncoordinates
- an ArrayList of coordinates that form the shapedepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingfaceLengths
- An array with the length of each face. Used to set
the texture width of each face on the side manually.public void addShape3D(float x, float y, float z, Shape2D shape, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction)
x
- the starting x positiony
- the starting y positionz
- the starting z positionshape
- a Shape2D which contains the coordinates of the shape pointsdepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingpublic void addShape3D(float x, float y, float z, Shape2D shape, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, int direction, float[] faceLengths)
x
- the starting x positiony
- the starting y positionz
- the starting z positionshape
- a Shape2D which contains the coordinates of the shape pointsdepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shapedirection
- the direction the starting point of the shape is facingfaceLengths
- An array with the length of each face. Used to set
the texture width of each face on the side manually.public void addShape3D(float x, float y, float z, Shape2D shape, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, float rotX, float rotY, float rotZ)
x
- the starting x positiony
- the starting y positionz
- the starting z positionshape
- a Shape2D which contains the coordinates of the shape pointsdepth
- the depth of the shapeshapeTextureWidth
- the width of the texture of one side of the shapeshapeTextureHeight
- the height of the texture the shapesideTextureWidth
- the width of the texture of the side of the shapesideTextureHeight
- the height of the texture of the side of the shaperotX
- the rotation around the x-axisrotY
- the rotation around the y-axisrotZ
- the rotation around the z-axispublic void addShape3D(float x, float y, float z, Shape2D shape, float depth, int shapeTextureWidth, int shapeTextureHeight, int sideTextureWidth, int sideTextureHeight, float rotX, float rotY, float rotZ, float[] faceLengths)
public void addPixel(float x, float y, float z, float width, float height, float length)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionwidth
- the width of the boxheight
- the height of the boxlength
- the length of the boxpublic void addPixel(float x, float y, float z, float[] scale, int w, int h)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionscale
- the "scale" of the cube, where scale is a float integer consisting of three valuesw
- the x-coordinate on the textureh
- the y-coordinate on the texturepublic void addSprite(float x, float y, float z, int w, int h, float expansion)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width of the spriteh
- the height of the spriteexpansion
- the expansion of the sprite. It only increases the size in each direction by that many.public void addSprite(float x, float y, float z, int w, int h, boolean rotX, boolean rotY, boolean rotZ, boolean mirrorX, boolean mirrorY, float expansion)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width of the spriteh
- the height of the spriterotX
- a boolean to define if it rotates 90 degrees around its yaw-axisrotY
- a boolean to define if it rotates 90 degrees around its pitch-axisrotZ
- a boolean to define if it rotates 90 degrees around its roll-axismirrorX
- a boolean to define if the sprite should be mirroredmirrorY
- a boolean to define if the sprite should be flippedexpansion
- the expansion of the sprite. It only increases the size in each direction by that many.public void addSprite(float x, float y, float z, int w, int h, int d, boolean rotX, boolean rotY, boolean rotZ, boolean mirrorX, boolean mirrorY, float expansion)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width of the spriteh
- the height of the sprited
- the depth of the shape itselfrotX
- a boolean to define if it rotates 90 degrees around its yaw-axisrotY
- a boolean to define if it rotates 90 degrees around its pitch-axisrotZ
- a boolean to define if it rotates 90 degrees around its roll-axismirrorX
- a boolean to define if the sprite should be mirroredmirrorY
- a boolean to define if the sprite should be flippedexpansion
- the expansion of the sprite. It only increases the size in each direction by that many.public void addSprite(float x, float y, float z, int w, int h, int d, float pixelScale, boolean rotX, boolean rotY, boolean rotZ, boolean mirrorX, boolean mirrorY, float expansion)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionw
- the width of the spriteh
- the height of the sprited
- the depth of the shape itselfpixelScale
- the scale of each individual pixelrotX
- a boolean to define if it rotates 90 degrees around its yaw-axisrotY
- a boolean to define if it rotates 90 degrees around its pitch-axisrotZ
- a boolean to define if it rotates 90 degrees around its roll-axismirrorX
- a boolean to define if the sprite should be mirroredmirrorY
- a boolean to define if the sprite should be flippedexpansion
- the expansion of the sprite. It only increases the size in each direction by that many.public void addSprite(float x, float y, float z, java.lang.String[] mask, int d, float pixelScale, boolean rotX, boolean rotY, boolean rotZ, boolean mirrorX, boolean mirrorY, float expansion)
x
- the starting x-positiony
- the starting y-positionz
- the starting z-positionmask
- an array with the mask stringd
- the depth of the shape itselfpixelScale
- the scale of each individual pixelrotX
- a boolean to define if it rotates 90 degrees around its yaw-axisrotY
- a boolean to define if it rotates 90 degrees around its pitch-axisrotZ
- a boolean to define if it rotates 90 degrees around its roll-axismirrorX
- a boolean to define if the sprite should be mirroredmirrorY
- a boolean to define if the sprite should be flippedexpansion
- the expansion of the sprite. It only increases the size in each direction by that many.public void addSphere(float x, float y, float z, float r, int segs, int rings, int textureW, int textureH)
x
- y
- z
- r
- segs
- rings
- textureW
- textureH
- public void addCone(float x, float y, float z, float radius, float length, int segments)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofpublic void addCone(float x, float y, float z, float radius, float length, int segments, float baseScale)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.public void addCone(float x, float y, float z, float radius, float length, int segments, float baseScale, int baseDirection)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.baseDirection
- the direction it facespublic void addCone(float x, float y, float z, float radius, float length, int segments, float baseScale, int baseDirection, int textureCircleDiameterW, int textureCircleDiameterH)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.baseDirection
- the direction it facestextureCircleDiameterW
- the diameter width of the circle on the texturetextureCircleDiameterH
- the diameter height of the circle on the texturepublic void addCylinder(float x, float y, float z, float radius, float length, int segments)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofpublic void addCylinder(float x, float y, float z, float radius, float length, int segments, float baseScale, float topScale)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.topScale
- the scaling of the top. Can be negative.public void addCylinder(float x, float y, float z, float radius, float length, int segments, float baseScale, float topScale, int baseDirection)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.topScale
- the scaling of the top. Can be negative.baseDirection
- the direction it facespublic void addCylinder(float x, float y, float z, float radius, float length, int segments, float baseScale, float topScale, int baseDirection, int textureCircleDiameterW, int textureCircleDiameterH, int textureH)
x
- the x-position of the basey
- the y-position of the basez
- the z-position of the baseradius
- the radius of the cylinderlength
- the length of the cylindersegments
- the amount of segments the cylinder is made ofbaseScale
- the scaling of the base. Can be negative.topScale
- the scaling of the top. Can be negative.baseDirection
- the direction it facestextureCircleDiameterW
- the diameter width of the circle on the texturetextureCircleDiameterH
- the diameter height of the circle on the texturetextureH
- the height of the texture of the bodypublic void addObj(java.lang.String file)
file
- the location of the .obj file. The location is relative to the base directories,
which are either resources/models or resources/mods/models.public void addModel(java.lang.String file, java.lang.Class modelFormat)
file
- the location of the model file. The location is relative to the base directories,
which are either resources/models or resources/mods/models.modelFormat
- the class of the model format interpreterpublic void setTextureOffset(int x, int y)
x
- the x-coordinate of the texture starty
- the y-coordinate of the texture startpublic void setPosition(float x, float y, float z)
x
- the x-position of the shapey
- the y-position of the shapez
- the z-position of the shapepublic void doMirror(boolean x, boolean y, boolean z)
x
- whether the model should be mirrored in the x-directiony
- whether the model should be mirrored in the y-directionz
- whether the model should be mirrored in the z-directionpublic void setMirrored(boolean isMirrored)
isMirrored
- a boolean to define whether the shape is mirroredpublic void setFlipped(boolean isFlipped)
isFlipped
- a boolean to define whether the shape is flippedpublic void clear()
public void copyTo(net.minecraft.src.PositionTextureVertex[] verts, net.minecraft.src.TexturedPolygon[] poly)
verts
- the array of vertices you want to copypoly
- the array of polygons you want to copypublic void copyTo(net.minecraft.src.PositionTextureVertex[] verts, net.minecraft.src.TexturedPolygon[] poly, boolean copyGroup)
public void copyTo(net.minecraft.src.PositionTextureVertex[] verts, net.minecraft.src.TexturedQuad[] quad)
verts
- the array of vertices you want to copyquad
- the array of quads you want to copypublic void setGroup(java.lang.String groupName)
groupName
- the name of the transformation group you want to switch topublic void setGroup(java.lang.String groupName, Bone bone, double weight)
groupName
- the name of the transformation group you want to switch tobone
- the Bone this transformation group is attached toweight
- the weight of the transformation grouppublic TransformGroup getGroup()
public TransformGroup getGroup(java.lang.String groupName)
public void setTextureGroup(java.lang.String groupName)
groupName
- The name of the texture group. If the texture
group doesn't exist, it creates a new group automatically.public TextureGroup getTextureGroup()
public TextureGroup getTextureGroup(java.lang.String groupName)
groupName
- the name of the texture group to return
public void setGroupTexture(java.lang.String s)
s
- the filenamepublic void setDefaultTexture(java.lang.String s)
s
- the filenamepublic void render(float worldScale)
render
in class net.minecraft.src.ModelRenderer
worldScale
- the scale of the shape. Usually is 0.0625.public void postRender(float f)
postRender
in class net.minecraft.src.ModelRenderer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |