JavaView® v2.00.008

jv.geom
Class PgTexture

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.geom.PgTexture
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PgTexture
extends PsObject

Texture image associated to a geometry. The geometry must supply texture coordinates in [0,1]*[0,1], either at vertices or for elements.

Version:
09.04.00, 1.10 revised (kp) File name added as instance variable.
00.00.98, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
PgPointSet, Serialized Form

Field Summary
protected  int m_height
          Height of texture image.
protected  java.awt.Image m_image
          Loaded texture image.
protected  java.lang.String m_imageName
          File name of texture image.
protected  int m_width
          Width of texture image.
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PgTexture()
           
 
Method Summary
 java.lang.Object clone()
          Duplicate texture by recursively cloning all instance variables except inspector panels and lists of registered listeners.
 int getHeight()
          Get height of texture image.
 java.awt.Image getImage()
          Get image of texture.
 java.lang.String getImageName()
          Get file name of texture image.
 int getWidth()
          Get width of texture image.
 void init()
          If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
 void setImage(java.awt.Image image)
          Set image of texture.
 void setImage(java.lang.String name)
          Set file name of texture image including full path or protocoll.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_imageName

protected java.lang.String m_imageName
File name of texture image.

m_image

protected java.awt.Image m_image
Loaded texture image.

m_width

protected int m_width
Width of texture image.

m_height

protected int m_height
Height of texture image.
Constructor Detail

PgTexture

public PgTexture()
Method Detail

init

public void init()
Description copied from class: PsObject
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
Overrides:
init in class PsObject

clone

public java.lang.Object clone()
Duplicate texture by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes.

Link to image is copied. image is not cloned and not nulled since class Image has no clone() method.

Overrides:
clone in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.copy(PsObject)

getImageName

public java.lang.String getImageName()
Get file name of texture image.

setImage

public void setImage(java.lang.String name)
Set file name of texture image including full path or protocoll.

getImage

public java.awt.Image getImage()
Get image of texture.

setImage

public void setImage(java.awt.Image image)
Set image of texture. If Image is null, set m_height and m_width to "-1".

getHeight

public int getHeight()
Get height of texture image.

getWidth

public int getWidth()
Get width of texture image.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.