espresso3d.engine.viewport.image
Class E3DFixedSizeImage

java.lang.Object
  extended byespresso3d.engine.base.E3DEngineItem
      extended byespresso3d.engine.renderer.base.E3DRenderable
          extended byespresso3d.engine.renderer.base.E3DTexturedRenderable
              extended byespresso3d.engine.renderer.base.E3DAnimatedTextureRenderable
                  extended byespresso3d.engine.viewport.image.E3DImage
                      extended byespresso3d.engine.viewport.image.E3DFixedSizeImage

public class E3DFixedSizeImage
extends E3DImage

Author:
Curt A fixed size image is a type of image that will always be the same size no matter how large or small the viewport and window are

Constructor Summary
E3DFixedSizeImage(E3DEngine engine, java.lang.String imageID, E3DAnimatedTextureFrame[] animatedTextureFrames, int animationLoops, E3DVector2I position, int width, int height, int life)
          Create a fixed size image that has an animated texture
E3DFixedSizeImage(E3DEngine engine, java.lang.String imageID, E3DAnimatedTextureFrame[] animatedTextureFrames, int animationLoops, E3DVector2I position, int width, int height, int life, int blendMode)
          Create a fixed size image that has an animated texture
E3DFixedSizeImage(E3DEngine engine, java.lang.String imageID, java.lang.String textureName, E3DVector2I position, int width, int height, int life)
          Construct an E3DImage that has a static width.
E3DFixedSizeImage(E3DEngine engine, java.lang.String imageID, java.lang.String textureName, E3DVector2I position, int width, int height, int life, int blendMode)
          Construct an E3DImage that has a static width.
E3DFixedSizeImage(E3DFixedSizeImage toCopyImage, java.lang.String imageID)
          Create this image as a copy of another, only giving it different ID
 
Method Summary
 int getHeight()
          Return the number of pixels high the image is
 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.
 int getWidth()
          Return the number of pixels wide the image is
 void scale(double scaleAmt)
          Multiply the width and height by a scalar
 void setHeight(int height)
          Set the height of the image
 void setWidth(int width)
          Set the width of the image
 
Methods inherited from class espresso3d.engine.viewport.image.E3DImage
getAge, getImageID, getLife, getPosition, getQuad, getViewport, render, setImageID, setLife, setPosition, setQuad, setVertexColor, setViewport, translate, update
 
Methods inherited from class espresso3d.engine.renderer.base.E3DAnimatedTextureRenderable
getAnimatedTexture, setAnimatedTexture
 
Methods inherited from class espresso3d.engine.renderer.base.E3DTexturedRenderable
getKey, getTexture, getTextureDetail0, getTextureDetail1, isTextureAvailable, isTextureDetail0Available, isTextureDetail1Available, setTexture, setTextureDetail0, setTextureDetail1
 
Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable
getBlendMode, getRenderMode, initCorrectGeometryRenderer, isKeyChanged, setBlendMode, setKeyChanged, setRenderMode
 
Methods inherited from class espresso3d.engine.base.E3DEngineItem
getEngine, setEngine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

E3DFixedSizeImage

public E3DFixedSizeImage(E3DEngine engine,
                         java.lang.String imageID,
                         java.lang.String textureName,
                         E3DVector2I position,
                         int width,
                         int height,
                         int life)
Construct an E3DImage that has a static width. Defaults blending to BLENDMODE_SOLID

Parameters:
engine -
imageID -
textureName -
position - Position the iamge will be at starting at 0,0 in the lower left corner of the window and extending up and left
width - Width from x going to the right
height - Height form y going up

E3DFixedSizeImage

public E3DFixedSizeImage(E3DEngine engine,
                         java.lang.String imageID,
                         java.lang.String textureName,
                         E3DVector2I position,
                         int width,
                         int height,
                         int life,
                         int blendMode)
Construct an E3DImage that has a static width.

Parameters:
engine -
imageID -
textureName -
position - Position the iamge will be at starting at 0,0 in the lower left corner of the window and extending up and left
width - Width from x going to the right
height - Height form y going up
blendMode - The type of blending that should be used to render the object

E3DFixedSizeImage

public E3DFixedSizeImage(E3DFixedSizeImage toCopyImage,
                         java.lang.String imageID)
Create this image as a copy of another, only giving it different ID

Parameters:
toCopyImage - The image to copy
imageID - A new unique imageID for this image

E3DFixedSizeImage

public E3DFixedSizeImage(E3DEngine engine,
                         java.lang.String imageID,
                         E3DAnimatedTextureFrame[] animatedTextureFrames,
                         int animationLoops,
                         E3DVector2I position,
                         int width,
                         int height,
                         int life,
                         int blendMode)
Create a fixed size image that has an animated texture

Parameters:
engine -
imageID - Uniue imageID for this image
animatedTextureFrames - Array of E3DAnimatedTextureFrame objects. Each specifying a frame of the animation for the image.
animationLoops - Number of loops to animate the image
position - 2D position (Viewport coords with (0,0) at the bottom left of the viewport)
width - How many pixels wide to make it
height - How many pixels high to make it
life - How long it is displayed. -1 is infinite
blendMode - One of E3DImage.RENDERMODE_ options

E3DFixedSizeImage

public E3DFixedSizeImage(E3DEngine engine,
                         java.lang.String imageID,
                         E3DAnimatedTextureFrame[] animatedTextureFrames,
                         int animationLoops,
                         E3DVector2I position,
                         int width,
                         int height,
                         int life)
Create a fixed size image that has an animated texture

Parameters:
engine -
imageID - Uniue imageID for this image
animatedTextureFrames - Array of E3DAnimatedTextureFrame objects. Each specifying a frame of the animation for the image.
animationLoops - Number of loops to animate the image
position - 2D position (Viewport coords with (0,0) at the bottom left of the viewport)
width - How many pixels wide to make it
height - How many pixels high to make it
life - How long it is displayed. -1 is infinite
Method Detail

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)
Multiply the width and height by a scalar

Specified by:
scale in class E3DImage
Parameters:
scaleAmt -

getHeight

public int getHeight()
Return the number of pixels high the image is

Returns:

setHeight

public void setHeight(int height)
Set the height of the image

Parameters:
height -

getWidth

public int getWidth()
Return the number of pixels wide the image is

Returns:

setWidth

public void setWidth(int width)
Set the width of the image

Parameters:
width -