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_EDGE`
    `boolean` | `m_bAddBoundaryElementSet`
    `boolean` | `m_bAddCubeAlignedFrameField`
    `boolean` | `m_bAddRotationField`
    `boolean` | `m_bAddTetAlignedFrameField`
    `boolean` | `m_bAddTexturePerCube`
    `boolean` | `m_bOrthonormalizeFrame`
    `boolean` | `m_bRefineBeforeSplitting`
    `static int` | `m_refineToEightType`
    `int` | `m_tetSplittingMode`
    `static int` | `SPLIT_PARALLEL`
    `static int` | `SPLIT_STAR`
    `static int` | `SPLIT_TO_SIX`
    `static int` | `SPLIT_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 void` | `addBoundaryLayer(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 void` | `addTexturePerCube(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 PdVector` | `computeCubeDihedralAngles(PgCubeSet cubeSet, int cubeIndex)` Compute all dihedral angles of a cube.
    `static double` | `computeCubeVolume(PgCubeSet cubeSet, int cubeIndex)` Compute he volume of a single cube.
    `static PgEdgeStar` | `computeEdgeStar(PgCubeSet cubeSet, int cubeIndex, int edgeIndex, PgEdgeStar edgeStar)` Compute the edge star.
    `static PgVectorField` | `computeRotationField(PgCubeSet cubeSet, boolean bAddField)` Compute a VectorField, which indicates for each Cube the combinatorial frame rotations to its neighbour cubes.
    `static PgElementSet` | `convertToElementSet(PgCubeSet cubeSet)` Store cubes to octagons in a PgElementSet.
    `static PiVector` | `countDihedralAnglesByBins(PgCubeSet cubeSet, PdVector threshold)` Compute dihedral angles for all cubes and count by given bin thresholds.
    `static void` | `countEdgeValences(PgCubeSet cubeSet, PiVector innerValence, PiVector boundaryValence)` Count edges by valence (interiour and boundary edges separately).
    `static boolean` | `edgeStarIsClosed(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 void` | `flipCube(PgCubeSet cubeSet, int cubeIndex)` Flip the orientation of an indicated cube.
    `static int` | `getLocalEdgeIndex(PgCubeSet cubeSet, int cubeIndex, int vertexIndex0, int vertexIndex1)`
    `static PgCubeSet` | `guessCubes(PgElementSet elementSet)` Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set.
    `void` | `init()` Initialization.
    `static void` | `makeOrientation(PgCubeSet cubeSet)` Make consistent orientation.
    `void` | `ok()` Perform defined actions (probably by PwCubeSet_IP) and close Workshop.
    `static void` | `orthoNormalizeFrame3D(PgPointSet geom)` Orthonormalize Frame Field
    `static void` | `refineIntoEight(PgCubeSet cubeSet)` Global uniform refinement of a cubeSet.
    `static void` | `relaxVertices(PgCubeSet cubeSet, boolean bEqualEdgeLength)` Relax not marked vertices of a cube set - trying to orthogonalize cubes.
    `static void` | `removeDuplicateCubes(PgCubeSet cubeSet)` Construct a PgCubeSet from a PgElementSet Cubes are constructed from the quads in the element set.
    `static void` | `selectSingularInner2Vertices(PgCubeSet cubeSet)` Select all vertices in a cubeSet at 2-singularities, i.e. vertices adjacent to to inner edges (valence == 2).
    `static void` | `selectSingularVertices(PgCubeSet cubeSet)` Select all non-regular vertices in a cubeSet, i.e. vertices adjacent to to inner edges (valence !
    `void` | `setGeometry(PgGeometry geom)` Set the geometry to work on.
    `static PgTetraSet` | `splitTo12Tetrahedra(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 PgTetraSet` | `splitToTetrahedra(PgCubeSet cubeSet)` Split each cube to six tetrahedra.
    `static void` | `testEdgeStars(PgCubeSet cubeSet)` Test ComputeEdgeStar method.
    `boolean` | `update(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

  - ### Constructor Detail

    - #### PwCubeSet

          public PwCubeSet()

      Constructor

  - ### Method Detail

    - #### init

          public void init()

      Initialization.
      Overrides:
        `init` in class `PjWorkshop`

    - #### 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.
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### setGeometry

          public void setGeometry(PgGeometry geom)

      Set the geometry to work on.
      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      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 by `computeEdgeStar`.
      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:
        `ok` in class `PjWorkshop`

    - #### 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

"

The software JavaView? is copyright protected. All Rights Reserved.
"