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

Class PgPolygon

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf
    Direct Known Subclasses:
    PgBezierCurve, PgBndPolygon, PgCircle, PgCircleF, PgCurveF, PgFunction, PgParmCurve, PgPlotF, PgPointF, PgPolygonOnElementSet, PgSegmentF


    public class PgPolygon
    extends PgPointSet
    Base class for polygons given as consecutive list of polygon vertices. The class interprets the vertices in the vertex array of its superclass PgPointSet as consecutive points of a polygon. Therefore, this class mainly consists of polygon properties, for example, polygon color, additional to the geometric information contained in its superclass.

    The dimension of all points is determined as argument of the constructor and cannot be changed later. See PgPointSet for details about allocation and access.

    A good starting point to obtain further insight are methods like computeEight(int) (if source code access to JavaView is available), or the tutorial applets of JavaView.

    See Also:
    PgPointSet, Serialized Form
    Author:
    Konrad Polthier
    Version:
    22.09.15, 3.30 revised (kp) Getting and setting of smooth edge colors corrected.
    04.07.06, 3.20 revised (kp) Length of edgeColor, edgeSize etc. is now m_maxNumEdges.
    22.10.05, 3.10 revised (kp) Method merge() implemented.
    26.04.03, 3.00 revised (kp) Global revision including implementation of colors and normals.
    22.03.02, 2.60 revised (ur) Internationalization.
    07.07.00, 2.50 revised (kp) Edge methods added and jvx exchange.
    02.04.00, 2.00 revised (kp) PdColor replaced with Color in lists.
    00.00.98, 1.00 created (kp)
    • Constructor Detail

      • PgPolygon

        public PgPolygon()
        Constructor of a polygon in three-dimensional space.
      • PgPolygon

        public PgPolygon(int aVertexDim)
        Constructor of a polygon set in a space of given dimension.
    • Method Detail

      • init

        public void init()
        Initialize and reset instance variables after call to super.init().
        Overrides:
        init in class PgPointSet
      • getJvx

        public PgJvxSrc getJvx()
        Fills a geometry object with data from this instance, for example, to print to file.
        Specified by:
        getJvx in interface PgGeometryIf
        Overrides:
        getJvx in class PgPointSet
        Returns:
        src a geometry source to be filled with data from this instance.
      • setJvx

        public void setJvx(PgJvxSrc src)
        Fill this instance with data from a geometry source, for example, previously read from file.
        Specified by:
        setJvx in interface PgGeometryIf
        Overrides:
        setJvx in class PgPointSet
        Parameters:
        src - a geometry source used to fill this instance with data.
        Version:
        17.11.01, 1.10 revised (kp) Update globalPolygonSize even if 0.
      • 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.
        Specified by:
        clone in interface PgGeometryIf
        Overrides:
        clone in class PgPointSet
        See Also:
        copy(PsObject)
        Version:
        11.12.04, 1.20 revised (kp) Missing clone of edge, edgeNormal and edgeColor added.
        05.07.00, 1.00 created (kp)
      • copy

        public void copy(PsObject object)
        Copy instance variables by duplication, not by copying a reference.

        The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use jv.object.PsObject#copy(PsObject) instead of jv.project.PgGeometry#copy(PsObject).

        Overrides:
        copy in class PgPointSet
        See Also:
        clone()
        Version:
        24.01.05, 1.50 revised (kp) Copy all other instance variables like colors and normals.
        08.11.02, 1.10 revised (kp) Argument changed to PsObject from PgGeometry.
      • toString

        public java.lang.String toString()
        Create a multi-line string representation with detailed information about all instance variables.
        Specified by:
        toString in interface PgGeometryIf
        Overrides:
        toString in class PgPointSet
      • setDimOfVertices

        public void setDimOfVertices(int dim)
        Set dimension of vertices. Make rare use, and try to assign dimension of vertices already in the constructor.
        Overrides:
        setDimOfVertices in class PgPointSet
        Version:
        11.11.04, 1.00 created (kp)
      • setNumVertices

        public void setNumVertices(int numVertices)
        Adjust the number of vertices of the polygon.

        Internally the number of edges are updated.

        Overrides:
        setNumVertices in class PgPointSet
      • getNumEdges

        public int getNumEdges()
        Get number of edges of polygon. If polygon is closed then the number is equal to number of vertices of the pointSet. If the polygon is not closed then the number is equal to (number of vertices-1).
        See Also:
        setNumVertices(int)
      • getGlobalEdgeColor

        public java.awt.Color getGlobalEdgeColor()
        Get global edge color which is used if no local colors are available.
      • getGlobalEdgeTagColor

        public java.awt.Color getGlobalEdgeTagColor()
        Get global color of tagged edges.
      • getGlobalEdgeSize

        public double getGlobalEdgeSize()
        Get thickness in pixels of edge when drawn in display.
      • setGlobalEdgeColor

        public void setGlobalEdgeColor(java.awt.Color color)
        Set global edge color to be used if no local colors are available.
      • setGlobalEdgeTagColor

        public void setGlobalEdgeTagColor(java.awt.Color color)
        Set global color of tagged edges.
      • setGlobalEdgeSize

        public void setGlobalEdgeSize(double size)
        Set thickness in pixels of edge when drawn in display.
      • getGlobalPolygonColor

        public java.awt.Color getGlobalPolygonColor()
        Deprecated. use getGlobalEdgeColor()
        Get global polygon color which is used if no local colors are available.
      • getGlobalPolygonTagColor

        public java.awt.Color getGlobalPolygonTagColor()
        Deprecated. use getGlobalEdgeTagColor()
        Get global color of tagged polygons.
      • getGlobalPolygonSize

        public double getGlobalPolygonSize()
        Deprecated. use getGlobalEdgeSize()
        Get thickness in pixels of polygon when drawn in display.
      • setGlobalPolygonColor

        public void setGlobalPolygonColor(java.awt.Color color)
        Deprecated. use setGlobalEdgeColor()
        Set global polygon color to be used if no local colors are available.
      • setGlobalPolygonTagColor

        public void setGlobalPolygonTagColor(java.awt.Color color)
        Deprecated. use setGlobalEdgeTagColor()
        Set global color of tagged polygons.
      • setGlobalPolygonSize

        public void setGlobalPolygonSize(double size)
        Deprecated. use setGlobalEdgeSize()
        Set thickness in pixels of polygon when drawn in display.
      • getGlobalEdgeNormalColor

        public java.awt.Color getGlobalEdgeNormalColor()
        Get global element color which is used if no local colors are available.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • getGlobalEdgeNormalLength

        public double getGlobalEdgeNormalLength()
        Get length factor of normal vectors when drawn in display.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • getGlobalEdgeNormalSize

        public double getGlobalEdgeNormalSize()
        Get thickness in pixels of normals when drawn in display.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • setGlobalEdgeNormalColor

        public void setGlobalEdgeNormalColor(java.awt.Color color)
        Set global normal color to be used if no local colors are available.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • setGlobalEdgeNormalLength

        public void setGlobalEdgeNormalLength(double length)
        Get length factor of normal vectors when drawn in display.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • setGlobalEdgeNormalSize

        public void setGlobalEdgeNormalSize(double size)
        Get thickness in pixels of normals when drawn in display.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • showPolygonColors

        public void showPolygonColors(boolean flag)
        Deprecated. use showEdgeColors(boolean)
        Set flag to enable drawing of polygon colors.
      • useGlobalPolygonColor

        public void useGlobalPolygonColor(boolean flag)
        Deprecated. use showEdgeColors(boolean)
        Set flag of using global polygon color instead of coloring each polygon individually.
      • isShowingEdgeLabels

        public boolean isShowingEdgeLabels()
        Determine whether showing of edge labels is enabled.
      • isShowingEdges

        public boolean isShowingEdges()
        Determine whether drawing of edges of polygon is enabled.
      • isShowingEdgeNormals

        public boolean isShowingEdgeNormals()
        Determine whether drawing of edge normals is enabled.
      • isShowingEdgeNormalArrow

        public boolean isShowingEdgeNormalArrow()
        Determine whether drawing of arrow at edge normals is enabled.
      • isShowingEdgeColors

        public boolean isShowingEdgeColors()
        Determine whether drawing of edge colors is enabled.
      • isShowingEdgeSizes

        public boolean isShowingEdgeSizes()
        Determine whether drawing of edge sizes is enabled.
      • isShowingPolygonStartArrow

        public boolean isShowingPolygonStartArrow()
        Determine whether drawing of arrow at first point of polygon is enabled.
      • isShowingPolygonEndArrow

        public boolean isShowingPolygonEndArrow()
        Determine whether drawing of arrow at last point of polygon is enabled.
      • isShowingPolygonColors

        public boolean isShowingPolygonColors()
        Deprecated. use isShowingEdgeColors()
        Set flag to enable drawing of polygon colors.
      • showEdgeLabels

        public void showEdgeLabels(boolean flag)
        Set flag to enable drawing of edge labels in display.
      • showEdges

        public void showEdges(boolean flag)
        Set flag to enable drawing of edges of polygon.
      • showEdgeNormals

        public void showEdgeNormals(boolean flag)
        Set flag to enable drawing of edge normals.
      • showEdgeNormalArrow

        public void showEdgeNormalArrow(boolean flag)
        Set flag to enable drawing of arrow at edge normals.
      • showEdgeColors

        public void showEdgeColors(boolean flag)
        Set flag to enable drawing of edge colors.
      • showEdgeSizes

        public void showEdgeSizes(boolean flag)
        Set flag to enable drawing of edge sizes.
      • showPolygonStartArrow

        public void showPolygonStartArrow(boolean flag)
        Set flag to enable drawing of arrow at first point of polygons.
      • showPolygonEndArrow

        public void showPolygonEndArrow(boolean flag)
        Set flag to enable drawing of arrow at last point of polygons.
      • getEdgeColors

        public java.awt.Color[] getEdgeColors()
        Get color array for read and write access, but do not modify the size of any color vector. Also note, that the actual size of the color array may be larger than m_numVertices for efficiency reasons. Therefore, do not make use of the length of the array.
      • hasEdgeColors

        public boolean hasEdgeColors()
        Check if edge colors have been allocated.
        See Also:
        assureEdgeColors()
      • hasEdgeNormals

        public boolean hasEdgeNormals()
        Check if edge normals have been allocated.
        See Also:
        assureEdgeNormals()
      • removeEdgeColors

        public void removeEdgeColors()
        Remove individual edge colors from a polygon and use the global polygon color instead.

        Showing of edge colors must be switched off explicitly using showEdgeColors(boolean).

      • setEdgeColors

        public void setEdgeColors(java.awt.Color[] color)
        Assign edge colors of list to existing array of edge colors. Length of argument list must be equal or larger than getNumEdges(). All edge colors are assigned.
        Parameters:
        color - array with new edge colors
      • setEdgeColor

        public boolean setEdgeColor(int ind,
                                    java.awt.Color aColor)
        Copy new color to edge color at specified position in the color list
        Parameters:
        ind - index of edge
        aColor - color to be copied to color list
        Returns:
        boolean false, if index out of range, or argument missing
      • assureEdgeColors

        public void assureEdgeColors()
        Assures respectively allocates correct length of edge color array. Length of array is equal to length of edge array.
      • getEdgeNormals

        public PdVector[] getEdgeNormals()
        Get vertex normal array for read and write access, but do not modify the size of any normal vector. Also note, that the actual size of the color may be larger than m_numVertices for efficiency reasons. Therefore, do not make use of the length of the array.
      • removeEdgeNormals

        public void removeEdgeNormals()
        Remove local edge normals from a geometry.

        Showing of edge normals must be switched off explicitly using showEdgeColors(boolean).

      • setEdgeNormals

        public void setEdgeNormals(PdVector[] normal)
        Copy edge normals of list to existing array of edge normals. Length of argument list must be equal or larger than getNumEdges(). All edge normals are copied. The dimension of all argument normals must be equal to getDimOfVectors() of the geometry.
        Parameters:
        normal - array with new edge normals
      • setEdgeNormal

        public boolean setEdgeNormal(int ind,
                                     PdVector aNormal)
        Copy new normal to edge normal at specified position in the normal list
        Parameters:
        ind - index of edge
        aNormal - normal to be copied to normal list
        Returns:
        boolean false, if index out of range, or argument missing
      • assureEdgeNormals

        public void assureEdgeNormals()
        Assures respectively allocates correct length of edge normal array. Length of array is equal to length of edge array. Dimension of normal vectors is equal to dimension of vertices.
      • getEdgeSizes

        public PdVector getEdgeSizes()
        Get edge sizes for read and write access, but do not modify the length of the vector. Also note, that the actual size of the vector may be larger than m_numVertices for efficiency reasons. Therefore, do not make use of the length of the array.
        Since:
        JavaView 3.09
        Version:
        07.02.04, 1.00 created (kp)
      • removeEdgeSizes

        public void removeEdgeSizes()
        Remove edge sizes from a geometry.

        Showing of edge sizes must be switched off explicitly using showEdgeSizes(boolean).

        Since:
        JavaView 3.09
        Version:
        07.02.04, 1.00 created (kp)
      • setEdgeSizes

        public void setEdgeSizes(PdVector size)
        Copy edge sizes of list to existing array of edge sizes. Length of argument list must be equal or larger than getNumEdges(). All edge sizes are copied.

        Showing of edge sizes must be switched on in order to be visible.

        Parameters:
        size - array with new edge size for all polygons
        Since:
        JavaView 3.09
        Version:
        07.02.04, 1.00 created (kp)
      • assureEdgeSizes

        public void assureEdgeSizes()
        Assures respectively allocates correct length of edge size vector. Length of vector is equal to length of edge array. Dimension of size vector is equal to maximal number of vertices.
        Since:
        JavaView 3.09
        Version:
        07.02.04, 1.00 created (kp)
      • getEdges

        public PiVector[] getEdges()
        Get the array of vertex indices which define the polygon for readonly purpose. Also note, that the actual size of the array may be larger than m_numEdges+1 for efficiency reasons. Therefore, do not make use of the length of the array.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • getLengthOfEdge

        public double getLengthOfEdge(int edgeInd)
        Compute length of given edge of polygon.
        Since:
        JavaView 3.12.002
        Author:
        Konrad Polthier
        Version:
        18.03.04, 1.00 created (kp)
      • getLength

        public double getLength()
        Compute geometric length of polygon as the sum of all edge lengths. If polygon is closed then the distance of the first and last vertex is added to the polygon length.
        Returns:
        length of polygon
        See Also:
        isClosed()
      • isClosed

        public boolean isClosed()
        Check whether polygon is closed, i.e.if endpoints are connected by additional edge.
        Returns:
        flag whether polygon is closed.
        See Also:
        setClosed(boolean)
      • setClosed

        public void setClosed(boolean flag)
        Set flag that polygon is closed. In the previous version 1.00 an additional vertex might have been allocated. This version just sets a flag.
        Parameters:
        flag - true closes polygons
        See Also:
        isClosed()
        Version:
        07.07.00, 1.10 revised (kp) Just set a flag, no longer allocated additional vertex.
      • computeEight

        public void computeEight(int numPoints)
        Compute figure eight in xy-plane with given radius including vertex normals.
        Parameters:
        numPoints - Discretization of polygon
      • computeCircle

        public void computeCircle(int numPoints,
                                  double radius)
        Compute circle centered at origin in xy-plane with given radius including vertex normals.
        Parameters:
        numPoints - Discretization of polygon
        radius - Radius of circle
      • removeMarkedVertices

        public int[] removeMarkedVertices()
        Remove vertices marked with tag PsObject#IS_DELETED from polygons. It is neccessary to keep a valid polygon set after removal of vertices in the superclass.
        Overrides:
        removeMarkedVertices in class PgPointSet
        Returns:
        array with indices of new positions of vertices
        See Also:
        PgPointSet.removeMarkedVertices()
        Version:
        23.10.05, 1.00 created (kp) From PgPointSet#removeMarkedVertices().
      • merge

        public boolean merge(PgGeometryIf aGeom)
        Merge polygon with current object and store union of both objects in 'this'. Number of points and polygons is the sum of both objects unless last vertex of this polygon is PuMath.EPS close to first vertex of argument polygon, which would be identified.

        Polygon will not be closed, even if it was closed before.

        The merged geometry will have 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
        Author:
        Konrad Polthier
        Version:
        22.10.05, 1.00 created (kp)
      • blend

        public boolean blend(double s,
                             PgGeometry ag,
                             double t,
                             PgGeometry bg)
        Blend between two polygons 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
        Author:
        Konrad Polthier
        Version:
        10.11.01, 2.00 revised (kp) Interpolation of material properties enabled.
        31.12.97, 1.00 created (kp)
      • makeVertexNormals

        public boolean makeVertexNormals()
        Compute normals at vertices as edge bisectors with unit length. All normals are oriented to show to the same side of the polygon as the first normal which is non-degenerate.

        This method correctly handles polygons with sequences of parallel edges and multiple vertices.

        Overrides:
        makeVertexNormals in class PgPointSet
        Author:
        Konrad Polthier
        Version:
        31.07.04, 3.00 revised (kp) Renamed to makeVertexNormals() from makeNormals().
        09.06.01, 2.00 revised (kp) Full revision to incorporate all degenerate cases.
        08.06.01, 1.00 created (kp) Created from former version of makeBiNormals().
      • makeNormals

        public void makeNormals()
        Deprecated. since JavaView 3.50.002, use makeVertexNormals().
        Compute normals at vertices as edge bisectors with unit length.
      • makeBiNormals

        public void makeBiNormals()
        Compute binormals at vertices which are orthogonal to both adjacent edges. All binormals lie in the span of the two edges of a vertex and all binormals have the same orientation as the normal vector of the enclosed patch surface.

        This method correctly handles polygons with sequences of parallel edges and multiple vertices.

        Author:
        Konrad Polthier
        Version:
        08.06.01, 1.00 revised (kp)
        08.06.01, 1.00 created (kp) Method simply calls makeNormals()
      • makeOffsetNormals

        public void makeOffsetNormals()
        Compute normals at vertices as edge bisectors whose tip lies on an offset==1 curve. All normals are oriented to show to the same side of the polygon as the first normal which is non-degenerate.

        This method correctly handles polygons with sequences of parallel edges and multiple vertices.

        Author:
        Konrad Polthier
        Version:
        08.06.01, 1.00 revised (kp)
        08.06.01, 1.00 created (kp) Method simply calls makeNormals()
      • makeCurvatureNormals

        public void makeCurvatureNormals()
        Compute normals at vertices as edge bisectors with length equal to (Pi-vertexAngle). All normals are oriented to show to the same side of the polygon as the first normal which is non-degenerate.

        This method correctly handles polygons with sequences of parallel edges and multiple vertices.

        Author:
        Konrad Polthier
        Version:
        08.06.01, 1.00 revised (kp)
        08.06.01, 1.00 created (kp) Method simply calls makeNormals()
      • makeNormals

        public void makeNormals(int type,
                                double length)
        Compute normals at vertices which lie in the span of the adjacent edges. All normals are oriented to show to the same side of the polygon as the first normal which is non-degenerate.

        This method correctly handles polygons with sequences of parallel edges and multiple vertices.

        Author:
        Konrad Polthier
        Version:
        15.07.05, 2.30 revised (kp) Bug with 2d normals removed, vectors now remain 2d.
        15.02.05, 2.20 revised (ep) Bug with 2d straight segments removed.
        22.11.01, 2.10 revised (kp) Bug with polygons of three vertices removed.
        09.06.01, 2.00 revised (kp) Full revision to incorporate all degenerate cases.
        08.06.01, 1.00 created (kp) Created from former version of makeBiNormals().
      • checkTriangleCut

        public boolean checkTriangleCut(int vertexInd,
                                        PdVector normal)
        Given a simple closed, nearly planar polygon, then the function tests whether three successive points of the polygon form a triangle which can be cut off the polygon, i.e. the triangle does not contain any other vertex of the polygon.

        Remark: this condition is only valid of the projection of the polygon onto a plane orthogonal to the normal of the polygon is a simple closed curve with no self-intersections.

        Fuer den Test wird abgefragt, ob die uebrigen Eckpunkte des Polygons im Innern des vom Dreieck p1,p2,p3 und der Normalen orient gebildeten Prismas liegt. Wenn alle Punkte ausserhalb liegen, so verlaeuft Linie im Innern d. Polygons.

        Parameters:
        vertexInd - index of middle vertex which might be cut off
        normal - normal of polygon, used as orientation, i.e. polygon runs counter-clockwise around normal
        Author:
        Konrad Polthier
        Version:
        10.6.98, 1.10 revised (kp) for Java.
        10.6.90, 1.00 created (kp) Original Fortran version "chckct.f"
      • triangulate

        public PiVector[] triangulate()
        Given a simple closed, nearly planar polygon, then the method triangulates the patch by successively removing the vertex with the smallest interior angle. The method can handle non-convex polygons.

        ToDo: But until now it cannot handle situations where an edge introduced by removing a vertex may intersect the polygon somewhere else. To solve this problem the above method checkTriangleCut must be employed.

        Returns:
        Array of vectors each containing the vertex indices of a triangle.
        Author:
        Konrad Polthier
        Version:
        12.02.01, 1.20 revised (kp) Remove usage of normal vectors used in PgUtil.triangulate.
        10.06.98, 1.10 revised (kp) Rewritten for Java.
        10.06.90, 1.00 created (kp) Original Fortran version "triplg.f".
      • intersectionWithLine

        public PvPickEvent intersectionWithLine(PdVector rayBaseWorld,
                                                PdVector rayDirWorld)
        Find intersection of polygon with a given ray. Closest polygon edge is located. Method is used for interactive picking. Base and direction of ray must be given in 3D world coordinates.
        Specified by:
        intersectionWithLine in interface PgGeometryIf
        Overrides:
        intersectionWithLine in class PgPointSet
        Parameters:
        rayBaseWorld - 3D base point of ray eventually hitting the surface.
        rayDirWorld - 3D direction vector of ray eventually hitting the surface.
        Returns:
        full information about hit element, barycentric coordinates etc.
        Author:
        Konrad Polthier
        Version:
        04.09.06, 2.31 revised (kp) Bary now contains element index.
        01.04.06, 2.30 revised (kp) Conversion of world to model coordinate move to this method from PvDisplay.
        15.02.05, 2.20 revised (kp) Use horizontal distance, diameter constraint removed.
        25.03.01, 2.10 revised (kp) Use point on geometry as vertex, use rayBase as viewBase.
        04.03.01, 2.00 revised (kp) Rewritten intersectionWithLine() to handle vertices in dim 2 and 3.
        02.12.00, 1.10 revised (kp) Use minDist as distance, use rayBase as vertex.
        02.12.00, 1.00 created (kp) From similar method PgPolygonSet.
      • getFVector

        public int[] getFVector()
        Compute F-vector that is the number of points, edges, faces, etc.
        Overrides:
        getFVector in class PgPointSet
        Version:
        21.12.02, 1.20 revised (kp) Calculation corrected which came from a cut-and-paste error.
        20.12.01, 1.10 revised (kp) Renamed to getFVector() from getEulerNumbers().
        04.11.01, 1.00 created (kp)
      • flipOrientation

        public void flipOrientation()
        Change orientation of the polygon by inverting the order of vertices of the pointSet, i.e. the end point becomes the first point. The superclass multiplies each normal vector with -1.
        Overrides:
        flipOrientation in class PgPointSet
        Author:
        Konrad Polthier
        Version:
        22.11.01, 1.00 created (kp)
      • makeEdgeColorsFromXYZ

        public boolean makeEdgeColorsFromXYZ()
        Create color from the edge position within its bounding box which is interpreted as RGB cube. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        26.04.03, 1.00 created (kp)
      • makeEdgeColorsFromZ

        public boolean makeEdgeColorsFromZ()
        Create color from the vertical z-height within its bounding box ranging from low blue to high red. If dimension of vertices is smaller than three then the highest vertex component is used instead of the z-component in the color computation.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        16.04.05, 1.20 revised (kp) Both colors flipped to better sync with Maple.
        26.04.03, 1.00 created (kp)
      • makeEdgeColorsFromZHue

        public boolean makeEdgeColorsFromZHue()
        Create color from the vertical z-height within its bounding box ranging through hue rainbow. If dimension of vertices is smaller than three then the highest vertex component are used instead of the z-component in the color computation.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        17.04.05, 1.20 revised (kp) Expand color spectrum to [magenta,red] from [blue,red].
        26.04.03, 1.00 created (kp)
      • isShowingSmoothLighting

        public boolean isShowingSmoothLighting()
        Determines whether smooth lighting is enabled, requires vertex normals.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • showSmoothLighting

        public void showSmoothLighting(boolean flag)
        Set flag to enable smooth lighting, requires vertex normals.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • isShowingSmoothEdgeColors

        public boolean isShowingSmoothEdgeColors()
        Determines whether smooth coloring of edges is enabled, currently requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • showSmoothEdgeColors

        public void showSmoothEdgeColors(boolean flag)
        Set flag to enable smooth coloring of edges, currently requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • isShowingEdgeColorFromVertices

        public boolean isShowingEdgeColorFromVertices()
        Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • showEdgeColorFromVertices

        public void showEdgeColorFromVertices(boolean flag)
        Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • isShowingEdgeFromVertexColors

        public boolean isShowingEdgeFromVertexColors()
        Deprecated. since JavaView 3.96.031, use #isShowingEdgeColorFromVertices()
        Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • showEdgeFromVertexColors

        public void showEdgeFromVertexColors(boolean flag)
        Deprecated. since JavaView 3.96.031, use #showEdgeColorFromVertices(boolean)
        Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 2.69
        Version:
        26.04.03, 1.00 created (kp)
      • makeEdgeFromVertexColors

        public boolean makeEdgeFromVertexColors()
        Create edge colors as average of the color of its two vertices. Vertex colors must be available.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        24.04.03, 1.00 created (kp)
      • makeVertexFromEdgeColors

        public boolean makeVertexFromEdgeColors()
        Create vertex colors as average of color of all adjacent edges. Edge colors must be available.
        Since:
        JavaView 2.69
        Author:
        Konrad Polthier
        Version:
        24.04.03, 1.00 created (kp)
      • makeEdgeColorsFromLength

        public boolean makeEdgeColorsFromLength()
        Create edge color from the polygon length ranging through hue rainbow. If polygon is closed then both end points have the same color red, otherwise color ranges from red to bluish.
        Since:
        JavaView 2.70
        Author:
        Konrad Polthier
        Version:
        02.05.03, 1.00 created (kp)
      • makeVertexColorsFromLength

        public boolean makeVertexColorsFromLength()
        Create vertex color from the polygon length ranging through hue rainbow. If polygon is closed then both end points have the same color red, otherwise color ranges from red to bluish.
        Since:
        JavaView 2.70
        Author:
        Konrad Polthier
        Version:
        02.05.03, 1.00 created (kp)
"JavaView? v5.03.003"

"

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

Ads help maintain this website.