Package mgui.interfaces.shapes.util
Class Image2DTexture
java.lang.Object
mgui.interfaces.shapes.util.Image2DTexture
public class Image2DTexture
extends java.lang.Object
Creates a Texture2D object from a given image.
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description float
height_ratio
float
width_ratio
-
Constructor Summary
Constructors Constructor Description Image2DTexture()
Image2DTexture(java.awt.image.BufferedImage image)
Image2DTexture(java.awt.image.BufferedImage image, boolean hasAlpha)
-
Method Summary
Modifier and Type Method Description org.jogamp.vecmath.TexCoord2f[]
getTexCoords()
org.jogamp.java3d.Texture2D
getTexture()
void
setTexture(java.awt.image.BufferedImage image, boolean hasAlpha)
Sets the texture for this object from an image.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
width_ratio
public float width_ratio -
height_ratio
public float height_ratio
-
-
Constructor Details
-
Image2DTexture
public Image2DTexture() -
Image2DTexture
public Image2DTexture(java.awt.image.BufferedImage image) -
Image2DTexture
public Image2DTexture(java.awt.image.BufferedImage image, boolean hasAlpha)
-
-
Method Details
-
setTexture
public void setTexture(java.awt.image.BufferedImage image, boolean hasAlpha)Sets the texture for this object from an image.- Parameters:
image
- BufferedImage with which to set this texture
-
getTexture
public org.jogamp.java3d.Texture2D getTexture() -
getTexCoords
public org.jogamp.vecmath.TexCoord2f[] getTexCoords()
-