|
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.PwUnfold
Workshop for unfolding of geometries. Unfolding is animatable. Optionally tabs that help to create a paper model of the geometry can be generated.
| Field Summary | |
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. |
| 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 | |
PwUnfold()
Constructor. |
|
| Method Summary | |
void |
cancel()
Stop any animation and restore the geometry to its original state. |
void |
dragDisplay(PvPickEvent pos)
Drag a location in the display with 2d display and 3d world coordinates. |
void |
dragInitial(PvPickEvent pos)
Drag an arbitrary point along a geometry, point may lie inside an element. |
void |
dragVertex(PgGeometryIf geom,
int index,
PdVector vertex)
Drag a picked vertex of a geometry. |
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 |
markVertices(PvPickEvent pos)
Mark a set of vertices of a geometry within a given bounding box. |
void |
ok()
Accept current version of the geometry as new version. |
void |
pickDisplay(PvPickEvent pos)
Get a location in the display with 2d display and 3d world coordinates. |
void |
pickInitial(PvPickEvent pos)
Pick an arbitrary point on a geometry, point may lie inside an element. |
void |
pickVertex(PgGeometryIf geom,
int index,
PdVector vertex)
Get a picked vertex of a geometry. |
void |
refold()
Refold the geometry to its original position. |
void |
reset()
Reset workshop and geometry to original state. |
void |
run()
|
void |
selectGeometry(PgGeometryIf geom)
Currently not supported by display. |
void |
setAnimation(PsAnimation anim)
Register an animation to the workshop. |
void |
setDisplay(PvDisplayIf disp)
Set the active display when this workshop was launched. |
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 be worked on. |
boolean |
setTime(PsTimeEvent timeEvent)
Set the time of the animation. |
void |
setWeight(int weight)
Set the weight used to compute the unfolding. |
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 |
unfold()
Unfold the actual geometry. |
void |
unmarkVertices(PvPickEvent pos)
Unmark a set of vertices of a geometry within a given bounding box. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class jvx.project.PjWorkshop |
close, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, 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.anim.PsTimeListenerIf |
getName |
| Methods inherited from interface jv.project.PvPickListenerIf |
getName |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, getName, setParent |
| Field Detail |
public static final int WEIGHT_EDGELENGTH
public static final int WEIGHT_ELEMENTINDEX
| Constructor Detail |
public PwUnfold()
| Method Detail |
public void init()
init in class PjWorkshoppublic void reset()
reset in class PjWorkshoppublic void ok()
ok in class PjWorkshoppublic void cancel()
cancel in class PjWorkshoppublic boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PjWorkshopevent - sender of this update.
public void setGeometry(PgElementSet geom)
geom - geometry will be unfolded.public void setDisplay(PvDisplayIf disp)
PjWorkshop
setDisplay in interface PjWorkshopIfsetDisplay in class PjWorkshoppublic void setWeight(int weight)
public int getWeight()
public void flatten(double d)
d - parameter in [0,1] describes the flattening state.public void setEnabledFixingElement(boolean flag)
isEnabledFixingElement(),
setFixedElement(int),
getFixedElement()public boolean isEnabledFixingElement()
setEnabledFixingElement(boolean),
setFixedElement(int),
getFixedElement()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 PsTimeListenerIfPsAnimation,
PsTimeListenerIfpublic boolean hasAnimation()
hasAnimation in interface PsTimeListenerIfPsAnimation,
PsTimeListenerIfpublic void setAnimation(PsAnimation anim)
setAnimation in interface PsTimeListenerIfPsAnimation,
PsTimeListenerIfpublic boolean setTime(PsTimeEvent timeEvent)
setTime in interface PsTimeListenerIfPsAnimation,
PsTimeListenerIfpublic boolean improveUnfolding()
public boolean isRunning()
public boolean isStopped()
public void start()
stop()public void stop()
start()public void run()
run in interface java.lang.Runnablepublic void selectGeometry(PgGeometryIf geom)
selectGeometry in interface PvPickListenerIfpublic void pickDisplay(PvPickEvent pos)
pickDisplay in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void dragDisplay(PvPickEvent pos)
dragDisplay in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void pickInitial(PvPickEvent pos)
pickInitial in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void dragInitial(PvPickEvent pos)
dragInitial in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIf
public void pickVertex(PgGeometryIf geom,
int index,
PdVector vertex)
pickVertex in interface PvPickListenerIfgeom - Picked geometry on which vertex liesindex - Index of vertex in vertex array of geometryvertex - 3d coordinates of vertex positionPvPickListenerIf
public void dragVertex(PgGeometryIf geom,
int index,
PdVector vertex)
dragVertex in interface PvPickListenerIfgeom - Picked geometry on which vertex liesindex - Index of vertex in vertex array of geometryvertex - 3d coordinates of vertex positionpublic void markVertices(PvPickEvent pos)
markVertices in interface PvPickListenerIfpos - contains four coplanar points on the bounding prism, and direction of prism.PvPickEvent.getMarkBox()public void unmarkVertices(PvPickEvent pos)
unmarkVertices in interface PvPickListenerIfpos - contains four coplanar points on the bounding prism, and direction of prism.PvPickEvent.getMarkBox()
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||