JavaView© v3.95.000

jv.project
Class PgJvxSrc

java.lang.Object
  extended byjv.object.PsObject
      extended byjv.project.PgGeometry
          extended byjv.project.PgJvxSrc
All Implemented Interfaces:
java.lang.Cloneable, PgGeometryIf, PsUpdateIf, java.io.Serializable
Direct Known Subclasses:
PgRuler, 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

Field Summary
static int BLEND_ALPHA
          Flag if texture of a greyscale image is only used to make surface semi-transparent.
static int BLEND_MATERIAL
          Flag if texture is combined with surface color depending on texture transparency.
static int BLEND_REPLACE
          Flag if texture overpaints all surface colors and a possible alpha channel makes surface semi-transparent.
static int FILTER_DIRECT
          No filtering, for each pixel the texture image is sampled at a single point.
static int FILTER_LINEAR
          Bilinear filtering, for each pixel the texture image is sampled at a four points.
static int FILTER_QUADRATIC
          Biquadratic filtering, for each pixel the texture image is sampled at a nine points.
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
 
Fields inherited from interface jv.project.PgGeometryIf
AMBIENT_H2_HYPERBOLIC, AMBIENT_H3_HYPERBOLIC, AMBIENT_H4_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R1_EUCLIDEAN, AMBIENT_R2_EUCLIDEAN, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_R5_EUCLIDEAN, AMBIENT_S1_SPHERE, AMBIENT_S2_SPHERE, AMBIENT_S3_SPHERE, AMBIENT_S4_SPHERE, AMBIENT_SPACES, HAS_METHOD_MENU, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, INSPECTOR_TEXTURE, INSPECTOR_TEXTURE_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, m_numLabelTypes, 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.
PgJvxSrc(int dim)
          This constructor is protected since it does not invoke the init() method when this class equals PgJvxSrc.
 
Method Summary
 int addElement(PiVector anElement)
          Deprecated. since JavaView 3.04, use setNumElements(numElements+1) and setElement(numElements)
 int addPolygon(PiVector aPolygon)
          Deprecated. since JavaView 3.04, use setNumPolygons(numPolygons+1) and setPolygon(numPolygons)
 int addVertex(PdVector aVertex)
          Deprecated. since JavaView 3.04, use setNumVertices(numVertices+1) and setVertex(numVertices)
 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 assurePolygonSizes()
          Assures respectively allocates correct length of polygon size vector.
 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 assureVertexSizes()
          Assures respectively allocates correct length of vertex size array.
 void assureVertexTextures()
          Assures respectively allocates correct length of vertex texture array.
 void clearTagVertex(int anIndex, int aTag)
          Clear a single tag of a vertex.
 java.lang.Object clone()
          Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.
 void copy(PgJvxSrc src)
          Copy argument PgJvxSrc into this.
 PdVector[] getAmbientBounds()
          Compute bounding box of this geometry from the set of all vertices, or return null if no vertices.
 int getBlendingMode()
          Get mode how texture color is applied to surface.
 PdVector[] getBounds()
          Compute bounding box of the vertices which are transformed with ambient and model matrix.
 double getCreaseAngle()
          Get crease angle which is a threshold determining sharp crease edges.
 int getDimOfElements()
          Get uniform number of vertices of all elements, or individual aSize=-1.
 int getDimOfPolygons()
          Get uniform number of vertices of all polygons, or individual aSize=-1.
 int getDimOfTextures()
          Get dimension of textures, i.e. number of components of each of the texture vectors.
 int getDimOfVectors(int ind)
          Get uniform number of components of each vector in a vector field.
 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.
 int getFilterType()
          Get mode how texture image is sampled to compute color of pixel.
 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.
 java.awt.Color getGlobalEdgeNormalColor()
          Get global element color which is used if no local colors are available.
 double getGlobalEdgeNormalLength()
          Get length factor of normal vectors when drawn in display.
 double getGlobalEdgeNormalSize()
          Get thickness in pixels of normals when drawn in display.
 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 color of vector field which is used if no local colors are available.
 double getGlobalVectorLength(int ind)
          Get length factor of vectors of vector field when drawn in display.
 double getGlobalVectorSize(int ind)
          Get thickness in pixels of vectors of vector field 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 getNumVectors(int ind)
          Get number of vectors in vector field with given index.
 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 polygon colors for read and write access.
 PdVector[] getPolygonNormals()
          Get polygon normals 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.
 PdVector getPolygonSizes()
          Get polygon sizes for read and write access.
 double getShininess()
          Get shininess of highlights of geometry.
 java.awt.Color getSpecularColor()
          Get specular color of geometry.
 java.awt.Image getTextureImage()
          Get image of texture.
 PdVector[] getTextureImageBnd()
          Get bounds of texture image in normalized texture coordinates.
 java.lang.String getTextureImageName()
          Get name of texture image, a URL or full path name.
 double getTransparency()
          Get transparency of geometry.
 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 getVertexSizes()
          Get vertex size array for read and write access.
 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.
 boolean hasTagVertex(int anIndex, int aTag)
          Check whether vertex has given tag.
 void init()
          Initializes and resets geometry.
 boolean isDefaultLabelEnabled()
          Deprecated. since JavaView 3.61.003, use isEnabledIndexLabels().
 boolean isEnabledIndexLabels()
          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 isShowingEdgeColorFromElements()
          Determines whether local edge color is induced from element or vertex colors.
 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 isShowingElementFromVertexColors()
          Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.
 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 isShowingIndividualMaterial(int ind)
          Get flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
 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 isShowingPolygonSizes()
          Determines whether drawing of polygon sizes is enabled.
 boolean isShowingPolygonStartArrow()
          Determine whether drawing of arrow at first point of polygon is enabled.
 boolean isShowingSilhouette()
          Determines whether a polygon is shown along the silhouette if a shape.
 boolean isShowingSmoothElementColors()
          Determines whether smooth coloring of elements is enabled, currently requires vertex colors.
 boolean isShowingSmoothLighting()
          Determines whether smooth lighting is enabled, requires vertex normals.
 boolean isShowingTaggedElements()
          Determine whether showing of tagged elements is enabled.
 boolean isShowingTaggedPolygons()
          Determine whether showing of tagged polygons is enabled.
 boolean isShowingTaggedVertices()
          Determine whether showing of tagged vertices is enabled.
 boolean isShowingTransparency()
          Determines whether usage of transparence is enabled.
 boolean isShowingVectorArrows(int ind)
          Get flag if tip of vectors is shown as arrow.
 boolean isShowingVectorColors(int ind)
          Get flag to enable drawing of individual vertex colors of a vector field.
 boolean isShowingVectorField(int ind)
          Get flag to enable drawing of vectors of a vector field.
 boolean isShowingVectorFields()
          Get flag to enable drawing of all vector fields if each is visible.
 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 isShowingVertexOutline()
          Determines whether drawing of border of vertex circles is enabled.
 boolean isShowingVertexSizes()
          Determines whether drawing of vertex sizes is enabled.
 boolean isShowingVertexTexture()
          Determines whether drawing of vertex texture is enabled.
 boolean isShowingVertices()
          Determines whether drawing of vertices is enabled.
 boolean isVectorElementBased(int ind)
          Get flag whether vector field is element based or vertex based.
 boolean makeElementColorsFromXYZ()
          Deprecated. since JavaView 3.85.000, no replacement.
 boolean makeElementFromVertexColors()
          Deprecated. this class no longer supports generation of colors, use geometry classes from jv.geom.*.
 boolean makeElementNormals()
          Compute element normals from edge crossproducts.
 void makeQuadrConn(int uDiscr, int vDiscr, boolean uClosed, boolean vClosed)
          Generate element information for a quadrilateral surface.
 boolean makeVertexNormals()
          Compute vertex normals by adding all adjacent corner element normals, and final normalization.
 void paint(PvGeometryIf dc)
          Major rendering method fills an internal container class supplied by the display.
 PgGeometry reflect(PdMatrix mat, boolean bOrient, boolean bVector)
          Deprecated. this class no longer supports reflection, use geometry classes from jv.geom.*.
 void removePolygonSizes()
          Remove polygon sizes from a geometry.
 void setBlendingMode(int blendingMode)
          Set mode how texture color is applied to surface.
 void setCreaseAngle(double angle)
          Set crease angle which is a threshold determining sharp crease edges.
 void setDefaultLabelEnabled(boolean flag)
          Deprecated. since JavaView 3.61.003, use setEnabledIndexLabels(boolean).
 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.
 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 setEnabledIndexLabels(boolean flag)
          Determine whether drawing of default labels, i.e. item indices, is enabled.
 void setFilterType(int filterType)
          Set mode how texture image is sampled to compute color of pixel.
 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 setGlobalEdgeNormalColor(java.awt.Color color)
          Set global normal color to be used if no local colors are available.
 void setGlobalEdgeNormalLength(double length)
          Get length factor of normal vectors when drawn in display.
 void setGlobalEdgeNormalSize(double size)
          Get thickness in pixels of normals when drawn in display.
 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 element 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 color of vector field to be used if no local colors are available.
 boolean setGlobalVectorLength(int ind, double length)
          Set length factor of vectors of vector field when drawn in display.
 boolean setGlobalVectorSize(int ind, double size)
          Set thickness in pixels of vectors of vector field 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.
 void setNeighbours(PiVector[] neighbour)
          Copy neighbour array to existing array of neighbours.
 void setNumEdges(int aNumEdges)
          Allocate given number of edges, and allocate normals, colors etc.
 void setNumElements(int numElements)
          Allocate given number of elements, and allocate neighbours, normals, colors etc.
 void setNumPolygons(int numPolygons)
          Allocate given number of polygons, and allocate normals, colors etc.
 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 with given index.
 void setNumVertices(int numVertices)
          Allocate given number of vertices, and allocate normals, colors etc.
 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 setPolygonSizes(PdVector size)
          Copy polygon sizes of list to existing array of polygon sizes.
 void setShininess(double val)
          Set shininess of highlights of geometry.
 void setSpecularColor(java.awt.Color col)
          Set specular color of geometry.
 void setState(int aKey, boolean aState)
          Set drawing flags of this geometry from within the display.
 void setTagVertex(int anIndex, int aTag)
          Set a tag of a vertex.
 void setTextureImage(java.awt.Image image)
          Set image of texture.
 void setTextureImageBnd(PdVector[] bnd)
          Set bounds of texture image in normalized texture coordinates.
 void setTextureImageName(java.lang.String image)
          Set file name of texture image as relative path or protocoll.
 void setTransparency(double alpha)
          Set transparency of geometry.
 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 whether 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 vector 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[] colorList)
          Copy vertex colors of list to existing array of vertex colors.
 void setVertexFunctions(java.lang.String[][] vertexFunction)
          Assign functions for each vertex of the vertex list.
 void setVertexNormals(PdVector[] normalList)
          Copy vertex normals of list to existing array of vertex normals.
 void setVertexSizes(PdVector sizeList)
          Copy vertex sizes of list to existing array of vertex sizes.
 void setVertexTextures(PdVector[] texList)
          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 showEdgeColorFromElements(boolean flag)
          Set flag if edge colors are induced from local element or vertex colors.
 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 showElementFromVertexColors(boolean flag)
          Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex 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 showIndividualMaterial(int ind, boolean flag)
          Set flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.
 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 showPolygonSizes(boolean flag)
          Set flag to enable drawing of polygon sizes.
 void showPolygonStartArrow(boolean flag)
          Set flag to enable drawing of arrow at first point of polygons.
 void showSilhouette(boolean flag)
          Set flag to enable if a polygon is shown along the silhouette if a shape.
 void showSmoothElementColors(boolean flag)
          Set flag to enable smooth coloring of elements, currently requires vertex colors.
 void showSmoothLighting(boolean flag)
          Set flag to enable smooth lighting, requires vertex normals.
 void showTaggedElements(boolean flag)
          Set flag to enable drawing of tagged elements.
 void showTaggedPolygons(boolean flag)
          Set flag to enable drawing of tagged polygons.
 void showTaggedVertices(boolean flag)
          Set flag to enable drawing of tagged vertices.
 void showTransparency(boolean flag)
          Enable usage of transparency.
 void showVectorArrows(int ind, boolean flag)
          Set flag if tip of vectors is shown as arrow.
 void showVectorColors(int ind, boolean flag)
          Set flag to enable drawing of individual vertex colors of a vector field.
 void showVectorField(int ind, boolean flag)
          Set flag to enable drawing of vectors of a vector field.
 void showVectorFields(boolean flag)
          Set flag to enable drawing of all vector fields which are visible.
 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 showVertexOutline(boolean flag)
          Set flag whether drawing of border of vertex circles is enabled.
 void showVertexSizes(boolean flag)
          Set flag to enable drawing of vertex sizes.
 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, applyAmbientMatrix, applyModelingMatrix, blend, clearTagElement, clearTagPolygon, copy, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getGeometryInfo, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getState, getTitle, getType, getVersion, getVersionType, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTagElement, hasTagPolygon, intersectionWithLine, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, merge, projectFromAmbientSpace, removeDisplay, removeElement, removeMethodMenus, removePolygon, removeVertex, setAmbientMatrix, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setEnabledInstanceSharing, setGeometryInfo, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setModelMatrix, setTagElement, setTagPolygon, setTitle, setType, setVersion, setVersionType, setVisible, showBndBox, showCenter, showName, showTitle, toString, update
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, updatePanels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.project.PgGeometryIf
assureInspector, getInfoPanel, getName, hasTag, setName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
 

Field Detail

BLEND_REPLACE

public static final int BLEND_REPLACE
Flag if texture overpaints all surface colors and a possible alpha channel makes surface semi-transparent.

See Also:
Constant Field Values

BLEND_MATERIAL

public static final int BLEND_MATERIAL
Flag if texture is combined with surface color depending on texture transparency.

See Also:
Constant Field Values

BLEND_ALPHA

public static final int BLEND_ALPHA
Flag if texture of a greyscale image is only used to make surface semi-transparent.

See Also:
Constant Field Values

FILTER_DIRECT

public static final int FILTER_DIRECT
No filtering, for each pixel the texture image is sampled at a single point.

See Also:
Constant Field Values

FILTER_LINEAR

public static final int FILTER_LINEAR
Bilinear filtering, for each pixel the texture image is sampled at a four points.

See Also:
Constant Field Values

FILTER_QUADRATIC

public static final int FILTER_QUADRATIC
Biquadratic filtering, for each pixel the texture image is sampled at a nine points.

See Also:
Constant Field Values
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

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.

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. This method only adjusts the size of vertices, and for example, not of vectors. Note, this class is not intented for changing the geometry data once it is assigned.


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()

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 dimenstion 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()

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.


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)

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.

Specified by:
paint in interface PgGeometryIf
Overrides:
paint in class PgGeometry
See Also:
PgGeometryIf

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.


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.


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.


clearTagVertex

public void clearTagVertex(int anIndex,
                           int aTag)
Clear a single tag of a vertex. For possible tags see PvGeometryIf.

Specified by:
clearTagVertex in interface PgGeometryIf
Overrides:
clearTagVertex in class PgGeometry

hasTagVertex

public boolean hasTagVertex(int anIndex,
                            int aTag)
Check whether vertex has given tag. For possible tags see PvGeometryIf.

Specified by:
hasTagVertex in interface PgGeometryIf
Overrides:
hasTagVertex in class PgGeometry

setTagVertex

public void setTagVertex(int anIndex,
                         int aTag)
Set a tag of a vertex. For possible tags see PvGeometryIf.

Specified by:
setTagVertex in interface PgGeometryIf
Overrides:
setTagVertex in class PgGeometry

addVertex

public int addVertex(PdVector aVertex)
Deprecated. since JavaView 3.04, use setNumVertices(numVertices+1) and setVertex(numVertices)

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

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.

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.


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)
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

showIndividualMaterial

public void showIndividualMaterial(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

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

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)

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


getDimOfElements

public int getDimOfElements()
Get uniform number of vertices of all elements, or individual aSize=-1.

Since:
JavaView 2.69

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)

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.


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

getGlobalEdgeNormalLength

public double getGlobalEdgeNormalLength()
Get length factor of normal vectors when drawn in display.

Since:
JavaView 2.69

getGlobalEdgeNormalSize

public double getGlobalEdgeNormalSize()
Get thickness in pixels of normals when drawn in display.

Since:
JavaView 2.69

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

setGlobalEdgeNormalLength

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

Since:
JavaView 2.69

setGlobalEdgeNormalSize

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

Since:
JavaView 2.69

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)

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()

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[][] 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.

Parameters:
vertexFunction - array with new vertex functions

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

getTextureImageName

public java.lang.String getTextureImageName()
Get name of texture image, a URL or full path name.

Specified by:
getTextureImageName in interface PgGeometryIf
Overrides:
getTextureImageName in class PgGeometry

setTextureImageName

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

Specified by:
setTextureImageName in interface PgGeometryIf
Overrides:
setTextureImageName in class PgGeometry

getTextureImage

public java.awt.Image getTextureImage()
Get image of texture.

Specified by:
getTextureImage in interface PgGeometryIf
Overrides:
getTextureImage in class PgGeometry

setTextureImage

public void setTextureImage(java.awt.Image image)
Set image of texture.

Specified by:
setTextureImage in interface PgGeometryIf
Overrides:
setTextureImage in class PgGeometry

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

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

getFilterType

public int getFilterType()
Get mode how texture image is sampled to compute color of pixel.

Returns:
filter type such as FILTER_DIRECT, 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 FILTER_DIRECT, FILTER_QUADRATIC ...

getBlendingMode

public int getBlendingMode()
Get mode how texture color is applied to surface.

Returns:
blending type such as BLEND_REPLACE, BLEND_MATERIAL ...

setBlendingMode

public void setBlendingMode(int blendingMode)
Set mode how texture color is applied to surface.

Parameters:
blendingMode - blending type such as BLEND_REPLACE, BLEND_MATERIAL ...

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

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

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

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

addPolygon

public int addPolygon(PiVector aPolygon)
Deprecated. since JavaView 3.04, use setNumPolygons(numPolygons+1) and setPolygon(numPolygons)

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

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

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

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

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 argment array too small do nothing.

Parameters:
edge - array of edge vectors to be copied

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

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

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

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

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()

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()

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:
isEnabledIndexLabels(), setEnabledIndexLabels(boolean)

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)

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.


isShowingEdgeColors

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


showEdgeColors

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


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.


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.


isShowingElementFromVertexColors

public boolean isShowingElementFromVertexColors()
Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.


showElementFromVertexColors

public void showElementFromVertexColors(boolean flag)
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.


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()

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()
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.


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.

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.


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

JavaView© v3.95.000

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