JavaView© v3.95.000

jvx.geom
Class PwRefineElementSet

java.lang.Object
  extended byjv.object.PsObject
      extended byjvx.project.PjWorkshop
          extended byjvx.geom.PwRefineElementSet
All Implemented Interfaces:
java.lang.Cloneable, PjWorkshopIf, PsUpdateIf, java.io.Serializable

public class PwRefineElementSet
extends PjWorkshop

Workshop provides several subdivision algorithms to refine an element set.

List of performed subdivision steps is stored which allows to recalculate the subdivision when the control grid is changed.

Undo of one or more recent subdivision steps is possible.

See Also:
Serialized Form

Field Summary
static int REFINE_BUTTERFLY
           
static int REFINE_CATMULL_CLARK
           
static int REFINE_DOO_SABIN
           
static int REFINE_GLOBAL_INTO_FOUR
           
static int REFINE_LOOP
           
static int REFINE_QUADRISECTION
           
static int REFINE_RIVARA
           
static int REFINE_SQRT2
           
static int REFINE_SQRT3
           
 
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
PwRefineElementSet()
          Constructor of a refinement class.
 
Method Summary
 void close()
          Remove all internal variables and break external links.
 boolean isShowingControlGrid()
          Show the control grid in the display.
static void quadrisection(PgElementSet geom, boolean bInsertMidPoints)
          Cut all elements into quadrilaterals, each touching two edge mid points, the element mid point and one original vertex of the element.
static void quadrisection(PgElementSet geom, int scheme)
          Refine an element set by flat quadrisection to quadrilaterals or by Catmull-Clark subdivision.
 void refineButterfly()
          Applies Butterfly subdivision algorithm to element set.
 void refineCatmullClark()
          Applies Catmull-Clark subdivision algorithm to element set.
 void refineDooSabin()
          This method assures, that the elementSet is suitable to be refined by the Doo-Sabin algorithm and calls refineDooSabin refinement for the workshop's PgElementSet.
static void refineDooSabin(PgElementSet geom)
          Cut all edges and vertices and fill the gaps with new elements.
 void refineGlobalIntoFour()
          This method assures, that the elementSet is suitable to be refined global into four and calls PgElementSet#refineGlobalIntoFour(boolean).
static void refineIntoFour(PgElementSet geom, int scheme)
          This method assures, that the elementSet is suitable to be refined global into four; The positions of new vertices are computed upon the old connectivity, afterwards the new connectivity is generated by PgElementSet.refineGlobalIntoFour.
 void refineLoop()
          Applies Loop subdivision algorithm to element set.
 void refineQuadrisection()
          Refines each triangle into four congruent children in a 1-4 split.
 void refineRivara()
          This method assures, that the elementSet is suitable to be refined by the Rivara algorithm and refines all elements marked with the tag PsObject.IS_SELECTED.
 void refineSqrt2()
          Refine the workshop's PgElementSet by Sqrt(2) Subdivision.
static void refineSqrt2(PgElementSet geom)
          Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) The limit surface is C4 continuous, C1 at extraordinary vertices.
 void refineSqrt3()
          Refine the workshop's PgElementSet by Sqrt(3) Subdivision.
static void refineSqrt3(PgElementSet geom)
          Refine a PgElementSet by Sqrt(3) Subdivision (by Leif Kobbelt).
 void reset()
          Remove all previously done refinements and set the workshop to its initial status.
 void setGeometry(PgElementSet geom)
          Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control grid for the refined geometry.
 void showControlGrid(boolean bShow)
          Show the control grid in the display.
 void undo()
          Undo the last executed refinement step, and remove the entry from refinement sequence.
 boolean update(java.lang.Object event)
          Update the class whenever a child has changed.
 
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, init, isModal, ok, removeGeometry, setDisplay, 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

REFINE_GLOBAL_INTO_FOUR

public static final int REFINE_GLOBAL_INTO_FOUR
See Also:
Constant Field Values

REFINE_RIVARA

public static final int REFINE_RIVARA
See Also:
Constant Field Values

REFINE_DOO_SABIN

public static final int REFINE_DOO_SABIN
See Also:
Constant Field Values

REFINE_BUTTERFLY

public static final int REFINE_BUTTERFLY
See Also:
Constant Field Values

REFINE_QUADRISECTION

public static final int REFINE_QUADRISECTION
See Also:
Constant Field Values

REFINE_CATMULL_CLARK

public static final int REFINE_CATMULL_CLARK
See Also:
Constant Field Values

REFINE_LOOP

public static final int REFINE_LOOP
See Also:
Constant Field Values

REFINE_SQRT3

public static final int REFINE_SQRT3
See Also:
Constant Field Values

REFINE_SQRT2

public static final int REFINE_SQRT2
See Also:
Constant Field Values
Constructor Detail

PwRefineElementSet

public PwRefineElementSet()
Constructor of a refinement class.

Method Detail

setGeometry

public void setGeometry(PgElementSet geom)
Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control grid for the refined geometry.


update

public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.

Specified by:
update in interface PsUpdateIf
Overrides:
update in class PjWorkshop
Parameters:
event - sender of this update.
Returns:
true if update was correctly handled by superclass.

reset

public void reset()
Remove all previously done refinements and set the workshop to its initial status.

Overrides:
reset in class PjWorkshop

isShowingControlGrid

public boolean isShowingControlGrid()
Show the control grid in the display. Add this workshop as update listener of the control grid.

Must update this workshop to see the effect.


showControlGrid

public void showControlGrid(boolean bShow)
Show the control grid in the display. Add this workshop as update listener of the control grid.

Must update this workshop to see the effect.


close

public void close()
Remove all internal variables and break external links. Here the control grid is removed from the display.

Overrides:
close in class PjWorkshop

undo

public void undo()
Undo the last executed refinement step, and remove the entry from refinement sequence.


refineGlobalIntoFour

public void refineGlobalIntoFour()
This method assures, that the elementSet is suitable to be refined global into four and calls PgElementSet#refineGlobalIntoFour(boolean).


refineRivara

public void refineRivara()
This method assures, that the elementSet is suitable to be refined by the Rivara algorithm and refines all elements marked with the tag PsObject.IS_SELECTED.


refineDooSabin

public void refineDooSabin()
This method assures, that the elementSet is suitable to be refined by the Doo-Sabin algorithm and calls refineDooSabin refinement for the workshop's PgElementSet.


refineButterfly

public void refineButterfly()
Applies Butterfly subdivision algorithm to element set.


refineLoop

public void refineLoop()
Applies Loop subdivision algorithm to element set.


refineIntoFour

public static void refineIntoFour(PgElementSet geom,
                                  int scheme)
This method assures, that the elementSet is suitable to be refined global into four; The positions of new vertices are computed upon the old connectivity, afterwards the new connectivity is generated by PgElementSet.refineGlobalIntoFour.


refineQuadrisection

public void refineQuadrisection()
Refines each triangle into four congruent children in a 1-4 split.


refineCatmullClark

public void refineCatmullClark()
Applies Catmull-Clark subdivision algorithm to element set.


quadrisection

public static void quadrisection(PgElementSet geom,
                                 int scheme)
Refine an element set by flat quadrisection to quadrilaterals or by Catmull-Clark subdivision.


quadrisection

public static void quadrisection(PgElementSet geom,
                                 boolean bInsertMidPoints)
Cut all elements into quadrilaterals, each touching two edge mid points, the element mid point and one original vertex of the element.


refineSqrt3

public void refineSqrt3()
Refine the workshop's PgElementSet by Sqrt(3) Subdivision.


refineSqrt3

public static void refineSqrt3(PgElementSet geom)
Refine a PgElementSet by Sqrt(3) Subdivision (by Leif Kobbelt). The limit surface is C2 continuous, except at extraordinary vertices, where it is C1 continuous.


refineDooSabin

public static void refineDooSabin(PgElementSet geom)
Cut all edges and vertices and fill the gaps with new elements. Each edge gets replaced ba a quadrilateral, original elements get shrinked and new n-gonal faces are inserted at vertices with n original faces touching. The limit surface is C1 continuous.


refineSqrt2

public void refineSqrt2()
Refine the workshop's PgElementSet by Sqrt(2) Subdivision.


refineSqrt2

public static void refineSqrt2(PgElementSet geom)
Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) The limit surface is C4 continuous, C1 at extraordinary vertices.


JavaView© v3.95.000

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