public class PwUnfold extends PjWorkshop implements PsTimeListenerIf, java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static int |
WEIGHT_BY_SELECTION
Compute unfolding respecting which are edges selected by the user.
|
static int |
WEIGHT_EDGELENGTH
Compute unfolding respecting the length of the edges.
|
static int |
WEIGHT_ELEMENTINDEX
Compute unfolding respecting at each interior edge the absolute
of the difference of the two adjacent 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_TAGS
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwUnfold()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stop any animation and restore the geometry to its original state.
|
void |
fitGeometry(boolean flag)
Enable/Disable fitting of geometry to the display after each step
of the animation.
|
void |
flatten(double d)
Incrementally flatten the registered geometry.
|
PsAnimation |
getAnimation()
Get the animation of the unfolding.
|
int |
getFixedElement()
Get index of element to be fixed.
|
int |
getWeight()
Get the weight used to compute the unfolding.
|
boolean |
hasAnimation()
Check if the animation is available.
|
boolean |
improveUnfolding()
Method to reduce the number of components the unfolding consists of.
|
void |
init()
Initialization.
|
boolean |
isEnabledFixingElement()
Check if freezing of the position of one element while the animation runs is enabled.
|
boolean |
isFittingGeometry()
Check if fitting of geometry to the display after each step
of the animation is enabled.
|
boolean |
isRunning()
Check whether smoothing prcess will be stopped.
|
boolean |
isShowingSplices()
Check visibility of splices along cuts of the flattened surface.
|
boolean |
isStopped()
Check whether smoothing prcess is currently NOT running a thread.
|
void |
ok()
Accept current version of the geometry as new version.
|
void |
refold()
Refold the geometry to its original position.
|
void |
reset()
Reset workshop and geometry to original state.
|
void |
run() |
void |
setAnimation(PsAnimation anim)
Register an animation to the workshop.
|
void |
setEnabledFixingElement(boolean flag)
Enable/Disable freezing of the position of one element while the animation runs.
|
void |
setFixedElement(int anIndex)
Give index of element to be fixed.
|
void |
setGeometry(PgElementSet geom)
Set geometry to work on.
|
boolean |
setTime(PsTimeEvent timeEvent)
Set the time of the animation.
|
void |
setWeight(int weight)
Set the weight used to compute the unfolding.
|
void |
showPolygonSet(boolean bShow)
Add a polygonSet to the display.
|
void |
showSplices(boolean flag)
Enable visibility of splices along cuts of the flattened surface.
|
void |
start()
Start smoothing in separate thread.
|
void |
stop()
Stop smoothing in separate thread.
|
void |
storeEdges()
Store the cutting edges to the geometry.
|
void |
unfold()
Unfold the actual geometry.
|
void |
unselectAllEdges()
Unselect all edges.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, openDialog, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getFather, getName, setParent
public static final int WEIGHT_EDGELENGTH
public static final int WEIGHT_ELEMENTINDEX
public static final int WEIGHT_BY_SELECTION
public void init()
init
in class PjWorkshop
public void reset()
reset
in class PjWorkshop
public void ok()
ok
in class PjWorkshop
public void cancel()
cancel
in class PjWorkshop
public boolean update(java.lang.Object event)
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void setGeometry(PgElementSet geom)
geom
- Geometry will be unfolded.public void showPolygonSet(boolean bShow)
public void unselectAllEdges()
public void setWeight(int weight)
public int getWeight()
public void flatten(double d)
d
- parameter in [0,1] describes the flattening state.public void storeEdges()
public void setEnabledFixingElement(boolean flag)
public boolean isEnabledFixingElement()
public void setFixedElement(int anIndex)
isEnabledFixingElement()
,
getFixedElement()
public int getFixedElement()
isEnabledFixingElement()
,
setFixedElement(int)
public void fitGeometry(boolean flag)
isFittingGeometry()
public boolean isFittingGeometry()
fitGeometry(boolean)
public boolean isShowingSplices()
public void showSplices(boolean flag)
Note, splices are only visible if the model is fully flattened. During all other states splices are automatically switched off.
public void unfold()
refold()
public void refold()
unfold()
public PsAnimation getAnimation()
getAnimation
in interface PsTimeListenerIf
PsAnimation
,
PsTimeListenerIf
public boolean hasAnimation()
hasAnimation
in interface PsTimeListenerIf
PsAnimation
,
PsTimeListenerIf
public void setAnimation(PsAnimation anim)
setAnimation
in interface PsTimeListenerIf
PsAnimation
,
PsTimeListenerIf
public boolean setTime(PsTimeEvent timeEvent)
setTime
in interface PsTimeListenerIf
PsAnimation
,
PsTimeListenerIf
public boolean improveUnfolding()
public boolean isRunning()
public boolean isStopped()
public void start()
stop()
public void stop()
start()
public void run()
run
in interface java.lang.Runnable
"