Class PgJvxSrc
- java.lang.Object
-
- jv.object.PsObject
-
- jv.project.PgGeometry
-
- jv.project.PgJvxSrc
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf
- Direct Known Subclasses:
- PgRuler, PvGeometry, PvLight
public class PgJvxSrc extends PgGeometry
Container of very diverse geometry data of points, curves, surfaces, and volumes. This class allows temporary storage and exchange of data. For example, this class is filled by loaders and later assigned to specialized geometry classes for further processing.Note, this class is not intended to perform geometric operations or even to modify data once it is allocated or assigned. For such operations use more specialized classes as e.g.
PgPointSet,PgPolygonSet, orPgElementSet.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 10.05.14, 3.70 revised (kp) Some query methods for polygon and elements added .
12.11.09, 3.60 revised (ur) Added missing boundary polygon data.
02.07.06, 3.50 revised (kp) Edge handling improved, including color and size.
18.06.06, 3.30 revised (kp) Static variables for texture handling moved to PgGeometryIf.
12.10.04, 3.20 revised (ur) Copy method implemented.
13.08.04, 3.10 revised (kp) Implemented computation of vertex normals for smooth lighting, if normals are missing.
29.02.04, 3.00 revised (kp) Methods on vectorFields removed which were deprecated before JavaView v2.21.
17.01.04, 2.50 revised (kp) Specular color and shininess added.
02.01.04, 2.40 revised (kp) Crease angle added.
19.05.01, 2.30 revised (kp) Vector field handling slightly revised.
12.12.00, 2.20 revised (kp) Descriptions moved from PgJvxSrc to PgGeometry.
12.12.00, 2.10 revised (kp) Secondary classification instance variable change to array of strings from pure string.
26.09.00, 2.00 revised (kp) All integer flags replaced with booleans to conform with PgGeometry.
21.09.00, 1.25 revised (kp) Methods for global backface element color added.
07.07.00, 1.20 revised (kp) More missing methods of PgGeometryIf implemented.
20.04.00, 1.10 revised (kp) Author member variable added.
08.04.00, 1.00 created (kp) Extracted from jv.project.PgGeometry
-
-
Field Summary
-
Fields inherited from class jv.object.PsObject
HAS_BOUNDARY_PANEL, 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, BLEND_ALPHA, BLEND_MATERIAL, BLEND_REPLACE, FILTER_DIRECT, FILTER_LINEAR, FILTER_QUADRATIC, 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, PERIODIC_BOTH, PERIODIC_HEIGHT, PERIODIC_NONE, PERIODIC_WIDTH, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE, SIDE_BACK, SIDE_BOTH, SIDE_FRONT, SIDE_NONE
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description intaddElement(PiVector anElement)Deprecated.since JavaView 3.04, use setNumElements(numElements+1) and setElement(numElements)intaddPolygon(PiVector aPolygon)Add new polygon to the end of the polygon list.intaddVertex(PdVector aVertex)Add new vertex to the end of the vertex list Method just callssetVertex(int, PdVector)with index=getNumVertices().voidassureEdgeColors()Assures respectively allocates correct length of edge color array.voidassureEdgeSizes()Assures respectively allocates correct length of edge size array.voidassureElementBackColors()Assures respectively allocates correct length of element back face color array.voidassureElementColors()Assures respectively allocates correct length of element color array.voidassureElementEdges()Assures respectively allocates correct length of element-edge incidence array.voidassureElementNormals()Assures respectively allocates correct length of element normal array.voidassureElementTextures()Assures respectively allocates correct length of element texture array.voidassureNeighbours()Assures correct length of neighbour array and, if any length changes, initializes with-1.voidassurePolygonColors()Assures respectively allocates correct length of polygon color array.voidassurePolygonNormals()Assures respectively allocates correct length of polygon normal array.voidassurePolygonSizes()Assures respectively allocates correct length of polygon size vector.voidassureVectorColors(int ind)Assures respectively allocates correct length of element color array.voidassureVertexColors()Assures respectively allocates correct length of vertex color array.voidassureVertexNormals()Assures respectively allocates correct length of vertex normal array.voidassureVertexSizes()Assures respectively allocates correct length of vertex size array.voidassureVertexTextures()Assures respectively allocates correct length of vertex texture array.voidclearTagVertex(int anIndex, int aTag)Clear a single tag of a vertex.java.lang.Objectclone()Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.voidcopy(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.intgetBlendingMode()Get mode how texture color is applied to surface.java.awt.ColorgetBndColor(int ind)Get global color of individual boundary polygon unless all have same color.PiVectorgetBndElementInd(int i)Get indices of surface elements along boundary.java.lang.StringgetBndName(int ind)Get thickness in pixels of boundary polygon.PiVectorgetBndNeighbourLocInd(int i)Get local indices of opposite vertices of edge in surface element.intgetBndNumVertices(int ind)Get number of a boundary polygon's vertices.doublegetBndSize(int ind)Get thickness in pixels of boundary polygon.PiVectorgetBndVertexInd(int ind)Get vertex index information for a boundary polygon.PdVector[]getBndVertices(int ind)Get a boundary polygon's vertices.PdVector[]getBounds()Compute bounding box of the vertices which are transformed with ambient and model matrix.doublegetCreaseAngle()Get crease angle which is a threshold determining sharp crease edges.intgetDimOfElements()Get uniform number of vertices of all elements, or individualaSize=-1.intgetDimOfPolygons()Get uniform number of vertices of all polygons, or individualaSize=-1.intgetDimOfTextures()Get dimension of textures, i.e. number of components of each of the texture vectors.intgetDimOfVectors(int ind)Get uniform number of components of each vector in a vector field.java.awt.Color[]getEdgeColors()Get color array for read and write access, but do not modify the size of any color vector.PiVector[]getEdges()Get edge array for read and write access, but do not modify the size of any edge.PdVectorgetEdgeSizes()Get array of relative edge sizes for read and write access.PiVectorgetElement(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.PiVector[]getElementEdges()Get an array which stores for each element the indices of its incident edges.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.intgetFilterType()Get mode how texture image is sampled to compute color of pixel.java.awt.ColorgetGlobalBndColor()Get global boundary color which is used if no local colors are available.doublegetGlobalBndSize()Get thickness in pixels of boundary when drawn in display.java.awt.ColorgetGlobalBndTagColor()Get global color of tagged boundaries.java.awt.ColorgetGlobalEdgeColor()Get global edge color which is used if no local colors are available.java.awt.ColorgetGlobalEdgeNormalColor()Get global element color which is used if no local colors are available.doublegetGlobalEdgeNormalLength()Get length factor of normal vectors when drawn in display.doublegetGlobalEdgeNormalSize()Get thickness in pixels of normals when drawn in display.doublegetGlobalEdgeSize()Get global radius in pixels of circle to visualize vertices in display.java.awt.ColorgetGlobalEdgeTagColor()Get global color of tagged vertices.java.awt.ColorgetGlobalElementBackColor()Get global color of backface of elements.java.awt.ColorgetGlobalElementColor()Get global element color which is used if no local colors are available.java.awt.ColorgetGlobalElementNormalColor()Get global element normal color which is used if no local colors are available.doublegetGlobalElementNormalLength()Get length factor of normal vectors when drawn in display.doublegetGlobalElementNormalSize()Get thickness in pixels of normals when drawn in display.java.awt.ColorgetGlobalElementTagColor()Get global color of tagged elements.java.awt.ColorgetGlobalPolygonColor()Get global polygon color which is used if no local colors are available.java.awt.ColorgetGlobalPolygonNormalColor()Get global polygon normal color which is used if no local colors are available.doublegetGlobalPolygonNormalLength()Get length factor of normal vectors when drawn in display.doublegetGlobalPolygonNormalSize()Get thickness in pixels of normals when drawn in display.doublegetGlobalPolygonSize()Get global radius in pixels of circle to visualize vertices in display.java.awt.ColorgetGlobalPolygonTagColor()Get global color of tagged vertices.java.awt.ColorgetGlobalVectorColor(int ind)Get global color of vector field which is used if no local colors are available.doublegetGlobalVectorLength(int ind)Get length factor of vectors of vector field when drawn in display.doublegetGlobalVectorSize(int ind)Get thickness in pixels of vectors of vector field when drawn in display.java.awt.ColorgetGlobalVertexColor()Get global vertex color which is used if no local colors are available.java.awt.ColorgetGlobalVertexNormalColor()Get global vertex normal color which is used if no local colors are available.doublegetGlobalVertexNormalLength()Get length factor of vertex normal vectors when drawn in display.doublegetGlobalVertexNormalSize()Get thickness in pixels of vertex normals when drawn in display.doublegetGlobalVertexSize()Get global radius in pixels of circle to visualize vertices in display.java.awt.ColorgetGlobalVertexTagColor()Get global color of tagged vertices.PgJvxSrcgetJvx()Fills a geometry object with data from this instance, for example, to print to file.PiVector[]getNeighbours()Get neighbourhood information.intgetNumBndPolygons()Get number of allocated and used vector fields.intgetNumEdges()Get number of allocated and used edges.intgetNumElements()Get number of allocated and used elements.intgetNumPolygons()Get number of allocated and used polygons.intgetNumVectorFields()Get number of allocated and used vector fields.intgetNumVectors(int ind)Get number of vectors in vector field with given index.intgetNumVertices()Get number of vertices in vertex array.PiVectorgetPolygon(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.PdVectorgetPolygonSizes()Get polygon sizes for read and write access.doublegetShininess()Get shininess of highlights of geometry.java.awt.ColorgetSpecularColor()Get specular color of geometry.java.awt.ImagegetTextureImage()Get image of texture.PdVector[]getTextureImageBnd()Get bounds of texture image in normalized texture coordinates.java.lang.StringgetTextureImageName()Get name of texture image, a URL or full path name.intgetTexturePeriodic()Get type of periodic extension of texture outside the unit texture square.intgetTextureSide()Determines whether texture is shown on front, back or both sides of a surface, if texture is shown at all.java.awt.DimensiongetTextureTiling()Get number of repetitions of texture image in both directions.doublegetTransparency()Get transparency of geometry.java.awt.Color[]getVectorFieldColors(int ind)Get color array of a vector field for read and write access.java.lang.StringgetVectorFieldName(int ind)Get name of vector field.PdVector[]getVectors(int ind)Get array of a vectors of a field for read and write access.PdVectorgetVertex(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.PdVectorgetVertexSizes()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.booleanhasEdgeColors()Check if edge colors have been allocated.booleanhasElementBackColors()Check if element back colors have been allocated.booleanhasElementColors()Check if element colors have been allocated.booleanhasElementNormals()Check if element normals have been allocated.booleanhasElementTextures()Check if element textures have been allocated.booleanhasPolygonColors()Check if polygon colors have been allocated.booleanhasPolygonNormals()Check if polygon normals have been allocated.booleanhasTagVertex(int anIndex, int aTag)Check whether vertex has given tag.booleanhasVertexColors()Check if vertex colors have been allocated.booleanhasVertexNormals()Check if vertex normals have been allocated.booleanhasVertexSizes()Check if relative vertex sizes have been allocated.booleanhasVertexTextures()Check if vertex textures have been allocated.voidinit()Initializes and resets geometry.booleanisDefaultLabelEnabled()Deprecated.since JavaView 3.61.003, use isEnabledIndexLabels().booleanisEnabledIndexLabels()Determine whether drawing of default labels, i.e. item indices, is enabled.booleanisShowingBackface()Determine flag to enable drawing of backfacing elements whose normal points away from camera.booleanisShowingBnd(int ind)Determines if boundary polygon is visible.booleanisShowingBndMaterials(int ind)Get flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.booleanisShowingBoundaries()Determines whether drawing of boundary curves is enabled.booleanisShowingEdgeColorFromElements()Determines whether local edge color is induced from element or vertex colors.booleanisShowingEdgeColorFromVertices()Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.booleanisShowingEdgeColors()Determine whether showing of edge colors is enabled.booleanisShowingEdgeLabels()Determine whether showing of edge labels is enabled.booleanisShowingEdges()Determines whether drawing of element edges is enabled.booleanisShowingEdgeSizes()Determine whether showing of edge sizes is enabled.booleanisShowingElementBackColor()Determines whether drawing of global backface element color is enabled.booleanisShowingElementBackColors()Determines whether drawing of individual backface element colors is enabled.booleanisShowingElementColorFromVertices()Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.booleanisShowingElementColors()Determines whether drawing of individual element colors is enabled.booleanisShowingElementFromVertexColors()Deprecated.since JavaView 4.52.003, use #isShowingElementColorFromVertices()booleanisShowingElementLabels()Determine whether showing of element labels is enabled.booleanisShowingElementNormalArrow()Determines whether drawing of arrow of element normals is enabled.booleanisShowingElementNormals()Determines whether drawing of element normals is enabled.booleanisShowingElements()Determines whether drawing of elements is enabled.booleanisShowingElementTexture()Determines whether drawing of element texture is enabled.booleanisShowingIndices()Check whether showing of indices is switched on.booleanisShowingIndividualMaterial(int ind)Deprecated.Since JavaView 3.98.003, useisShowingVectorFieldMaterials(int)insteadbooleanisShowingPolygonColors()Determines whether drawing of polygon colors is enabled.booleanisShowingPolygonEndArrow()Determine whether drawing of arrow at last point of polygon is enabled.booleanisShowingPolygonLabels()Determine whether showing of polygon labels is enabled.booleanisShowingPolygonNormalArrow()Determines whether drawing of arrow of polygon normals is enabled.booleanisShowingPolygonNormals()Determines whether drawing of polygon normals is enabled.booleanisShowingPolygons()Determines whether drawing of polygons is enabled.booleanisShowingPolygonSizes()Determines whether drawing of polygon sizes is enabled.booleanisShowingPolygonStartArrow()Determine whether drawing of arrow at first point of polygon is enabled.booleanisShowingSilhouette()Determines whether a polygon is shown along the silhouette if a shape.booleanisShowingSmoothEdgeColors()Determines whether smooth coloring of edges is enabled, currently requires vertex colors.booleanisShowingSmoothElementColors()Determines whether smooth coloring of elements is enabled, currently requires vertex colors.booleanisShowingSmoothLighting()Determines whether smooth lighting is enabled, requires vertex normals.booleanisShowingTaggedElements()Determine whether showing of tagged elements is enabled.booleanisShowingTaggedPolygons()Determine whether showing of tagged polygons is enabled.booleanisShowingTaggedVertices()Determine whether showing of tagged vertices is enabled.booleanisShowingTransparency()Determines whether usage of transparency is enabled.booleanisShowingVectorArrows(int ind)Get flag if tip of vectors is shown as arrow.booleanisShowingVectorColors(int ind)Get flag to enable drawing of individual vertex colors of a vector field.booleanisShowingVectorField(int ind)Get flag to enable drawing of vectors of a vector field.booleanisShowingVectorFieldMaterials(int ind)Get flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.booleanisShowingVectorFields()Get flag to enable drawing of all vector fields if each is visible.booleanisShowingVertexColors()Determines whether drawing of vertex colors is enabled.booleanisShowingVertexLabels()Determine whether showing of vertex labels is enabled.booleanisShowingVertexNormalArrow()Determines whether drawing of arrow of vertex normals is enabled.booleanisShowingVertexNormals()Determines whether drawing of vertex normals is enabled.booleanisShowingVertexOutline()Determines whether drawing of border of vertex circles is enabled.booleanisShowingVertexSizes()Determines whether drawing of vertex sizes is enabled.booleanisShowingVertexTexture()Determines whether drawing of vertex texture is enabled.booleanisShowingVertices()Determines whether drawing of vertices is enabled.booleanisVectorElementBased(int ind)Get flag whether vector field is element based or vertex based.booleanmakeElementColorsFromXYZ()Deprecated.since JavaView 3.85.000, no replacement.booleanmakeElementFromVertexColors()Deprecated.this class no longer supports generation of colors, use geometry classes from jv.geom.*.booleanmakeElementNormals()Compute element normals from edge crossproducts.voidmakeQuadrConn(int uDiscr, int vDiscr, boolean uClosed, boolean vClosed)Generate element information for a quadrilateral surface.booleanmakeVertexNormals()Compute vertex normals by adding all adjacent corner element normals, and final normalization.voidpaint(PvGeometryIf dc)Major rendering method fills an internal container class supplied by the display.PgGeometryreflect(PdMatrix mat, boolean bOrient, boolean bVector)Deprecated.this class no longer supports reflection, use geometry classes from jv.geom.*.voidremovePolygonSizes()Remove polygon sizes from a geometry.voidsetBlendingMode(int blendingMode)Set mode how texture color is applied to surface.booleansetBndColor(int ind, java.awt.Color color)Set global color of individual boundary polygon unless all have same color.voidsetBndElementInd(int ind, PiVector elemInd)Set indices of surface elements along boundary.voidsetBndName(int ind, java.lang.String name)Set thickness in pixels of boundary polygon.voidsetBndNeighbourLocInd(int ind, PiVector oppLocInd)Set local indices of opposite vertices of edge in surface element.voidsetBndNumVertices(int ind, int num)Set number of a boundary polygon's vertices.booleansetBndSize(int ind, double size)Set thickness in pixels of boundary polygon.voidsetBndVertexInd(int ind, PiVector vertexInd)Set vertex index information to a boundary polygon.voidsetBndVertices(int ind, PdVector[] vertex)Set vertices to a boundary polygon.voidsetCreaseAngle(double angle)Set crease angle which is a threshold determining sharp crease edges.voidsetDefaultLabelEnabled(boolean flag)Deprecated.since JavaView 3.61.003, use setEnabledIndexLabels(boolean).voidsetDimOfElements(int aSize)Let all elements have same number of verticesaSize!voidsetDimOfPolygons(int aSize)Let all polygons have same number of verticesaSize!voidsetDimOfTextures(int dim)Set dimension of textures, i.e. number of components of each of the texture vectors.voidsetDimOfVertices(int dim)Assign dimension of vertices.voidsetEdgeColors(java.awt.Color[] colorList)Copy edge colors of list to existing array of edge colors.voidsetEdges(PiVector[] edge)Copy the first m_numEdges of given array into edge array.voidsetEdgeSizes(PdVector edgeSize)Assign a set of relative edge sizes.booleansetElement(int anIndex, PiVector newElem)Assign element data to an existing element.voidsetElementBackColors(java.awt.Color[] color)Copy backface element colors of list to existing array of element colors.voidsetElementColors(java.awt.Color[] color)Copy element colors of list to existing array of element colors.voidsetElementEdges(PiVector[] elementEdge)Set an array which stores for each element the indices of its incident edges.voidsetElementNormals(PdVector[] normal)Copy element normals of list to existing array of element normals.voidsetElements(PiVector[] element)Copy the first m_numElements of given array into element array.voidsetElementTextures(PdVector[][] texCoords)Copy element textures of list to existing array of element textures.voidsetEnabledIndexLabels(boolean flag)Determine whether drawing of default labels, i.e. item indices, is enabled.voidsetFilterType(int filterType)Set mode how texture image is sampled to compute color of pixel.voidsetGlobalBndColor(java.awt.Color color)Set global boundary color to be used if no local colors are available.voidsetGlobalBndSize(double size)Set thickness in pixels of boundary when drawn in display.voidsetGlobalBndTagColor(java.awt.Color color)Set global color of tagged boundaries.voidsetGlobalEdgeColor(java.awt.Color color)Set global edge color to be used if no local colors are available.voidsetGlobalEdgeNormalColor(java.awt.Color color)Set global normal color to be used if no local colors are available.voidsetGlobalEdgeNormalLength(double length)Get length factor of normal vectors when drawn in display.voidsetGlobalEdgeNormalSize(double size)Get thickness in pixels of normals when drawn in display.voidsetGlobalEdgeSize(double size)Set global radius in pixels of circle to visualize vertices in display.voidsetGlobalEdgeTagColor(java.awt.Color color)Set global color of tagged vertices.voidsetGlobalElementBackColor(java.awt.Color color)Set global color of backface of elements.voidsetGlobalElementColor(java.awt.Color color)Set global element color to be used if no local colors are available.voidsetGlobalElementNormalColor(java.awt.Color color)Set global element normal color to be used if no local colors are available.voidsetGlobalElementNormalLength(double length)Get length factor of normal vectors when drawn in display.voidsetGlobalElementNormalSize(double size)Get thickness in pixels of normals when drawn in display.voidsetGlobalElementTagColor(java.awt.Color color)Set global color of tagged elements.voidsetGlobalPolygonColor(java.awt.Color color)Set global polygon color to be used if no local colors are available.voidsetGlobalPolygonNormalColor(java.awt.Color color)Set global polygon normal color to be used if no local colors are available.voidsetGlobalPolygonNormalLength(double length)Get length factor of normal vectors when drawn in display.voidsetGlobalPolygonNormalSize(double size)Get thickness in pixels of normals when drawn in display.voidsetGlobalPolygonSize(double size)Set global radius in pixels of circle to visualize vertices in display.voidsetGlobalPolygonTagColor(java.awt.Color color)Set global color of tagged vertices.booleansetGlobalVectorColor(int ind, java.awt.Color color)Set global color of vector field to be used if no local colors are available.booleansetGlobalVectorLength(int ind, double length)Set length factor of vectors of vector field when drawn in display.booleansetGlobalVectorSize(int ind, double size)Set thickness in pixels of vectors of vector field when drawn in display.voidsetGlobalVertexColor(java.awt.Color color)Set global vertex color to be used if no local colors are available.voidsetGlobalVertexNormalColor(java.awt.Color color)Set global vertex normal color to be used if no local colors are available.voidsetGlobalVertexNormalLength(double length)Get length factor of vertex normal vectors when drawn in display.voidsetGlobalVertexNormalSize(double size)Get thickness in pixels of vertex normals when drawn in display.voidsetGlobalVertexSize(double size)Set global radius in pixels of circle to visualize vertices in display.voidsetGlobalVertexTagColor(java.awt.Color color)Set global color of tagged vertices.voidsetJvx(PgJvxSrc src)Fill this instance with data from a geometry source, for example, previously read from file.voidsetNeighbours(PiVector[] neighbour)Copy neighbour array to existing array of neighbours.voidsetNumBndPolygons(int num)Set number of allocated and used vector fields.voidsetNumEdges(int aNumEdges)Allocate given number of edges, and allocate normals, colors etc.voidsetNumElements(int numElements)Allocate given number of elements, and allocate neighbours, normals, colors etc.voidsetNumPolygons(int numPolygons)Allocate given number of polygons, and allocate normals, colors etc.voidsetNumVectorFields(int num)Set number of allocated and used vector fields.voidsetNumVectors(int ind, int num, int dimOfVectors)Set number of vectors of a vector field with given index.voidsetNumVertices(int numVertices)Allocate given number of vertices, and allocate normals, colors etc.booleansetPolygon(int anIndex, PiVector aPolygon)Set index vector of polygon with given index.voidsetPolygonColors(java.awt.Color[] color)Copy polygon colors of list to existing array of polygon colors.voidsetPolygonNormals(PdVector[] normal)Copy polygon normals of list to existing array of polygon normals.voidsetPolygons(PiVector[] polygon)Copy the first m_numPolygons of given array into polygon array.voidsetPolygonSizes(PdVector size)Copy polygon sizes of list to existing array of polygon sizes.voidsetShininess(double val)Set shininess of highlights of geometry.voidsetSpecularColor(java.awt.Color col)Set specular color of geometry.voidsetState(int aKey, boolean aState)Set drawing flags of this geometry from within the display.voidsetTagVertex(int anIndex, int aTag)Set a tag of a vertex.voidsetTextureImage(java.awt.Image image)Set image of texture.voidsetTextureImageBnd(PdVector[] bnd)Set bounds of texture image in normalized texture coordinates.voidsetTextureImageName(java.lang.String image)Set file name of texture image as relative path or protocol.voidsetTexturePeriodic(int periodic)Set number of repetitions of texture image in both directions.voidsetTextureSide(int side)Set flag whether texture is shown on front, back or both sides of a surface, if texture is shown at all.voidsetTextureTiling(java.awt.Dimension repeat)Set number of repetitions of texture image in both directions.voidsetTransparency(double alpha)Set transparency of geometry.voidsetVectorColors(int ind, java.awt.Color[] list)Copy vector colors of list to existing array of vector colors.voidsetVectorElementBased(int ind, boolean flag)Set flag whether vector field is element based or vertex based.voidsetVectorFieldName(int ind, java.lang.String name)Set name of vector field.voidsetVectors(int ind, PdVector[] list)Copy all vectors of vector list to existing array of vectors.booleansetVertex(int anIndex, PdVector aVertex)Copy new vertex to vertex at specified position in the vertex listvoidsetVertexColors(java.awt.Color[] colorList)Copy vertex colors of list to existing array of vertex colors.voidsetVertexFunctions(java.lang.String[][] vertexFunction)Assign functions for each vertex of the vertex list.voidsetVertexNormals(PdVector[] normalList)Copy vertex normals of list to existing array of vertex normals.voidsetVertexSizes(PdVector sizeList)Copy vertex sizes of list to existing array of vertex sizes.voidsetVertexTextures(PdVector[] texList)Copy vertex textures of list to existing array of vertex textures.voidsetVertices(PdVector[] vertex)Copy all vertices of vertex list to existing array of vertices.voidshowBackface(boolean flag)Set flag to enable drawing of backfacing elements whose normal points away from camera.voidshowBnd(int ind, boolean flag)Set visibility of boundary polygon.voidshowBndMaterials(int ind, boolean flag)Set flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.voidshowBoundaries(boolean flag)Set flag to enable drawing of boundary curves.voidshowEdgeColorFromElements(boolean flag)Set flag if edge colors are induced from local element or vertex colors.voidshowEdgeColorFromVertices(boolean flag)Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.voidshowEdgeColors(boolean flag)Set flag to enable drawing of individual edge colors.voidshowEdgeLabels(boolean flag)Set flag to enable drawing of edge labels in display.voidshowEdges(boolean flag)Set flag to enable drawing of element edges.voidshowEdgeSizes(boolean flag)Set flag to enable drawing of edge sizes.voidshowElementBackColor(boolean flag)Set flag to enable drawing of backface element colors.voidshowElementBackColors(boolean flag)Set flag to enable drawing of individual backface element colors.voidshowElementColorFromVertices(boolean flag)Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.voidshowElementColors(boolean flag)Set flag to enable drawing of individual element colors.voidshowElementFromVertexColors(boolean flag)Deprecated.since JavaView 4.52.003, use #showElementColorFromVertices(boolean)voidshowElementLabels(boolean flag)Set flag to enable drawing of element labels in display.voidshowElementNormalArrow(boolean flag)Set flag to enable drawing of arrow of element normal.voidshowElementNormals(boolean flag)Set flag to enable drawing of element normals.voidshowElements(boolean flag)Set flag to enable drawing of elements.voidshowElementTexture(boolean flag)Set flag to enable drawing of vertex texture.voidshowIndices(boolean flag)Set flag to drawing of indices in display.voidshowIndividualMaterial(int ind, boolean flag)Deprecated.Since JavaView 3.98.003, useshowVectorFieldMaterials(int,boolean)insteadvoidshowPolygonColors(boolean flag)Set flag to enable drawing of polygon colors.voidshowPolygonEndArrow(boolean flag)Set flag to enable drawing of arrow at last point of polygons.voidshowPolygonLabels(boolean flag)Set flag to enable drawing of polygon labels in display.voidshowPolygonNormalArrow(boolean flag)Set flag to enable drawing of arrow of polygon normal.voidshowPolygonNormals(boolean flag)Set flag to enable drawing of polygon normals.voidshowPolygons(boolean flag)Set flag to enable drawing of polygons.voidshowPolygonSizes(boolean flag)Set flag to enable drawing of polygon sizes.voidshowPolygonStartArrow(boolean flag)Set flag to enable drawing of arrow at first point of polygons.voidshowSilhouette(boolean flag)Set flag to enable if a polygon is shown along the silhouette if a shape.voidshowSmoothEdgeColors(boolean flag)Set flag to enable smooth coloring of edges, currently requires vertex colors.voidshowSmoothElementColors(boolean flag)Set flag to enable smooth coloring of elements, currently requires vertex colors.voidshowSmoothLighting(boolean flag)Set flag to enable smooth lighting, requires vertex normals.voidshowTaggedElements(boolean flag)Set flag to enable drawing of tagged elements.voidshowTaggedPolygons(boolean flag)Set flag to enable drawing of tagged polygons.voidshowTaggedVertices(boolean flag)Set flag to enable drawing of tagged vertices.voidshowTransparency(boolean flag)Enable usage of transparency.voidshowVectorArrows(int ind, boolean flag)Set flag if tip of vectors is shown as arrow.voidshowVectorColors(int ind, boolean flag)Set flag to enable drawing of individual vertex colors of a vector field.voidshowVectorField(int ind, boolean flag)Set flag to enable drawing of vectors of a vector field.voidshowVectorFieldMaterials(int ind, boolean flag)Set flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.voidshowVectorFields(boolean flag)Set flag to enable drawing of all vector fields which are visible.voidshowVertexColors(boolean flag)Set flag to enable drawing of vertex colors.voidshowVertexLabels(boolean flag)Set flag to enable drawing of vertex labels in display.voidshowVertexNormalArrow(boolean flag)Set flag to enable drawing of arrow of vertex normal.voidshowVertexNormals(boolean flag)Set flag to enable drawing of vertex normals.voidshowVertexOutline(boolean flag)Set flag whether drawing of border of vertex circles is enabled.voidshowVertexSizes(boolean flag)Set flag to enable drawing of vertex sizes.voidshowVertexTexture(boolean flag)Set flag to enable drawing of element texture.voidshowVertices(boolean flag)Set flag to enable drawing of vertices.-
Methods inherited from class jv.project.PgGeometry
addDisplay, applyAmbientMatrix, applyModelingMatrix, blend, clearTagElement, clearTagPolygon, convertWorldToModel, 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
-
-
-
-
Constructor Detail
-
PgJvxSrc
public PgJvxSrc()
Constructs a geometry container whose vertex dimension is initialized to 3. You are advised to call this method rather thanPgJvxSrc(int)to avoid problems with the init() method. This constructor explicitly calls the init() method. These problems are due to JAX.- See Also:
PgJvxSrc(int)- Version:
- 17.12.00, 1.10 revised (kp) Init() method now called explicitly.
-
PgJvxSrc
public PgJvxSrc(int dim)
This constructor is protected since it does not invoke the init() method when this class equals PgJvxSrc. Therefore, external instantiation of PgJvxSrc should use "new PgJvxSrc();" which calls the init() method explicitly.Subclasses of PgJvxSrc are advised to use the construction PgJvxSrc(int) similar to the use of all other geometry classes, and then invoke the init() method inside their own constructor.
All this business about the init() method is due to JAX which is unable to check against the (obfuscated) class name after obfuscation.
- Version:
- 04.05.14, 1.30 revised (kp) Type now initialized in constructor, no longer in init().
26.08.03, 1.20 revised (kp) Method made public.
12.08.00, 1.10 revised (kp) Init() method now called conditionally since class no longer final.
-
-
Method Detail
-
init
public void init()
Initializes and resets geometry.- Overrides:
initin classPgGeometry- Version:
- 04.05.14, 1.30 revised (kp) Type now initialized in constructor, no longer in init().
-
setDimOfVertices
public void setDimOfVertices(int dim)
Assign dimension of vertices. This method only adjusts the size of vertices, and for example, not of vectors. Note, this class is not intended for changing the geometry data once it is assigned.- Overrides:
setDimOfVerticesin classPgGeometry- Version:
- 07.03.03, 1.50 revised (kp) Adjust size of vertices since classes in PvDisplay require this.
11.12.02, 1.10 revised (kp) Call superclass method.
-
getBounds
public PdVector[] getBounds()
Compute bounding box of the vertices which are transformed with ambient and model matrix.The two returned bounding box vectors are 3-dimensional. If dimension of vertices is less than 3 then remaining components are zeroed.
Note, transformation not supported yet.
- Overrides:
getBoundsin classPgGeometry- Returns:
- two 3d vectors which are the extremal corners of the bounding cube
- See Also:
getAmbientBounds()- Version:
- 14.05.01, 1.10 revised (kp) Dimension of bounding box vector now always 3.
-
getAmbientBounds
public PdVector[] getAmbientBounds()
Compute bounding box of this geometry from the set of all vertices, or return null if no vertices. Method returns two vectors whose size is equal to the dimension of this geometry. The two bounding vectors are first, the minimal corner, and second, the maximal corner of the bounding m_dim-cube. Both vectors uniquely determine the bounding box. Note, the bounding box does not include transformations from the ambient or model matrix.- Overrides:
getAmbientBoundsin classPgGeometry- Returns:
- two vectors which are the extremal corners of the bounding cube
- See Also:
getBounds()- Version:
- 14.05.01, 1.00 created (kp)
-
setState
public void setState(int aKey, boolean aState)Set drawing flags of this geometry from within the display. Currently, this method is not intended for public use.- Specified by:
setStatein interfacePgGeometryIf- Overrides:
setStatein classPgGeometry- 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:
getJvxin interfacePgGeometryIf- Overrides:
getJvxin classPgGeometry- 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:
setJvxin interfacePgGeometryIf- Overrides:
setJvxin classPgGeometry- Parameters:
src- a geometry source used to fill this instance with data.
-
copy
public void copy(PgJvxSrc src)
Copy argument PgJvxSrc into this.- Version:
- 12.10.04, 1.00 created (ur)
-
clone
public java.lang.Object clone()
Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set tonull.- Specified by:
clonein interfacePgGeometryIf- Overrides:
clonein classPgGeometry- See Also:
copy(PgJvxSrc)- Version:
- 12.12.00, 1.10 revised (kp) Descriptions moved from PgJvxSrc to PgGeometry.
17.11.00, 1.00 created (kp)
-
paint
public void paint(PvGeometryIf dc)
Major rendering method fills an internal container class supplied by the display. Seejv.project.PgGeometryIffor detailed information.- Specified by:
paintin interfacePgGeometryIf- Overrides:
paintin classPgGeometry- See Also:
PgGeometryIf- Version:
- 21.07.03, 1.10 revised (kp) Now texture image bounds supported.
-
getNumVertices
public int getNumVertices()
Get number of vertices in vertex array.
-
getVertices
public PdVector[] getVertices()
Get vertex array for read and write access, but do not modify the size of any vertex.
-
getVertexColors
public java.awt.Color[] getVertexColors()
Get vertex color array for read and write access.
-
getVertexNormals
public PdVector[] getVertexNormals()
Get vertex normal array for read and write access, but do not modify the size of any normal vector.
-
getVertexSizes
public PdVector getVertexSizes()
Get vertex size array for read and write access.- Since:
- JavaView 2.43
-
getVertexTextures
public PdVector[] getVertexTextures()
Get vertex texture array for read and write access, but do not modify the size of any texture vector.
-
getNumPolygons
public int getNumPolygons()
Get number of allocated and used polygons.
-
getPolygons
public PiVector[] getPolygons()
Get polygon array for read and write access, but do not modify the size of any polygon.
-
getPolygonColors
public java.awt.Color[] getPolygonColors()
Get polygon colors for read and write access.
-
getPolygonNormals
public PdVector[] getPolygonNormals()
Get polygon normals array for read and write access, but do not modify the size of any normal vector.
-
getPolygonSizes
public PdVector getPolygonSizes()
Get polygon sizes for read and write access.
-
getNumElements
public int getNumElements()
Get number of allocated and used elements.
-
getElements
public PiVector[] getElements()
Get element array for read and write access, but do not modify the size of any element.
-
getElementColors
public java.awt.Color[] getElementColors()
Get element color array for read and write access.
-
getElementBackColors
public java.awt.Color[] getElementBackColors()
Get backside element color array for read and write access.
-
getElementNormals
public PdVector[] getElementNormals()
Get element normal array for read and write access, but do not modify the size of any normal vector.
-
getElementTextures
public PdVector[][] getElementTextures()
Get element texture array for read and write access, but do not modify the size of any texture vector.
-
getNeighbours
public PiVector[] getNeighbours()
Get neighbourhood information.
-
clearTagVertex
public void clearTagVertex(int anIndex, int aTag)Clear a single tag of a vertex. For possible tags seePvGeometryIf.- Specified by:
clearTagVertexin interfacePgGeometryIf- Overrides:
clearTagVertexin classPgGeometry
-
hasTagVertex
public boolean hasTagVertex(int anIndex, int aTag)Check whether vertex has given tag. For possible tags seePvGeometryIf.- Specified by:
hasTagVertexin interfacePgGeometryIf- Overrides:
hasTagVertexin classPgGeometry
-
setTagVertex
public void setTagVertex(int anIndex, int aTag)Set a tag of a vertex. For possible tags seePvGeometryIf.- Specified by:
setTagVertexin interfacePgGeometryIf- Overrides:
setTagVertexin classPgGeometry
-
addVertex
public int addVertex(PdVector aVertex)
Add new vertex to the end of the vertex list Method just callssetVertex(int, PdVector)with index=getNumVertices().- Specified by:
addVertexin interfacePgGeometryIf- Overrides:
addVertexin classPgGeometry- 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:
getVertexin interfacePgGeometryIf- Overrides:
getVertexin classPgGeometry- Parameters:
anIndex- index of vertex- Returns:
- reference to vertex vector with given index
-
setVertex
public boolean setVertex(int anIndex, PdVector aVertex)Copy new vertex to vertex at specified position in the vertex list- Specified by:
setVertexin interfacePgGeometryIf- Overrides:
setVertexin classPgGeometry- Parameters:
anIndex- index of vertex positionaVertex- vertex to be copied to vertex list- Returns:
falseif index out of range, or argument missing
-
setNumVertices
public void setNumVertices(int numVertices)
Allocate given number of vertices, and allocate normals, colors etc. if they already exist. The user should change the number of vertices only via this method.- Parameters:
numVertices- new number of vertices of this geometry.
-
hasVertexColors
public boolean hasVertexColors()
Check if vertex colors have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureVertexColors()
-
hasVertexNormals
public boolean hasVertexNormals()
Check if vertex normals have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureVertexNormals()
-
hasVertexSizes
public boolean hasVertexSizes()
Check if relative vertex sizes have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureVertexSizes()
-
hasVertexTextures
public boolean hasVertexTextures()
Check if vertex textures have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureVertexTextures()
-
assureVertexColors
public void assureVertexColors()
Assures respectively allocates correct length of vertex color array. Length of array is equal to length of maximal number of vertices.
-
assureVertexNormals
public void assureVertexNormals()
Assures respectively allocates correct length of vertex normal array. Length of array is equal to length of vertex array. Dimension of normal vectors is equal to dimension of maximal number of vertices.
-
assureVertexSizes
public void assureVertexSizes()
Assures respectively allocates correct length of vertex size array. Length of array is equal to length of vertex array. Dimension of size vectors is equal to dimension of maximal number of vertices.- Since:
- JavaView 2.43
-
assureVertexTextures
public void assureVertexTextures()
Assures respectively allocates correct length of vertex texture array. Length of array is equal to length of vertex array. Dimension of texture coordinates will be equal.
-
getDimOfTextures
public int getDimOfTextures()
Get dimension of textures, i.e. number of components of each of the texture vectors.- Version:
- 27.12.03, 1.00 created (kp)
-
setDimOfTextures
public void setDimOfTextures(int dim)
Set dimension of textures, i.e. number of components of each of the texture vectors.- Version:
- 07.06.10, 1.00 created (ur)
-
getDimOfVectors
public int getDimOfVectors(int ind)
Get uniform number of components of each vector in a vector field.
-
getNumVectors
public int getNumVectors(int ind)
Get number of vectors in vector field with given index.
-
setNumVectors
public void setNumVectors(int ind, int num, int dimOfVectors)Set number of vectors of a vector field with given index.- Parameters:
ind- index of vector fieldnum- number of vectors in that vector fielddimOfVectors- 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 fieldlist- array with new vectors
-
getVectorFieldName
public java.lang.String getVectorFieldName(int ind)
Get name of vector field.
-
setVectorFieldName
public void setVectorFieldName(int ind, java.lang.String name)Set name of vector field.
-
isShowingVectorArrows
public boolean isShowingVectorArrows(int ind)
Get flag if tip of vectors is shown as arrow.
-
showVectorArrows
public void showVectorArrows(int ind, boolean flag)Set flag if tip of vectors is shown as arrow.
-
isVectorElementBased
public boolean isVectorElementBased(int ind)
Get flag whether vector field is element based or vertex based.
-
setVectorElementBased
public void setVectorElementBased(int ind, boolean flag)Set flag whether vector field is element based or vertex based.- Parameters:
ind- index of vector field.flag- true if element based vf, false if vertex based vf.
-
isShowingIndividualMaterial
public boolean isShowingIndividualMaterial(int ind)
Deprecated. Since JavaView 3.98.003, useisShowingVectorFieldMaterials(int)insteadGet flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of vector field- Returns:
- true if individual material of this vector field is used
- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
isShowingVectorFieldMaterials
public boolean isShowingVectorFieldMaterials(int ind)
Get flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of vector field- Returns:
- true if individual material of this vector field is used
- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
showIndividualMaterial
public void showIndividualMaterial(int ind, boolean flag)Deprecated. Since JavaView 3.98.003, useshowVectorFieldMaterials(int,boolean)insteadSet flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of vector fieldflag- true if individual material of this vector field is used- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
showVectorFieldMaterials
public void showVectorFieldMaterials(int ind, boolean flag)Set flag if this vector field uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of vector fieldflag- true if individual material of this vector field is used- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
isShowingVectorFields
public boolean isShowingVectorFields()
Get flag to enable drawing of all vector fields if each is visible.
-
showVectorFields
public void showVectorFields(boolean flag)
Set flag to enable drawing of all vector fields which are visible.
-
isShowingVectorField
public boolean isShowingVectorField(int ind)
Get flag to enable drawing of vectors of a vector field.
-
showVectorField
public void showVectorField(int ind, boolean flag)Set flag to enable drawing of vectors of a vector field.
-
isShowingVectorColors
public boolean isShowingVectorColors(int ind)
Get flag to enable drawing of individual vertex colors of a vector field.
-
showVectorColors
public void showVectorColors(int ind, boolean flag)Set flag to enable drawing of individual vertex colors of a vector field.
-
getGlobalVectorColor
public java.awt.Color getGlobalVectorColor(int ind)
Get global color of vector field which is used if no local colors are available.
-
setGlobalVectorColor
public boolean setGlobalVectorColor(int ind, java.awt.Color color)Set global color of vector field to be used if no local colors are available.
-
getGlobalVectorLength
public double getGlobalVectorLength(int ind)
Get length factor of vectors of vector field when drawn in display.
-
setGlobalVectorLength
public boolean setGlobalVectorLength(int ind, double length)Set length factor of vectors of vector field when drawn in display.
-
getGlobalVectorSize
public double getGlobalVectorSize(int ind)
Get thickness in pixels of vectors of vector field when drawn in display.
-
setGlobalVectorSize
public boolean setGlobalVectorSize(int ind, double size)Set thickness in pixels of vectors of vector field when drawn in display.
-
assureVectorColors
public void assureVectorColors(int ind)
Assures respectively allocates correct length of element color array. Length of array is equal to length of element array.- Parameters:
ind- index of vector field
-
getVectorFieldColors
public java.awt.Color[] getVectorFieldColors(int ind)
Get color array of a vector field for read and write access.- Parameters:
ind- index of vector field
-
setVectorColors
public void setVectorColors(int ind, java.awt.Color[] list)Copy vector colors of list to existing array of vector colors. Length of argument list must be equal or larger than getNumVectors(int).- Parameters:
ind- index of vector fieldlist- array with new vector colors
-
getDimOfPolygons
public int getDimOfPolygons()
Get uniform number of vertices of all polygons, or individualaSize=-1.- Since:
- JavaView 2.69
- Version:
- 27.04.03 1.00 created (kp)
-
setDimOfPolygons
public void setDimOfPolygons(int aSize)
Let all polygons have same number of verticesaSize!=0, or individualaSize=-1. It is more efficient to call method beforesetNumPolygons().- Parameters:
aSize- Number of vertices for all polygons.- See Also:
setNumPolygons(int)- Version:
- 04.10.99 1.10 revised (kp) Now run until maxNumPolygons when changing dim.
04.10.99 1.00 created (kp)
-
setNumPolygons
public void setNumPolygons(int numPolygons)
Allocate given number of polygons, and allocate normals, colors etc. if they already exist. The user should change the number of polygons only via this method. If dimension of polygons is '-1' then only the polygon array is allocated and not the individual polygons.
-
hasPolygonColors
public boolean hasPolygonColors()
Check if polygon colors have been allocated.- Since:
- JavaView 4.20.015
- See Also:
assurePolygonColors()
-
hasPolygonNormals
public boolean hasPolygonNormals()
Check if polygon normals have been allocated.- Since:
- JavaView 4.20.015
- See Also:
assurePolygonNormals()
-
assurePolygonColors
public void assurePolygonColors()
Assures respectively allocates correct length of polygon color array. Length of array is equal to length of polygon array.
-
assurePolygonNormals
public void assurePolygonNormals()
Assures respectively allocates correct length of polygon normal array. Length of array is equal to length of polygon array. Dimension of normal vectors is equal to dimension of vertices.
-
getNumEdges
public int getNumEdges()
Get number of allocated and used edges.
-
setNumEdges
public void setNumEdges(int aNumEdges)
Allocate given number of edges, and allocate normals, colors etc. if they already exist. The user should change the number of edges only via this method.
-
getEdges
public PiVector[] getEdges()
Get edge array for read and write access, but do not modify the size of any edge.
-
setEdges
public void setEdges(PiVector[] edge)
Copy the first m_numEdges of given array into edge array. Must callsetNumEdges(int)before to allocate argument array. If argument array too small do nothing.- Parameters:
edge- array of edge vectors to be copied
-
getElementEdges
public PiVector[] getElementEdges()
Get an array which stores for each element the indices of its incident edges. For each element, the indices of the incident edges are ordered in the same way as the neighbour array.- Returns:
- array of length=numElements with indices of edges
- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
setElementEdges
public void setElementEdges(PiVector[] elementEdge)
Set an array which stores for each element the indices of its incident edges. For each element, the indices of the incident edges are ordered in the same way as the neighbour array.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
assureElementEdges
public void assureElementEdges()
Assures respectively allocates correct length of element-edge incidence array. Length of array is equal to length of element array.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
getEdgeColors
public java.awt.Color[] getEdgeColors()
Get color array for read and write access, but do not modify the size of any color vector. Also note, that the actual size of the array may be larger than the number of used edges for efficiency reasons. Therefore, do not use length of array.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
hasEdgeColors
public boolean hasEdgeColors()
Check if edge colors have been allocated.- Since:
- JavaView 3.96.026
- See Also:
assureEdgeColors()- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
assureEdgeColors
public void assureEdgeColors()
Assures respectively allocates correct length of edge color array. Length of array is equal to length of edge array.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
setEdgeColors
public void setEdgeColors(java.awt.Color[] colorList)
Copy edge colors of list to existing array of edge colors. Length of argument list must be equal or larger than getNumEdges(). All edge colors are copied. The dimension of all argument colors must be equal to getDimOfColors() of the geometry.Showing of edge colors must be switched on in order to be visible.
- Parameters:
colorList- array with new edge colors- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
isShowingEdgeColors
public boolean isShowingEdgeColors()
Determine whether showing of edge colors is enabled.
-
showEdgeColors
public void showEdgeColors(boolean flag)
Set flag to enable drawing of individual edge colors.
-
getEdgeSizes
public PdVector getEdgeSizes()
Get array of relative edge sizes for read and write access. Also note, that the actual size of the array may be larger than the number of used edges for efficiency reasons. Therefore, do not use length of array.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
assureEdgeSizes
public void assureEdgeSizes()
Assures respectively allocates correct length of edge size array. Length of array is equal to length of edge array. Dimension of size vector is equal to maximal number of vertices.- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
setEdgeSizes
public void setEdgeSizes(PdVector edgeSize)
Assign a set of relative edge sizes. Length of argument list must be equal or larger than getNumEdges(). All edge sizes are copied.Showing of edge sizes must be switched on in order to be visible.
- Parameters:
edgeSize- array with new edge size for all edges- Since:
- JavaView 3.96.026
- Author:
- Konrad Polthier
- Version:
- 02.07.06, 1.00 created (kp)
-
isShowingEdgeSizes
public boolean isShowingEdgeSizes()
Determine whether showing of edge sizes is enabled.
-
showEdgeSizes
public void showEdgeSizes(boolean flag)
Set flag to enable drawing of edge sizes.
-
getDimOfElements
public int getDimOfElements()
Get uniform number of vertices of all elements, or individualaSize=-1.- Since:
- JavaView 2.69
- Version:
- 27.04.03 1.00 created (kp)
-
setDimOfElements
public void setDimOfElements(int aSize)
Let all elements have same number of verticesaSize!=0, or individualaSize=-1. It is more efficient to call method beforesetNumElements().Argument must be
-1 or >=3. Other values lead to a warning message.- Parameters:
aSize- Number of vertices for all elements.- See Also:
setNumElements(int)- Version:
- 13.06.00, 1.20 revised (kp) Assure that argument is
-1 or >=3.
30.07.99, 1.10 revised (kp) Now run until maxNumElements when changing dim.
00.00.98, 1.00 created (kp)
-
setNumElements
public void setNumElements(int numElements)
Allocate given number of elements, and allocate neighbours, normals, colors etc. if they already exist. The user should change the number of elements only via this method. If dimension of elements is '-1' then only the element array is allocated and not the individual elements.If the new number of elements is zero then dimension of elements is set to -1.
- Parameters:
numElements- new number of faces.
-
assureNeighbours
public void assureNeighbours()
Assures correct length of neighbour array and, if any length changes, initializes with-1. Length of array is equal to all lengths of element array. Variablem_dimOfElementsis used to determine length of neighbour array for each element ifm_dimOfElement!=-1. Initialization of neighbour array with-1marks each edge as boundary edge.If neighbour array or any individual vector changes length, then neighbour is set to -1.
- Version:
- 08.03.01 revised (ur) Initialize neighbour with -1 for m_neighbour.length != m_maxNumElements too.
25.02.01 revised (kp) Return if length of all neighbour data is identical to length of element data.
11.07.00 revised (kp) If-statement extended to catch not fully allocated neighbour arrays.
30.12.99 revised (kp) Method access level reduced to protected from public.
21.08.99 revised (kp) Initialization only if any length has changed.
-
hasElementColors
public boolean hasElementColors()
Check if element colors have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureElementColors()
-
hasElementBackColors
public boolean hasElementBackColors()
Check if element back colors have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureElementBackColors()
-
hasElementNormals
public boolean hasElementNormals()
Check if element normals have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureElementNormals()
-
hasElementTextures
public boolean hasElementTextures()
Check if element textures have been allocated.- Since:
- JavaView 4.20.012
- See Also:
assureElementTextures()
-
assureElementColors
public void assureElementColors()
Assures respectively allocates correct length of element color array. Length of array is equal to length of element array.
-
assureElementBackColors
public void assureElementBackColors()
Assures respectively allocates correct length of element back face color array. Length of array is equal to length of element array.
-
assureElementNormals
public void assureElementNormals()
Assures respectively allocates correct length of element normal array. Length of array is equal to length of element array. Dimension of normal vectors is equal to dimension of vertices.
-
assureElementTextures
public void assureElementTextures()
Assures respectively allocates correct length of element texture array. Length of array is equal to length of element array. Texture values are lost if number of elements changes.
-
getGlobalVertexColor
public java.awt.Color getGlobalVertexColor()
Get global vertex color which is used if no local colors are available.
-
getGlobalVertexTagColor
public java.awt.Color getGlobalVertexTagColor()
Get global color of tagged vertices.
-
getGlobalVertexSize
public double getGlobalVertexSize()
Get global radius in pixels of circle to visualize vertices in display.
-
getGlobalVertexNormalColor
public java.awt.Color getGlobalVertexNormalColor()
Get global vertex normal color which is used if no local colors are available.
-
getGlobalVertexNormalLength
public double getGlobalVertexNormalLength()
Get length factor of vertex normal vectors when drawn in display.
-
getGlobalVertexNormalSize
public double getGlobalVertexNormalSize()
Get thickness in pixels of vertex normals when drawn in display.
-
setGlobalVertexColor
public void setGlobalVertexColor(java.awt.Color color)
Set global vertex color to be used if no local colors are available.
-
setGlobalVertexTagColor
public void setGlobalVertexTagColor(java.awt.Color color)
Set global color of tagged vertices.
-
setGlobalVertexSize
public void setGlobalVertexSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
-
setGlobalVertexNormalColor
public void setGlobalVertexNormalColor(java.awt.Color color)
Set global vertex normal color to be used if no local colors are available.
-
setGlobalVertexNormalLength
public void setGlobalVertexNormalLength(double length)
Get length factor of vertex normal vectors when drawn in display.
-
setGlobalVertexNormalSize
public void setGlobalVertexNormalSize(double size)
Get thickness in pixels of vertex normals when drawn in display.
-
getGlobalPolygonColor
public java.awt.Color getGlobalPolygonColor()
Get global polygon color which is used if no local colors are available.
-
getGlobalPolygonTagColor
public java.awt.Color getGlobalPolygonTagColor()
Get global color of tagged vertices.
-
getGlobalPolygonSize
public double getGlobalPolygonSize()
Get global radius in pixels of circle to visualize vertices in display.
-
getGlobalPolygonNormalColor
public java.awt.Color getGlobalPolygonNormalColor()
Get global polygon normal color which is used if no local colors are available.
-
getGlobalPolygonNormalLength
public double getGlobalPolygonNormalLength()
Get length factor of normal vectors when drawn in display.
-
getGlobalPolygonNormalSize
public double getGlobalPolygonNormalSize()
Get thickness in pixels of normals when drawn in display.
-
setGlobalPolygonColor
public void setGlobalPolygonColor(java.awt.Color color)
Set global polygon color to be used if no local colors are available.
-
setGlobalPolygonTagColor
public void setGlobalPolygonTagColor(java.awt.Color color)
Set global color of tagged vertices.
-
setGlobalPolygonSize
public void setGlobalPolygonSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
-
setGlobalPolygonNormalColor
public void setGlobalPolygonNormalColor(java.awt.Color color)
Set global polygon normal color to be used if no local colors are available.
-
setGlobalPolygonNormalLength
public void setGlobalPolygonNormalLength(double length)
Get length factor of normal vectors when drawn in display.
-
setGlobalPolygonNormalSize
public void setGlobalPolygonNormalSize(double size)
Get thickness in pixels of normals when drawn in display.
-
getGlobalEdgeColor
public java.awt.Color getGlobalEdgeColor()
Get global edge color which is used if no local colors are available.
-
getGlobalEdgeTagColor
public java.awt.Color getGlobalEdgeTagColor()
Get global color of tagged vertices.
-
getGlobalEdgeSize
public double getGlobalEdgeSize()
Get global radius in pixels of circle to visualize vertices in display.
-
setGlobalEdgeColor
public void setGlobalEdgeColor(java.awt.Color color)
Set global edge color to be used if no local colors are available.
-
setGlobalEdgeTagColor
public void setGlobalEdgeTagColor(java.awt.Color color)
Set global color of tagged vertices.
-
setGlobalEdgeSize
public void setGlobalEdgeSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
-
getGlobalEdgeNormalColor
public java.awt.Color getGlobalEdgeNormalColor()
Get global element color which is used if no local colors are available.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
getGlobalEdgeNormalLength
public double getGlobalEdgeNormalLength()
Get length factor of normal vectors when drawn in display.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
getGlobalEdgeNormalSize
public double getGlobalEdgeNormalSize()
Get thickness in pixels of normals when drawn in display.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
setGlobalEdgeNormalColor
public void setGlobalEdgeNormalColor(java.awt.Color color)
Set global normal color to be used if no local colors are available.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
setGlobalEdgeNormalLength
public void setGlobalEdgeNormalLength(double length)
Get length factor of normal vectors when drawn in display.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
setGlobalEdgeNormalSize
public void setGlobalEdgeNormalSize(double size)
Get thickness in pixels of normals when drawn in display.- Since:
- JavaView 2.69
- Version:
- 26.04.03, 1.00 created (kp)
-
getGlobalElementColor
public java.awt.Color getGlobalElementColor()
Get global element color which is used if no local colors are available.
-
getGlobalElementBackColor
public java.awt.Color getGlobalElementBackColor()
Get global color of backface of elements.
-
getGlobalElementTagColor
public java.awt.Color getGlobalElementTagColor()
Get global color of tagged elements.
-
getGlobalElementNormalColor
public java.awt.Color getGlobalElementNormalColor()
Get global element normal color which is used if no local colors are available.
-
getGlobalElementNormalLength
public double getGlobalElementNormalLength()
Get length factor of normal vectors when drawn in display.
-
getGlobalElementNormalSize
public double getGlobalElementNormalSize()
Get thickness in pixels of normals when drawn in display.
-
setGlobalElementColor
public void setGlobalElementColor(java.awt.Color color)
Set global element color to be used if no local colors are available.
-
setGlobalElementBackColor
public void setGlobalElementBackColor(java.awt.Color color)
Set global color of backface of elements.
-
setGlobalElementTagColor
public void setGlobalElementTagColor(java.awt.Color color)
Set global color of tagged elements.
-
setGlobalElementNormalColor
public void setGlobalElementNormalColor(java.awt.Color color)
Set global element normal color to be used if no local colors are available.
-
setGlobalElementNormalLength
public void setGlobalElementNormalLength(double length)
Get length factor of normal vectors when drawn in display.
-
setGlobalElementNormalSize
public void setGlobalElementNormalSize(double size)
Get thickness in pixels of normals when drawn in display.
-
getCreaseAngle
public double getCreaseAngle()
Get crease angle which is a threshold determining sharp crease edges.- Since:
- JavaView 3.03.007
- See Also:
setCreaseAngle(double)- Version:
- 02.01.04, 1.00 created (kp)
-
setCreaseAngle
public void setCreaseAngle(double angle)
Set crease angle which is a threshold determining sharp crease edges. In smooth lighting and shading there is no interpolation across crease edges. An edge is a crease edge if the dihedral angle (positive angle between normals) between the two adjacent faces is equal or larger than the crease angle threshold. The crease angle is measure in radians in [0,Pi]. A crease angle 0 induces flat shading and prevents all smoothing, and a crease angle Pi+eps shows all edges with smooth shading.- Since:
- JavaView 3.03.007
- See Also:
getCreaseAngle()- Version:
- 02.01.04, 1.00 created (kp)
-
getBndName
public java.lang.String getBndName(int ind)
Get thickness in pixels of boundary polygon.
-
setBndName
public void setBndName(int ind, java.lang.String name)Set thickness in pixels of boundary polygon.
-
getBndElementInd
public PiVector getBndElementInd(int i)
Get indices of surface elements along boundary.
-
setBndElementInd
public void setBndElementInd(int ind, PiVector elemInd)Set indices of surface elements along boundary.
-
getBndNeighbourLocInd
public PiVector getBndNeighbourLocInd(int i)
Get local indices of opposite vertices of edge in surface element.
-
setBndNeighbourLocInd
public void setBndNeighbourLocInd(int ind, PiVector oppLocInd)Set local indices of opposite vertices of edge in surface element.
-
setBndNumVertices
public void setBndNumVertices(int ind, int num)Set number of a boundary polygon's vertices.
-
getBndNumVertices
public int getBndNumVertices(int ind)
Get number of a boundary polygon's vertices.
-
setBndVertices
public void setBndVertices(int ind, PdVector[] vertex)Set vertices to a boundary polygon.
-
getBndVertices
public PdVector[] getBndVertices(int ind)
Get a boundary polygon's vertices.
-
setBndVertexInd
public void setBndVertexInd(int ind, PiVector vertexInd)Set vertex index information to a boundary polygon.
-
getBndVertexInd
public PiVector getBndVertexInd(int ind)
Get vertex index information for a boundary polygon.
-
isShowingBnd
public boolean isShowingBnd(int ind)
Determines if boundary polygon is visible.
-
showBnd
public void showBnd(int ind, boolean flag)Set visibility of boundary polygon.
-
getGlobalBndColor
public java.awt.Color getGlobalBndColor()
Get global boundary color which is used if no local colors are available.
-
setGlobalBndColor
public void setGlobalBndColor(java.awt.Color color)
Set global boundary color to be used if no local colors are available.
-
getGlobalBndTagColor
public java.awt.Color getGlobalBndTagColor()
Get global color of tagged boundaries.
-
setGlobalBndTagColor
public void setGlobalBndTagColor(java.awt.Color color)
Set global color of tagged boundaries.
-
getBndColor
public java.awt.Color getBndColor(int ind)
Get global color of individual boundary polygon unless all have same color.
-
setBndColor
public boolean setBndColor(int ind, java.awt.Color color)Set global color of individual boundary polygon unless all have same color.
-
getGlobalBndSize
public double getGlobalBndSize()
Get thickness in pixels of boundary when drawn in display.
-
setGlobalBndSize
public void setGlobalBndSize(double size)
Set thickness in pixels of boundary when drawn in display.
-
getBndSize
public double getBndSize(int ind)
Get thickness in pixels of boundary polygon.
-
setBndSize
public boolean setBndSize(int ind, double size)Set thickness in pixels of boundary polygon.
-
isShowingBndMaterials
public boolean isShowingBndMaterials(int ind)
Get flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of boundary polygon- Returns:
- true if individual material of this boundary polygon is used
- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
showBndMaterials
public void showBndMaterials(int ind, boolean flag)Set flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.- Parameters:
ind- index of boundary polygonflag- true if individual material of this boundary polygon is used- Since:
- JavaView 2.49.005
- Version:
- 23.01.03, 1.00 created (kp)
-
getNumBndPolygons
public int getNumBndPolygons()
Get number of allocated and used vector fields.
-
setNumBndPolygons
public void setNumBndPolygons(int num)
Set number of allocated and used vector fields.- Parameters:
num- number of vector fields
-
setVertices
public void setVertices(PdVector[] vertex)
Copy all vertices of vertex list to existing array of vertices. Length of argument vertex list must be equal or larger than getNumVertices(). All vertices are copied. The dimension of all argument vertices must be equal to getDimOfVertices() of the geometry.- Parameters:
vertex- array with new vertices- Version:
- 07.03.03, 1.10 revised (kp) Ensure that dimension of argument vertices is correct.
-
getVertexFunctions
public java.lang.String[][] getVertexFunctions()
-
setVertexFunctions
public void setVertexFunctions(java.lang.String[][] vertexFunction)
Assign functions for each vertex of the vertex list. Length of argument vertex list must be equal or larger than getNumVertices(). The dimension of all argument vertices must be equal to getDimOfVertices() of the geometry. Remove vertexFunctions by assigning null.- Parameters:
vertexFunction- array with new vertex functions- Version:
- 05.02.11, 1.20 revised (kp) Error checking made similar setVertexColors.
07.03.03, 1.10 revised (kp) Ensure that dimension of argument array is correct.
-
setVertexColors
public void setVertexColors(java.awt.Color[] colorList)
Copy vertex colors of list to existing array of vertex colors. Length of argument list must be equal or larger than getNumVertices(). All vertex colors are copied. The dimension of all argument colors must be equal.- Parameters:
colorList- array with new vertex colors
-
setVertexNormals
public void setVertexNormals(PdVector[] normalList)
Copy vertex normals of list to existing array of vertex normals. Length of argument list must be equal or larger than getNumVertices(). All vertex normals are copied. The dimension of all argument normals must be equal.- Parameters:
normalList- array with new vertex normals
-
setVertexSizes
public void setVertexSizes(PdVector sizeList)
Copy vertex sizes of list to existing array of vertex sizes. Length of argument list must be equal or larger than getNumVertices().- Parameters:
sizeList- array with new vertex sizes- Since:
- JavaView 2.43
-
setVertexTextures
public void setVertexTextures(PdVector[] texList)
Copy vertex textures of list to existing array of vertex textures. Length of argument list must be equal or larger than getNumVertices(). All vertex textures are copied.- Parameters:
texList- array with new vertex textures
-
getTextureImageName
public java.lang.String getTextureImageName()
Get name of texture image, a URL or full path name.- Specified by:
getTextureImageNamein interfacePgGeometryIf- Overrides:
getTextureImageNamein classPgGeometry
-
setTextureImageName
public void setTextureImageName(java.lang.String image)
Set file name of texture image as relative path or protocol.- Specified by:
setTextureImageNamein interfacePgGeometryIf- Overrides:
setTextureImageNamein classPgGeometry
-
getTextureImage
public java.awt.Image getTextureImage()
Get image of texture.- Specified by:
getTextureImagein interfacePgGeometryIf- Overrides:
getTextureImagein classPgGeometry
-
setTextureImage
public void setTextureImage(java.awt.Image image)
Set image of texture.- Specified by:
setTextureImagein interfacePgGeometryIf- Overrides:
setTextureImagein classPgGeometry
-
getTextureImageBnd
public PdVector[] getTextureImageBnd()
Get bounds of texture image in normalized texture coordinates.- Returns:
- array of length two with position of lower left and upper right position of image.
- Since:
- JavaView 2.86.000
- Version:
- 21.07.03, 1.00 created (kp)
-
setTextureImageBnd
public void setTextureImageBnd(PdVector[] bnd)
Set bounds of texture image in normalized texture coordinates. Bounds are given by two vectors with the position of lower left and upper right corner of the texture image in normalized texture coordinates. The dimension of each vector must be equal to the dimension of the texture. For a two-dimensional texture the default is {(0,0),(1,1)}.- Parameters:
bnd- array with bounds of image.- Since:
- JavaView 2.86.000
- Version:
- 05.02.11, 1.10 revised (kp) Error checking made similar setVertexColors.
21.07.03, 1.00 created (kp)
-
getFilterType
public int getFilterType()
Get mode how texture image is sampled to compute color of pixel.- Returns:
- filter type such as PgGeometryIf.FILTER_DIRECT, PgGeometryIf.FILTER_QUADRATIC ...
-
setFilterType
public void setFilterType(int filterType)
Set mode how texture image is sampled to compute color of pixel.- Parameters:
filterType- filter type such as PgGeometryIf.FILTER_DIRECT, PgGeometryIf.FILTER_QUADRATIC ...
-
getBlendingMode
public int getBlendingMode()
Get mode how texture color is applied to surface.- Returns:
- blending type such as PgGeometryIf.BLEND_REPLACE, PgGeometryIf.BLEND_MATERIAL ...
-
setBlendingMode
public void setBlendingMode(int blendingMode)
Set mode how texture color is applied to surface.- Parameters:
blendingMode- blending type such as PgGeometryIf.BLEND_REPLACE, PgGeometryIf.BLEND_MATERIAL ...
-
getTexturePeriodic
public int getTexturePeriodic()
Get type of periodic extension of texture outside the unit texture square.- Returns:
- Type which is a value such as m_periodic.
- Since:
- JavaView 3.96.025
- Version:
- 22.06.06, 1.00 created (kp)
-
setTexturePeriodic
public void setTexturePeriodic(int periodic)
Set number of repetitions of texture image in both directions.- Parameters:
periodic- Type of periodic extension such as m_periodic.- Since:
- JavaView 3.96.025
- Version:
- 22.06.06, 1.00 created (kp)
-
getTextureTiling
public java.awt.Dimension getTextureTiling()
Get number of repetitions of texture image in both directions.- Returns:
- Number of repetitions of texture image in both directions.
-
setTextureTiling
public void setTextureTiling(java.awt.Dimension repeat)
Set number of repetitions of texture image in both directions.- Parameters:
repeat- Number of repetitions of texture image in both directions.
-
getShininess
public double getShininess()
Get shininess of highlights of geometry.
-
setShininess
public void setShininess(double val)
Set shininess of highlights of geometry.
-
getSpecularColor
public java.awt.Color getSpecularColor()
Get specular color of geometry.
-
setSpecularColor
public void setSpecularColor(java.awt.Color col)
Set specular color of geometry.
-
isShowingTransparency
public boolean isShowingTransparency()
Determines whether usage of transparency is enabled.
-
showTransparency
public void showTransparency(boolean flag)
Enable usage of transparency.
-
getTransparency
public double getTransparency()
Get transparency of geometry.
-
setTransparency
public void setTransparency(double alpha)
Set transparency of geometry.
-
setPolygons
public void setPolygons(PiVector[] polygon)
Copy the first m_numPolygons of given array into polygon array. Must callsetNumPolygons(int)before to allocate argument array. If argument array too small do nothing.- Parameters:
polygon- array of polygon vectors to be copied
-
setPolygonColors
public void setPolygonColors(java.awt.Color[] color)
Copy polygon colors of list to existing array of polygon colors. Length of argument list must be equal or larger than getNumPolygons().- Parameters:
color- array with new polygon colors
-
setPolygonNormals
public void setPolygonNormals(PdVector[] normal)
Copy polygon normals of list to existing array of polygon normals. Length of argument list must be equal or larger than getNumPolygons(). All polygon normals are copied. The dimension of all argument normals must be equal.- Parameters:
normal- array with new polygon normals
-
removePolygonSizes
public void removePolygonSizes()
Remove polygon sizes from a geometry.Showing of polygon sizes must be switched off explicitly using
showPolygonSizes(boolean).- Since:
- JavaView 3.09
- Version:
- 07.02.04, 1.00 created (kp)
-
setPolygonSizes
public void setPolygonSizes(PdVector size)
Copy polygon sizes of list to existing array of polygon sizes. Length of argument list must be equal or larger than getNumPolygons(). All polygon sizes are copied.Showing of polygon sizes must be switched on in order to be visible.
- Parameters:
size- array with new polygon size for all polygons- Since:
- JavaView 3.09
- Version:
- 07.02.04, 1.00 created (kp)
-
assurePolygonSizes
public void assurePolygonSizes()
Assures respectively allocates correct length of polygon size vector. Length of vector is equal to length of polygon array. Dimension of size vector is equal to maximal number of vertices.- Since:
- JavaView 3.09
- Version:
- 07.02.04, 1.00 created (kp)
-
addPolygon
public int addPolygon(PiVector aPolygon)
Add new polygon to the end of the polygon list. Method just callssetPolygon(int, PiVector)with index = getNumVertices().Avoid usage and prefer setNumPolygons(numPolygons+1) and setPolygon(numPolygons) whenever the number of polygons is known in advance.
- Specified by:
addPolygonin interfacePgGeometryIf- Overrides:
addPolygonin classPgGeometry- Parameters:
aPolygon- polygon to be added to polygon list- Returns:
- int index of added polygon in polygon list
- Version:
- 07.07.00, 1.00 created (kp)
-
getPolygon
public PiVector getPolygon(int anIndex)
Get a reference to index vector of polygon with given index.- Specified by:
getPolygonin interfacePgGeometryIf- Overrides:
getPolygonin classPgGeometry- Parameters:
anIndex- index of polygon to be returned- Returns:
- reference to polygon vector with given index
-
setPolygon
public boolean setPolygon(int anIndex, PiVector aPolygon)Set index vector of polygon with given index. Copy new polygon to polygon at specified position in the polygon list. Number of polygons is increased if required.- Specified by:
setPolygonin interfacePgGeometryIf- Overrides:
setPolygonin classPgGeometry- Parameters:
anIndex- index of polygonaPolygon- array with indices of new polygon- Returns:
- boolean false, if index out of range, or argument missing
- Version:
- 07.07.00, 1.00 created (kp)
-
setElements
public void setElements(PiVector[] element)
Copy the first m_numElements of given array into element array. Must callsetNumElements(int)before to allocate argument array. If argument array is too small then do nothing. If dimension of an element exceeds maxDimOfElements then its length is truncated to this value.Appearance of elements with 2 or less vertices should be avoid. They lead to a setting of m_dimOfElements=2.
- Parameters:
element- array of element vectors to be copied- Version:
- 09.11.02, 2.00 revised (kp) Full revision handling elements with 2 or less vertices.
24.02.01, 1.20 revised (kp) Call assureNeighbours() only if new value of m_dimOfElements==-1.
01.08.00, 1.10 revised (kp) Truncation of long elements added.
-
setElementColors
public void setElementColors(java.awt.Color[] color)
Copy element colors of list to existing array of element colors. Length of argument list must be equal or larger than getNumElements().- Parameters:
color- array with new element colors
-
setElementBackColors
public void setElementBackColors(java.awt.Color[] color)
Copy backface element colors of list to existing array of element colors. Length of argument list must be equal or larger than getNumElements().- Parameters:
color- array with new element colors
-
setElementNormals
public void setElementNormals(PdVector[] normal)
Copy element normals of list to existing array of element normals. Length of argument list must be equal or larger than getNumElements(). All element normals are copied. The dimension of all argument normals must be equal.- Parameters:
normal- array with new element normals
-
setElementTextures
public void setElementTextures(PdVector[][] texCoords)
Copy element textures of list to existing array of element textures. Length of argument list must be equal or larger than getNumElements(). All element textures are copied. The dimension of all argument textures must be equal.- Parameters:
texCoords- array with new element textures
-
setNeighbours
public void setNeighbours(PiVector[] neighbour)
Copy neighbour array to existing array of neighbours. Length of argument list must be equal or larger than getNumElements(). All neighbour information is copied.- Parameters:
neighbour- array with neighbour information
-
addElement
public int addElement(PiVector anElement)
Deprecated. since JavaView 3.04, use setNumElements(numElements+1) and setElement(numElements)Add element to the element list and increase number of elements. Method increases the number of elements and callssetElement(int, PiVector). If dimension of element exceeds maxDimOfElements then length of element is truncated to this value.- Specified by:
addElementin interfacePgGeometryIf- Overrides:
addElementin classPgGeometry- Parameters:
anElement- element to be added to element list- Returns:
- index of added element in element list
- Version:
- 01.08.00, 1.10 revised (kp) Truncation of long elements added.
07.07.00, 1.00 created (sk)
-
getElement
public PiVector getElement(int anIndex)
Get a reference to an individual element.- Specified by:
getElementin interfacePgGeometryIf- Overrides:
getElementin classPgGeometry- Parameters:
anIndex- index of element- Returns:
- reference to element vector with given index
- Version:
- 07.07.00, 1.00 created (sk)
-
setElement
public boolean setElement(int anIndex, PiVector newElem)Assign element data to an existing element. Copy new vertex indices to element at specified position in the element list. If dimension of element exceeds maxDimOfElements then length of element is truncated to this value.- Specified by:
setElementin interfacePgGeometryIf- Overrides:
setElementin classPgGeometry- Parameters:
anIndex- index of elementnewElem- vector with new indices of element- Returns:
- false if element and array have different
- Version:
- 01.08.00, 1.10 revised (kp) Truncation of long elements added.
-
isEnabledIndexLabels
public boolean isEnabledIndexLabels()
Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of default labels is enabled.- See Also:
isShowingIndices()- Version:
- 31.10.04, 1.00 created (kp) Created from isDefaultLabelEnabled().
-
isDefaultLabelEnabled
public boolean isDefaultLabelEnabled()
Deprecated. since JavaView 3.61.003, use isEnabledIndexLabels().Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of default labels is enabled.- See Also:
isShowingIndices()
-
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.
-
isShowingVertexLabels
public boolean isShowingVertexLabels()
Determine whether showing of vertex labels is enabled.
-
isShowingPolygonLabels
public boolean isShowingPolygonLabels()
Determine whether showing of polygon labels is enabled.
-
isShowingEdgeLabels
public boolean isShowingEdgeLabels()
Determine whether showing of edge labels is enabled.
-
isShowingElementLabels
public boolean isShowingElementLabels()
Determine whether showing of element labels is enabled.
-
isShowingVertices
public boolean isShowingVertices()
Determines whether drawing of vertices is enabled.
-
isShowingVertexColors
public boolean isShowingVertexColors()
Determines whether drawing of vertex colors is enabled.
-
isShowingVertexNormals
public boolean isShowingVertexNormals()
Determines whether drawing of vertex normals is enabled.
-
isShowingVertexNormalArrow
public boolean isShowingVertexNormalArrow()
Determines whether drawing of arrow of vertex normals is enabled.
-
isShowingVertexSizes
public boolean isShowingVertexSizes()
Determines whether drawing of vertex sizes is enabled.- Since:
- JavaView 2.43
-
isShowingSilhouette
public boolean isShowingSilhouette()
Determines whether a polygon is shown along the silhouette if a shape.
-
showSilhouette
public void showSilhouette(boolean flag)
Set flag to enable if a polygon is shown along the silhouette if a shape.
-
isShowingVertexOutline
public boolean isShowingVertexOutline()
Determines whether drawing of border of vertex circles is enabled.
-
showVertexOutline
public void showVertexOutline(boolean flag)
Set flag whether drawing of border of vertex circles is enabled.
-
isShowingTaggedVertices
public boolean isShowingTaggedVertices()
Determine whether showing of tagged vertices is enabled.
-
showTaggedVertices
public void showTaggedVertices(boolean flag)
Set flag to enable drawing of tagged vertices.
-
setEnabledIndexLabels
public void setEnabledIndexLabels(boolean flag)
Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of of default labels is enabled.- See Also:
showIndices(boolean)- Version:
- 31.10.04, 1.00 created (kp) Created from setDefaultLabelEnabled(boolean).
-
setDefaultLabelEnabled
public void setDefaultLabelEnabled(boolean flag)
Deprecated. since JavaView 3.61.003, use setEnabledIndexLabels(boolean).Determine whether drawing of default labels, i.e. item indices, is enabled. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, usage of of default labels is enabled.- See Also:
showIndices(boolean)
-
showIndices
public void showIndices(boolean flag)
Set flag to drawing of indices in display. If no label is specified for an item the a default label is drawing. Usually, the default label is the index of an item in an array. For example, the index of a vertex in the vertex array of a point set. By default, showing of labels is disabled.
-
showVertexLabels
public void showVertexLabels(boolean flag)
Set flag to enable drawing of vertex labels in display.
-
showPolygonLabels
public void showPolygonLabels(boolean flag)
Set flag to enable drawing of polygon labels in display.
-
showEdgeLabels
public void showEdgeLabels(boolean flag)
Set flag to enable drawing of edge labels in display.
-
showElementLabels
public void showElementLabels(boolean flag)
Set flag to enable drawing of element labels in display.
-
showVertices
public void showVertices(boolean flag)
Set flag to enable drawing of vertices.
-
showVertexColors
public void showVertexColors(boolean flag)
Set flag to enable drawing of vertex colors.
-
showVertexNormals
public void showVertexNormals(boolean flag)
Set flag to enable drawing of vertex normals.
-
showVertexNormalArrow
public void showVertexNormalArrow(boolean flag)
Set flag to enable drawing of arrow of vertex normal.
-
showVertexSizes
public void showVertexSizes(boolean flag)
Set flag to enable drawing of vertex sizes.- Since:
- JavaView 2.43
-
isShowingPolygons
public boolean isShowingPolygons()
Determines whether drawing of polygons is enabled.
-
isShowingPolygonNormals
public boolean isShowingPolygonNormals()
Determines whether drawing of polygon normals is enabled.
-
isShowingPolygonNormalArrow
public boolean isShowingPolygonNormalArrow()
Determines whether drawing of arrow of polygon normals is enabled.
-
isShowingPolygonColors
public boolean isShowingPolygonColors()
Determines whether drawing of polygon colors is enabled.
-
isShowingPolygonStartArrow
public boolean isShowingPolygonStartArrow()
Determine whether drawing of arrow at first point of polygon is enabled.
-
isShowingPolygonEndArrow
public boolean isShowingPolygonEndArrow()
Determine whether drawing of arrow at last point of polygon is enabled.
-
isShowingPolygonSizes
public boolean isShowingPolygonSizes()
Determines whether drawing of polygon sizes is enabled.
-
isShowingTaggedPolygons
public boolean isShowingTaggedPolygons()
Determine whether showing of tagged polygons is enabled.
-
showTaggedPolygons
public void showTaggedPolygons(boolean flag)
Set flag to enable drawing of tagged polygons.
-
showPolygons
public void showPolygons(boolean flag)
Set flag to enable drawing of polygons.
-
showPolygonNormals
public void showPolygonNormals(boolean flag)
Set flag to enable drawing of polygon normals.
-
showPolygonNormalArrow
public void showPolygonNormalArrow(boolean flag)
Set flag to enable drawing of arrow of polygon normal.
-
showPolygonColors
public void showPolygonColors(boolean flag)
Set flag to enable drawing of polygon colors.
-
showPolygonStartArrow
public void showPolygonStartArrow(boolean flag)
Set flag to enable drawing of arrow at first point of polygons.
-
showPolygonEndArrow
public void showPolygonEndArrow(boolean flag)
Set flag to enable drawing of arrow at last point of polygons.
-
showPolygonSizes
public void showPolygonSizes(boolean flag)
Set flag to enable drawing of polygon sizes.
-
isShowingEdges
public boolean isShowingEdges()
Determines whether drawing of element edges is enabled.
-
showEdges
public void showEdges(boolean flag)
Set flag to enable drawing of element edges.
-
isShowingEdgeColorFromElements
public boolean isShowingEdgeColorFromElements()
Determines whether local edge color is induced from element or vertex colors.
-
showEdgeColorFromElements
public void showEdgeColorFromElements(boolean flag)
Set flag if edge colors are induced from local element or vertex colors.
-
isShowingSmoothEdgeColors
public boolean isShowingSmoothEdgeColors()
Determines whether smooth coloring of edges is enabled, currently requires vertex colors.
-
showSmoothEdgeColors
public void showSmoothEdgeColors(boolean flag)
Set flag to enable smooth coloring of edges, currently requires vertex colors.
-
isShowingEdgeColorFromVertices
public boolean isShowingEdgeColorFromVertices()
Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.
-
showEdgeColorFromVertices
public void showEdgeColorFromVertices(boolean flag)
Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.
-
isShowingSmoothLighting
public boolean isShowingSmoothLighting()
Determines whether smooth lighting is enabled, requires vertex normals.
-
showSmoothLighting
public void showSmoothLighting(boolean flag)
Set flag to enable smooth lighting, requires vertex normals.
-
isShowingSmoothElementColors
public boolean isShowingSmoothElementColors()
Determines whether smooth coloring of elements is enabled, currently requires vertex colors.
-
showSmoothElementColors
public void showSmoothElementColors(boolean flag)
Set flag to enable smooth coloring of elements, currently requires vertex colors.
-
isShowingElementColorFromVertices
public boolean isShowingElementColorFromVertices()
Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.- Since:
- JavaView 4.52.003
- Version:
- 22.09.15, 1.00 created (kp)
-
showElementColorFromVertices
public void showElementColorFromVertices(boolean flag)
Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.- Since:
- JavaView 4.52.003
- Version:
- 22.09.15, 1.00 created (kp)
-
isShowingElementFromVertexColors
public boolean isShowingElementFromVertexColors()
Deprecated. since JavaView 4.52.003, use #isShowingElementColorFromVertices()Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.
-
showElementFromVertexColors
public void showElementFromVertexColors(boolean flag)
Deprecated. since JavaView 4.52.003, use #showElementColorFromVertices(boolean)Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.
-
isShowingElements
public boolean isShowingElements()
Determines whether drawing of elements is enabled.
-
isShowingBackface
public boolean isShowingBackface()
Determine flag to enable drawing of backfacing elements whose normal points away from camera.
-
isShowingElementNormals
public boolean isShowingElementNormals()
Determines whether drawing of element normals is enabled.
-
isShowingElementNormalArrow
public boolean isShowingElementNormalArrow()
Determines whether drawing of arrow of element normals is enabled.
-
isShowingElementColors
public boolean isShowingElementColors()
Determines whether drawing of individual element colors is enabled.
-
isShowingElementBackColor
public boolean isShowingElementBackColor()
Determines whether drawing of global backface element color is enabled.
-
isShowingElementBackColors
public boolean isShowingElementBackColors()
Determines whether drawing of individual backface element colors is enabled.
-
isShowingBoundaries
public boolean isShowingBoundaries()
Determines whether drawing of boundary curves is enabled.
-
isShowingVertexTexture
public boolean isShowingVertexTexture()
Determines whether drawing of vertex texture is enabled.
-
isShowingElementTexture
public boolean isShowingElementTexture()
Determines whether drawing of element texture is enabled.
-
isShowingTaggedElements
public boolean isShowingTaggedElements()
Determine whether showing of tagged elements is enabled.
-
showTaggedElements
public void showTaggedElements(boolean flag)
Set flag to enable drawing of tagged elements.
-
showElements
public void showElements(boolean flag)
Set flag to enable drawing of elements.
-
showBackface
public void showBackface(boolean flag)
Set flag to enable drawing of backfacing elements whose normal points away from camera. If element set has no element normals then method creates element normals.
-
showElementNormals
public void showElementNormals(boolean flag)
Set flag to enable drawing of element normals.
-
showElementNormalArrow
public void showElementNormalArrow(boolean flag)
Set flag to enable drawing of arrow of element normal.
-
showElementColors
public void showElementColors(boolean flag)
Set flag to enable drawing of individual element colors.
-
showElementBackColor
public void showElementBackColor(boolean flag)
Set flag to enable drawing of backface element colors.
-
showElementBackColors
public void showElementBackColors(boolean flag)
Set flag to enable drawing of individual backface element colors.
-
showBoundaries
public void showBoundaries(boolean flag)
Set flag to enable drawing of boundary curves.
-
showVertexTexture
public void showVertexTexture(boolean flag)
Set flag to enable drawing of element texture.
-
showElementTexture
public void showElementTexture(boolean flag)
Set flag to enable drawing of vertex texture.
-
getTextureSide
public int getTextureSide()
Determines whether texture is shown on front, back or both sides of a surface, if texture is shown at all.- Since:
- JavaView 3.96.022
- See Also:
showVertexTexture(boolean),showElementTexture(boolean)- Version:
- 18.06.06, 1.00 created (kp)
-
setTextureSide
public void setTextureSide(int side)
Set flag whether texture is shown on front, back or both sides of a surface, if texture is shown at all.- Since:
- JavaView 3.96.022
- See Also:
showVertexTexture(boolean),showElementTexture(boolean)- Version:
- 18.06.06, 1.00 created (kp)
-
makeVertexNormals
public boolean makeVertexNormals()
Compute vertex normals by adding all adjacent corner element normals, and final normalization. For each vertex compute for each element a normal vector from two edges. The contribution of these element normals is proportional to the element area.- Since:
- JavaView 3.52.000
- See Also:
makeElementNormals()- Author:
- Konrad Polthier
- Version:
- 13.08.04, 1.00 created (kp) Copied from PgElementSet.makeVertexNormals().
-
makeElementNormals
public boolean makeElementNormals()
Compute element normals from edge crossproducts. For each element, a normal is computed at each of its vertices as the crossproduct of the adjacent edges. These vertex normals are then added, and the normalized sum used as element normal. This strategy reduces the effect of non-planar elements.Method exists in this class to allow enabling of backface culling even if no element normals have been previously supplied by user.
- Author:
- Konrad Polthier
- Version:
- 18.07.00, 1.00 created (kp) Method copied from PgElementSet.
-
makeElementColorsFromXYZ
public boolean makeElementColorsFromXYZ()
Deprecated. since JavaView 3.85.000, no replacement.Create color from the element position within its bounding box which is interpreted as RGB cube. If dimension of vertices is smaller than three then only the first vertex components are used in the color computation.- Author:
- Konrad Polthier
- Version:
- 22.08.00, 1.00 created (kp)
-
makeQuadrConn
public void makeQuadrConn(int uDiscr, int vDiscr, boolean uClosed, boolean vClosed)Generate element information for a quadrilateral surface. Method generates only topological information, no coordinates are required.- Parameters:
uDiscr- Number of lines inudirection.vDiscr- Number of lines invdirection.uClosed- Flag if first and last u-lines are identical.vClosed- Flag if first and last v-lines are identical.- Author:
- Konrad Polthier
- Version:
- 18.07.00, 2.00 created (kp) Method copied from PgElementSet.
20.08.99, 1.02 revised (ur) Orientation of all elements changed to be counter-clockwise in (i,j) domain
13.02.99, 1.01 revised (kp) Orientation of triangles changed to be counter-clockwise and identical to rectangular case.
19.10.97, 1.00 created (kp)
-
makeElementFromVertexColors
public boolean makeElementFromVertexColors()
Deprecated. this class no longer supports generation of colors, use geometry classes from jv.geom.*.Create element colors as average of all colors of its vertices. Vertex colors must be available.- Author:
- Konrad Polthier
- Version:
- 18.03.01, 1.00 created (kp)
-
reflect
public PgGeometry reflect(PdMatrix mat, boolean bOrient, boolean bVector)
Deprecated. this class no longer supports reflection, use geometry classes from jv.geom.*.Generate a cloned geometry and transform vertices by a matrix. For example, this method is called to calculate mirror images of a geometry. Orientation of geometry affects surface vectors.- Specified by:
reflectin interfacePgGeometryIf- Overrides:
reflectin classPgGeometry- Parameters:
mat- 3*3 or 4*4 transformation matrixbOrient- flag whether to keep the orientation of the geometrybVector- flag whether to keep the orientation of vectors- Returns:
- new reflected copy of the geometry
- Author:
- Konrad Polthier
- Version:
- 12.12.00, 1.10 revised (kp) Additional argument added for orientation of vectors.
16.11.00, 1.00 created (kp)
-
-
"