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

Class PgJvxSrc

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf
    Direct Known Subclasses:
    PgRuler, PvGeometry, PvLight


    public class PgJvxSrc
    extends PgGeometry
    Container of very diverse geometry data of points, curves, surfaces, and volumes. This class allows temporary storage and exchange of data. For example, this class is filled by loaders and later assigned to specialized geometry classes for further processing.

    Note, this class is not intended to perform geometric operations or even to modify data once it is allocated or assigned. For such operations use more specialized classes as e.g. PgPointSet, PgPolygonSet, or PgElementSet.

    See Also:
    Serialized Form
    Author:
    Konrad Polthier
    Version:
    10.05.14, 3.70 revised (kp) Some query methods for polygon and elements added .
    12.11.09, 3.60 revised (ur) Added missing boundary polygon data.
    02.07.06, 3.50 revised (kp) Edge handling improved, including color and size.
    18.06.06, 3.30 revised (kp) Static variables for texture handling moved to PgGeometryIf.
    12.10.04, 3.20 revised (ur) Copy method implemented.
    13.08.04, 3.10 revised (kp) Implemented computation of vertex normals for smooth lighting, if normals are missing.
    29.02.04, 3.00 revised (kp) Methods on vectorFields removed which were deprecated before JavaView v2.21.
    17.01.04, 2.50 revised (kp) Specular color and shininess added.
    02.01.04, 2.40 revised (kp) Crease angle added.
    19.05.01, 2.30 revised (kp) Vector field handling slightly revised.
    12.12.00, 2.20 revised (kp) Descriptions moved from PgJvxSrc to PgGeometry.
    12.12.00, 2.10 revised (kp) Secondary classification instance variable change to array of strings from pure string.
    26.09.00, 2.00 revised (kp) All integer flags replaced with booleans to conform with PgGeometry.
    21.09.00, 1.25 revised (kp) Methods for global backface element color added.
    07.07.00, 1.20 revised (kp) More missing methods of PgGeometryIf implemented.
    20.04.00, 1.10 revised (kp) Author member variable added.
    08.04.00, 1.00 created (kp) Extracted from jv.project.PgGeometry
    • Constructor Detail

      • PgJvxSrc

        public PgJvxSrc()
        Constructs a geometry container whose vertex dimension is initialized to 3. You are advised to call this method rather than PgJvxSrc(int) to avoid problems with the init() method. This constructor explicitly calls the init() method. These problems are due to JAX.
        See Also:
        PgJvxSrc(int)
        Version:
        17.12.00, 1.10 revised (kp) Init() method now called explicitly.
      • PgJvxSrc

        public PgJvxSrc(int dim)
        This constructor is protected since it does not invoke the init() method when this class equals PgJvxSrc. Therefore, external instantiation of PgJvxSrc should use "new PgJvxSrc();" which calls the init() method explicitly.

        Subclasses of PgJvxSrc are advised to use the construction PgJvxSrc(int) similar to the use of all other geometry classes, and then invoke the init() method inside their own constructor.

        All this business about the init() method is due to JAX which is unable to check against the (obfuscated) class name after obfuscation.

        Version:
        04.05.14, 1.30 revised (kp) Type now initialized in constructor, no longer in init().
        26.08.03, 1.20 revised (kp) Method made public.
        12.08.00, 1.10 revised (kp) Init() method now called conditionally since class no longer final.
    • Method Detail

      • init

        public void init()
        Initializes and resets geometry.
        Overrides:
        init in class PgGeometry
        Version:
        04.05.14, 1.30 revised (kp) Type now initialized in constructor, no longer in init().
      • setDimOfVertices

        public void setDimOfVertices(int dim)
        Assign dimension of vertices. This method only adjusts the size of vertices, and for example, not of vectors. Note, this class is not intended for changing the geometry data once it is assigned.
        Overrides:
        setDimOfVertices in class PgGeometry
        Version:
        07.03.03, 1.50 revised (kp) Adjust size of vertices since classes in PvDisplay require this.
        11.12.02, 1.10 revised (kp) Call superclass method.
      • getBounds

        public PdVector[] getBounds()
        Compute bounding box of the vertices which are transformed with ambient and model matrix.

        The two returned bounding box vectors are 3-dimensional. If dimension of vertices is less than 3 then remaining components are zeroed.

        Note, transformation not supported yet.

        Overrides:
        getBounds in class PgGeometry
        Returns:
        two 3d vectors which are the extremal corners of the bounding cube
        See Also:
        getAmbientBounds()
        Version:
        14.05.01, 1.10 revised (kp) Dimension of bounding box vector now always 3.
      • getAmbientBounds

        public PdVector[] getAmbientBounds()
        Compute bounding box of this geometry from the set of all vertices, or return null if no vertices. Method returns two vectors whose size is equal to the dimension of this geometry. The two bounding vectors are first, the minimal corner, and second, the maximal corner of the bounding m_dim-cube. Both vectors uniquely determine the bounding box. Note, the bounding box does not include transformations from the ambient or model matrix.
        Overrides:
        getAmbientBounds in class PgGeometry
        Returns:
        two vectors which are the extremal corners of the bounding cube
        See Also:
        getBounds()
        Version:
        14.05.01, 1.00 created (kp)
      • setState

        public void setState(int aKey,
                             boolean aState)
        Set drawing flags of this geometry from within the display. Currently, this method is not intended for public use.
        Specified by:
        setState in interface PgGeometryIf
        Overrides:
        setState in class PgGeometry
        Parameters:
        aKey - flag to be set, choose among PvGeometryIf.SHOW_...
        aState - enable or disable state
      • 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 PgGeometry
        Returns:
        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 PgGeometry
        Parameters:
        src - a geometry source used to fill this instance with data.
      • copy

        public void copy(PgJvxSrc src)
        Copy argument PgJvxSrc into this.
        Version:
        12.10.04, 1.00 created (ur)
      • 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 PgGeometry
        See Also:
        copy(PgJvxSrc)
        Version:
        12.12.00, 1.10 revised (kp) Descriptions moved from PgJvxSrc to PgGeometry.
        17.11.00, 1.00 created (kp)
      • getNumVertices

        public int getNumVertices()
        Get number of vertices in vertex array.
      • getVertices

        public PdVector[] getVertices()
        Get vertex array for read and write access, but do not modify the size of any vertex.
      • getVertexColors

        public java.awt.Color[] getVertexColors()
        Get vertex color array for read and write access.
      • getVertexNormals

        public PdVector[] getVertexNormals()
        Get vertex normal array for read and write access, but do not modify the size of any normal vector.
      • getVertexSizes

        public PdVector getVertexSizes()
        Get vertex size array for read and write access.
        Since:
        JavaView 2.43
      • getVertexTextures

        public PdVector[] getVertexTextures()
        Get vertex texture array for read and write access, but do not modify the size of any texture vector.
      • getNumPolygons

        public int getNumPolygons()
        Get number of allocated and used polygons.
      • getPolygons

        public PiVector[] getPolygons()
        Get polygon array for read and write access, but do not modify the size of any polygon.
      • getPolygonColors

        public java.awt.Color[] getPolygonColors()
        Get polygon colors for read and write access.
      • getPolygonNormals

        public PdVector[] getPolygonNormals()
        Get polygon normals array for read and write access, but do not modify the size of any normal vector.
      • getPolygonSizes

        public PdVector getPolygonSizes()
        Get polygon sizes for read and write access.
      • getNumElements

        public int getNumElements()
        Get number of allocated and used elements.
      • getElements

        public PiVector[] getElements()
        Get element array for read and write access, but do not modify the size of any element.
      • getElementColors

        public java.awt.Color[] getElementColors()
        Get element color array for read and write access.
      • getElementBackColors

        public java.awt.Color[] getElementBackColors()
        Get backside element color array for read and write access.
      • getElementNormals

        public PdVector[] getElementNormals()
        Get element normal array for read and write access, but do not modify the size of any normal vector.
      • getElementTextures

        public PdVector[][] getElementTextures()
        Get element texture array for read and write access, but do not modify the size of any texture vector.
      • getNeighbours

        public PiVector[] getNeighbours()
        Get neighbourhood information.
      • addVertex

        public int addVertex(PdVector aVertex)
        Add new vertex to the end of the vertex list Method just calls setVertex(int, PdVector) with index=getNumVertices().
        Specified by:
        addVertex in interface PgGeometryIf
        Overrides:
        addVertex in class PgGeometry
        Parameters:
        aVertex - vertex to be added to vertex list
        Returns:
        index of added vertex in vertex list
      • getVertex

        public PdVector getVertex(int anIndex)
        Get a reference to an individual vertex.
        Specified by:
        getVertex in interface PgGeometryIf
        Overrides:
        getVertex in class PgGeometry
        Parameters:
        anIndex - index of vertex
        Returns:
        reference to vertex vector with given index
      • setVertex

        public boolean setVertex(int anIndex,
                                 PdVector aVertex)
        Copy new vertex to vertex at specified position in the vertex list
        Specified by:
        setVertex in interface PgGeometryIf
        Overrides:
        setVertex in class PgGeometry
        Parameters:
        anIndex - index of vertex position
        aVertex - vertex to be copied to vertex list
        Returns:
        false if index out of range, or argument missing
      • setNumVertices

        public void setNumVertices(int numVertices)
        Allocate given number of vertices, and allocate normals, colors etc. if they already exist. The user should change the number of vertices only via this method.
        Parameters:
        numVertices - new number of vertices of this geometry.
      • hasVertexColors

        public boolean hasVertexColors()
        Check if vertex colors have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureVertexColors()
      • hasVertexNormals

        public boolean hasVertexNormals()
        Check if vertex normals have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureVertexNormals()
      • hasVertexSizes

        public boolean hasVertexSizes()
        Check if relative vertex sizes have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureVertexSizes()
      • hasVertexTextures

        public boolean hasVertexTextures()
        Check if vertex textures have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureVertexTextures()
      • assureVertexColors

        public void assureVertexColors()
        Assures respectively allocates correct length of vertex color array. Length of array is equal to length of maximal number of vertices.
      • assureVertexNormals

        public void assureVertexNormals()
        Assures respectively allocates correct length of vertex normal array. Length of array is equal to length of vertex array. Dimension of normal vectors is equal to dimension of maximal number of vertices.
      • assureVertexSizes

        public void assureVertexSizes()
        Assures respectively allocates correct length of vertex size array. Length of array is equal to length of vertex array. Dimension of size vectors is equal to dimension of maximal number of vertices.
        Since:
        JavaView 2.43
      • assureVertexTextures

        public void assureVertexTextures()
        Assures respectively allocates correct length of vertex texture array. Length of array is equal to length of vertex array. Dimension of texture coordinates will be equal.
      • getDimOfTextures

        public int getDimOfTextures()
        Get dimension of textures, i.e. number of components of each of the texture vectors.
        Version:
        27.12.03, 1.00 created (kp)
      • setDimOfTextures

        public void setDimOfTextures(int dim)
        Set dimension of textures, i.e. number of components of each of the texture vectors.
        Version:
        07.06.10, 1.00 created (ur)
      • getDimOfVectors

        public int getDimOfVectors(int ind)
        Get uniform number of components of each vector in a vector field.
      • getNumVectors

        public int getNumVectors(int ind)
        Get number of vectors in vector field with given index.
      • setNumVectors

        public void setNumVectors(int ind,
                                  int num,
                                  int dimOfVectors)
        Set number of vectors of a vector field with given index.
        Parameters:
        ind - index of vector field
        num - number of vectors in that vector field
        dimOfVectors - dim of vectors in that vector field
      • getNumVectorFields

        public int getNumVectorFields()
        Get number of allocated and used vector fields.
      • setNumVectorFields

        public void setNumVectorFields(int num)
        Set number of allocated and used vector fields.
        Parameters:
        num - number of vector fields
      • getVectors

        public PdVector[] getVectors(int ind)
        Get array of a vectors of a field for read and write access.
      • setVectors

        public void setVectors(int ind,
                               PdVector[] list)
        Copy all vectors of vector list to existing array of vectors. Length of argument vector list must be equal or larger than getNumVectors(). All vectors are copied. The dimension of all argument vectors must be equal to getDimOfVectors(ind) of the vector field.
        Parameters:
        ind - index of vector field
        list - array with new vectors
      • getVectorFieldName

        public java.lang.String getVectorFieldName(int ind)
        Get name of vector field.
      • setVectorFieldName

        public void setVectorFieldName(int ind,
                                       java.lang.String name)
        Set name of vector field.
      • isShowingVectorArrows

        public boolean isShowingVectorArrows(int ind)
        Get flag if tip of vectors is shown as arrow.
      • showVectorArrows

        public void showVectorArrows(int ind,
                                     boolean flag)
        Set flag if tip of vectors is shown as arrow.
      • isVectorElementBased

        public boolean isVectorElementBased(int ind)
        Get flag whether vector field is element based or vertex based.
      • setVectorElementBased

        public void setVectorElementBased(int ind,
                                          boolean flag)
        Set flag whether vector field is element based or vertex based.
        Parameters:
        ind - index of vector field.
        flag - true if element based vf, false if vertex based vf.
      • isShowingIndividualMaterial

        public boolean isShowingIndividualMaterial(int ind)
        Deprecated. Since JavaView 3.98.003, use isShowingVectorFieldMaterials(int) instead
        Get flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of vector field
        Returns:
        true if individual material of this vector field is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • isShowingVectorFieldMaterials

        public boolean isShowingVectorFieldMaterials(int ind)
        Get flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of vector field
        Returns:
        true if individual material of this vector field is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • showIndividualMaterial

        public void showIndividualMaterial(int ind,
                                           boolean flag)
        Deprecated. Since JavaView 3.98.003, use showVectorFieldMaterials(int,boolean) instead
        Set flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of vector field
        flag - true if individual material of this vector field is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • showVectorFieldMaterials

        public void showVectorFieldMaterials(int ind,
                                             boolean flag)
        Set flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of vector field
        flag - true if individual material of this vector field is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • isShowingVectorFields

        public boolean isShowingVectorFields()
        Get flag to enable drawing of all vector fields if each is visible.
      • showVectorFields

        public void showVectorFields(boolean flag)
        Set flag to enable drawing of all vector fields which are visible.
      • isShowingVectorField

        public boolean isShowingVectorField(int ind)
        Get flag to enable drawing of vectors of a vector field.
      • showVectorField

        public void showVectorField(int ind,
                                    boolean flag)
        Set flag to enable drawing of vectors of a vector field.
      • isShowingVectorColors

        public boolean isShowingVectorColors(int ind)
        Get flag to enable drawing of individual vertex colors of a vector field.
      • showVectorColors

        public void showVectorColors(int ind,
                                     boolean flag)
        Set flag to enable drawing of individual vertex colors of a vector field.
      • getGlobalVectorColor

        public java.awt.Color getGlobalVectorColor(int ind)
        Get global color of vector field which is used if no local colors are available.
      • setGlobalVectorColor

        public boolean setGlobalVectorColor(int ind,
                                            java.awt.Color color)
        Set global color of vector field to be used if no local colors are available.
      • getGlobalVectorLength

        public double getGlobalVectorLength(int ind)
        Get length factor of vectors of vector field when drawn in display.
      • setGlobalVectorLength

        public boolean setGlobalVectorLength(int ind,
                                             double length)
        Set length factor of vectors of vector field when drawn in display.
      • getGlobalVectorSize

        public double getGlobalVectorSize(int ind)
        Get thickness in pixels of vectors of vector field when drawn in display.
      • setGlobalVectorSize

        public boolean setGlobalVectorSize(int ind,
                                           double size)
        Set thickness in pixels of vectors of vector field when drawn in display.
      • assureVectorColors

        public void assureVectorColors(int ind)
        Assures respectively allocates correct length of element color array. Length of array is equal to length of element array.
        Parameters:
        ind - index of vector field
      • getVectorFieldColors

        public java.awt.Color[] getVectorFieldColors(int ind)
        Get color array of a vector field for read and write access.
        Parameters:
        ind - index of vector field
      • setVectorColors

        public void setVectorColors(int ind,
                                    java.awt.Color[] list)
        Copy vector colors of list to existing array of vector colors. Length of argument list must be equal or larger than getNumVectors(int).
        Parameters:
        ind - index of vector field
        list - array with new vector colors
      • getDimOfPolygons

        public int getDimOfPolygons()
        Get uniform number of vertices of all polygons, or individual aSize=-1.
        Since:
        JavaView 2.69
        Version:
        27.04.03 1.00 created (kp)
      • setDimOfPolygons

        public void setDimOfPolygons(int aSize)
        Let all polygons have same number of vertices aSize!=0, or individual aSize=-1. It is more efficient to call method before setNumPolygons().
        Parameters:
        aSize - Number of vertices for all polygons.
        See Also:
        setNumPolygons(int)
        Version:
        04.10.99 1.10 revised (kp) Now run until maxNumPolygons when changing dim.
        04.10.99 1.00 created (kp)
      • setNumPolygons

        public void setNumPolygons(int numPolygons)
        Allocate given number of polygons, and allocate normals, colors etc. if they already exist. The user should change the number of polygons only via this method. If dimension of polygons is '-1' then only the polygon array is allocated and not the individual polygons.
      • hasPolygonColors

        public boolean hasPolygonColors()
        Check if polygon colors have been allocated.
        Since:
        JavaView 4.20.015
        See Also:
        assurePolygonColors()
      • hasPolygonNormals

        public boolean hasPolygonNormals()
        Check if polygon normals have been allocated.
        Since:
        JavaView 4.20.015
        See Also:
        assurePolygonNormals()
      • assurePolygonColors

        public void assurePolygonColors()
        Assures respectively allocates correct length of polygon color array. Length of array is equal to length of polygon array.
      • assurePolygonNormals

        public void assurePolygonNormals()
        Assures respectively allocates correct length of polygon normal array. Length of array is equal to length of polygon array. Dimension of normal vectors is equal to dimension of vertices.
      • getNumEdges

        public int getNumEdges()
        Get number of allocated and used edges.
      • setNumEdges

        public void setNumEdges(int aNumEdges)
        Allocate given number of edges, and allocate normals, colors etc. if they already exist. The user should change the number of edges only via this method.
      • getEdges

        public PiVector[] getEdges()
        Get edge array for read and write access, but do not modify the size of any edge.
      • setEdges

        public void setEdges(PiVector[] edge)
        Copy the first m_numEdges of given array into edge array. Must call setNumEdges(int) before to allocate argument array. If argument array too small do nothing.
        Parameters:
        edge - array of edge vectors to be copied
      • getElementEdges

        public PiVector[] getElementEdges()
        Get an array which stores for each element the indices of its incident edges. For each element, the indices of the incident edges are ordered in the same way as the neighbour array.
        Returns:
        array of length=numElements with indices of edges
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • setElementEdges

        public void setElementEdges(PiVector[] elementEdge)
        Set an array which stores for each element the indices of its incident edges. For each element, the indices of the incident edges are ordered in the same way as the neighbour array.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • assureElementEdges

        public void assureElementEdges()
        Assures respectively allocates correct length of element-edge incidence array. Length of array is equal to length of element array.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • 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 array may be larger than the number of used edges for efficiency reasons. Therefore, do not use length of array.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • hasEdgeColors

        public boolean hasEdgeColors()
        Check if edge colors have been allocated.
        Since:
        JavaView 3.96.026
        See Also:
        assureEdgeColors()
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • assureEdgeColors

        public void assureEdgeColors()
        Assures respectively allocates correct length of edge color array. Length of array is equal to length of edge array.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • setEdgeColors

        public void setEdgeColors(java.awt.Color[] colorList)
        Copy 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 copied. The dimension of all argument colors must be equal to getDimOfColors() of the geometry.

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

        Parameters:
        colorList - array with new edge colors
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • isShowingEdgeColors

        public boolean isShowingEdgeColors()
        Determine whether showing of edge colors is enabled.
      • showEdgeColors

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

        public PdVector getEdgeSizes()
        Get array of relative edge sizes for read and write access. Also note, that the actual size of the array may be larger than the number of used edges for efficiency reasons. Therefore, do not use length of array.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • assureEdgeSizes

        public void assureEdgeSizes()
        Assures respectively allocates correct length of edge size array. Length of array is equal to length of edge array. Dimension of size vector is equal to maximal number of vertices.
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • setEdgeSizes

        public void setEdgeSizes(PdVector edgeSize)
        Assign a set of relative 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:
        edgeSize - array with new edge size for all edges
        Since:
        JavaView 3.96.026
        Author:
        Konrad Polthier
        Version:
        02.07.06, 1.00 created (kp)
      • isShowingEdgeSizes

        public boolean isShowingEdgeSizes()
        Determine whether showing of edge sizes is enabled.
      • showEdgeSizes

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

        public int getDimOfElements()
        Get uniform number of vertices of all elements, or individual aSize=-1.
        Since:
        JavaView 2.69
        Version:
        27.04.03 1.00 created (kp)
      • setDimOfElements

        public void setDimOfElements(int aSize)
        Let all elements have same number of vertices aSize!=0, or individual aSize=-1. It is more efficient to call method before setNumElements().

        Argument must be -1 or >=3. Other values lead to a warning message.

        Parameters:
        aSize - Number of vertices for all elements.
        See Also:
        setNumElements(int)
        Version:
        13.06.00, 1.20 revised (kp) Assure that argument is -1 or >=3.
        30.07.99, 1.10 revised (kp) Now run until maxNumElements when changing dim.
        00.00.98, 1.00 created (kp)
      • setNumElements

        public void setNumElements(int numElements)
        Allocate given number of elements, and allocate neighbours, normals, colors etc. if they already exist. The user should change the number of elements only via this method. If dimension of elements is '-1' then only the element array is allocated and not the individual elements.

        If the new number of elements is zero then dimension of elements is set to -1.

        Parameters:
        numElements - new number of faces.
      • assureNeighbours

        public void assureNeighbours()
        Assures correct length of neighbour array and, if any length changes, initializes with -1. Length of array is equal to all lengths of element array. Variable m_dimOfElements is used to determine length of neighbour array for each element if m_dimOfElement!=-1. Initialization of neighbour array with -1 marks each edge as boundary edge.

        If neighbour array or any individual vector changes length, then neighbour is set to -1.

        Version:
        08.03.01 revised (ur) Initialize neighbour with -1 for m_neighbour.length != m_maxNumElements too.
        25.02.01 revised (kp) Return if length of all neighbour data is identical to length of element data.
        11.07.00 revised (kp) If-statement extended to catch not fully allocated neighbour arrays.
        30.12.99 revised (kp) Method access level reduced to protected from public.
        21.08.99 revised (kp) Initialization only if any length has changed.
      • hasElementColors

        public boolean hasElementColors()
        Check if element colors have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureElementColors()
      • hasElementBackColors

        public boolean hasElementBackColors()
        Check if element back colors have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureElementBackColors()
      • hasElementNormals

        public boolean hasElementNormals()
        Check if element normals have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureElementNormals()
      • hasElementTextures

        public boolean hasElementTextures()
        Check if element textures have been allocated.
        Since:
        JavaView 4.20.012
        See Also:
        assureElementTextures()
      • assureElementColors

        public void assureElementColors()
        Assures respectively allocates correct length of element color array. Length of array is equal to length of element array.
      • assureElementBackColors

        public void assureElementBackColors()
        Assures respectively allocates correct length of element back face color array. Length of array is equal to length of element array.
      • assureElementNormals

        public void assureElementNormals()
        Assures respectively allocates correct length of element normal array. Length of array is equal to length of element array. Dimension of normal vectors is equal to dimension of vertices.
      • assureElementTextures

        public void assureElementTextures()
        Assures respectively allocates correct length of element texture array. Length of array is equal to length of element array. Texture values are lost if number of elements changes.
      • getGlobalVertexColor

        public java.awt.Color getGlobalVertexColor()
        Get global vertex color which is used if no local colors are available.
      • getGlobalVertexTagColor

        public java.awt.Color getGlobalVertexTagColor()
        Get global color of tagged vertices.
      • getGlobalVertexSize

        public double getGlobalVertexSize()
        Get global radius in pixels of circle to visualize vertices in display.
      • getGlobalVertexNormalColor

        public java.awt.Color getGlobalVertexNormalColor()
        Get global vertex normal color which is used if no local colors are available.
      • getGlobalVertexNormalLength

        public double getGlobalVertexNormalLength()
        Get length factor of vertex normal vectors when drawn in display.
      • getGlobalVertexNormalSize

        public double getGlobalVertexNormalSize()
        Get thickness in pixels of vertex normals when drawn in display.
      • setGlobalVertexColor

        public void setGlobalVertexColor(java.awt.Color color)
        Set global vertex color to be used if no local colors are available.
      • setGlobalVertexTagColor

        public void setGlobalVertexTagColor(java.awt.Color color)
        Set global color of tagged vertices.
      • setGlobalVertexSize

        public void setGlobalVertexSize(double size)
        Set global radius in pixels of circle to visualize vertices in display.
      • setGlobalVertexNormalColor

        public void setGlobalVertexNormalColor(java.awt.Color color)
        Set global vertex normal color to be used if no local colors are available.
      • setGlobalVertexNormalLength

        public void setGlobalVertexNormalLength(double length)
        Get length factor of vertex normal vectors when drawn in display.
      • setGlobalVertexNormalSize

        public void setGlobalVertexNormalSize(double size)
        Get thickness in pixels of vertex normals when drawn in display.
      • getGlobalPolygonColor

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

        public java.awt.Color getGlobalPolygonTagColor()
        Get global color of tagged vertices.
      • getGlobalPolygonSize

        public double getGlobalPolygonSize()
        Get global radius in pixels of circle to visualize vertices in display.
      • getGlobalPolygonNormalColor

        public java.awt.Color getGlobalPolygonNormalColor()
        Get global polygon normal color which is used if no local colors are available.
      • getGlobalPolygonNormalLength

        public double getGlobalPolygonNormalLength()
        Get length factor of normal vectors when drawn in display.
      • getGlobalPolygonNormalSize

        public double getGlobalPolygonNormalSize()
        Get thickness in pixels of normals when drawn in display.
      • setGlobalPolygonColor

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

        public void setGlobalPolygonTagColor(java.awt.Color color)
        Set global color of tagged vertices.
      • setGlobalPolygonSize

        public void setGlobalPolygonSize(double size)
        Set global radius in pixels of circle to visualize vertices in display.
      • setGlobalPolygonNormalColor

        public void setGlobalPolygonNormalColor(java.awt.Color color)
        Set global polygon normal color to be used if no local colors are available.
      • setGlobalPolygonNormalLength

        public void setGlobalPolygonNormalLength(double length)
        Get length factor of normal vectors when drawn in display.
      • setGlobalPolygonNormalSize

        public void setGlobalPolygonNormalSize(double size)
        Get thickness in pixels of normals when drawn in display.
      • 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 vertices.
      • getGlobalEdgeSize

        public double getGlobalEdgeSize()
        Get global radius in pixels of circle to visualize vertices 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 vertices.
      • setGlobalEdgeSize

        public void setGlobalEdgeSize(double size)
        Set global radius in pixels of circle to visualize vertices 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)
      • getGlobalElementColor

        public java.awt.Color getGlobalElementColor()
        Get global element color which is used if no local colors are available.
      • getGlobalElementBackColor

        public java.awt.Color getGlobalElementBackColor()
        Get global color of backface of elements.
      • getGlobalElementTagColor

        public java.awt.Color getGlobalElementTagColor()
        Get global color of tagged elements.
      • getGlobalElementNormalColor

        public java.awt.Color getGlobalElementNormalColor()
        Get global element normal color which is used if no local colors are available.
      • getGlobalElementNormalLength

        public double getGlobalElementNormalLength()
        Get length factor of normal vectors when drawn in display.
      • getGlobalElementNormalSize

        public double getGlobalElementNormalSize()
        Get thickness in pixels of normals when drawn in display.
      • setGlobalElementColor

        public void setGlobalElementColor(java.awt.Color color)
        Set global element color to be used if no local colors are available.
      • setGlobalElementBackColor

        public void setGlobalElementBackColor(java.awt.Color color)
        Set global color of backface of elements.
      • setGlobalElementTagColor

        public void setGlobalElementTagColor(java.awt.Color color)
        Set global color of tagged elements.
      • setGlobalElementNormalColor

        public void setGlobalElementNormalColor(java.awt.Color color)
        Set global element normal color to be used if no local colors are available.
      • setGlobalElementNormalLength

        public void setGlobalElementNormalLength(double length)
        Get length factor of normal vectors when drawn in display.
      • setGlobalElementNormalSize

        public void setGlobalElementNormalSize(double size)
        Get thickness in pixels of normals when drawn in display.
      • getCreaseAngle

        public double getCreaseAngle()
        Get crease angle which is a threshold determining sharp crease edges.
        Since:
        JavaView 3.03.007
        See Also:
        setCreaseAngle(double)
        Version:
        02.01.04, 1.00 created (kp)
      • setCreaseAngle

        public void setCreaseAngle(double angle)
        Set crease angle which is a threshold determining sharp crease edges. In smooth lighting and shading there is no interpolation across crease edges. An edge is a crease edge if the dihedral angle (positive angle between normals) between the two adjacent faces is equal or larger than the crease angle threshold. The crease angle is measure in radians in [0,Pi]. A crease angle 0 induces flat shading and prevents all smoothing, and a crease angle Pi+eps shows all edges with smooth shading.
        Since:
        JavaView 3.03.007
        See Also:
        getCreaseAngle()
        Version:
        02.01.04, 1.00 created (kp)
      • getBndName

        public java.lang.String getBndName(int ind)
        Get thickness in pixels of boundary polygon.
      • setBndName

        public void setBndName(int ind,
                               java.lang.String name)
        Set thickness in pixels of boundary polygon.
      • getBndElementInd

        public PiVector getBndElementInd(int i)
        Get indices of surface elements along boundary.
      • setBndElementInd

        public void setBndElementInd(int ind,
                                     PiVector elemInd)
        Set indices of surface elements along boundary.
      • getBndNeighbourLocInd

        public PiVector getBndNeighbourLocInd(int i)
        Get local indices of opposite vertices of edge in surface element.
      • setBndNeighbourLocInd

        public void setBndNeighbourLocInd(int ind,
                                          PiVector oppLocInd)
        Set local indices of opposite vertices of edge in surface element.
      • setBndNumVertices

        public void setBndNumVertices(int ind,
                                      int num)
        Set number of a boundary polygon's vertices.
      • getBndNumVertices

        public int getBndNumVertices(int ind)
        Get number of a boundary polygon's vertices.
      • setBndVertices

        public void setBndVertices(int ind,
                                   PdVector[] vertex)
        Set vertices to a boundary polygon.
      • getBndVertices

        public PdVector[] getBndVertices(int ind)
        Get a boundary polygon's vertices.
      • setBndVertexInd

        public void setBndVertexInd(int ind,
                                    PiVector vertexInd)
        Set vertex index information to a boundary polygon.
      • getBndVertexInd

        public PiVector getBndVertexInd(int ind)
        Get vertex index information for a boundary polygon.
      • isShowingBnd

        public boolean isShowingBnd(int ind)
        Determines if boundary polygon is visible.
      • showBnd

        public void showBnd(int ind,
                            boolean flag)
        Set visibility of boundary polygon.
      • getGlobalBndColor

        public java.awt.Color getGlobalBndColor()
        Get global boundary color which is used if no local colors are available.
      • setGlobalBndColor

        public void setGlobalBndColor(java.awt.Color color)
        Set global boundary color to be used if no local colors are available.
      • getGlobalBndTagColor

        public java.awt.Color getGlobalBndTagColor()
        Get global color of tagged boundaries.
      • setGlobalBndTagColor

        public void setGlobalBndTagColor(java.awt.Color color)
        Set global color of tagged boundaries.
      • getBndColor

        public java.awt.Color getBndColor(int ind)
        Get global color of individual boundary polygon unless all have same color.
      • setBndColor

        public boolean setBndColor(int ind,
                                   java.awt.Color color)
        Set global color of individual boundary polygon unless all have same color.
      • getGlobalBndSize

        public double getGlobalBndSize()
        Get thickness in pixels of boundary when drawn in display.
      • setGlobalBndSize

        public void setGlobalBndSize(double size)
        Set thickness in pixels of boundary when drawn in display.
      • getBndSize

        public double getBndSize(int ind)
        Get thickness in pixels of boundary polygon.
      • setBndSize

        public boolean setBndSize(int ind,
                                  double size)
        Set thickness in pixels of boundary polygon.
      • isShowingBndMaterials

        public boolean isShowingBndMaterials(int ind)
        Get flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of boundary polygon
        Returns:
        true if individual material of this boundary polygon is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • showBndMaterials

        public void showBndMaterials(int ind,
                                     boolean flag)
        Set flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        ind - index of boundary polygon
        flag - true if individual material of this boundary polygon is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • getNumBndPolygons

        public int getNumBndPolygons()
        Get number of allocated and used vector fields.
      • setNumBndPolygons

        public void setNumBndPolygons(int num)
        Set number of allocated and used vector fields.
        Parameters:
        num - number of vector fields
      • setVertices

        public void setVertices(PdVector[] vertex)
        Copy all vertices of vertex list to existing array of vertices. Length of argument vertex list must be equal or larger than getNumVertices(). All vertices are copied. The dimension of all argument vertices must be equal to getDimOfVertices() of the geometry.
        Parameters:
        vertex - array with new vertices
        Version:
        07.03.03, 1.10 revised (kp) Ensure that dimension of argument vertices is correct.
      • getVertexFunctions

        public java.lang.String[][] getVertexFunctions()
      • setVertexFunctions

        public void setVertexFunctions(java.lang.String[][] vertexFunction)
        Assign functions for each vertex of the vertex list. Length of argument vertex list must be equal or larger than getNumVertices(). The dimension of all argument vertices must be equal to getDimOfVertices() of the geometry. Remove vertexFunctions by assigning null.
        Parameters:
        vertexFunction - array with new vertex functions
        Version:
        05.02.11, 1.20 revised (kp) Error checking made similar setVertexColors.
        07.03.03, 1.10 revised (kp) Ensure that dimension of argument array is correct.
      • setVertexColors

        public void setVertexColors(java.awt.Color[] colorList)
        Copy vertex colors of list to existing array of vertex colors. Length of argument list must be equal or larger than getNumVertices(). All vertex colors are copied. The dimension of all argument colors must be equal.
        Parameters:
        colorList - array with new vertex colors
      • setVertexNormals

        public void setVertexNormals(PdVector[] normalList)
        Copy vertex normals of list to existing array of vertex normals. Length of argument list must be equal or larger than getNumVertices(). All vertex normals are copied. The dimension of all argument normals must be equal.
        Parameters:
        normalList - array with new vertex normals
      • setVertexSizes

        public void setVertexSizes(PdVector sizeList)
        Copy vertex sizes of list to existing array of vertex sizes. Length of argument list must be equal or larger than getNumVertices().
        Parameters:
        sizeList - array with new vertex sizes
        Since:
        JavaView 2.43
      • setVertexTextures

        public void setVertexTextures(PdVector[] texList)
        Copy vertex textures of list to existing array of vertex textures. Length of argument list must be equal or larger than getNumVertices(). All vertex textures are copied.
        Parameters:
        texList - array with new vertex textures
      • getTextureImageBnd

        public PdVector[] getTextureImageBnd()
        Get bounds of texture image in normalized texture coordinates.
        Returns:
        array of length two with position of lower left and upper right position of image.
        Since:
        JavaView 2.86.000
        Version:
        21.07.03, 1.00 created (kp)
      • setTextureImageBnd

        public void setTextureImageBnd(PdVector[] bnd)
        Set bounds of texture image in normalized texture coordinates. Bounds are given by two vectors with the position of lower left and upper right corner of the texture image in normalized texture coordinates. The dimension of each vector must be equal to the dimension of the texture. For a two-dimensional texture the default is {(0,0),(1,1)}.
        Parameters:
        bnd - array with bounds of image.
        Since:
        JavaView 2.86.000
        Version:
        05.02.11, 1.10 revised (kp) Error checking made similar setVertexColors.
        21.07.03, 1.00 created (kp)
      • getFilterType

        public int getFilterType()
        Get mode how texture image is sampled to compute color of pixel.
        Returns:
        filter type such as PgGeometryIf.FILTER_DIRECT, PgGeometryIf.FILTER_QUADRATIC ...
      • setFilterType

        public void setFilterType(int filterType)
        Set mode how texture image is sampled to compute color of pixel.
        Parameters:
        filterType - filter type such as PgGeometryIf.FILTER_DIRECT, PgGeometryIf.FILTER_QUADRATIC ...
      • getBlendingMode

        public int getBlendingMode()
        Get mode how texture color is applied to surface.
        Returns:
        blending type such as PgGeometryIf.BLEND_REPLACE, PgGeometryIf.BLEND_MATERIAL ...
      • setBlendingMode

        public void setBlendingMode(int blendingMode)
        Set mode how texture color is applied to surface.
        Parameters:
        blendingMode - blending type such as PgGeometryIf.BLEND_REPLACE, PgGeometryIf.BLEND_MATERIAL ...
      • getTexturePeriodic

        public int getTexturePeriodic()
        Get type of periodic extension of texture outside the unit texture square.
        Returns:
        Type which is a value such as m_periodic.
        Since:
        JavaView 3.96.025
        Version:
        22.06.06, 1.00 created (kp)
      • setTexturePeriodic

        public void setTexturePeriodic(int periodic)
        Set number of repetitions of texture image in both directions.
        Parameters:
        periodic - Type of periodic extension such as m_periodic.
        Since:
        JavaView 3.96.025
        Version:
        22.06.06, 1.00 created (kp)
      • getTextureTiling

        public java.awt.Dimension getTextureTiling()
        Get number of repetitions of texture image in both directions.
        Returns:
        Number of repetitions of texture image in both directions.
      • setTextureTiling

        public void setTextureTiling(java.awt.Dimension repeat)
        Set number of repetitions of texture image in both directions.
        Parameters:
        repeat - Number of repetitions of texture image in both directions.
      • getShininess

        public double getShininess()
        Get shininess of highlights of geometry.
      • setShininess

        public void setShininess(double val)
        Set shininess of highlights of geometry.
      • getSpecularColor

        public java.awt.Color getSpecularColor()
        Get specular color of geometry.
      • setSpecularColor

        public void setSpecularColor(java.awt.Color col)
        Set specular color of geometry.
      • isShowingTransparency

        public boolean isShowingTransparency()
        Determines whether usage of transparency is enabled.
      • showTransparency

        public void showTransparency(boolean flag)
        Enable usage of transparency.
      • getTransparency

        public double getTransparency()
        Get transparency of geometry.
      • setTransparency

        public void setTransparency(double alpha)
        Set transparency of geometry.
      • setPolygons

        public void setPolygons(PiVector[] polygon)
        Copy the first m_numPolygons of given array into polygon array. Must call setNumPolygons(int) before to allocate argument array. If argument array too small do nothing.
        Parameters:
        polygon - array of polygon vectors to be copied
      • setPolygonColors

        public void setPolygonColors(java.awt.Color[] color)
        Copy polygon colors of list to existing array of polygon colors. Length of argument list must be equal or larger than getNumPolygons().
        Parameters:
        color - array with new polygon colors
      • setPolygonNormals

        public void setPolygonNormals(PdVector[] normal)
        Copy polygon normals of list to existing array of polygon normals. Length of argument list must be equal or larger than getNumPolygons(). All polygon normals are copied. The dimension of all argument normals must be equal.
        Parameters:
        normal - array with new polygon normals
      • removePolygonSizes

        public void removePolygonSizes()
        Remove polygon sizes from a geometry.

        Showing of polygon sizes must be switched off explicitly using showPolygonSizes(boolean).

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

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

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

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

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

        public int addPolygon(PiVector aPolygon)
        Add new polygon to the end of the polygon list. Method just calls setPolygon(int, PiVector) with index = getNumVertices().

        Avoid usage and prefer setNumPolygons(numPolygons+1) and setPolygon(numPolygons) whenever the number of polygons is known in advance.

        Specified by:
        addPolygon in interface PgGeometryIf
        Overrides:
        addPolygon in class PgGeometry
        Parameters:
        aPolygon - polygon to be added to polygon list
        Returns:
        int index of added polygon in polygon list
        Version:
        07.07.00, 1.00 created (kp)
      • getPolygon

        public PiVector getPolygon(int anIndex)
        Get a reference to index vector of polygon with given index.
        Specified by:
        getPolygon in interface PgGeometryIf
        Overrides:
        getPolygon in class PgGeometry
        Parameters:
        anIndex - index of polygon to be returned
        Returns:
        reference to polygon vector with given index
      • setPolygon

        public boolean setPolygon(int anIndex,
                                  PiVector aPolygon)
        Set index vector of polygon with given index. Copy new polygon to polygon at specified position in the polygon list. Number of polygons is increased if required.
        Specified by:
        setPolygon in interface PgGeometryIf
        Overrides:
        setPolygon in class PgGeometry
        Parameters:
        anIndex - index of polygon
        aPolygon - array with indices of new polygon
        Returns:
        boolean false, if index out of range, or argument missing
        Version:
        07.07.00, 1.00 created (kp)
      • setElements

        public void setElements(PiVector[] element)
        Copy the first m_numElements of given array into element array. Must call setNumElements(int) before to allocate argument array. If argument array is too small then do nothing. If dimension of an element exceeds maxDimOfElements then its length is truncated to this value.

        Appearance of elements with 2 or less vertices should be avoid. They lead to a setting of m_dimOfElements=2.

        Parameters:
        element - array of element vectors to be copied
        Version:
        09.11.02, 2.00 revised (kp) Full revision handling elements with 2 or less vertices.
        24.02.01, 1.20 revised (kp) Call assureNeighbours() only if new value of m_dimOfElements==-1.
        01.08.00, 1.10 revised (kp) Truncation of long elements added.
      • setElementColors

        public void setElementColors(java.awt.Color[] color)
        Copy element colors of list to existing array of element colors. Length of argument list must be equal or larger than getNumElements().
        Parameters:
        color - array with new element colors
      • setElementBackColors

        public void setElementBackColors(java.awt.Color[] color)
        Copy backface element colors of list to existing array of element colors. Length of argument list must be equal or larger than getNumElements().
        Parameters:
        color - array with new element colors
      • setElementNormals

        public void setElementNormals(PdVector[] normal)
        Copy element normals of list to existing array of element normals. Length of argument list must be equal or larger than getNumElements(). All element normals are copied. The dimension of all argument normals must be equal.
        Parameters:
        normal - array with new element normals
      • setElementTextures

        public void setElementTextures(PdVector[][] texCoords)
        Copy element textures of list to existing array of element textures. Length of argument list must be equal or larger than getNumElements(). All element textures are copied. The dimension of all argument textures must be equal.
        Parameters:
        texCoords - array with new element textures
      • setNeighbours

        public void setNeighbours(PiVector[] neighbour)
        Copy neighbour array to existing array of neighbours. Length of argument list must be equal or larger than getNumElements(). All neighbour information is copied.
        Parameters:
        neighbour - array with neighbour information
      • addElement

        public int addElement(PiVector anElement)
        Deprecated. since JavaView 3.04, use setNumElements(numElements+1) and setElement(numElements)
        Add element to the element list and increase number of elements. Method increases the number of elements and calls setElement(int, PiVector). If dimension of element exceeds maxDimOfElements then length of element is truncated to this value.
        Specified by:
        addElement in interface PgGeometryIf
        Overrides:
        addElement in class PgGeometry
        Parameters:
        anElement - element to be added to element list
        Returns:
        index of added element in element list
        Version:
        01.08.00, 1.10 revised (kp) Truncation of long elements added.
        07.07.00, 1.00 created (sk)
      • getElement

        public PiVector getElement(int anIndex)
        Get a reference to an individual element.
        Specified by:
        getElement in interface PgGeometryIf
        Overrides:
        getElement in class PgGeometry
        Parameters:
        anIndex - index of element
        Returns:
        reference to element vector with given index
        Version:
        07.07.00, 1.00 created (sk)
      • setElement

        public boolean setElement(int anIndex,
                                  PiVector newElem)
        Assign element data to an existing element. Copy new vertex indices to element at specified position in the element list. If dimension of element exceeds maxDimOfElements then length of element is truncated to this value.
        Specified by:
        setElement in interface PgGeometryIf
        Overrides:
        setElement in class PgGeometry
        Parameters:
        anIndex - index of element
        newElem - vector with new indices of element
        Returns:
        false if element and array have different
        Version:
        01.08.00, 1.10 revised (kp) Truncation of long elements added.
      • isEnabledIndexLabels

        public boolean isEnabledIndexLabels()
        Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of default labels is enabled.
        See Also:
        isShowingIndices()
        Version:
        31.10.04, 1.00 created (kp) Created from isDefaultLabelEnabled().
      • isDefaultLabelEnabled

        public boolean isDefaultLabelEnabled()
        Deprecated. since JavaView 3.61.003, use isEnabledIndexLabels().
        Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of default labels is enabled.
        See Also:
        isShowingIndices()
      • isShowingVertexLabels

        public boolean isShowingVertexLabels()
        Determine whether showing of vertex labels is enabled.
      • isShowingPolygonLabels

        public boolean isShowingPolygonLabels()
        Determine whether showing of polygon labels is enabled.
      • isShowingEdgeLabels

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

        public boolean isShowingElementLabels()
        Determine whether showing of element labels is enabled.
      • isShowingVertices

        public boolean isShowingVertices()
        Determines whether drawing of vertices is enabled.
      • isShowingVertexColors

        public boolean isShowingVertexColors()
        Determines whether drawing of vertex colors is enabled.
      • isShowingVertexNormals

        public boolean isShowingVertexNormals()
        Determines whether drawing of vertex normals is enabled.
      • isShowingVertexNormalArrow

        public boolean isShowingVertexNormalArrow()
        Determines whether drawing of arrow of vertex normals is enabled.
      • isShowingVertexSizes

        public boolean isShowingVertexSizes()
        Determines whether drawing of vertex sizes is enabled.
        Since:
        JavaView 2.43
      • isShowingSilhouette

        public boolean isShowingSilhouette()
        Determines whether a polygon is shown along the silhouette if a shape.
      • showSilhouette

        public void showSilhouette(boolean flag)
        Set flag to enable if a polygon is shown along the silhouette if a shape.
      • isShowingVertexOutline

        public boolean isShowingVertexOutline()
        Determines whether drawing of border of vertex circles is enabled.
      • showVertexOutline

        public void showVertexOutline(boolean flag)
        Set flag whether drawing of border of vertex circles is enabled.
      • isShowingTaggedVertices

        public boolean isShowingTaggedVertices()
        Determine whether showing of tagged vertices is enabled.
      • showTaggedVertices

        public void showTaggedVertices(boolean flag)
        Set flag to enable drawing of tagged vertices.
      • setEnabledIndexLabels

        public void setEnabledIndexLabels(boolean flag)
        Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of of default labels is enabled.
        See Also:
        showIndices(boolean)
        Version:
        31.10.04, 1.00 created (kp) Created from setDefaultLabelEnabled(boolean).
      • setDefaultLabelEnabled

        public void setDefaultLabelEnabled(boolean flag)
        Deprecated. since JavaView 3.61.003, use setEnabledIndexLabels(boolean).
        Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of of default labels is enabled.
        See Also:
        showIndices(boolean)
      • showIndices

        public void showIndices(boolean flag)
        Set flag to drawing of indices in display. If no label is specified for an item the a default label is drawing. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, showing of labels is disabled.
        See Also:
        isEnabledIndexLabels(), setEnabledIndexLabels(boolean)
      • showVertexLabels

        public void showVertexLabels(boolean flag)
        Set flag to enable drawing of vertex labels in display.
      • showPolygonLabels

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

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

        public void showElementLabels(boolean flag)
        Set flag to enable drawing of element labels in display.
      • showVertices

        public void showVertices(boolean flag)
        Set flag to enable drawing of vertices.
      • showVertexColors

        public void showVertexColors(boolean flag)
        Set flag to enable drawing of vertex colors.
      • showVertexNormals

        public void showVertexNormals(boolean flag)
        Set flag to enable drawing of vertex normals.
      • showVertexNormalArrow

        public void showVertexNormalArrow(boolean flag)
        Set flag to enable drawing of arrow of vertex normal.
      • showVertexSizes

        public void showVertexSizes(boolean flag)
        Set flag to enable drawing of vertex sizes.
        Since:
        JavaView 2.43
      • isShowingPolygons

        public boolean isShowingPolygons()
        Determines whether drawing of polygons is enabled.
      • isShowingPolygonNormals

        public boolean isShowingPolygonNormals()
        Determines whether drawing of polygon normals is enabled.
      • isShowingPolygonNormalArrow

        public boolean isShowingPolygonNormalArrow()
        Determines whether drawing of arrow of polygon normals is enabled.
      • isShowingPolygonColors

        public boolean isShowingPolygonColors()
        Determines whether drawing of polygon colors 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.
      • isShowingPolygonSizes

        public boolean isShowingPolygonSizes()
        Determines whether drawing of polygon sizes is enabled.
      • isShowingTaggedPolygons

        public boolean isShowingTaggedPolygons()
        Determine whether showing of tagged polygons is enabled.
      • showTaggedPolygons

        public void showTaggedPolygons(boolean flag)
        Set flag to enable drawing of tagged polygons.
      • showPolygons

        public void showPolygons(boolean flag)
        Set flag to enable drawing of polygons.
      • showPolygonNormals

        public void showPolygonNormals(boolean flag)
        Set flag to enable drawing of polygon normals.
      • showPolygonNormalArrow

        public void showPolygonNormalArrow(boolean flag)
        Set flag to enable drawing of arrow of polygon normal.
      • showPolygonColors

        public void showPolygonColors(boolean flag)
        Set flag to enable drawing of polygon colors.
      • 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.
      • showPolygonSizes

        public void showPolygonSizes(boolean flag)
        Set flag to enable drawing of polygon sizes.
      • isShowingEdges

        public boolean isShowingEdges()
        Determines whether drawing of element edges is enabled.
      • showEdges

        public void showEdges(boolean flag)
        Set flag to enable drawing of element edges.
      • isShowingEdgeColorFromElements

        public boolean isShowingEdgeColorFromElements()
        Determines whether local edge color is induced from element or vertex colors.
      • showEdgeColorFromElements

        public void showEdgeColorFromElements(boolean flag)
        Set flag if edge colors are induced from local element or vertex colors.
      • isShowingSmoothEdgeColors

        public boolean isShowingSmoothEdgeColors()
        Determines whether smooth coloring of edges is enabled, currently requires vertex colors.
      • showSmoothEdgeColors

        public void showSmoothEdgeColors(boolean flag)
        Set flag to enable smooth coloring of edges, currently requires vertex colors.
      • isShowingEdgeColorFromVertices

        public boolean isShowingEdgeColorFromVertices()
        Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.
      • showEdgeColorFromVertices

        public void showEdgeColorFromVertices(boolean flag)
        Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.
      • isShowingSmoothLighting

        public boolean isShowingSmoothLighting()
        Determines whether smooth lighting is enabled, requires vertex normals.
      • showSmoothLighting

        public void showSmoothLighting(boolean flag)
        Set flag to enable smooth lighting, requires vertex normals.
      • isShowingSmoothElementColors

        public boolean isShowingSmoothElementColors()
        Determines whether smooth coloring of elements is enabled, currently requires vertex colors.
      • showSmoothElementColors

        public void showSmoothElementColors(boolean flag)
        Set flag to enable smooth coloring of elements, currently requires vertex colors.
      • isShowingElementColorFromVertices

        public boolean isShowingElementColorFromVertices()
        Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 4.52.003
        Version:
        22.09.15, 1.00 created (kp)
      • showElementColorFromVertices

        public void showElementColorFromVertices(boolean flag)
        Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.
        Since:
        JavaView 4.52.003
        Version:
        22.09.15, 1.00 created (kp)
      • isShowingElementFromVertexColors

        public boolean isShowingElementFromVertexColors()
        Deprecated. since JavaView 4.52.003, use #isShowingElementColorFromVertices()
        Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.
      • showElementFromVertexColors

        public void showElementFromVertexColors(boolean flag)
        Deprecated. since JavaView 4.52.003, use #showElementColorFromVertices(boolean)
        Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.
      • isShowingElements

        public boolean isShowingElements()
        Determines whether drawing of elements is enabled.
      • isShowingBackface

        public boolean isShowingBackface()
        Determine flag to enable drawing of backfacing elements whose normal points away from camera.
      • isShowingElementNormals

        public boolean isShowingElementNormals()
        Determines whether drawing of element normals is enabled.
      • isShowingElementNormalArrow

        public boolean isShowingElementNormalArrow()
        Determines whether drawing of arrow of element normals is enabled.
      • isShowingElementColors

        public boolean isShowingElementColors()
        Determines whether drawing of individual element colors is enabled.
      • isShowingElementBackColor

        public boolean isShowingElementBackColor()
        Determines whether drawing of global backface element color is enabled.
      • isShowingElementBackColors

        public boolean isShowingElementBackColors()
        Determines whether drawing of individual backface element colors is enabled.
      • isShowingBoundaries

        public boolean isShowingBoundaries()
        Determines whether drawing of boundary curves is enabled.
      • isShowingVertexTexture

        public boolean isShowingVertexTexture()
        Determines whether drawing of vertex texture is enabled.
      • isShowingElementTexture

        public boolean isShowingElementTexture()
        Determines whether drawing of element texture is enabled.
      • isShowingTaggedElements

        public boolean isShowingTaggedElements()
        Determine whether showing of tagged elements is enabled.
      • showTaggedElements

        public void showTaggedElements(boolean flag)
        Set flag to enable drawing of tagged elements.
      • showElements

        public void showElements(boolean flag)
        Set flag to enable drawing of elements.
      • showBackface

        public void showBackface(boolean flag)
        Set flag to enable drawing of backfacing elements whose normal points away from camera. If element set has no element normals then method creates element normals.
      • showElementNormals

        public void showElementNormals(boolean flag)
        Set flag to enable drawing of element normals.
      • showElementNormalArrow

        public void showElementNormalArrow(boolean flag)
        Set flag to enable drawing of arrow of element normal.
      • showElementColors

        public void showElementColors(boolean flag)
        Set flag to enable drawing of individual element colors.
      • showElementBackColor

        public void showElementBackColor(boolean flag)
        Set flag to enable drawing of backface element colors.
      • showElementBackColors

        public void showElementBackColors(boolean flag)
        Set flag to enable drawing of individual backface element colors.
      • showBoundaries

        public void showBoundaries(boolean flag)
        Set flag to enable drawing of boundary curves.
      • showVertexTexture

        public void showVertexTexture(boolean flag)
        Set flag to enable drawing of element texture.
      • showElementTexture

        public void showElementTexture(boolean flag)
        Set flag to enable drawing of vertex texture.
      • getTextureSide

        public int getTextureSide()
        Determines whether texture is shown on front, back or both sides of a surface, if texture is shown at all.
        Since:
        JavaView 3.96.022
        See Also:
        showVertexTexture(boolean), showElementTexture(boolean)
        Version:
        18.06.06, 1.00 created (kp)
      • setTextureSide

        public void setTextureSide(int side)
        Set flag whether texture is shown on front, back or both sides of a surface, if texture is shown at all.
        Since:
        JavaView 3.96.022
        See Also:
        showVertexTexture(boolean), showElementTexture(boolean)
        Version:
        18.06.06, 1.00 created (kp)
      • makeVertexNormals

        public boolean makeVertexNormals()
        Compute vertex normals by adding all adjacent corner element normals, and final normalization. For each vertex compute for each element a normal vector from two edges. The contribution of these element normals is proportional to the element area.
        Since:
        JavaView 3.52.000
        See Also:
        makeElementNormals()
        Author:
        Konrad Polthier
        Version:
        13.08.04, 1.00 created (kp) Copied from PgElementSet.makeVertexNormals().
      • makeElementNormals

        public boolean makeElementNormals()
        Compute element normals from edge crossproducts. For each element, a normal is computed at each of its vertices as the crossproduct of the adjacent edges. These vertex normals are then added, and the normalized sum used as element normal. This strategy reduces the effect of non-planar elements.

        Method exists in this class to allow enabling of backface culling even if no element normals have been previously supplied by user.

        Author:
        Konrad Polthier
        Version:
        18.07.00, 1.00 created (kp) Method copied from PgElementSet.
      • makeElementColorsFromXYZ

        public boolean makeElementColorsFromXYZ()
        Deprecated. since JavaView 3.85.000, no replacement.
        Create color from the element 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.
        Author:
        Konrad Polthier
        Version:
        22.08.00, 1.00 created (kp)
      • makeQuadrConn

        public void makeQuadrConn(int uDiscr,
                                  int vDiscr,
                                  boolean uClosed,
                                  boolean vClosed)
        Generate element information for a quadrilateral surface. Method generates only topological information, no coordinates are required.
        Parameters:
        uDiscr - Number of lines in u direction.
        vDiscr - Number of lines in v direction.
        uClosed - Flag if first and last u-lines are identical.
        vClosed - Flag if first and last v-lines are identical.
        Author:
        Konrad Polthier
        Version:
        18.07.00, 2.00 created (kp) Method copied from PgElementSet.
        20.08.99, 1.02 revised (ur) Orientation of all elements changed to be counter-clockwise in (i,j) domain
        13.02.99, 1.01 revised (kp) Orientation of triangles changed to be counter-clockwise and identical to rectangular case.
        19.10.97, 1.00 created (kp)
      • makeElementFromVertexColors

        public boolean makeElementFromVertexColors()
        Deprecated. this class no longer supports generation of colors, use geometry classes from jv.geom.*.
        Create element colors as average of all colors of its vertices. Vertex colors must be available.
        Author:
        Konrad Polthier
        Version:
        18.03.01, 1.00 created (kp)
      • reflect

        public PgGeometry reflect(PdMatrix mat,
                                  boolean bOrient,
                                  boolean bVector)
        Deprecated. this class no longer supports reflection, use geometry classes from jv.geom.*.
        Generate a cloned geometry and transform vertices by a matrix. For example, this method is called to calculate mirror images of a geometry. Orientation of geometry affects surface vectors.
        Specified by:
        reflect in interface PgGeometryIf
        Overrides:
        reflect in class PgGeometry
        Parameters:
        mat - 3*3 or 4*4 transformation matrix
        bOrient - flag whether to keep the orientation of the geometry
        bVector - flag whether to keep the orientation of vectors
        Returns:
        new reflected copy of the geometry
        Author:
        Konrad Polthier
        Version:
        12.12.00, 1.10 revised (kp) Additional argument added for orientation of vectors.
        16.11.00, 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.