jvx.geom
Class PwRefineElementSet
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.project.PjWorkshop
-
- jvx.geom.PwRefineElementSet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf
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
- Author:
- Ulrich Reitebuch
- Version:
- 20.01.15, 3.00 revised (ur) Corrected Catmull Clark weights.
23.03.03, 2.50 revised (kp) Class prepared for outside batch usage.
09.03.03, 2.00 revised (kp) Several methods names changed and synchronized.
10.03.02, 1.40 revised (ur) Sqrt(2) subdivision added.
06.03.02, 1.30 revised (ur) Method dooSabin moved from PwModel to this class.
04.03.02, 1.20 revised (ur) Sqrt(3) subdivision method added.
11.02.02, 1.10 revised (ur) Loop and Catmull-Clark subdivision added.
18.01.02, 1.00 created (ur)
-
-
Field Summary
Fields Modifier and Type Field and Description static intREFINE_BARYCENTRICstatic intREFINE_BUTTERFLYstatic intREFINE_CATMULL_CLARKstatic intREFINE_DOO_SABINstatic intREFINE_GLOBAL_INTO_FOURstatic intREFINE_LOOPstatic intREFINE_QUADRISECTIONstatic intREFINE_RIVARAstatic intREFINE_SPLIT_CENTRALstatic intREFINE_SQRT2static intREFINE_SQRT2_QUADstatic intREFINE_SQRT2_QUAD_FLATstatic intREFINE_SQRT3-
Fields inherited from class jv.object.PsObject
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
-
Fields inherited from interface jv.project.PjWorkshopIf
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
-
-
Constructor Summary
Constructors Constructor and Description PwRefineElementSet()Constructor of a refinement class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Remove all internal variables and break external links.booleanisShowingControlGrid()Show the control grid in the display.static voidquadrisection(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 voidquadrisection(PgElementSet geom, int scheme)Refine an element set by flat quadrisection to quadrilaterals or by Catmull-Clark subdivision.voidrefineBarycentric()Applies barycentric subdivision algorithm to element set.static voidrefineBarycentric(PgElementSet geom)Barycentric subdivision of a polyhedral surface.voidrefineButterfly()Applies Butterfly subdivision algorithm to element set.voidrefineCatmullClark()Applies Catmull-Clark subdivision algorithm to element set.voidrefineDooSabin()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 voidrefineDooSabin(PgElementSet geom)Cut all edges and vertices and fill the gaps with new elements.voidrefineGlobalIntoFour()This method assures, that the elementSet is suitable to be refined global into four and callsPgElementSet#refineGlobalIntoFour(boolean).static voidrefineIntoFour(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.voidrefineLoop()Applies Loop subdivision algorithm to element set.voidrefineQuadrisection()Refines each triangle into four congruent children in a 1-4 split.voidrefineQuadSqrt2()Refine the workshop's PgElementSet by Sqrt(2) Subdivision.static voidrefineQuadSqrt2(PgElementSet geom)Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) - this is a modified quad version, removing the old edges in every refinement step, so the mesh is a quadrangulation almost everywhere (at the boundary there may be triangles).static voidrefineQuadSqrt2(PgElementSet geom, int scheme)Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) - this is a modified quad version, removing the old edges in every refinement step, so the mesh is a quadrangulation almost everywhere (at the boundary there may be triangles).voidrefineQuadSqrt2Flat()Refine the workshop's PgElementSet by Sqrt(2) refinement.static voidrefineQuadSqrt2Flat(PgElementSet geom)voidrefineRivara()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.voidrefineSplitCentral()Refine the workshop's PgElementSet by Central Split.static voidrefineSplitCentral(PgElementSet geom)Refine a PgElementSet by Central Split.voidrefineSqrt2()Refine the workshop's PgElementSet by Sqrt(2) Subdivision.static voidrefineSqrt2(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.voidrefineSqrt3()Refine the workshop's PgElementSet by Sqrt(3) Subdivision.static voidrefineSqrt3(PgElementSet geom)Refine a PgElementSet by Sqrt(3) Subdivision (by Leif Kobbelt).voidreset()Remove all previously done refinements and set the workshop to its initial status.voidsetGeometry(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.voidshowControlGrid(boolean bShow)Show the control grid in the display.voidundo()Undo the last executed refinement step, and remove the entry from refinement sequence.booleanupdate(java.lang.Object event)Update the class whenever a child has changed.-
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, init, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, 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
-
REFINE_BARYCENTRIC
public static final int REFINE_BARYCENTRIC
- See Also:
- Constant Field Values
-
REFINE_SQRT2_QUAD
public static final int REFINE_SQRT2_QUAD
- See Also:
- Constant Field Values
-
REFINE_SQRT2_QUAD_FLAT
public static final int REFINE_SQRT2_QUAD_FLAT
- See Also:
- Constant Field Values
-
REFINE_SPLIT_CENTRAL
public static final int REFINE_SPLIT_CENTRAL
- 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:
updatein interfacePsUpdateIf- Overrides:
updatein classPjWorkshop- Parameters:
event- sender of this update.- Returns:
- true if update was correctly handled by superclass.
- See Also:
PsObject.setParent(PsUpdateIf),PsObject.getFather(),PsObject.addUpdateListener(PsUpdateIf)
-
reset
public void reset()
Remove all previously done refinements and set the workshop to its initial status.- Overrides:
resetin classPjWorkshop
-
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.
- Version:
- 23.07.03, 1.10 revised (kp) Require additional update.
-
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.
- Version:
- 23.07.03, 1.10 revised (kp) Require additional update.
-
close
public void close()
Remove all internal variables and break external links. Here the control grid is removed from the display.- Overrides:
closein classPjWorkshop
-
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 callsPgElementSet#refineGlobalIntoFour(boolean).- Author:
- Ulrich Reitebuch
- Version:
- 18.01.02, 1.00 created (ur)
-
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. Beware that the edge stars of the geometry will NOT be maintained..- Author:
- Ulrich Reitebuch
- Version:
- 24.10.02, 1.10 revised (ur) Select new elements, when they lay within old selected elements.
18.01.02, 1.00 created (ur)
-
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.- Author:
- Ulrich Reitebuch
- Version:
- 18.01.02, 1.00 created (ur)
-
refineButterfly
public void refineButterfly()
Applies Butterfly subdivision algorithm to element set.- Author:
- Konrad Polthier
- Version:
- 09.05.03, 1.00 created (kp)
-
refineLoop
public void refineLoop()
Applies Loop subdivision algorithm to element set.- Author:
- Konrad Polthier
- Version:
- 09.05.03, 1.00 created (kp)
-
refineBarycentric
public void refineBarycentric()
Applies barycentric subdivision algorithm to element set.- Author:
- Konrad Polthier
- Version:
- 16.01.09, 1.00 created (kp)
-
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.- Author:
- Ulrich Reitebuch
- Version:
- 13.11.08, 1.10 revised (ur) Loop subdivision now blends vertex textures like the geometry coordinates.
18.01.02, 1.00 created (ur)
-
refineBarycentric
public static void refineBarycentric(PgElementSet geom)
Barycentric subdivision of a polyhedral surface. Each k-polygon is linearly split into 2k triangles. New vertices are introduced at edge midpoints and centers of gravity of elements.- Author:
- Konrad Polthier
- Version:
- 16.01.09, 1.00 revised (kp)
16.01.09, 1.00 created (kp) Based on quadrisection().
-
refineQuadrisection
public void refineQuadrisection()
Refines each triangle into four congruent children in a 1-4 split.- Author:
- Konrad Polthier
- Version:
- 09.05.03, 1.00 created (kp)
-
refineCatmullClark
public void refineCatmullClark()
Applies Catmull-Clark subdivision algorithm to element set.- Author:
- Konrad Polthier
- Version:
- 09.05.03, 1.00 created (kp)
-
quadrisection
public static void quadrisection(PgElementSet geom, int scheme)
Refine an element set by flat quadrisection to quadrilaterals or by Catmull-Clark subdivision.- Author:
- Ulrich Reitebuch
- Version:
- 29.01.15, 2.00 revised (ur) Corrected Catmull Clark weights.
11.03.02, 1.10 revised (ur) Avoid call of PgVertexStar.makeVertexStar with argument -1.
11.02.02, 1.00 created (ur)
-
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.- Author:
- Ulrich Reitebuch
- Version:
- 11.02.02, 1.00 created (ur)
-
refineSqrt3
public void refineSqrt3()
Refine the workshop's PgElementSet by Sqrt(3) Subdivision.- Author:
- Ulrich Reitebuch
- Version:
- 22.02.02, 1.00 created (ur)
-
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.- Author:
- Ulrich Reitebuch
- Version:
- 22.02.02, 1.00 created (ur)
-
refineDooSabin
public static void refineDooSabin(PgElementSet geom)
Cut all edges and vertices and fill the gaps with new elements. Each edge gets replaced by a quadrilateral, original elements get shrunk and new n-gonal faces are inserted at vertices with n original faces touching. The limit surface is C1 continuous.- Author:
- Ulrich Reitebuch
- Version:
- 09.05.03, 1.60 revised (kp) Renamed to refineDooSabin from dooSabin.
16.12.02, 1.50 revised (ur) Texture handling improved.
11.03.02, 1.40 revised (ur) Avoid call of PgVertexStar.makeVertexStar with argument -1.
06.03.02, 1.30 revised (ur) Moved from PwModel to PwRefineELementSet.
24.09.01, 1.20 revised (ur) Adjust Vector Fields.
20.09.01, 1.10 revised (ur) Adjust Element Textures.
06.06.01, 1.00 created (ur).
-
refineSqrt2
public void refineSqrt2()
Refine the workshop's PgElementSet by Sqrt(2) Subdivision.- Author:
- Ulrich Reitebuch
- Version:
- 09.05.03, 1.10 revised (kp) Renamed to refineSqrt2 from sqrt2Subdivision.
10.03.02, 1.00 created (ur).
-
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.- Author:
- Ulrich Reitebuch
- Version:
- 09.05.03, 1.40 revised (kp) Renamed to refineSqrt2 from sqrt2Subdivision.
16.12.02, 1.30 revised (ur) Handling of element based texture improved.
29.04.02, 1.20 revised (ur) Bug in neighbourhoods removed.
23.04.02, 1.10 revised (ur) Bugs in handling boundary vertices removed.
10.03.02, 1.00 created (ur).
-
refineQuadSqrt2
public void refineQuadSqrt2()
Refine the workshop's PgElementSet by Sqrt(2) Subdivision.- Author:
- Ulrich Reitebuch
- Version:
- 30.09.09, 1.00 created (ur).
-
refineQuadSqrt2Flat
public void refineQuadSqrt2Flat()
Refine the workshop's PgElementSet by Sqrt(2) refinement.- Author:
- Ulrich Reitebuch
- Version:
- 30.09.09, 1.00 created (ur).
-
refineQuadSqrt2Flat
public static void refineQuadSqrt2Flat(PgElementSet geom)
-
refineQuadSqrt2
public static void refineQuadSqrt2(PgElementSet geom)
Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) - this is a modified quad version, removing the old edges in every refinement step, so the mesh is a quadrangulation almost everywhere (at the boundary there may be triangles). The limit surface is C4 continuous, C1 at extraordinary vertices.- Author:
- Ulrich Reitebuch
- Version:
- 30.09.09, 1.00 created (ur).
-
refineQuadSqrt2
public static void refineQuadSqrt2(PgElementSet geom, int scheme)
Refine a PgElementSet by Sqrt(2) (or 4-8) Subdivision (by Luiz Velho and Denis Zorin) - this is a modified quad version, removing the old edges in every refinement step, so the mesh is a quadrangulation almost everywhere (at the boundary there may be triangles). The limit surface is C4 continuous, C1 at extraordinary vertices.- Author:
- Ulrich Reitebuch
- Version:
- 30.09.09, 1.00 created (ur).
-
refineSplitCentral
public static void refineSplitCentral(PgElementSet geom)
Refine a PgElementSet by Central Split.- Author:
- Ulrich Reitebuch
- Version:
- 01.10.09, 1.00 created (ur).
-
refineSplitCentral
public void refineSplitCentral()
Refine the workshop's PgElementSet by Central Split.- Author:
- Ulrich Reitebuch
- Version:
- 01.10.09, 1.00 created (ur).
-
-
"