JavaView® v2.00.008

jv.project
Class PgJvxSrc

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.project.PgGeometry
              |
              +--jv.project.PgJvxSrc
All Implemented Interfaces:
java.lang.Cloneable, PgGeometryIf, PsUpdateIf, java.io.Serializable
Direct Known Subclasses:
PvGrid

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.

Version:
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
Author:
Konrad Polthier
See Also:
Serialized Form

Field Summary
protected  boolean m_bDefaultLabelEnabled
          Flag whether default labels are shown in display if no label exists for an item.
protected  boolean m_bShowBackface
          Flag whether backfacing elements are shown in display.
protected  boolean m_bShowBoundaries
          Flag whether boundary is shown in display.
protected  boolean m_bShowEdgeColors
          Flag whether to show edge colors or not.
protected  boolean m_bShowEdgeLabels
          Flag whether labels of edges are shown in display.
protected  boolean m_bShowEdges
          Flag whether edges are shown in display.
protected  boolean m_bShowElementBackColor
          Flag to enable showing of global backface color.
protected  boolean m_bShowElementBackColors
          Flag to enable showing of individual backface color.
protected  boolean m_bShowElementColors
          Flag whether to show element colors or not.
protected  boolean m_bShowElementLabels
          Flag whether labels of elements are shown in display.
protected  boolean m_bShowElementNormalArrow
          Flag whether to show arrow of element normals or not.
protected  boolean m_bShowElementNormals
          Flag whether to show element normals or not.
protected  boolean m_bShowElements
          Flag whether elements are shown in display.
protected  boolean m_bShowElementTexture
          Flag whether to show element texture or not.
protected  boolean m_bShowIndices
          Flag whether indices of vertices and elements are shown in display.
protected  boolean m_bShowOutline
          Flag whether edges at horizon are shown thickened in display.
protected  boolean m_bShowPolygonColors
          Flag whether to show polygon colors or not.
protected  boolean m_bShowPolygonEndArrow
          Flag whether arrow is shown at last point of polygon.
protected  boolean m_bShowPolygonLabels
          Flag whether labels of polygons are shown in display.
protected  boolean m_bShowPolygonNormalArrow
          Flag whether to show arrow of edge normals or not.
protected  boolean m_bShowPolygonNormals
          Flag whether to show edge normals or not.
protected  boolean m_bShowPolygons
          Flag whether polygons are shown in display.
protected  boolean m_bShowPolygonStartArrow
          Flag whether arrow is shown at first point of polygon.
protected  boolean m_bShowTaggedBoundaries
          Flag whether tagged boundary is shown in display.
protected  boolean m_bShowTaggedEdges
          Flag whether tagged edges are shown in display.
protected  boolean m_bShowTaggedElements
          Flag whether tagged elements are shown in display.
protected  boolean m_bShowTaggedPolygons
          Flag whether tagged polygons are shown in display.
protected  boolean m_bShowTaggedVertices
          Flag whether tagged vertices are shown in display.
protected  boolean[] m_bShowVectorArrow
          Flag if tip of vectors is shown as arrow.
protected  boolean[] m_bShowVectorField
          Flag if vector fields are shown.
protected  boolean m_bShowVertexColors
          Flag whether to show vertex colors or not.
protected  boolean m_bShowVertexLabels
          Flag whether labels of vertices are shown in display.
protected  boolean m_bShowVertexNormalArrow
          Flag whether to show arrow of vertex normals or not.
protected  boolean m_bShowVertexNormals
          Flag whether to show vertex normals or not.
protected  boolean m_bShowVertexTexture
          Flag whether to show vertex texture or not.
protected  boolean m_bShowVertices
          Flag whether vertices are shown in display.
protected  int m_dimOfElements
          Determines size of elements.
protected  int m_dimOfPolygons
          Determines size of polygons.
protected  int m_dimOfTextures
          Number of components per texture coordinate.
protected  PiVector[] m_edge
          Array with edges of element set.
protected  java.awt.Color[] m_edgeColor
          Color of each edge.
protected  PiVector[] m_element
          Array with all polygonal faces.
protected  java.awt.Color[] m_elementBackColor
          Colors of backside of element set with one color per element.
protected  java.awt.Color[] m_elementColor
          Colors of element set with one color per element.
protected  PdVector[] m_elementNormal
          Colors of element set with one normal per element.
protected  PdVector[][] m_elementTexture
          Texture coordinates for each element.
protected  int m_geomType
          Type of geometryfor example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET.
protected  java.awt.Color m_globalBndColor
          Global color of boundary.
protected  double m_globalBndSize
          Thickness in pixels of boundary edges.
protected  java.awt.Color m_globalBndTagColor
          Global color of tagged boundary.
protected  java.awt.Color m_globalEdgeColor
          Global color of edges applied if no individual edge coloring available.
protected  double m_globalEdgeSize
          Thickness in pixels of each edge.
protected  java.awt.Color m_globalEdgeTagColor
          Global color of tagged edges.
protected  java.awt.Color m_globalElementBackColor
          Global color of backside of elements used in display, applied if enabled.
protected  java.awt.Color m_globalElementColor
          Global color of elements applied if no individual element coloring available.
protected  java.awt.Color m_globalElementNormalColor
          Global color of vertex normals used in display, applied if no individual normal coloring available.
protected  double m_globalElementNormalLength
          Scaling factor of all vertex normals.
protected  double m_globalElementNormalSize
          Thickness in pixels of each vertex normal.
protected  java.awt.Color m_globalElementTagColor
          Global color of tagged elements.
protected  java.awt.Color m_globalPolygonColor
          Global color of polygons applied if no individual polygon coloring available.
protected  java.awt.Color m_globalPolygonNormalColor
          Global color of vertex normals used in display, applied if no individual normal coloring available.
protected  double m_globalPolygonNormalLength
          Scaling factor of all vertex normals.
protected  double m_globalPolygonNormalSize
          Thickness in pixels of each vertex normal.
protected  double m_globalPolygonSize
          Thickness in pixels of each polygon.
protected  java.awt.Color m_globalPolygonTagColor
          Global color of tagged polygons.
protected  java.awt.Color[] m_globalVectorColor
          Global color of all vectors.
protected  double[] m_globalVectorLength
          Scaling factor of all vectors.
protected  double[] m_globalVectorSize
          Thickness in pixels of each vector.
protected  java.awt.Color m_globalVertexColor
          Global color of vertices applied if no individual vertex coloring available.
protected  java.awt.Color m_globalVertexNormalColor
          Global color of vertex normals applied if no individual normal coloring available.
protected  double m_globalVertexNormalLength
          Scaling factor of all vertex normals.
protected  double m_globalVertexNormalSize
          Thickness in pixels of each vertex normal.
protected  double m_globalVertexSize
          Thickness in pixels of each vertex.
protected  java.awt.Color m_globalVertexTagColor
          Global color of tagged vertices.
protected  int m_maxDimOfElements
          Maximal number of vertices per element.
protected  int m_maxNumElements
          Number of allocated elements.
protected  int m_maxNumPolygons
          Number of allocated vertices.
protected  int m_maxNumVertices
          Maximum number of vertices in m_vertex array, internal use only
protected  PiVector[] m_neighbour
          Array with neighbours of all elements.
protected  int m_numEdges
          Number of used edges.
protected  int m_numElements
          Number of used elements.
protected  int m_numPolygons
          Number of used polygons.
protected  int m_numVectorFields
          Number of vector fields is equals to size of allocated vector field arrays.
protected  int m_numVertices
          Number of used vertices.
protected  PiVector[] m_polygon
          Array with all polygonal polygons.
protected  java.awt.Color[] m_polygonColor
          Colors of polygon with one color per edge.
protected  PdVector[] m_polygonNormal
          Normals of polygon with one normal per edge.
protected  java.awt.Image m_textureImage
          Texture image.
protected  java.lang.String m_textureImageName
          URL of texture image.
protected  PdVector[][] m_vector
          Array of vector fields where each field has one vector per vertex or per element.
protected  java.awt.Color[][] m_vectorColor
          Color of each vector.
protected  boolean[] m_vectorIsElementBased
          Flag if vector field is element based or vertex based.
protected  java.lang.String[] m_vectorName
          Name of vector field.
protected  PdVector[] m_vertex
          Array of points of point set, where dimension of each vertex is the same.
protected  java.awt.Color[] m_vertexColor
          Colors of point set with one color per vertex.
protected  java.lang.String[][] m_vertexFunction
          Array of functions of point set, where dimension of each array is the same.
protected  PdVector[] m_vertexNormal
          Normals of point set with one normal per vertex.
protected  PdVector[] m_vertexTexture
          Texture coordinates of each vertex in [0,1]*[0,1].
 
Fields inherited from class jv.project.PgGeometry
m_ambientProj, m_ambientSpace, m_authorInfo, m_bShowBndBox, m_bShowCenter, m_bShowing, m_bShowTitle, m_center, m_dim, m_dimOfSimplex, m_displayList, m_geometryInfo, m_labelAttribute, m_methodMenu, m_modelMatrix, m_title, m_version, m_versionType
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Fields inherited from interface jv.project.PgGeometryIf
AMBIENT_H3_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_S3_SPHERE, AMBIENT_SPACES, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, METHOD_EXT, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE
 
Constructor Summary
  PgJvxSrc()
          Constructs a geometry container whose vertex dimension is initialized to 3.
protected PgJvxSrc(int dim)
          This constructor is protected since it does not invoke the init() method when this class equals PgJvxSrc.
 
Method Summary
 int addEdge(PiVector anEdge)
          Add new edge to the end of the edge list.
 int addElement(PiVector anElement)
          Add element to the element list and increase number of elements.
 int addPolygon(PiVector anPolygon)
          Add new polygon to the end of the polygon list.
 int addVertex(PdVector aVertex)
          Add new vertex to the end of the vertex list Method just calls setVertex(numVertices, PdVector).
 void assureEdgeColors()
          Assures respectively allocates correct length of edge color array.
 void assureElementBackColors()
          Assures respectively allocates correct length of element back face color array.
 void assureElementColors()
          Assures respectively allocates correct length of element color array.
 void assureElementNormals()
          Assures respectively allocates correct length of element normal array.
 void assureElementTextures()
          Assures respectively allocates correct length of element texture array.
 void assureNeighbours()
          Assures correct length of neighbour array and, if any length changes, initializes with -1.
 void assurePolygonColors()
          Assures respectively allocates correct length of polygon color array.
 void assurePolygonNormals()
          Assures respectively allocates correct length of polygon normal array.
 void assureVectorColors(int ind)
          Assures respectively allocates correct length of element color array.
 void assureVertexColors()
          Assures respectively allocates correct length of vertex color array.
 void assureVertexNormals()
          Assures respectively allocates correct length of vertex normal array.
 void assureVertexTextures()
          Assures respectively allocates correct length of vertex texture array.
 java.lang.Object clone()
          Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.
 void copy(PgJvxSrc src)
           
 PdVector[] getBounds()
          Compute bounding box if geometry has number of vertices, otherwise return null.
 int getDimOfVectors(int ind)
          Get uniform number of components of each vector in a vector field.
 PiVector getEdge(int anIndex)
          Get a reference to index vector of edge with given index.
 java.awt.Color[] getEdgeColors()
          Get color array for read and write access.
 PiVector[] getEdges()
          Get edge array for read and write access, but do not modify the size of any edge.
 PiVector getElement(int anIndex)
          Get a reference to an individual element.
 java.awt.Color[] getElementBackColors()
          Get backside element color array for read and write access.
 java.awt.Color[] getElementColors()
          Get element color array for read and write access.
 PdVector[] getElementNormals()
          Get element normal array for read and write access, but do not modify the size of any normal vector.
 PiVector[] getElements()
          Get element array for read and write access, but do not modify the size of any element.
 PdVector[][] getElementTextures()
          Get element texture array for read and write access, but do not modify the size of any texture vector.
 java.awt.Color getGlobalBndColor()
          Get global boundary color which is used if no local colors are available.
 double getGlobalBndSize()
          Get thickness in pixels of boundary when drawn in display.
 java.awt.Color getGlobalBndTagColor()
          Get global color of tagged boundaries.
 java.awt.Color getGlobalEdgeColor()
          Get global edge color which is used if no local colors are available.
 double getGlobalEdgeSize()
          Get global radius in pixels of circle to visualize vertices in display.
 java.awt.Color getGlobalEdgeTagColor()
          Get global color of tagged vertices.
 java.awt.Color getGlobalElementBackColor()
          Get global color of backface of elements.
 java.awt.Color getGlobalElementColor()
          Get global element color which is used if no local colors are available.
 java.awt.Color getGlobalElementNormalColor()
          Get global element normal color which is used if no local colors are available.
 double getGlobalElementNormalLength()
          Get length factor of normal vectors when drawn in display.
 double getGlobalElementNormalSize()
          Get thickness in pixels of normals when drawn in display.
 java.awt.Color getGlobalElementTagColor()
          Get global color of tagged elements.
 java.awt.Color getGlobalPolygonColor()
          Get global polygon color which is used if no local colors are available.
 java.awt.Color getGlobalPolygonNormalColor()
          Get global polygon normal color which is used if no local colors are available.
 double getGlobalPolygonNormalLength()
          Get length factor of normal vectors when drawn in display.
 double getGlobalPolygonNormalSize()
          Get thickness in pixels of normals when drawn in display.
 double getGlobalPolygonSize()
          Get global radius in pixels of circle to visualize vertices in display.
 java.awt.Color getGlobalPolygonTagColor()
          Get global color of tagged vertices.
 java.awt.Color getGlobalVectorColor(int ind)
          Get global element color which is used if no local colors are available.
 double getGlobalVectorLength(int ind)
          Get length factor of normal vectors when drawn in display.
 double getGlobalVectorSize(int ind)
          Get thickness in pixels of normals when drawn in display.
 java.awt.Color getGlobalVertexColor()
          Get global vertex color which is used if no local colors are available.
 java.awt.Color getGlobalVertexNormalColor()
          Get global vertex normal color which is used if no local colors are available.
 double getGlobalVertexNormalLength()
          Get length factor of vertex normal vectors when drawn in display.
 double getGlobalVertexNormalSize()
          Get thickness in pixels of vertex normals when drawn in display.
 double getGlobalVertexSize()
          Get global radius in pixels of circle to visualize vertices in display.
 java.awt.Color getGlobalVertexTagColor()
          Get global color of tagged vertices.
 PgJvxSrc getJvx()
          Fills a geometry object with data from this instance, for example, to print to file.
 PiVector[] getNeighbours()
          Get neighbourhood information.
 int getNumEdges()
          Get number of allocated and used edges.
 int getNumElements()
          Get number of allocated and used elements.
 int getNumPolygons()
          Get number of allocated and used polygons.
 int getNumVectorFields()
          Get number of allocated and used vector fields.
 int getNumVertices()
          Get number of vertices in vertex array.
 PiVector getPolygon(int anIndex)
          Get a reference to index vector of polygon with given index.
 java.awt.Color[] getPolygonColors()
          Get color array for read and write access.
 PdVector[] getPolygonNormals()
          Get vertex normal array for read and write access, but do not modify the size of any normal vector.
 PiVector[] getPolygons()
          Get polygon array for read and write access, but do not modify the size of any polygon.
 java.awt.Image getTextureImage()
          Get image of texture.
 java.lang.String getTextureImageName()
          Get name of texture image, a URL or full path name.
 int getType()
          Get type of geometry, for example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET.
 java.awt.Color[] getVectorFieldColors(int ind)
          Get color array of a vector field for read and write access.
 java.lang.String getVectorFieldName(int ind)
          Get name of vector field.
 PdVector[] getVectors(int ind)
          Get array of a vectors of a field for read and write access.
 PdVector getVertex(int anIndex)
          Get a reference to an individual vertex.
 java.awt.Color[] getVertexColors()
          Get vertex color array for read and write access.
 java.lang.String[][] getVertexFunctions()
           
 PdVector[] getVertexNormals()
          Get vertex normal array for read and write access, but do not modify the size of any normal vector.
 PdVector[] getVertexTextures()
          Get vertex texture array for read and write access, but do not modify the size of any texture vector.
 PdVector[] getVertices()
          Get vertex array for read and write access, but do not modify the size of any vertex.
 void init()
          Initializes and resets geometry.
 boolean isDefaultLabelEnabled()
          Determine whether drawing of default labels, i.e. item indices, is enabled.
 boolean isShowingBackface()
          Determine flag to enable drawing of backfacing elements whose normal points away from camera.
 boolean isShowingBoundaries()
          Determines whether drawing of boundary curves is enabled.
 boolean isShowingEdgeColors()
          Determines whether drawing of edge colors is enabled.
 boolean isShowingEdgeLabels()
          Determine whether showing of edge labels is enabled.
 boolean isShowingEdges()
          Determines whether drawing of element edges is enabled.
 boolean isShowingElementBackColor()
          Determines whether drawing of global backface element color is enabled.
 boolean isShowingElementBackColors()
          Determines whether drawing of individual backface element colors is enabled.
 boolean isShowingElementColors()
          Determines whether drawing of individual element colors is enabled.
 boolean isShowingElementLabels()
          Determine whether showing of element labels is enabled.
 boolean isShowingElementNormalArrow()
          Determines whether drawing of arrow of element normals is enabled.
 boolean isShowingElementNormals()
          Determines whether drawing of element normals is enabled.
 boolean isShowingElements()
          Determines whether drawing of elements is enabled.
 boolean isShowingElementTexture()
          Determines whether drawing of element texture is enabled.
 boolean isShowingIndices()
          Check whether showing of indices is switched on.
 boolean isShowingOutline()
          Determines whether drawing of outline element edges is enabled.
 boolean isShowingPolygonColors()
          Determines whether drawing of polygon colors is enabled.
 boolean isShowingPolygonEndArrow()
          Determine whether drawing of arrow at last point of polygon is enabled.
 boolean isShowingPolygonLabels()
          Determine whether showing of polygon labels is enabled.
 boolean isShowingPolygonNormalArrow()
          Determines whether drawing of arrow of polygon normals is enabled.
 boolean isShowingPolygonNormals()
          Determines whether drawing of polygon normals is enabled.
 boolean isShowingPolygons()
          Determines whether drawing of polygons is enabled.
 boolean isShowingPolygonStartArrow()
          Determine whether drawing of arrow at first point of polygon is enabled.
 boolean isShowingVertexColors()
          Determines whether drawing of vertex colors is enabled.
 boolean isShowingVertexLabels()
          Determine whether showing of vertex labels is enabled.
 boolean isShowingVertexNormalArrow()
          Determines whether drawing of arrow of vertex normals is enabled.
 boolean isShowingVertexNormals()
          Determines whether drawing of vertex normals is enabled.
 boolean isShowingVertexTexture()
          Determines whether drawing of vertex texture is enabled.
 boolean isShowingVertices()
          Determines whether drawing of vertices is enabled.
 boolean isVectorArrowVisible(int ind)
          Get flag if tip of vectors is shown as arrow.
 boolean isVectorElementBased(int ind)
          Get flag if vector field is element based or vertex based.
 boolean makeElementColorsFromXYZ()
          Create color from the element position within its bounding box which is interpreted as RGB cube.
 boolean makeElementNormals()
          Compute element normals from edge crossproducts.
 void makeQuadrConn(int uDiscr, int vDiscr, boolean uClosed, boolean vClosed)
          Generate element and neighbourhood information for a quadrilateral surface.
 void paint(PvGeometryIf dc)
          Major rendering method fills an internal container class supplied by the display.
 PgGeometry reflect(PdMatrix mat, boolean bOrient, boolean bVector)
          Generate a cloned geometry and transform vertices by a matrix.
 void setDefaultLabelEnabled(boolean flag)
          Determine whether drawing of default labels, i.e. item indices, is enabled.
protected  void setDimOfElement(int ind, int aSize)
          Set size of a single element and associated data like neighbour list.
 void setDimOfElements(int aSize)
          Let all elements have same number of vertices aSize<>0, or individual aSize=-1.
 void setDimOfPolygons(int aSize)
          Let all polygons have same number of vertices aSize<>0, or individual aSize=-1.
 void setDimOfVertices(int dim)
          Assign dimension of vertices.
 boolean setEdge(int anIndex, PiVector aEdge)
          Set index vector of edge with given index.
 void setEdgeColors(java.awt.Color[] color)
          Copy edge colors of list to existing array of edge colors.
 void setEdges(PiVector[] edge)
          Copy the first m_numEdges of given array into edge array.
 boolean setElement(int anIndex, PiVector newElem)
          Assign element data to an existing element.
 void setElementBackColors(java.awt.Color[] color)
          Copy backface element colors of list to existing array of element colors.
 void setElementColors(java.awt.Color[] color)
          Copy element colors of list to existing array of element colors.
 void setElementNormals(PdVector[] normal)
          Copy element normals of list to existing array of element normals.
 void setElements(PiVector[] element)
          Copy the first m_numElements of given array into element array.
 void setElementTextures(PdVector[][] texCoords)
          Copy element textures of list to existing array of element textures.
 void setGlobalBndColor(java.awt.Color color)
          Set global boundary color to be used if no local colors are available.
 void setGlobalBndSize(double size)
          Set thickness in pixels of boundary when drawn in display.
 void setGlobalBndTagColor(java.awt.Color color)
          Set global color of tagged boundaries.
 void setGlobalEdgeColor(java.awt.Color color)
          Set global edge color to be used if no local colors are available.
 void setGlobalEdgeSize(double size)
          Set global radius in pixels of circle to visualize vertices in display.
 void setGlobalEdgeTagColor(java.awt.Color color)
          Set global color of tagged vertices.
 void setGlobalElementBackColor(java.awt.Color color)
          Set global color of backface of elements.
 void setGlobalElementColor(java.awt.Color color)
          Set global vertex color to be used if no local colors are available.
 void setGlobalElementNormalColor(java.awt.Color color)
          Set global element normal color to be used if no local colors are available.
 void setGlobalElementNormalLength(double length)
          Get length factor of normal vectors when drawn in display.
 void setGlobalElementNormalSize(double size)
          Get thickness in pixels of normals when drawn in display.
 void setGlobalElementTagColor(java.awt.Color color)
          Set global color of tagged elements.
 void setGlobalPolygonColor(java.awt.Color color)
          Set global polygon color to be used if no local colors are available.
 void setGlobalPolygonNormalColor(java.awt.Color color)
          Set global polygon normal color to be used if no local colors are available.
 void setGlobalPolygonNormalLength(double length)
          Get length factor of normal vectors when drawn in display.
 void setGlobalPolygonNormalSize(double size)
          Get thickness in pixels of normals when drawn in display.
 void setGlobalPolygonSize(double size)
          Set global radius in pixels of circle to visualize vertices in display.
 void setGlobalPolygonTagColor(java.awt.Color color)
          Set global color of tagged vertices.
 boolean setGlobalVectorColor(int ind, java.awt.Color color)
          Set global normal color to be used if no local colors are available.
 boolean setGlobalVectorLength(int ind, double length)
          Get length factor of normal vectors when drawn in display.
 boolean setGlobalVectorSize(int ind, double size)
          Get thickness in pixels of normals when drawn in display.
 void setGlobalVertexColor(java.awt.Color color)
          Set global vertex color to be used if no local colors are available.
 void setGlobalVertexNormalColor(java.awt.Color color)
          Set global vertex normal color to be used if no local colors are available.
 void setGlobalVertexNormalLength(double length)
          Get length factor of vertex normal vectors when drawn in display.
 void setGlobalVertexNormalSize(double size)
          Get thickness in pixels of vertex normals when drawn in display.
 void setGlobalVertexSize(double size)
          Set global radius in pixels of circle to visualize vertices in display.
 void setGlobalVertexTagColor(java.awt.Color color)
          Set global color of tagged vertices.
 void setJvx(PgJvxSrc src)
          Fill this instance with data from a geometry source, for example, previously read from file.
protected  void setMaxNumElements(int numElements)
          Major memory allocation routine, all element allocation should be done here.
protected  void setMaxNumPolygons(int numPolygons)
          All polygon allocation should be done in 'setMaxNumPolygons'.
protected  void setMaxNumVertices(int numVertices)
          All vertex allocation should be done in 'setMaxNumVertices' method should not be called directly, only subclass.setMaxNumVertices may call it.
 void setNeighbours(PiVector[] neighbour)
          Copy neighbour array to existing array of neighbours.
 void setNumEdges(int aNumEdges, int dimOfEdges)
          Allocate given number of edges, and allocate normals, colors etc. if they already exist.
 void setNumElements(int numElements)
          Allocate given number of elements, and allocate neighbours, normals, colors etc. if they already exist.
 void setNumPolygons(int numPolygons)
          Allocate given number of polygons, and allocate normals, colors etc. if they already exist.
 void setNumVectorFields(int num)
          Set number of allocated and used vector fields.
 void setNumVectors(int ind, int num, int dimOfVectors)
          Set number of vectors of a vector field.
 void setNumVertices(int numVertices)
          Allocate given number of vertices, and allocate normals, colors etc. if they already exist.
 boolean setPolygon(int anIndex, PiVector aPolygon)
          Set index vector of polygon with given index.
 void setPolygonColors(java.awt.Color[] color)
          Copy polygon colors of list to existing array of polygon colors.
 void setPolygonNormals(PdVector[] normal)
          Copy polygon normals of list to existing array of polygon normals.
 void setPolygons(PiVector[] polygon)
          Copy the first m_numPolygons of given array into polygon array.
 void setTextureImage(java.awt.Image image)
          Set image of texture.
 void setTextureImageName(java.lang.String image)
          Set file name of texture image as relative path or protocoll.
 void setType(int type)
          Set type of geometry, for example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET.
 void setVectorArrowVisible(int ind, boolean flag)
          Set flag if tip of vectors is shown as arrow.
 void setVectorColors(int ind, java.awt.Color[] list)
          Copy vector colors of list to existing array of vector colors.
 void setVectorElementBased(int ind, boolean flag)
          Set flag if vector field is element based or vertex based.
 void setVectorFieldName(int ind, java.lang.String name)
          Set name of vector field.
 void setVectors(int ind, PdVector[] list)
          Copy all vectors of vertex list to existing array of vectors.
 boolean setVertex(int anIndex, PdVector aVertex)
          Copy new vertex to vertex at specified position in the vertex list
 void setVertexColors(java.awt.Color[] aVertexColorList)
          Copy vertex colors of list to existing array of vertex colors.
 void setVertexFunctions(java.lang.String[][] vertex)
          Copy all vertices of vertex list to existing array of vertices.
 void setVertexNormals(PdVector[] aVertexNormalList)
          Copy vertex normals of list to existing array of vertex normals.
 void setVertexTextures(PdVector[] aVertexTextureList)
          Copy vertex textures of list to existing array of vertex textures.
 void setVertices(PdVector[] vertex)
          Copy all vertices of vertex list to existing array of vertices.
 void showBackface(boolean flag)
          Set flag to enable drawing of backfacing elements whose normal points away from camera.
 void showBoundaries(boolean flag)
          Set flag to enable drawing of boundary curves.
 void showEdgeColors(boolean flag)
          Set flag to enable drawing of edge colors.
 void showEdgeLabels(boolean flag)
          Set flag to enable drawing of edge labels in display.
 void showEdges(boolean flag)
          Set flag to enable drawing of element edges.
 void showElementBackColor(boolean flag)
          Set flag to enable drawing of backface element colors.
 void showElementBackColors(boolean flag)
          Set flag to enable drawing of individual backface element colors.
 void showElementColors(boolean flag)
          Set flag to enable drawing of individual element colors.
 void showElementLabels(boolean flag)
          Set flag to enable drawing of element labels in display.
 void showElementNormalArrow(boolean flag)
          Set flag to enable drawing of arrow of element normal.
 void showElementNormals(boolean flag)
          Set flag to enable drawing of element normals.
 void showElements(boolean flag)
          Set flag to enable drawing of elements.
 void showElementTexture(boolean flag)
          Set flag to enable drawing of vertex texture.
 void showIndices(boolean flag)
          Set flag to drawing of indices in display.
 void showOutline(boolean flag)
          Set flag to enable drawing of outline element edges.
 void showPolygonColors(boolean flag)
          Set flag to enable drawing of polygon colors.
 void showPolygonEndArrow(boolean flag)
          Set flag to enable drawing of arrow at last point of polygons.
 void showPolygonLabels(boolean flag)
          Set flag to enable drawing of polygon labels in display.
 void showPolygonNormalArrow(boolean flag)
          Set flag to enable drawing of arrow of polygon normal.
 void showPolygonNormals(boolean flag)
          Set flag to enable drawing of polygon normals.
 void showPolygons(boolean flag)
          Set flag to enable drawing of polygons.
 void showPolygonStartArrow(boolean flag)
          Set flag to enable drawing of arrow at first point of polygons.
 void showVertexColors(boolean flag)
          Set flag to enable drawing of vertex colors.
 void showVertexLabels(boolean flag)
          Set flag to enable drawing of vertex labels in display.
 void showVertexNormalArrow(boolean flag)
          Set flag to enable drawing of arrow of vertex normal.
 void showVertexNormals(boolean flag)
          Set flag to enable drawing of vertex normals.
 void showVertexTexture(boolean flag)
          Set flag to enable drawing of element texture.
 void showVertices(boolean flag)
          Set flag to enable drawing of vertices.
 
Methods inherited from class jv.project.PgGeometry
addDisplay, blend, clearTagElement, clearTagPolygon, clearTagVertex, copy, fillMethodMenu, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplays, getGeometryInfo, getLabelAttribute, getMaterialPanel, getModelMatrix, getTitle, getVersion, getVersionType, hasDisplay, hasModelMatrix, hasTagElement, hasTagPolygon, hasTagVertex, intersectionWithLine, isConfigurable, isShowingBndBox, isShowingCenter, isShowingTitle, isVisible, merge, removeDisplay, removeElement, removePolygon, removeVertex, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setGeometryInfo, setLabelAttribute, setLabelAttribute, setModelMatrix, setTagElement, setTagPolygon, setTagVertex, setTitle, setVersion, setVersionType, setVisible, showBndBox, showCenter, showTitle, toString, update
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.project.PgGeometryIf
getInfoPanel, getName, setName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
 

Field Detail

m_geomType

protected int m_geomType
Type of geometryfor example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET.

m_bDefaultLabelEnabled

protected boolean m_bDefaultLabelEnabled
Flag whether default labels are shown in display if no label exists for an item. 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.

m_bShowIndices

protected boolean m_bShowIndices
Flag whether indices of vertices and elements are shown in display.

m_bShowVertexLabels

protected boolean m_bShowVertexLabels
Flag whether labels of vertices are shown in display.

m_bShowPolygonLabels

protected boolean m_bShowPolygonLabels
Flag whether labels of polygons are shown in display.

m_bShowEdgeLabels

protected boolean m_bShowEdgeLabels
Flag whether labels of edges are shown in display.

m_bShowElementLabels

protected boolean m_bShowElementLabels
Flag whether labels of elements are shown in display.

m_bShowOutline

protected boolean m_bShowOutline
Flag whether edges at horizon are shown thickened in display.

m_bShowBackface

protected boolean m_bShowBackface
Flag whether backfacing elements are shown in display.

m_numVertices

protected int m_numVertices
Number of used vertices. Do not modify directly, use setNumOfVertices().

m_maxNumVertices

protected int m_maxNumVertices
Maximum number of vertices in m_vertex array, internal use only

m_vertex

protected PdVector[] m_vertex
Array of points of point set, where dimension of each vertex is the same. Dimension of all vertices is constant, and is determined as argument of the constructor. Applications usually call getVertices() to obtain vertex array, and work directly on the vertices.

m_vertexFunction

protected java.lang.String[][] m_vertexFunction
Array of functions of point set, where dimension of each array is the same.

m_vertexColor

protected java.awt.Color[] m_vertexColor
Colors of point set with one color per vertex.

m_vertexNormal

protected PdVector[] m_vertexNormal
Normals of point set with one normal per vertex.

m_bShowVertices

protected boolean m_bShowVertices
Flag whether vertices are shown in display.

m_bShowTaggedVertices

protected boolean m_bShowTaggedVertices
Flag whether tagged vertices are shown in display.

m_bShowVertexNormals

protected boolean m_bShowVertexNormals
Flag whether to show vertex normals or not.

m_bShowVertexNormalArrow

protected boolean m_bShowVertexNormalArrow
Flag whether to show arrow of vertex normals or not.

m_bShowVertexColors

protected boolean m_bShowVertexColors
Flag whether to show vertex colors or not.

m_globalVertexSize

protected double m_globalVertexSize
Thickness in pixels of each vertex.

m_globalVertexColor

protected java.awt.Color m_globalVertexColor
Global color of vertices applied if no individual vertex coloring available.

m_globalVertexTagColor

protected java.awt.Color m_globalVertexTagColor
Global color of tagged vertices.

m_globalVertexNormalLength

protected double m_globalVertexNormalLength
Scaling factor of all vertex normals.

m_globalVertexNormalSize

protected double m_globalVertexNormalSize
Thickness in pixels of each vertex normal.

m_globalVertexNormalColor

protected java.awt.Color m_globalVertexNormalColor
Global color of vertex normals applied if no individual normal coloring available.

m_numVectorFields

protected int m_numVectorFields
Number of vector fields is equals to size of allocated vector field arrays.

m_vector

protected PdVector[][] m_vector
Array of vector fields where each field has one vector per vertex or per element.

m_vectorColor

protected java.awt.Color[][] m_vectorColor
Color of each vector.

m_vectorName

protected java.lang.String[] m_vectorName
Name of vector field.

m_bShowVectorField

protected boolean[] m_bShowVectorField
Flag if vector fields are shown.

m_bShowVectorArrow

protected boolean[] m_bShowVectorArrow
Flag if tip of vectors is shown as arrow.

m_vectorIsElementBased

protected boolean[] m_vectorIsElementBased
Flag if vector field is element based or vertex based.

m_globalVectorLength

protected double[] m_globalVectorLength
Scaling factor of all vectors.

m_globalVectorSize

protected double[] m_globalVectorSize
Thickness in pixels of each vector.

m_globalVectorColor

protected java.awt.Color[] m_globalVectorColor
Global color of all vectors.

m_dimOfTextures

protected int m_dimOfTextures
Number of components per texture coordinate.

m_bShowVertexTexture

protected boolean m_bShowVertexTexture
Flag whether to show vertex texture or not.

m_bShowElementTexture

protected boolean m_bShowElementTexture
Flag whether to show element texture or not.

m_textureImageName

protected java.lang.String m_textureImageName
URL of texture image.

m_textureImage

protected java.awt.Image m_textureImage
Texture image.

m_vertexTexture

protected PdVector[] m_vertexTexture
Texture coordinates of each vertex in [0,1]*[0,1].

m_numPolygons

protected int m_numPolygons
Number of used polygons. Each polygon may be a polygon of different size.

m_maxNumPolygons

protected int m_maxNumPolygons
Number of allocated vertices. Do not modify this value directly but use setNumPolygons(int) This value is adjusted automatically whenever more memory is needed.
See Also:
setNumPolygons(int), setMaxNumPolygons(int)

m_dimOfPolygons

protected int m_dimOfPolygons
Determines size of polygons. It has the following states m_dimOfPolygon = -1 polygons have different size = 3 all polygons are consist of 3 vertices = .. all polygons are polygons with same size
See Also:
PgPolygonSet#setDimOfPolygons(int)

m_polygon

protected PiVector[] m_polygon
Array with all polygonal polygons. Each polygon with, say k, vertices is given by the indices of its k vertices in the array '[] m_vertex'. Polygons may differ in the number of vertices.

m_polygonColor

protected java.awt.Color[] m_polygonColor
Colors of polygon with one color per edge.

m_polygonNormal

protected PdVector[] m_polygonNormal
Normals of polygon with one normal per edge.

m_bShowPolygons

protected boolean m_bShowPolygons
Flag whether polygons are shown in display.

m_bShowTaggedPolygons

protected boolean m_bShowTaggedPolygons
Flag whether tagged polygons are shown in display.

m_bShowPolygonNormals

protected boolean m_bShowPolygonNormals
Flag whether to show edge normals or not.

m_bShowPolygonNormalArrow

protected boolean m_bShowPolygonNormalArrow
Flag whether to show arrow of edge normals or not.

m_bShowPolygonColors

protected boolean m_bShowPolygonColors
Flag whether to show polygon colors or not.

m_bShowPolygonStartArrow

protected boolean m_bShowPolygonStartArrow
Flag whether arrow is shown at first point of polygon.

m_bShowPolygonEndArrow

protected boolean m_bShowPolygonEndArrow
Flag whether arrow is shown at last point of polygon.

m_globalPolygonColor

protected java.awt.Color m_globalPolygonColor
Global color of polygons applied if no individual polygon coloring available.

m_globalPolygonTagColor

protected java.awt.Color m_globalPolygonTagColor
Global color of tagged polygons.

m_globalPolygonSize

protected double m_globalPolygonSize
Thickness in pixels of each polygon.

m_globalPolygonNormalLength

protected double m_globalPolygonNormalLength
Scaling factor of all vertex normals.

m_globalPolygonNormalSize

protected double m_globalPolygonNormalSize
Thickness in pixels of each vertex normal.

m_globalPolygonNormalColor

protected java.awt.Color m_globalPolygonNormalColor
Global color of vertex normals used in display, applied if no individual normal coloring available.

m_numEdges

protected int m_numEdges
Number of used edges. Each edge may be a polygon of different size.

m_edge

protected PiVector[] m_edge
Array with edges of element set. Will be updated whenever connectivity changes.

m_bShowEdges

protected boolean m_bShowEdges
Flag whether edges are shown in display.

m_bShowTaggedEdges

protected boolean m_bShowTaggedEdges
Flag whether tagged edges are shown in display.

m_bShowEdgeColors

protected boolean m_bShowEdgeColors
Flag whether to show edge colors or not.

m_edgeColor

protected java.awt.Color[] m_edgeColor
Color of each edge.

m_globalEdgeColor

protected java.awt.Color m_globalEdgeColor
Global color of edges applied if no individual edge coloring available.

m_globalEdgeTagColor

protected java.awt.Color m_globalEdgeTagColor
Global color of tagged edges.

m_globalEdgeSize

protected double m_globalEdgeSize
Thickness in pixels of each edge.

m_bShowBoundaries

protected boolean m_bShowBoundaries
Flag whether boundary is shown in display.

m_bShowTaggedBoundaries

protected boolean m_bShowTaggedBoundaries
Flag whether tagged boundary is shown in display.

m_globalBndColor

protected java.awt.Color m_globalBndColor
Global color of boundary.

m_globalBndTagColor

protected java.awt.Color m_globalBndTagColor
Global color of tagged boundary.

m_globalBndSize

protected double m_globalBndSize
Thickness in pixels of boundary edges.

m_dimOfElements

protected int m_dimOfElements
Determines size of elements. It has the following states m_dimOfElement = -1 elements have different size = 3 all elements are triangles = 4 all elements are quadrilaterals = .. all elements are polygons with same size Some methods assume all elements to be triangles. In such a case all elements are triangulated.
See Also:
setDimOfElements(int)

m_maxDimOfElements

protected int m_maxDimOfElements
Maximal number of vertices per element.

m_numElements

protected int m_numElements
Number of used elements. Each element may be a polygon of different size.
See Also:
setNumElements(int)

m_maxNumElements

protected int m_maxNumElements
Number of allocated elements. Do not modify this value directly but use setNumElements(int) This value is adjusted automatically whenever more memory is needed.
See Also:
setNumElements(int), setMaxNumElements(int)

m_element

protected PiVector[] m_element
Array with all polygonal faces. Each face with, say k, points is given by the indices of its k vertices in the array '[] m_vertex'. Elements may differ in the number of vertices.

m_elementColor

protected java.awt.Color[] m_elementColor
Colors of element set with one color per element.

m_elementNormal

protected PdVector[] m_elementNormal
Colors of element set with one normal per element.

m_elementTexture

protected PdVector[][] m_elementTexture
Texture coordinates for each element.

m_bShowElements

protected boolean m_bShowElements
Flag whether elements are shown in display.

m_bShowTaggedElements

protected boolean m_bShowTaggedElements
Flag whether tagged elements are shown in display.

m_bShowElementNormals

protected boolean m_bShowElementNormals
Flag whether to show element normals or not.

m_bShowElementNormalArrow

protected boolean m_bShowElementNormalArrow
Flag whether to show arrow of element normals or not.

m_bShowElementColors

protected boolean m_bShowElementColors
Flag whether to show element colors or not.

m_globalElementColor

protected java.awt.Color m_globalElementColor
Global color of elements applied if no individual element coloring available.

m_globalElementTagColor

protected java.awt.Color m_globalElementTagColor
Global color of tagged elements.

m_globalElementBackColor

protected java.awt.Color m_globalElementBackColor
Global color of backside of elements used in display, applied if enabled.

m_elementBackColor

protected java.awt.Color[] m_elementBackColor
Colors of backside of element set with one color per element.

m_bShowElementBackColor

protected boolean m_bShowElementBackColor
Flag to enable showing of global backface color.

m_bShowElementBackColors

protected boolean m_bShowElementBackColors
Flag to enable showing of individual backface color.

m_globalElementNormalLength

protected double m_globalElementNormalLength
Scaling factor of all vertex normals.

m_globalElementNormalSize

protected double m_globalElementNormalSize
Thickness in pixels of each vertex normal.

m_globalElementNormalColor

protected java.awt.Color m_globalElementNormalColor
Global color of vertex normals used in display, applied if no individual normal coloring available.

m_neighbour

protected PiVector[] m_neighbour
Array with neighbours of all elements. For each element with, say k, edges exists a corresponding neighbour array listing the indices of the neighbouring elements at these edges.
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)

PgJvxSrc

protected 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.

Method Detail

init

public void init()
Initializes and resets geometry.
Overrides:
init in class PgGeometry

setDimOfVertices

public void setDimOfVertices(int dim)
Assign dimension of vertices.

getBounds

public PdVector[] getBounds()
Compute bounding box if geometry has number of vertices, otherwise return null.
Overrides:
getBounds in class PgGeometry
Following copied from class: jv.project.PgGeometry
Returns:
two vectors which are the extremal corners of the bounding cube

getJvx

public PgJvxSrc getJvx()
Fills a geometry object with data from this instance, for example, to print to file.
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.
Overrides:
setJvx in class PgGeometry
Parameters:
src - a geometry source used to fill this instance with data.

copy

public void copy(PgJvxSrc src)

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. Tags of this object are not copied but maybe copied of subclasses.
Overrides:
clone in class PgGeometry
See Also:
copy(PgJvxSrc)

paint

public void paint(PvGeometryIf dc)
Major rendering method fills an internal container class supplied by the display. See jv.project.PgGeometryIf for detailed information.
Overrides:
paint in class PgGeometry
See Also:
PgGeometryIf

getType

public int getType()
Get type of geometry, for example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET.

setType

public void setType(int type)
Set type of geometry, for example PvGeometryIf#GEOM_POINT_SET and PvGeometryIf#GEOM_ELEMENT_SET. Change display of vertices to default setting depending on geometry type.

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.

getVertexTextures

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

getNumVectorFields

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

getDimOfVectors

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

getVectors

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

getVectorFieldColors

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

getVectorFieldName

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

isVectorArrowVisible

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

isVectorElementBased

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

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 color array for read and write access.

getPolygonNormals

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

getNumEdges

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

getEdges

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

getEdgeColors

public java.awt.Color[] getEdgeColors()
Get color array 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(numVertices, PdVector).
Overrides:
addVertex in class PgGeometry
Parameters:
PdVector - vertex to be added to vertex list
Returns:
int index of added vertex in vertex list

getVertex

public PdVector getVertex(int anIndex)
Get a reference to an individual vertex.
Overrides:
getVertex in class PgGeometry
Parameters:
anIndex - index of vertex

setVertex

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

setMaxNumVertices

protected void setMaxNumVertices(int numVertices)
All vertex allocation should be done in 'setMaxNumVertices' method should not be called directly, only subclass.setMaxNumVertices may call it. The user should change the number of vertices via setNumVertices().

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:
dim - uniform dimension of points, i.e. number of coordinates per point

assureVertexColors

public void assureVertexColors()
Assures respectively allocates correct length of vertex color array. Length of array is equal to length of vertex array.

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 vertices.

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 is equal to getDimOfTextures().

setNumVectors

public void setNumVectors(int ind,
                          int num,
                          int dimOfVectors)
Set number of vectors of a vector field.

setNumVectorFields

public void setNumVectorFields(int num)
Set number of allocated and used vector fields.

setVectorFieldName

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

setVectorArrowVisible

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

setVectorElementBased

public void setVectorElementBased(int ind,
                                  boolean flag)
Set flag if vector field is element based or vertex based.

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.

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:
PgPolygonSet#setNumPolygons(int)

setMaxNumPolygons

protected void setMaxNumPolygons(int numPolygons)
All polygon allocation should be done in 'setMaxNumPolygons'.

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.

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.

setNumEdges

public void setNumEdges(int aNumEdges,
                        int dimOfEdges)
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. If dimension of edges is '-1' then only the edge array is allocated and not the individual edges.

assureEdgeColors

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

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)

setDimOfElement

protected void setDimOfElement(int ind,
                               int aSize)
Set size of a single element and associated data like neighbour list. Element must exist already, and index of element must be in range [0,m_numElements-1]. Method may modify instance variable m_dimOfElements. It is more efficient to call method before setElement(int, PiVector).

New size must be larger than 3, other values lead to a warning message.

Parameters:
ind - Index of element to change size.
aSize - New number of vertices of element, must be larger than 3.
See Also:
setDimOfElements(int), setElement(int, PiVector)

setMaxNumElements

protected void setMaxNumElements(int numElements)
Major memory allocation routine, all element allocation should be done here. Element and neighbour array are adjusted to new size. All element property arrays, such as element normals, are adjusted if they where allocated before. Method should not be called directly, only subclass.setMaxNumElements() may call it. The user should change the number of elements via setNumElements().

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.

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.


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. Dimension of normal vectors is equal to getDimOfTextures(). 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.

getGlobalVectorColor

public java.awt.Color getGlobalVectorColor(int ind)
Get global element color which is used if no local colors are available.

getGlobalVectorLength

public double getGlobalVectorLength(int ind)
Get length factor of normal vectors when drawn in display.

getGlobalVectorSize

public double getGlobalVectorSize(int ind)
Get thickness in pixels of normals when drawn in display.

setGlobalVectorColor

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

setGlobalVectorLength

public boolean setGlobalVectorLength(int ind,
                                     double length)
Get length factor of normal vectors when drawn in display.

setGlobalVectorSize

public boolean setGlobalVectorSize(int ind,
                                   double size)
Get thickness in pixels of 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.

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 vertex 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.

getGlobalBndColor

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

getGlobalBndTagColor

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

getGlobalBndSize

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

setGlobalBndColor

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

setGlobalBndTagColor

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

setGlobalBndSize

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

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

getVertexFunctions

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

setVertexFunctions

public void setVertexFunctions(java.lang.String[][] 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

setVertexColors

public void setVertexColors(java.awt.Color[] aVertexColorList)
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 to getDimOfColors() of the geometry.
Parameters:
aVertexColorList - array with new vertex colors

setVertexNormals

public void setVertexNormals(PdVector[] aVertexNormalList)
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 to getDimOfVectors() of the geometry.
Parameters:
aVertexNormalList - array with new vertex normals

setVertexTextures

public void setVertexTextures(PdVector[] aVertexTextureList)
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. The dimension of all argument textures must be equal to getDimOfTextures() of the geometry.
Parameters:
aVertexTextureList - array with new vertex textures

getTextureImageName

public java.lang.String getTextureImageName()
Get name of texture image, a URL or full path name.
Overrides:
getTextureImageName in class PgGeometry

setTextureImageName

public void setTextureImageName(java.lang.String image)
Set file name of texture image as relative path or protocoll.
Overrides:
setTextureImageName in class PgGeometry

getTextureImage

public java.awt.Image getTextureImage()
Get image of texture.
Overrides:
getTextureImage in class PgGeometry

setTextureImage

public void setTextureImage(java.awt.Image image)
Set image of texture.
Overrides:
setTextureImage in class PgGeometry

setVectors

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

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(). All vector colors are copied. The dimension of all argument colors must be equal to getDimOfColors() of the geometry.
Parameters:
ind - index of vector field
list - array with new vector colors

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 argment 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 to getDimOfVectors() of the geometry.
Parameters:
normal - array with new polygon normals

addPolygon

public int addPolygon(PiVector anPolygon)
Add new polygon to the end of the polygon list. Method just calls setPolygon(PiVector, numPolygons).
Overrides:
addPolygon in class PgGeometry
Parameters:
PiVector - polygon to be added to polygon list
Returns:
int index of added polygon in polygon list

getPolygon

public PiVector getPolygon(int anIndex)
Get a reference to index vector of polygon with given index.
Overrides:
getPolygon in class PgGeometry
Following copied from interface: jv.project.PgGeometryIf
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.
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

setEdges

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

setEdgeColors

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

addEdge

public int addEdge(PiVector anEdge)
Add new edge to the end of the edge list. Method just calls setEdge(PiVector, numEdges).
Parameters:
PiVector - edge to be added to edge list
Returns:
int index of added edge in edge list

getEdge

public PiVector getEdge(int anIndex)
Get a reference to index vector of edge with given index.

setEdge

public boolean setEdge(int anIndex,
                       PiVector aEdge)
Set index vector of edge with given index. Copy new edge to edge at specified position in the edge list. Number of edges is increased if required.
Parameters:
anIndex - index of edge
aEdge - array with indices of new edge
Returns:
boolean false, if index out of range, or argument missing

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 argment array too small do nothing. If dimension of an element exceeds maxDimOfElements then its length is truncated to this value.
Parameters:
element - array of element vectors to be copied

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 to getDimOfVectors() of the geometry.
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 to getDimOfTextures() of the geometry.
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)
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.
Overrides:
addElement in class PgGeometry
Parameters:
PiVector - element to be added to element list
Returns:
int index of added element in element list

getElement

public PiVector getElement(int anIndex)
Get a reference to an individual element.
Overrides:
getElement in class PgGeometry
Parameters:
anIndex - index of element

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.
Overrides:
setElement in class PgGeometry
Parameters:
anIndex - index of element
newElem - vector with new indices of element
Returns:
boolean false, if element and array have different

isDefaultLabelEnabled

public boolean isDefaultLabelEnabled()
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. On default, usage of default labels is enabled.
See Also:
isShowingIndices()

isShowingIndices

public boolean isShowingIndices()
Check whether showing of indices is switched on. If no label is specified for an item the a default label is drawing.
See Also:
isDefaultLabelEnabled(), #setDefaultLabelEnabled(int)

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.

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.

isShowingVertexColors

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

isShowingOutline

public boolean isShowingOutline()
Determines whether drawing of outline element edges is enabled.

setDefaultLabelEnabled

public void setDefaultLabelEnabled(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. On default, usage of of default labels is enabled.
See Also:
#showIndices(int)

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. On default, showing of labels is disabled.
See Also:
isDefaultLabelEnabled(), setDefaultLabelEnabled(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.

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.

showVertexColors

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

showOutline

public void showOutline(boolean flag)
Set flag to enable drawing of outline element edges.

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.

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.

isShowingEdges

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

isShowingEdgeColors

public boolean isShowingEdgeColors()
Determines whether drawing of edge colors is enabled.

showEdges

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

showEdgeColors

public void showEdgeColors(boolean flag)
Set flag to enable drawing of edge 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.

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.

makeQuadrConn

public void makeQuadrConn(int uDiscr,
                          int vDiscr,
                          boolean uClosed,
                          boolean vClosed)
Generate element and neighbourhood information for a quadrilateral surface. Method generates only topological information, no coordinates are required.
Parameters:
uDiscr, - vDiscr Number of lines in u and v direction.
See Also:
PgElementSet#makeCylinderConn(int, int)

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.


makeElementColorsFromXYZ

public boolean makeElementColorsFromXYZ()
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.

reflect

public PgGeometry reflect(PdMatrix mat,
                          boolean bOrient,
                          boolean bVector)
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.
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

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.