Documentation of 'jvx.geom.PgPointSetOnElementSet' Java class
PgPointSetOnElementSet ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.geom

Class PgPointSetOnElementSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf


    public class PgPointSetOnElementSet
    extends PgPointSet
    A point set on a triangulated element set whose vertices are given by barycentric coordinates. Every point of a PointsOnElementSet is given by the element index of the element the point lies on, and the barycentric coordinates with respect to this triangle. The base geometry must be a triangulated element set.
    See Also:
    PgElementSet, PgPolygonOnElementSet, Serialized Form
    Author:
    Konrad Polthier
    Version:
    16.04.06, 1.00 created (kp)
    • Constructor Detail

      • PgPointSetOnElementSet

        public PgPointSetOnElementSet(PgElementSet geom)
        Construct a new point set on given base surface.
        Parameters:
        geom - Base geometry of point set.
    • Method Detail

      • init

        public void init()
        Initialize to default values.
        Overrides:
        init in class PgPointSet
      • getGeometry

        public PgElementSet getGeometry()
        Get the underlying geometry.
        Returns:
        Reference to underlying triangulation.
      • setGeometry

        public void setGeometry(PgElementSet geom)
        Assign a new underlying simplicial surface. Method returns with warning if surface is not a triangulation.
        Parameters:
        geom - New underlying triangulation.
        Version:
        22.10.05, 1.10 revised (kp) Return with warning if geometry is not triangulated.
      • clone

        public java.lang.Object clone()
        Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set to null except to the base geometry whose reference is kept.
        Specified by:
        clone in interface PgGeometryIf
        Overrides:
        clone in class PgPointSet
        See Also:
        copy(PsObject)
        Version:
        16.04.06, 1.00 created (kp)
      • copy

        public void copy(PsObject object)
        Copy instance variables by duplication, not by copying a reference. Reference to base geometry is not changed.
        Overrides:
        copy in class PgPointSet
        Since:
        JavaView 2.65.000
        See Also:
        clone()
        Version:
        16.04.06, 2.00 revised (kp) Full revision, name changed to copy from copyIntrinsicData().
      • merge

        public boolean merge(PgGeometryIf aGeom)
        Merge point set with current object and store union of both objects in 'this'. Number of points and polygons is the sum of both objects.

        The merged geometry will local colors allocated and assignd if

                        1. both the global color of both geometries are different, or
                        2. either geometry has local colors.
         
        If local colors are allocated but one of the geometries does not have local colors then its local colors are be assumed to be its global color. The merged geometry will show globalVertexColors if
                        1. the global color of both geometries is the same, and
                        2. both geometries are showing the global color.
         
        In all other cases the merged geometry will show local colors. The global color of the merged geometry is never changed.
        Specified by:
        merge in interface PgGeometryIf
        Overrides:
        merge in class PgPointSet
        Parameters:
        aGeom - Polygon set to be merged into 'this'
        Returns:
        true if method was successfull
        Version:
        09.12.06, 1.00 created (kp)
      • blend

        public boolean blend(double s,
                             PgGeometry ag,
                             double t,
                             PgGeometry bg)
        Blend between two point sets using this = s*ag + t*bg.
        Specified by:
        blend in interface PgGeometryIf
        Overrides:
        blend in class PgPointSet
        Parameters:
        s - weight of vertices of first geometry
        ag - first geometry used for blending
        t - weight of vertices of second geometry
        bg - second geometry used for blending
        Returns:
        true on success
        Version:
        09.12.06, 1.00 created (kp)
      • setMaxNumVertices

        public void setMaxNumVertices(int numVertices)
        Allocate given number of vertices, and allocate normals, colors etc. if they already exist. All vertex allocation is done in this method. Method should not be called directly unless a specific allocation is required. Usually, a user would specify the number of vertices via setNumVertices().
        Overrides:
        setMaxNumVertices in class PgPointSet
        Version:
        14.03.06, 3.00 revised (kp) Method made public to allow better control of allocations.
      • getVertexBary

        public PdBary[] getVertexBary()
        Get array of barycentric positions for read and write access, but do not modify the size of any vector.

        Note, that the actual size of the vertex array may differ from getNumVertices() for efficiency reasons. Therefore, do not use bary.length but use getNumVertices().

        Note, the array is void as soon as the number of vertices changes. After issuing setNumVertices(int) then call this method again.

      • setVertexBary

        public void setVertexBary(PdBary[] vertexBary)
        Set vector of barycentric position. Length of vector must be at least m_numVertices.
        Since:
        JavaView 3.97.034
        Version:
        27.11.06, 1.00 created (kp)
      • getVertexBary

        public PdBary getVertexBary(int vertInd)
        Get barycentric coordinates of the vertex at given index.
        Parameters:
        vertInd - Index of vertex.
        Returns:
        Barycentric coordinates of vertex.
        See Also:
        getVertexElemInd(int)
      • getVertexElemInd

        public int getVertexElemInd(int vertInd)
        Get element index of the vertex at given index.
        Parameters:
        vertInd - index of vertex
        Returns:
        element index of given vertex
        See Also:
        getVertexBary(int)
      • setVertexBary

        public void setVertexBary(int vertInd,
                                  int elemInd,
                                  PdBary bary)
        Set barycentric coordinate and element index of vertex at given index, and also update the position of the corresponding vertex. Barycentric coordinate is copied into another PdBary instance.
        Parameters:
        vertInd - Vertex index in vertex array.
        elemInd - Global element index where the vertex shall lie on.
        bary - Barycentric coordinates of vertex within the given element.
        Version:
        21.08.06, 2.10 revised (kp) Improved checks for consistency of indices.
      • setVertexBary

        public void setVertexBary(int vertInd,
                                  PdBary bary)
        Set barycentric coordinate and element index of vertex at given index, and also update the position of the corresponding vertex. Element index is contained in parameter bary.
        Parameters:
        vertInd - Vertex index in vertex array.
        bary - Barycentric coordinates of vertex within the given element.
        Version:
        21.08.06, 2.10 revised (kp) Update position of vertex too.
      • computeVertices

        public void computeVertices()
        Compute all geometric vertex positions on the base surface from barycentric coordinates.
        Version:
        16.04.06, 1.00 created (kp)
"JavaView? v5.03.003"

"

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

You see the box below because you did not login.