espresso3d.engine.viewport.image
Class E3DVariableSizeImage
java.lang.Object
espresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.engine.renderer.base.E3DBlendedRenderable
espresso3d.engine.renderer.base.E3DBlendedAnimatedTextureRenderable
espresso3d.engine.viewport.image.E3DImage
espresso3d.engine.viewport.image.E3DVariableSizeImage
- public class E3DVariableSizeImage
- extends E3DImage
- Author:
- Curt
A variable size image will scale itself to be the size to always fill the same amount of space
in the viewport no matter how large or small it gets.
|
Constructor Summary |
E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
E3DAnimatedTextureFrame[] animatedTextureFrames,
int animationLoops,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life)
Create a variable size image that has an animated texture |
E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
E3DAnimatedTextureFrame[] animatedTextureFrames,
int animationLoops,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life,
int blendMode)
Create a variable size image that has an animated texture |
E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
java.lang.String textureName,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life)
Construct an E3DImage that has a percentage height and width. |
E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
java.lang.String textureName,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life,
int blendMode)
Construct an E3DImage that has a percentage height and width. |
E3DVariableSizeImage(E3DVariableSizeImage toCopyImage,
java.lang.String imageID)
Create this image as a copy of another, only giving it different ID |
|
Method Summary |
E3DQuad |
getPositionedQuad()
Returns a quad in 3D space that is positioned correctly to be rendered in the correct position for 2D space
Usually used only by the engine. |
void |
scale(double scaleAmt)
Scale the widthPercentage and heightPercentage by scaleAmt |
| Methods inherited from class espresso3d.engine.viewport.image.E3DImage |
getAge, getImageID, getLife, getPosition, getQuad, getViewport, renderAtPosition, setImageID, setLife, setPosition, setQuad, setVertexColor, setViewport, translate, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
E3DVariableSizeImage
public E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
java.lang.String textureName,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life)
- Construct an E3DImage that has a percentage height and width. That means
as the viewport scales, the image will always scale with it.
This defaults the blendMode of the image to BLENDMODE_SOLID
- Parameters:
engine - imageID - textureName - position - The position the bottom left corner of the image is at in the viewport. (0,0) starts in the bottom left corner of the viewport and extends up and to the right.
E3DVariableSizeImage
public E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
java.lang.String textureName,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life,
int blendMode)
- Construct an E3DImage that has a percentage height and width. That means
as the viewport scales, the image will always scale with it.
- Parameters:
engine - imageID - textureName - position - The position the bottom left corner of the image is at in the viewport. (0,0) starts in the bottom left corner of the viewport and extends up and to the right.blendMode - The type of blending that should be used to render the object
E3DVariableSizeImage
public E3DVariableSizeImage(E3DVariableSizeImage toCopyImage,
java.lang.String imageID)
- Create this image as a copy of another, only giving it different ID
- Parameters:
toCopyImage - The image to copyimageID - A new unique imageID for this image
E3DVariableSizeImage
public E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
E3DAnimatedTextureFrame[] animatedTextureFrames,
int animationLoops,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life,
int blendMode)
- Create a variable size image that has an animated texture
- Parameters:
engine - imageID - Uniue imageID for this imageanimatedTextureFrames - Array of E3DAnimatedTextureFrame objects. Each specifying a frame of the animation for the image.animationLoops - Number of loops to animate the imageposition - 2D position (Viewport coords with (0,0) at the bottom left of the viewport)widthPercentage - Percentage of the viewport the image should fill width-wiseheightPercentage - Percentage of the viewport the image should fill height-wiselife - How long it is displayed. -1 is infiniteblendMode - One of E3DImage.RENDERMODE_ options
E3DVariableSizeImage
public E3DVariableSizeImage(E3DEngine engine,
java.lang.String imageID,
E3DAnimatedTextureFrame[] animatedTextureFrames,
int animationLoops,
E3DVector2I position,
double widthPercentage,
double heightPercentage,
int life)
- Create a variable size image that has an animated texture
- Parameters:
engine - imageID - Uniue imageID for this imageanimatedTextureFrames - Array of E3DAnimatedTextureFrame objects. Each specifying a frame of the animation for the image.animationLoops - Number of loops to animate the imageposition - 2D position (Viewport coords with (0,0) at the bottom left of the viewport)widthPercentage - Percentage of the viewport the image should fill width-wiseheightPercentage - Percentage of the viewport the image should fill height-wiselife - How long it is displayed. -1 is infinite
getPositionedQuad
public E3DQuad getPositionedQuad()
- Returns a quad in 3D space that is positioned correctly to be rendered in the correct position for 2D space
Usually used only by the engine.
- Specified by:
getPositionedQuad in class E3DImage
- Returns:
scale
public void scale(double scaleAmt)
- Scale the widthPercentage and heightPercentage by scaleAmt
- Specified by:
scale in class E3DImage
- Parameters:
scaleAmt -