vgp.discrete.pointCloud

## Class PjPointCloud

- java.lang.Object
- - jv.object.PsObject
  - - jv.project.PjProject
    - - vgp.discrete.pointCloud.PjPointCloud

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf

      public class PjPointCloud
      extends PjProject
      implements java.awt.event.ActionListener

  Anisotropic smoothing of point set surfaces.
  See Also:
    Serialized Form
  Author:
    Konrad Polthier
  Version:
    07.02.17, 4.02 revised (ms) Modify definition of Covariance and Anisotropic Laplacian to follow CAGD Paper.
    24.01.17, 4.01 revised (ms) Dynamically choose models from repository folder, no hard coded filepaths.
    14.01.17, 4.00 revised (kp) Work in progress ...
    16.03.15, 3.00 revised (kp) Moved to vgp.discrete.pointCloud from dev.apps.
    10.08.14, 2.00 revised (kp) User interface re-structured.
    11.03.03, 1.00 created (kp)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COLOR_COV_QUOTIENT`
    `static int` | `COLOR_MAX_COV`
    `static int` | `COLOR_MAX_PRINC`
    `static int` | `COLOR_MEAN` Current type of vertex coloring.
    `static int` | `COLOR_MEAN_ANI`
    `static int` | `COLOR_PRINC_QUOTIENT`
    `static double[]` | `CURVATURE`
    `static java.lang.String[]` | `FILE_NAME`
    `static double[]` | `INFLUENCE`
    `static double[]` | `MAXHUE`
    `static int` | `MODEL_COSTA`
    `static int` | `MODEL_CUBE`
    `static int` | `MODEL_CYLINDER`
    `static java.lang.String[]` | `MODEL_NAMES`
    `static int` | `MODEL_OCTAHEDRON`
    `static int` | `MODEL_TORUS`
    `static int` | `MODEL_TRUNCATED`
    `static int` | `MODEL_VENUS`
    `static int` | `NUM_MODELS` Some models.

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PjPointCloud()`
    `PjPointCloud(int modelID)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent event)`
    `void` | `computeAnisotropicLaplace(PgPointSet geom, PiVector[] neigh)` Compute the anisotropic Laplacian for each vertex of a point set using the connectivity of the neigh parameter.
    `PdMatrix` | `computeCovariance(PdMatrix covMat, PdVector[] vertex)` Compute the covariance matrix of a set of vertices in Rn.
    `int[]` | `computeCovarianceSpectrum(PdMatrix covMat, PdVector[] eVector, PdVector eValue)` Compute the eigenvalue and eigenvectors of a covariance matrix.
    `static void` | `computeLaplace(PgPointSet geom, PiVector[] neigh)` Compute the point set Laplacian for each vertex using the connectivity of the neigh parameter.
    `void` | `computeMesh()` Compute an initial smooth mesh, which then must be distorted using the noise workshop.
    `void` | `computeNeighbour(PgPointSet geom, double influence)` Calculate the adjacency relation which determines for each vertex an unordered set of nearby neighbours excluding the reference point.
    `void` | `computePrincipal(PgPointSet geom, PiVector[] neigh)` Compute the principal curvature directions.
    `void` | `computeTangents(PgPointSet geom, PgPointSet tangent, PiVector[] neigh)` Compute the normal vector and tangent plane of each vertex of a point set.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `void` | `reset()`
    `void` | `setFileName(int currentModel)` Set the file path of the given model id into the `m_fileName` variable.
    `boolean` | `setGeometry(PgGeometryIf newGeomIf)` Sets given geometry as project geometry for energy minimization.
    `void` | `start()` Method is invoked during loading of a project in JavaView.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class jv.project.PjProject

      `addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getParameterInfo, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickInitial, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setParameterInfo, setTime, setViewer, stop, unmarkVertices`

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

- - ### Field Detail

    - #### COLOR_MEAN

          public static final int COLOR_MEAN

      Current type of vertex coloring. Type is equal to one of the COLOR_ values.
      See Also:
        Constant Field Values

    - #### COLOR_MEAN_ANI

          public static final int COLOR_MEAN_ANI

      See Also:
        Constant Field Values

    - #### COLOR_MAX_PRINC

          public static final int COLOR_MAX_PRINC

      See Also:
        Constant Field Values

    - #### COLOR_PRINC_QUOTIENT

          public static final int COLOR_PRINC_QUOTIENT

      See Also:
        Constant Field Values

    - #### COLOR_COV_QUOTIENT

          public static final int COLOR_COV_QUOTIENT

      See Also:
        Constant Field Values

    - #### COLOR_MAX_COV

          public static final int COLOR_MAX_COV

      See Also:
        Constant Field Values

    - #### NUM_MODELS

          public static final int NUM_MODELS

      Some models.
      See Also:
        Constant Field Values

    - #### MODEL_VENUS

          public static final int MODEL_VENUS

      See Also:
        Constant Field Values

    - #### MODEL_COSTA

          public static final int MODEL_COSTA

      See Also:
        Constant Field Values

    - #### MODEL_CYLINDER

          public static final int MODEL_CYLINDER

      See Also:
        Constant Field Values

    - #### MODEL_OCTAHEDRON

          public static final int MODEL_OCTAHEDRON

      See Also:
        Constant Field Values

    - #### MODEL_TORUS

          public static final int MODEL_TORUS

      See Also:
        Constant Field Values

    - #### MODEL_TRUNCATED

          public static final int MODEL_TRUNCATED

      See Also:
        Constant Field Values

    - #### MODEL_CUBE

          public static final int MODEL_CUBE

      See Also:
        Constant Field Values

    - #### MODEL_NAMES

          public static final java.lang.String[] MODEL_NAMES

    - #### FILE_NAME

          public static final java.lang.String[] FILE_NAME

    - #### INFLUENCE

          public static final double[] INFLUENCE

    - #### CURVATURE

          public static final double[] CURVATURE

    - #### MAXHUE

          public static final double[] MAXHUE

  - ### Constructor Detail

    - #### PjPointCloud

          public PjPointCloud()

    - #### PjPointCloud

          public PjPointCloud(int modelID)

  - ### Method Detail

    - #### setFileName

          public void setFileName(int currentModel)

      Set the file path of the given model id into the `m_fileName` variable.
      Parameters:
        `currentModel` - ID of the current model
      Version:
        21.04.17, 1.15 revised (kp) Made method 1.1 conforming again by using PuString#replace.
        24.01.17, 1.10 revised (ms) Dynamically choose models from repository folder, no hard coded filepaths.

    - #### init

          public void init()

      Description copied from class: `PjProject`
      Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
      Overrides:
        `init` in class `PjProject`

    - #### start

          public void start()

      Description copied from class: `PjProject`
      Method is invoked during loading of a project in JavaView.

      If a project has an animation object, then the animation panel is shown when the project's this start() method is invoked during loading of the project. Use `setAnimation(PsAnimation)` to register an animation.

      If auto fit is enabled then scenery is scaled to fit in each display.

      Overrides:
        `start` in class `PjProject`
      See Also:
        `PvViewerIf.start()`, `PjProject.isEnabledAutoFit()`

    - #### reset

          public void reset()

    - #### setGeometry

          public boolean setGeometry(PgGeometryIf newGeomIf)

      Sets given geometry as project geometry for energy minimization.
      Overrides:
        `setGeometry` in class `PjProject`
      Parameters:
        `newGeomIf` - must be an element set
      Returns:
        false if newGeomIf is no element set

    - #### 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 `PsObject`
      Parameters:
        `event` - carries a lot of information
      Returns:
        true if event has been handled, otherwise false
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent event)

      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`

    - #### computeMesh

          public void computeMesh()

      Compute an initial smooth mesh, which then must be distorted using the noise workshop.

    - #### computeNeighbour

          public void computeNeighbour(PgPointSet geom,
                                       double influence)

      Calculate the adjacency relation which determines for each vertex an unordered set of nearby neighbours excluding the reference point. The adjacency relation is a graph which, for example, is used in the calculation of the best fit tangent plane or the Laplacian.

    - #### computeLaplace

          public static void computeLaplace(PgPointSet geom,
                                            PiVector[] neigh)

      Compute the point set Laplacian for each vertex using the connectivity of the neigh parameter.
      Parameters:
        `neigh` - determines connectivity and neighbours of each vertex.

    - #### computeAnisotropicLaplace

          public void computeAnisotropicLaplace(PgPointSet geom,
                                                PiVector[] neigh)

      Compute the anisotropic Laplacian for each vertex of a point set using the connectivity of the neigh parameter.
      Parameters:
        `neigh` - determines connectivity and neighbours of each vertex.

    - #### computeCovariance

          public PdMatrix computeCovariance(PdMatrix covMat,
                                            PdVector[] vertex)

      Compute the covariance matrix of a set of vertices in Rn. If argument matrix is null then it will be allocated and returned, otherwise the argument matrix will be modified and returned.

      If vertex array is missing then null is returned.

    - #### computeCovarianceSpectrum

          public int[] computeCovarianceSpectrum(PdMatrix covMat,
                                                 PdVector[] eVector,
                                                 PdVector eValue)

      Compute the eigenvalue and eigenvectors of a covariance matrix.

      Vectors must be passed to this method. Vector with eigenvalue and the array of eigenvectors are filled. The eigenvalues and -vectors are sorted by increasing eigenvalue.

      An index vector is returned which provides the indices of the eigenvalues in increasing order of value.

    - #### computeTangents

          public void computeTangents(PgPointSet geom,
                                      PgPointSet tangent,
                                      PiVector[] neigh)

      Compute the normal vector and tangent plane of each vertex of a point set. The vectors ares stored as vector field in tangent point set.

    - #### computePrincipal

          public void computePrincipal(PgPointSet geom,
                                       PiVector[] neigh)

      Compute the principal curvature directions.

"

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