|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.object.PsObject
jvx.project.PjWorkshop
jvx.geom.PwSimplify
Simplifies a geometry by collapsing edges. Edges to remove are selected by smallest surface error in the quadric metric following the algorithm of Heckbert and Garland.
| Field Summary | |
static int |
ABSOLUTE_SLIDER
|
int |
m_sliderType
|
static int |
PERCENT_SLIDER
|
| Fields inherited from class jv.object.PsObject |
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_TAGS |
| Constructor Summary | |
PwSimplify()
Constructor. |
|
PwSimplify(PgElementSet anElementSet)
Deprecated. use constructor prj=new PwSimplify();prj.setGeometry(geom);prj.reset(); |
|
| Method Summary | |
void |
close()
Remove all internal variables and break external links. |
void |
init()
Initialization. |
boolean |
isEnabledCheckAngles()
Determine if inner angles of triangles are checked during simplification. |
boolean |
isEnabledCheckNormals()
Check if normals of new faces are allowed to differ from old normals by more than the initial value of m_maxAngle. |
boolean |
isEnabledFlipEdges()
Determine if triangle edges are flipped before simplification. |
boolean |
isEnabledForceSimplify()
Check if other simplification criteria are allowed to be relaxed during the simplification in order to simplify down to the requested remaining number of elements. |
boolean |
isEnabledKeepBoundary()
Check if boundary points of PgElementSet are kept and not removed during simplification. |
boolean |
isEnabledKeepMarkedVertices()
Check if marked points of PgElementSet are kept and not removed during simplification. |
boolean |
isShowingNumTriangles()
Whether the number of triangles is shown in the registered display. |
void |
reset()
Remove all previously done simplification and set the workshop to its initial status. |
void |
setDisplay(PvDisplayIf disp)
Sets the display used for showing the number of triangles. |
void |
setEnabledCheckAngles(boolean flag)
Determine if inner angles of triangles are checked during simplification. |
void |
setEnabledCheckNormals(boolean flag)
Determine if normals of new faces are allowed to differ from old normals by more than the initial value of m_maxAngle. |
void |
setEnabledFlipEdges(boolean flag)
Determine if triangle edges are flipped before simplification. |
void |
setEnabledForceSimplify(boolean flag)
Determine if other simplification criteria are allowed to be relaxed during the simplification in order to simplify down to the requested remaining number of elements. |
void |
setEnabledKeepBoundary(boolean flag)
Determine if boundary points of PgElementSet are kept and not removed during simplification. |
void |
setEnabledKeepMarkedVertices(boolean flag)
Determine if marked points of PgElementSet are kept and not removed during simplification. |
void |
setGeometry(PgElementSet geom)
Register a geometry on this workshop will operate. |
void |
setSliderType(int type)
Set type of slider to PERCENT_SLIDER or ABSOLUTE_SLIDER. |
void |
showNumTriangles(boolean flag)
Whether to show the number of triangles in the registered display. |
int |
simplify()
Call simplify(#faces) or simplifyByFactor(factor) according to Slider type. |
int |
simplify(int remainElements)
Simplify the PgElementSet until it has few enough elements. |
int |
simplifyByFactor(double fac)
Reduce number of elements of a surface to a given percentage. |
boolean |
update(java.lang.Object event)
Update if workshop or slider values change. |
void |
updateSlider()
Adjust slider bounds and value to the geometry. |
| Methods inherited from class jvx.project.PjWorkshop |
cancel, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, ok, removeGeometry, setDisplays, setGeometry, setModal, setViewer |
| Methods inherited from class jv.object.PsObject |
addInspector, 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, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, getName, setParent |
| Field Detail |
public static final int PERCENT_SLIDER
public static final int ABSOLUTE_SLIDER
public int m_sliderType
| Constructor Detail |
public PwSimplify(PgElementSet anElementSet)
public PwSimplify()
| Method Detail |
public void init()
init in class PjWorkshoppublic void setGeometry(PgElementSet geom)
public void updateSlider()
public void setSliderType(int type)
public void reset()
reset in class PjWorkshoppublic void close()
close in class PjWorkshoppublic boolean isEnabledKeepBoundary()
public void setEnabledKeepBoundary(boolean flag)
public boolean isEnabledKeepMarkedVertices()
public void setEnabledKeepMarkedVertices(boolean flag)
public boolean isEnabledCheckNormals()
public void setEnabledCheckNormals(boolean flag)
public boolean isEnabledForceSimplify()
public void setEnabledForceSimplify(boolean flag)
public boolean isEnabledCheckAngles()
public void setEnabledCheckAngles(boolean flag)
public boolean isEnabledFlipEdges()
public void setEnabledFlipEdges(boolean flag)
public void setDisplay(PvDisplayIf disp)
setDisplay in interface PjWorkshopIfsetDisplay in class PjWorkshopshowNumTriangles(boolean)public void showNumTriangles(boolean flag)
setDisplay(PvDisplayIf)public boolean isShowingNumTriangles()
public int simplify()
public int simplifyByFactor(double fac)
num and the factor
0 < fac < 1 (within 0. and 1.) then the number of remaining
elements is aimed at num*val.
fac - fac between 0. and 1.
public int simplify(int remainElements)
remainElements - requested number of remaining elements.
public boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PjWorkshopevent - sender of this update.
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||