jvx.volume
Class PwCubeSet
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.project.PjWorkshop
-
- jvx.volume.PwCubeSet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf
public class PwCubeSet extends PjWorkshop
Workshop for operations on a cube set.- See Also:
- Serialized Form
- Author:
- Ulrich Reitebuch
- Version:
- 09.03.15, 2.00 revised (kp) Moved to jvx.volume from dev.volume.
20.05.10, 1.00 created (ur).
-
-
Field Summary
Fields Modifier and Type Field and Description static int[][]FACE_AT_EDGEbooleanm_bAddBoundaryElementSetbooleanm_bAddCubeAlignedFrameFieldbooleanm_bAddRotationFieldbooleanm_bAddTetAlignedFrameFieldbooleanm_bAddTexturePerCubebooleanm_bOrthonormalizeFramebooleanm_bRefineBeforeSplittingstatic intm_refineToEightTypeintm_tetSplittingModestatic intSPLIT_PARALLELstatic intSPLIT_STARstatic intSPLIT_TO_SIXstatic intSPLIT_TO_TWELVE-
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 PwCubeSet()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static PgVectorField[]addAlignedFrameField(PgCubeSet cubeSet, boolean addFieldsToGeometry)Add an edge aligned frame field to the given PgCubeSet.static voidaddBoundaryLayer(PgCubeSet cubeSet)Add a boundary layer to a cubeSet.static PgVectorField[]addFrameByCubeEdges(PgTetraSet tetraSet, boolean addFieldsToGeometry)Add a frame to a PgTetraSet, that was generated from a cubve set by the splitToTetrahedra method.static PgVectorField[]addFrameByCubeEdges12(PgTetraSet tetraSet, boolean addFieldsToGeometry)Add a frame to a PgTetraSet, that was generated from a cube set by the splitTo12Tetrahedra method.static voidaddTexturePerCube(PgCubeSet cubeSet)Map all cubes to the unit cube in texture space.static double[]computeAllCubeVolumes(PgCubeSet cubeSet)Compute all cube volumes.static double[]computeAllDihedralAngles(PgCubeSet cubeSet)Compute all dihedral angles in the cube mesh.static double[]computeAllEdgeLengths(PgCubeSet cubeSet)Compute a list of all edge lengths.static PdVectorcomputeCubeDihedralAngles(PgCubeSet cubeSet, int cubeIndex)Compute all dihedral angles of a cube.static doublecomputeCubeVolume(PgCubeSet cubeSet, int cubeIndex)Compute he volume of a single cube.static PgEdgeStarcomputeEdgeStar(PgCubeSet cubeSet, int cubeIndex, int edgeIndex, PgEdgeStar edgeStar)Compute the edge star.static PgVectorFieldcomputeRotationField(PgCubeSet cubeSet, boolean bAddField)Compute a VectorField, which indicates for each Cube the combinatorial frame rotations to its neighbour cubes.static PgElementSetconvertToElementSet(PgCubeSet cubeSet)Store cubes to octagons in a PgElementSet.static PiVectorcountDihedralAnglesByBins(PgCubeSet cubeSet, PdVector threshold)Compute dihedral angles for all cubes and count by given bin thresholds.static voidcountEdgeValences(PgCubeSet cubeSet, PiVector innerValence, PiVector boundaryValence)Count edges by valence (interiour and boundary edges separately).static booleanedgeStarIsClosed(PgCubeSet cubeSet, PgEdgeStar edgeStar)Check if an edge star is closed.static PgPolygonSet[]ExtractSingularities(PgCubeSet cubeSet)Construct two PolygonSets, containing the non-regular edges of the cubeSet - sorted to inner edges (valence !static voidflipCube(PgCubeSet cubeSet, int cubeIndex)Flip the orientation of an indicated cube.static intgetLocalEdgeIndex(PgCubeSet cubeSet, int cubeIndex, int vertexIndex0, int vertexIndex1)static PgCubeSetguessCubes(PgElementSet elementSet)Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set.voidinit()Initialization.static voidmakeOrientation(PgCubeSet cubeSet)Make consistent orientation.voidok()Perform defined actions (probably by PwCubeSet_IP) and close Workshop.static voidorthoNormalizeFrame3D(PgPointSet geom)Orthonormalize Frame Fieldstatic voidrefineIntoEight(PgCubeSet cubeSet)Global uniform refinement of a cubeSet.static voidrelaxVertices(PgCubeSet cubeSet, boolean bEqualEdgeLength)Relax not marked vertices of a cube set - trying to orthogonalize cubes.static voidremoveDuplicateCubes(PgCubeSet cubeSet)Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set.static voidselectSingularInner2Vertices(PgCubeSet cubeSet)Select all vertices in a cubeSet at 2-singularities, i.e. vertices adjacent to to inner edges (valence == 2).static voidselectSingularVertices(PgCubeSet cubeSet)Select all non-regular vertices in a cubeSet, i.e. vertices adjacent to to inner edges (valence !voidsetGeometry(PgGeometry geom)Set the geometry to work on.static PgTetraSetsplitTo12Tetrahedra(PgCubeSet cubeSet)Split each cube to twelve tetrahedra.static PgCubeSet[]splitToLayers(PgCubeSet cubeSet)Split cubeSet to layers - layer 0 is defined by all cubes touching selected vertices.static PgTetraSetsplitToTetrahedra(PgCubeSet cubeSet)Split each cube to six tetrahedra.static voidtestEdgeStars(PgCubeSet cubeSet)Test ComputeEdgeStar method.booleanupdate(java.lang.Object event)Update the class whenever a child has changed.-
Methods inherited from class jvx.project.PjWorkshop
cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, removeGeometry, reset, setDisplay, setDisplays, 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
-
FACE_AT_EDGE
public static final int[][] FACE_AT_EDGE
-
SPLIT_PARALLEL
public static final int SPLIT_PARALLEL
- See Also:
- Constant Field Values
-
SPLIT_STAR
public static final int SPLIT_STAR
- See Also:
- Constant Field Values
-
m_refineToEightType
public static int m_refineToEightType
-
SPLIT_TO_SIX
public static final int SPLIT_TO_SIX
- See Also:
- Constant Field Values
-
SPLIT_TO_TWELVE
public static final int SPLIT_TO_TWELVE
- See Also:
- Constant Field Values
-
m_tetSplittingMode
public int m_tetSplittingMode
-
m_bRefineBeforeSplitting
public boolean m_bRefineBeforeSplitting
-
m_bAddCubeAlignedFrameField
public boolean m_bAddCubeAlignedFrameField
-
m_bAddTetAlignedFrameField
public boolean m_bAddTetAlignedFrameField
-
m_bOrthonormalizeFrame
public boolean m_bOrthonormalizeFrame
-
m_bAddTexturePerCube
public boolean m_bAddTexturePerCube
-
m_bAddBoundaryElementSet
public boolean m_bAddBoundaryElementSet
-
m_bAddRotationField
public boolean m_bAddRotationField
-
-
Method Detail
-
init
public void init()
Initialization.- Overrides:
initin classPjWorkshop
-
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)
-
setGeometry
public void setGeometry(PgGeometry geom)
Set the geometry to work on.- Specified by:
setGeometryin interfacePjWorkshopIf- Overrides:
setGeometryin classPjWorkshop- Parameters:
geom- the workshop modifies this geometry.
-
convertToElementSet
public static PgElementSet convertToElementSet(PgCubeSet cubeSet)
Store cubes to octagons in a PgElementSet.- Author:
- Ulrich Reitebuch
- Version:
- 20.05.10, 1.00 (ur) created
-
addAlignedFrameField
public static PgVectorField[] addAlignedFrameField(PgCubeSet cubeSet, boolean addFieldsToGeometry)
Add an edge aligned frame field to the given PgCubeSet.- Author:
- Ulrich Reitebuch
- Version:
- 20.05.10, 1.00 (ur) created
-
makeOrientation
public static void makeOrientation(PgCubeSet cubeSet)
Make consistent orientation.- Author:
- Ulrich Reitebuch
- Version:
- 20.05.10, 1.00 (ur) created
-
flipCube
public static void flipCube(PgCubeSet cubeSet, int cubeIndex)
Flip the orientation of an indicated cube.- Author:
- Ulrich Reitebuch
- Version:
- 20.05.10, 1.00 (ur) created
-
splitToTetrahedra
public static PgTetraSet splitToTetrahedra(PgCubeSet cubeSet)
Split each cube to six tetrahedra.- Author:
- Ulrich Reitebuch
- Version:
- 21.05.10, 1.00 (ur) created
-
addFrameByCubeEdges
public static PgVectorField[] addFrameByCubeEdges(PgTetraSet tetraSet, boolean addFieldsToGeometry)
Add a frame to a PgTetraSet, that was generated from a cubve set by the splitToTetrahedra method. In this case each tetrahedron has three edges on cube edges, two on cube face diagonals and one edge on the cube's spacial diagonal. The frame will be computed from the three tetrahedron edges coinciding with cube edges.- Author:
- Ulrich Reitebuch
- Version:
- 25.05.10, 1.00 (ur) created
-
splitTo12Tetrahedra
public static PgTetraSet splitTo12Tetrahedra(PgCubeSet cubeSet)
Split each cube to twelve tetrahedra. One center vertex is inserted, each quad of a cube will be triangulated by its default diagonal, given by the smallest vertex index.- Author:
- Ulrich Reitebuch
- Version:
- 10.06.10, 1.00 (ur) created
-
addFrameByCubeEdges12
public static PgVectorField[] addFrameByCubeEdges12(PgTetraSet tetraSet, boolean addFieldsToGeometry)
Add a frame to a PgTetraSet, that was generated from a cube set by the splitTo12Tetrahedra method. In this case each tetrahedron has two edges on cube edges, one on a cube face diagonals and three edges on the cube's spatial diagonals. The frame will be computed from the two tetrahedron edges coinciding with cube edges and of the inner vertex minus the center of the face.- Author:
- Ulrich Reitebuch
- Version:
- 25.05.10, 1.00 (ur) created
-
getLocalEdgeIndex
public static int getLocalEdgeIndex(PgCubeSet cubeSet, int cubeIndex, int vertexIndex0, int vertexIndex1)
-
computeEdgeStar
public static PgEdgeStar computeEdgeStar(PgCubeSet cubeSet, int cubeIndex, int edgeIndex, PgEdgeStar edgeStar)
Compute the edge star. Cubes will be added in cyclic order.- Author:
- Ulrich Reitebuch
- Version:
- 26.05.10, 1.00 (ur) created
-
edgeStarIsClosed
public static boolean edgeStarIsClosed(PgCubeSet cubeSet, PgEdgeStar edgeStar)
Check if an edge star is closed. The edgeStar is supposed to be given in cyclic order (as computed bycomputeEdgeStar.- Author:
- Ulrich Reitebuch
- Version:
- 26.05.10, 1.00 (ur) created
-
testEdgeStars
public static void testEdgeStars(PgCubeSet cubeSet)
Test ComputeEdgeStar method. JUST A TEST METHOD TO CALL THE computeEdgeStar METHOD FOR ALL POSSIBLE CUBE-EDGE COMBINATIONS.- Author:
- Ulrich Reitebuch
- Version:
- 26.05.10, 1.00 (ur) created
-
refineIntoEight
public static void refineIntoEight(PgCubeSet cubeSet)
Global uniform refinement of a cubeSet.- Author:
- Ulrich Reitebuch
- Version:
- 26.05.10, 1.00 (ur) created
-
orthoNormalizeFrame3D
public static void orthoNormalizeFrame3D(PgPointSet geom)
Orthonormalize Frame Field- Author:
- Ulrich Reitebuch
- Version:
- 06.07.10, 1.00 (ur) created
-
ok
public void ok()
Perform defined actions (probably by PwCubeSet_IP) and close Workshop.- Overrides:
okin classPjWorkshop
-
computeRotationField
public static PgVectorField computeRotationField(PgCubeSet cubeSet, boolean bAddField)
Compute a VectorField, which indicates for each Cube the combinatorial frame rotations to its neighbour cubes.- Author:
- Ulrich Reitebuch
- Version:
- 13.08.10, 1.00 (ur) created
-
addTexturePerCube
public static void addTexturePerCube(PgCubeSet cubeSet)
Map all cubes to the unit cube in texture space.- Author:
- Ulrich Reitebuch
- Version:
- 12.07.10, 1.00 (ur) created
-
relaxVertices
public static void relaxVertices(PgCubeSet cubeSet, boolean bEqualEdgeLength)
Relax not marked vertices of a cube set - trying to orthogonalize cubes.- Author:
- Ulrich Reitebuch
- Version:
- 28.08.10, 1.00 (ur) created
-
guessCubes
public static PgCubeSet guessCubes(PgElementSet elementSet)
Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set. In some special cases by this way cubes may be constructed, that are not intended to belong to the cube Set.- Author:
- Ulrich Reitebuch
- Version:
- 06.09.10, 1.00 (ur) created
-
removeDuplicateCubes
public static void removeDuplicateCubes(PgCubeSet cubeSet)
Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set. In some special cases by this way cubes may be constructed, that are not intended to belong to the cube Set.- Author:
- Ulrich Reitebuch
- Version:
- 06.09.10, 1.00 (ur) created
-
computeCubeDihedralAngles
public static PdVector computeCubeDihedralAngles(PgCubeSet cubeSet, int cubeIndex)
Compute all dihedral angles of a cube.- Author:
- Ulrich Reitebuch
- Version:
- 27.09.10, 1.00 (ur) created
-
countDihedralAnglesByBins
public static PiVector countDihedralAnglesByBins(PgCubeSet cubeSet, PdVector threshold)
Compute dihedral angles for all cubes and count by given bin thresholds.- Author:
- Ulrich Reitebuch
- Version:
- 27.09.10, 1.00 (ur) created
-
computeAllDihedralAngles
public static double[] computeAllDihedralAngles(PgCubeSet cubeSet)
Compute all dihedral angles in the cube mesh.- Author:
- Ulrich Reitebuch
- Version:
- 27.09.10, 1.00 (ur) created
-
countEdgeValences
public static void countEdgeValences(PgCubeSet cubeSet, PiVector innerValence, PiVector boundaryValence)
Count edges by valence (interiour and boundary edges separately).- Author:
- Ulrich Reitebuch
- Version:
- 27.09.10, 1.00 (ur) created
-
ExtractSingularities
public static PgPolygonSet[] ExtractSingularities(PgCubeSet cubeSet)
Construct two PolygonSets, containing the non-regular edges of the cubeSet - sorted to inner edges (valence != 4) and boundary edges (valence != 2).- Author:
- Ulrich Reitebuch
- Version:
- 01.10.10, 1.00 (ur) created
-
selectSingularVertices
public static void selectSingularVertices(PgCubeSet cubeSet)
Select all non-regular vertices in a cubeSet, i.e. vertices adjacent to to inner edges (valence != 4) and boundary edges (valence != 2).- Author:
- Ulrich Reitebuch
- Version:
- 18.01.12, 1.00 (ur) created
-
selectSingularInner2Vertices
public static void selectSingularInner2Vertices(PgCubeSet cubeSet)
Select all vertices in a cubeSet at 2-singularities, i.e. vertices adjacent to to inner edges (valence == 2).- Author:
- Ulrich Reitebuch
- Version:
- 18.01.12, 1.00 (ur) created
-
computeAllEdgeLengths
public static double[] computeAllEdgeLengths(PgCubeSet cubeSet)
Compute a list of all edge lengths.- Author:
- Ulrich Reitebuch
- Version:
- 01.10.10, 1.00 (ur) created
-
computeCubeVolume
public static double computeCubeVolume(PgCubeSet cubeSet, int cubeIndex)
Compute he volume of a single cube.- Author:
- Ulrich Reitebuch
- Version:
- 01.10.10, 1.00 (ur) created
-
computeAllCubeVolumes
public static double[] computeAllCubeVolumes(PgCubeSet cubeSet)
Compute all cube volumes.- Author:
- Ulrich Reitebuch
- Version:
- 01.10.10, 1.00 (ur) created
-
splitToLayers
public static PgCubeSet[] splitToLayers(PgCubeSet cubeSet)
Split cubeSet to layers - layer 0 is defined by all cubes touching selected vertices.- Author:
- Ulrich Reitebuch
- Version:
- 28.09.10, 1.00 (ur) created
-
addBoundaryLayer
public static void addBoundaryLayer(PgCubeSet cubeSet)
Add a boundary layer to a cubeSet. This will offset all boundary singularities in the mesh to the interior of the volume. Still at the boundary at vertices with more or less than four adjacent boundary quadrilaterals, singularities will touch the boundary. Only the connectivity information is changed and boundary vertices are duplicated, so the boundary layer cubes all will have zero volume.- Author:
- Ulrich Reitebuch
- Version:
- 13.04.11, 1.00 (ur) created
-
-
"