public class PwTexture extends PjWorkshop
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
m_defDijkstraTexture
Default texture for triangular elements.
|
static java.lang.String |
m_defQuadTexture
Default texture for quadrilateral and higher elements.
|
static java.lang.String |
m_defTriTexture
Default texture for triangular elements.
|
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGSMODE_BUG, MODE_STANDARD, MODE_VALIDATE| Constructor and Description |
|---|
PwTexture()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
burn()
Burns surface colors to a new texture image using element textures.
|
int |
getLicSize()
Get length of the longest edge of triangles in texture domain.
|
void |
init()
Resets all properties to default values.
|
static void |
makeDijkstraTexture(PgElementSet geom)
Generate element texture showing lines through all mid points
of edges with different Dijkstra values at their ends.
|
static double[] |
makeElementTextureCoords(PgElementSet geom,
int maxwidth)
Calculates element texture coordinates for triangulation.
|
static void |
makePatchTexture(PgElementSet geom)
Assign same texture image to each element of a geometry.
|
static void |
makeThresholdTexture(PgElementSet geom,
PdVector[] value,
double[] threshold)
Generate element texture by two sets of scalar data per vertex and two thresholds.
|
static void |
makeThresholdTexture(PgElementSet geom,
PdVector value,
double threshold)
Generate element texture by scalar data per vertex and a threshold value.
|
void |
setGeometry(PgElementSet geom)
Assign an element set which must be a triangulation.
|
void |
setLicSize(int size)
Set length of the longest edge of triangles in texture domain.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, reset, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setVieweraddInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanelsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFather, getName, setParentpublic static java.lang.String m_defQuadTexture
public static java.lang.String m_defTriTexture
public static java.lang.String m_defDijkstraTexture
public void init()
init in class PjWorkshoppublic void setGeometry(PgElementSet geom)
Geometry is triangulated if it is no triangulation.
geom - may be null to indicate that the geometry shall be removed from this workshop.public boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PjWorkshopevent - sender of this update.PsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public static void makePatchTexture(PgElementSet geom)
Method assigns a texture to the geometry if not available.
Texture image is either set to PwTexture#m_defTriTexture
for triangulations, or to PwTexture#m_defQuadTexture.
public static void makeDijkstraTexture(PgElementSet geom)
Method assigns a texture to the geometry if not available.
Texture image is set to PwTexture#m_defDijkstraTexture.
public static void makeThresholdTexture(PgElementSet geom, PdVector value, double threshold)
Method assigns a texture to the geometry if not available.
// * Texture image is set to PwTexture#m_defDijkstraTexture.
public static void makeThresholdTexture(PgElementSet geom, PdVector[] value, double[] threshold)
The value and threshold arrays should have size 2.
Method assigns a texture to the geometry if not available.
// * Texture image is set to PwTexture#m_defDijkstraTexture.
public int getLicSize()
burn()public void setLicSize(int size)
burn()public void burn()
Methods requires an assigned elementSet and a display.
HACK: Vertical gap between triangle rows is currently determined by static variable VGAP.
public static double[] makeElementTextureCoords(PgElementSet geom, int maxwidth)
geom - triangulationmaxwidth - length of the longest edge of triangles in texture domain"