public class PgJvxSrc extends PgGeometry
Note, this class is not intended to perform geometric operations or
even to modify data once it is allocated or assigned. For such operations
use more specialized classes as e.g. PgPointSet
,
PgPolygonSet
, or PgElementSet
.
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
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 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.
|
Modifier and Type | Method and Description |
---|---|
int |
addElement(PiVector anElement)
Deprecated.
since JavaView 3.04, use setNumElements(numElements+1) and setElement(numElements)
|
int |
addPolygon(PiVector aPolygon)
Add new polygon to the end of the polygon list.
|
int |
addVertex(PdVector aVertex)
Deprecated.
since JavaView 3.04, use setNumVertices(numVertices+1) and setVertex(numVertices)
|
void |
assureEdgeColors()
Assures respectively allocates correct length of edge color array.
|
void |
assureEdgeSizes()
Assures respectively allocates correct length of edge size array.
|
void |
assureElementBackColors()
Assures respectively allocates correct length of element back face color array.
|
void |
assureElementColors()
Assures respectively allocates correct length of element color array.
|
void |
assureElementEdges()
Assures respectively allocates correct length of element-edge incidence array.
|
void |
assureElementNormals()
Assures respectively allocates correct length of element normal array.
|
void |
assureElementTextures()
Assures respectively allocates correct length of element texture array.
|
void |
assureNeighbours()
Assures correct length of neighbour array and, if any length changes, initializes with
-1 . |
void |
assurePolygonColors()
Assures respectively allocates correct length of polygon color array.
|
void |
assurePolygonNormals()
Assures respectively allocates correct length of polygon normal array.
|
void |
assurePolygonSizes()
Assures respectively allocates correct length of polygon size vector.
|
void |
assureVectorColors(int ind)
Assures respectively allocates correct length of element color array.
|
void |
assureVertexColors()
Assures respectively allocates correct length of vertex color array.
|
void |
assureVertexNormals()
Assures respectively allocates correct length of vertex normal array.
|
void |
assureVertexSizes()
Assures respectively allocates correct length of vertex size array.
|
void |
assureVertexTextures()
Assures respectively allocates correct length of vertex texture array.
|
void |
clearTagVertex(int anIndex,
int aTag)
Clear a single tag of a vertex.
|
java.lang.Object |
clone()
Duplicate geometry by recursively cloning all instance variables
except inspector panels and lists of registered listeners.
|
void |
copy(PgJvxSrc src)
Copy argument PgJvxSrc into this.
|
PdVector[] |
getAmbientBounds()
Compute bounding box of this geometry from the set of all vertices, or return null if no vertices.
|
int |
getBlendingMode()
Get mode how texture color is applied to surface.
|
java.awt.Color |
getBndColor(int ind)
Get global color of individual boundary polygon unless all have same color.
|
PiVector |
getBndElementInd(int i)
Get indices of surface elements along boundary.
|
java.lang.String |
getBndName(int ind)
Get thickness in pixels of boundary polygon.
|
PiVector |
getBndNeighbourLocInd(int i)
Get local indices of opposite vertices of edge in surface element.
|
int |
getBndNumVertices(int ind)
Get number of a boundary polygon's vertices.
|
double |
getBndSize(int ind)
Get thickness in pixels of boundary polygon.
|
PiVector |
getBndVertexInd(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.
|
double |
getCreaseAngle()
Get crease angle which is a threshold determining sharp crease edges.
|
int |
getDimOfElements()
Get uniform number of vertices of all elements, or individual
aSize=-1 . |
int |
getDimOfPolygons()
Get uniform number of vertices of all polygons, or individual
aSize=-1 . |
int |
getDimOfTextures()
Get dimension of textures, i.e. number of components of each of the texture vectors.
|
int |
getDimOfVectors(int ind)
Get uniform number of components of each vector in a vector field.
|
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.
|
PdVector |
getEdgeSizes()
Get array of relative edge sizes for read and write access.
|
PiVector |
getElement(int anIndex)
Get a reference to an individual element.
|
java.awt.Color[] |
getElementBackColors()
Get backside element color array for read and write access.
|
java.awt.Color[] |
getElementColors()
Get element color array for read and write access.
|
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.
|
int |
getFilterType()
Get mode how texture image is sampled to compute color of pixel.
|
java.awt.Color |
getGlobalBndColor()
Get global boundary color which is used if no local colors are available.
|
double |
getGlobalBndSize()
Get thickness in pixels of boundary when drawn in display.
|
java.awt.Color |
getGlobalBndTagColor()
Get global color of tagged boundaries.
|
java.awt.Color |
getGlobalEdgeColor()
Get global edge color which is used if no local colors are available.
|
java.awt.Color |
getGlobalEdgeNormalColor()
Get global element color which is used if no local colors are available.
|
double |
getGlobalEdgeNormalLength()
Get length factor of normal vectors when drawn in display.
|
double |
getGlobalEdgeNormalSize()
Get thickness in pixels of normals when drawn in display.
|
double |
getGlobalEdgeSize()
Get global radius in pixels of circle to visualize vertices in display.
|
java.awt.Color |
getGlobalEdgeTagColor()
Get global color of tagged vertices.
|
java.awt.Color |
getGlobalElementBackColor()
Get global color of backface of elements.
|
java.awt.Color |
getGlobalElementColor()
Get global element color which is used if no local colors are available.
|
java.awt.Color |
getGlobalElementNormalColor()
Get global element normal color which is used if no local colors are available.
|
double |
getGlobalElementNormalLength()
Get length factor of normal vectors when drawn in display.
|
double |
getGlobalElementNormalSize()
Get thickness in pixels of normals when drawn in display.
|
java.awt.Color |
getGlobalElementTagColor()
Get global color of tagged elements.
|
java.awt.Color |
getGlobalPolygonColor()
Get global polygon color which is used if no local colors are available.
|
java.awt.Color |
getGlobalPolygonNormalColor()
Get global polygon normal color which is used if no local colors are available.
|
double |
getGlobalPolygonNormalLength()
Get length factor of normal vectors when drawn in display.
|
double |
getGlobalPolygonNormalSize()
Get thickness in pixels of normals when drawn in display.
|
double |
getGlobalPolygonSize()
Get global radius in pixels of circle to visualize vertices in display.
|
java.awt.Color |
getGlobalPolygonTagColor()
Get global color of tagged vertices.
|
java.awt.Color |
getGlobalVectorColor(int ind)
Get global color of vector field which is used if no local colors are available.
|
double |
getGlobalVectorLength(int ind)
Get length factor of vectors of vector field when drawn in display.
|
double |
getGlobalVectorSize(int ind)
Get thickness in pixels of vectors of vector field when drawn in display.
|
java.awt.Color |
getGlobalVertexColor()
Get global vertex color which is used if no local colors are available.
|
java.awt.Color |
getGlobalVertexNormalColor()
Get global vertex normal color which is used if no local colors are available.
|
double |
getGlobalVertexNormalLength()
Get length factor of vertex normal vectors when drawn in display.
|
double |
getGlobalVertexNormalSize()
Get thickness in pixels of vertex normals when drawn in display.
|
double |
getGlobalVertexSize()
Get global radius in pixels of circle to visualize vertices in display.
|
java.awt.Color |
getGlobalVertexTagColor()
Get global color of tagged vertices.
|
PgJvxSrc |
getJvx()
Fills a geometry object with data from this instance, for example, to print to file.
|
PiVector[] |
getNeighbours()
Get neighbourhood information.
|
int |
getNumBndPolygons()
Get number of allocated and used vector fields.
|
int |
getNumEdges()
Get number of allocated and used edges.
|
int |
getNumElements()
Get number of allocated and used elements.
|
int |
getNumPolygons()
Get number of allocated and used polygons.
|
int |
getNumVectorFields()
Get number of allocated and used vector fields.
|
int |
getNumVectors(int ind)
Get number of vectors in vector field with given index.
|
int |
getNumVertices()
Get number of vertices in vertex array.
|
PiVector |
getPolygon(int anIndex)
Get a reference to index vector of polygon with given index.
|
java.awt.Color[] |
getPolygonColors()
Get polygon colors for read and write access.
|
PdVector[] |
getPolygonNormals()
Get polygon normals array for read and write access, but do not modify the size of any normal vector.
|
PiVector[] |
getPolygons()
Get polygon array for read and write access, but do not modify the size of any polygon.
|
PdVector |
getPolygonSizes()
Get polygon sizes for read and write access.
|
double |
getShininess()
Get shininess of highlights of geometry.
|
java.awt.Color |
getSpecularColor()
Get specular color of geometry.
|
java.awt.Image |
getTextureImage()
Get image of texture.
|
PdVector[] |
getTextureImageBnd()
Get bounds of texture image in normalized texture coordinates.
|
java.lang.String |
getTextureImageName()
Get name of texture image, a URL or full path name.
|
int |
getTexturePeriodic()
Get type of periodic extension of texture outside the unit texture square.
|
int |
getTextureSide()
Determines whether texture is shown on front, back or both sides of a surface, if texture is shown at all.
|
java.awt.Dimension |
getTextureTiling()
Get number of repetitions of texture image in both directions.
|
double |
getTransparency()
Get transparency of geometry.
|
java.awt.Color[] |
getVectorFieldColors(int ind)
Get color array of a vector field for read and write access.
|
java.lang.String |
getVectorFieldName(int ind)
Get name of vector field.
|
PdVector[] |
getVectors(int ind)
Get array of a vectors of a field for read and write access.
|
PdVector |
getVertex(int anIndex)
Get a reference to an individual vertex.
|
java.awt.Color[] |
getVertexColors()
Get vertex color array for read and write access.
|
java.lang.String[][] |
getVertexFunctions() |
PdVector[] |
getVertexNormals()
Get vertex normal array for read and write access, but do not modify the size of any normal vector.
|
PdVector |
getVertexSizes()
Get vertex size array for read and write access.
|
PdVector[] |
getVertexTextures()
Get vertex texture array for read and write access, but do not modify the size of any texture vector.
|
PdVector[] |
getVertices()
Get vertex array for read and write access, but do not modify the size of any vertex.
|
boolean |
hasEdgeColors()
Check if edge colors have been allocated.
|
boolean |
hasTagVertex(int anIndex,
int aTag)
Check whether vertex has given tag.
|
void |
init()
Initializes and resets geometry.
|
boolean |
isDefaultLabelEnabled()
Deprecated.
since JavaView 3.61.003, use isEnabledIndexLabels().
|
boolean |
isEnabledIndexLabels()
Determine whether drawing of default labels, i.e. item indices, is enabled.
|
boolean |
isShowingBackface()
Determine flag to enable drawing of backfacing elements whose normal points away from camera.
|
boolean |
isShowingBnd(int ind)
Determines if boundary polygon is visible.
|
boolean |
isShowingBndMaterials(int ind)
Get flag if this boundary polygon uses its own material properties
instead of inheriting material properties of the base geometry.
|
boolean |
isShowingBoundaries()
Determines whether drawing of boundary curves is enabled.
|
boolean |
isShowingEdgeColorFromElements()
Determines whether local edge color is induced from element or vertex colors.
|
boolean |
isShowingEdgeColorFromVertices()
Determines whether smooth edge coloring uses vertex colors at vertices, requires vertex colors.
|
boolean |
isShowingEdgeColors()
Determine whether showing of edge colors is enabled.
|
boolean |
isShowingEdgeLabels()
Determine whether showing of edge labels is enabled.
|
boolean |
isShowingEdges()
Determines whether drawing of element edges is enabled.
|
boolean |
isShowingEdgeSizes()
Determine whether showing of edge sizes is enabled.
|
boolean |
isShowingElementBackColor()
Determines whether drawing of global backface element color is enabled.
|
boolean |
isShowingElementBackColors()
Determines whether drawing of individual backface element colors is enabled.
|
boolean |
isShowingElementColors()
Determines whether drawing of individual element colors is enabled.
|
boolean |
isShowingElementFromVertexColors()
Determines whether smooth element coloring uses vertex colors at vertices, requires vertex colors.
|
boolean |
isShowingElementLabels()
Determine whether showing of element labels is enabled.
|
boolean |
isShowingElementNormalArrow()
Determines whether drawing of arrow of element normals is enabled.
|
boolean |
isShowingElementNormals()
Determines whether drawing of element normals is enabled.
|
boolean |
isShowingElements()
Determines whether drawing of elements is enabled.
|
boolean |
isShowingElementTexture()
Determines whether drawing of element texture is enabled.
|
boolean |
isShowingIndices()
Check whether showing of indices is switched on.
|
boolean |
isShowingIndividualMaterial(int ind)
Deprecated.
Since JavaView 3.98.003, use
isShowingVectorFieldMaterials(int) instead |
boolean |
isShowingPolygonColors()
Determines whether drawing of polygon colors is enabled.
|
boolean |
isShowingPolygonEndArrow()
Determine whether drawing of arrow at last point of polygon is enabled.
|
boolean |
isShowingPolygonLabels()
Determine whether showing of polygon labels is enabled.
|
boolean |
isShowingPolygonNormalArrow()
Determines whether drawing of arrow of polygon normals is enabled.
|
boolean |
isShowingPolygonNormals()
Determines whether drawing of polygon normals is enabled.
|
boolean |
isShowingPolygons()
Determines whether drawing of polygons is enabled.
|
boolean |
isShowingPolygonSizes()
Determines whether drawing of polygon sizes is enabled.
|
boolean |
isShowingPolygonStartArrow()
Determine whether drawing of arrow at first point of polygon is enabled.
|
boolean |
isShowingSilhouette()
Determines whether a polygon is shown along the silhouette if a shape.
|
boolean |
isShowingSmoothEdgeColors()
Determines whether smooth coloring of edges is enabled, currently requires vertex colors.
|
boolean |
isShowingSmoothElementColors()
Determines whether smooth coloring of elements is enabled, currently requires vertex colors.
|
boolean |
isShowingSmoothLighting()
Determines whether smooth lighting is enabled, requires vertex normals.
|
boolean |
isShowingTaggedElements()
Determine whether showing of tagged elements is enabled.
|
boolean |
isShowingTaggedPolygons()
Determine whether showing of tagged polygons is enabled.
|
boolean |
isShowingTaggedVertices()
Determine whether showing of tagged vertices is enabled.
|
boolean |
isShowingTransparency()
Determines whether usage of transparency is enabled.
|
boolean |
isShowingVectorArrows(int ind)
Get flag if tip of vectors is shown as arrow.
|
boolean |
isShowingVectorColors(int ind)
Get flag to enable drawing of individual vertex colors of a vector field.
|
boolean |
isShowingVectorField(int ind)
Get flag to enable drawing of vectors of a vector field.
|
boolean |
isShowingVectorFieldMaterials(int ind)
Get flag if this vector field uses its own material properties
instead of inheriting material properties of the base geometry.
|
boolean |
isShowingVectorFields()
Get flag to enable drawing of all vector fields if each is visible.
|
boolean |
isShowingVertexColors()
Determines whether drawing of vertex colors is enabled.
|
boolean |
isShowingVertexLabels()
Determine whether showing of vertex labels is enabled.
|
boolean |
isShowingVertexNormalArrow()
Determines whether drawing of arrow of vertex normals is enabled.
|
boolean |
isShowingVertexNormals()
Determines whether drawing of vertex normals is enabled.
|
boolean |
isShowingVertexOutline()
Determines whether drawing of border of vertex circles is enabled.
|
boolean |
isShowingVertexSizes()
Determines whether drawing of vertex sizes is enabled.
|
boolean |
isShowingVertexTexture()
Determines whether drawing of vertex texture is enabled.
|
boolean |
isShowingVertices()
Determines whether drawing of vertices is enabled.
|
boolean |
isVectorElementBased(int ind)
Get flag whether vector field is element based or vertex based.
|
boolean |
makeElementColorsFromXYZ()
Deprecated.
since JavaView 3.85.000, no replacement.
|
boolean |
makeElementFromVertexColors()
Deprecated.
this class no longer supports generation of colors, use geometry classes from jv.geom.*.
|
boolean |
makeElementNormals()
Compute element normals from edge crossproducts.
|
void |
makeQuadrConn(int uDiscr,
int vDiscr,
boolean uClosed,
boolean vClosed)
Generate element information for a quadrilateral surface.
|
boolean |
makeVertexNormals()
Compute vertex normals by adding all adjacent corner element normals, and final normalization.
|
void |
paint(PvGeometryIf dc)
Major rendering method fills an internal container class supplied by the display.
|
PgGeometry |
reflect(PdMatrix mat,
boolean bOrient,
boolean bVector)
Deprecated.
this class no longer supports reflection, use geometry classes from jv.geom.*.
|
void |
removePolygonSizes()
Remove polygon sizes from a geometry.
|
void |
setBlendingMode(int blendingMode)
Set mode how texture color is applied to surface.
|
boolean |
setBndColor(int ind,
java.awt.Color color)
Set global color of individual boundary polygon unless all have same color.
|
void |
setBndElementInd(int ind,
PiVector elemInd)
Set indices of surface elements along boundary.
|
void |
setBndName(int ind,
java.lang.String name)
Set thickness in pixels of boundary polygon.
|
void |
setBndNeighbourLocInd(int ind,
PiVector oppLocInd)
Set local indices of opposite vertices of edge in surface element.
|
void |
setBndNumVertices(int ind,
int num)
Set number of a boundary polygon's vertices.
|
boolean |
setBndSize(int ind,
double size)
Set thickness in pixels of boundary polygon.
|
void |
setBndVertexInd(int ind,
PiVector vertexInd)
Set vertex index information to a boundary polygon.
|
void |
setBndVertices(int ind,
PdVector[] vertex)
Set vertices to a boundary polygon.
|
void |
setCreaseAngle(double angle)
Set crease angle which is a threshold determining sharp crease edges.
|
void |
setDefaultLabelEnabled(boolean flag)
Deprecated.
since JavaView 3.61.003, use setEnabledIndexLabels(boolean).
|
void |
setDimOfElements(int aSize)
Let all elements have same number of vertices
aSize<>0 ,
or individual aSize=-1 . |
void |
setDimOfPolygons(int aSize)
Let all polygons have same number of vertices
aSize<>0 , or individual aSize=-1 . |
void |
setDimOfTextures(int dim)
Set dimension of textures, i.e. number of components of each of the texture vectors.
|
void |
setDimOfVertices(int dim)
Assign dimension of vertices.
|
void |
setEdgeColors(java.awt.Color[] colorList)
Copy edge colors of list to existing array of edge colors.
|
void |
setEdges(PiVector[] edge)
Copy the first m_numEdges of given array into edge array.
|
void |
setEdgeSizes(PdVector edgeSize)
Assign a set of relative edge sizes.
|
boolean |
setElement(int anIndex,
PiVector newElem)
Assign element data to an existing element.
|
void |
setElementBackColors(java.awt.Color[] color)
Copy backface element colors of list to existing array of element colors.
|
void |
setElementColors(java.awt.Color[] color)
Copy element colors of list to existing array of element colors.
|
void |
setElementEdges(PiVector[] elementEdge)
Set an array which stores for each element the indices of its incident edges.
|
void |
setElementNormals(PdVector[] normal)
Copy element normals of list to existing array of element normals.
|
void |
setElements(PiVector[] element)
Copy the first m_numElements of given array into element array.
|
void |
setElementTextures(PdVector[][] texCoords)
Copy element textures of list to existing array of element textures.
|
void |
setEnabledIndexLabels(boolean flag)
Determine whether drawing of default labels, i.e. item indices, is enabled.
|
void |
setFilterType(int filterType)
Set mode how texture image is sampled to compute color of pixel.
|
void |
setGlobalBndColor(java.awt.Color color)
Set global boundary color to be used if no local colors are available.
|
void |
setGlobalBndSize(double size)
Set thickness in pixels of boundary when drawn in display.
|
void |
setGlobalBndTagColor(java.awt.Color color)
Set global color of tagged boundaries.
|
void |
setGlobalEdgeColor(java.awt.Color color)
Set global edge color to be used if no local colors are available.
|
void |
setGlobalEdgeNormalColor(java.awt.Color color)
Set global normal color to be used if no local colors are available.
|
void |
setGlobalEdgeNormalLength(double length)
Get length factor of normal vectors when drawn in display.
|
void |
setGlobalEdgeNormalSize(double size)
Get thickness in pixels of normals when drawn in display.
|
void |
setGlobalEdgeSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
|
void |
setGlobalEdgeTagColor(java.awt.Color color)
Set global color of tagged vertices.
|
void |
setGlobalElementBackColor(java.awt.Color color)
Set global color of backface of elements.
|
void |
setGlobalElementColor(java.awt.Color color)
Set global element color to be used if no local colors are available.
|
void |
setGlobalElementNormalColor(java.awt.Color color)
Set global element normal color to be used if no local colors are available.
|
void |
setGlobalElementNormalLength(double length)
Get length factor of normal vectors when drawn in display.
|
void |
setGlobalElementNormalSize(double size)
Get thickness in pixels of normals when drawn in display.
|
void |
setGlobalElementTagColor(java.awt.Color color)
Set global color of tagged elements.
|
void |
setGlobalPolygonColor(java.awt.Color color)
Set global polygon color to be used if no local colors are available.
|
void |
setGlobalPolygonNormalColor(java.awt.Color color)
Set global polygon normal color to be used if no local colors are available.
|
void |
setGlobalPolygonNormalLength(double length)
Get length factor of normal vectors when drawn in display.
|
void |
setGlobalPolygonNormalSize(double size)
Get thickness in pixels of normals when drawn in display.
|
void |
setGlobalPolygonSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
|
void |
setGlobalPolygonTagColor(java.awt.Color color)
Set global color of tagged vertices.
|
boolean |
setGlobalVectorColor(int ind,
java.awt.Color color)
Set global color of vector field to be used if no local colors are available.
|
boolean |
setGlobalVectorLength(int ind,
double length)
Set length factor of vectors of vector field when drawn in display.
|
boolean |
setGlobalVectorSize(int ind,
double size)
Set thickness in pixels of vectors of vector field when drawn in display.
|
void |
setGlobalVertexColor(java.awt.Color color)
Set global vertex color to be used if no local colors are available.
|
void |
setGlobalVertexNormalColor(java.awt.Color color)
Set global vertex normal color to be used if no local colors are available.
|
void |
setGlobalVertexNormalLength(double length)
Get length factor of vertex normal vectors when drawn in display.
|
void |
setGlobalVertexNormalSize(double size)
Get thickness in pixels of vertex normals when drawn in display.
|
void |
setGlobalVertexSize(double size)
Set global radius in pixels of circle to visualize vertices in display.
|
void |
setGlobalVertexTagColor(java.awt.Color color)
Set global color of tagged vertices.
|
void |
setJvx(PgJvxSrc src)
Fill this instance with data from a geometry source, for example, previously read from file.
|
void |
setNeighbours(PiVector[] neighbour)
Copy neighbour array to existing array of neighbours.
|
void |
setNumBndPolygons(int num)
Set number of allocated and used vector fields.
|
void |
setNumEdges(int aNumEdges)
Allocate given number of edges, and allocate normals, colors etc.
|
void |
setNumElements(int numElements)
Allocate given number of elements, and allocate neighbours, normals, colors etc.
|
void |
setNumPolygons(int numPolygons)
Allocate given number of polygons, and allocate normals, colors etc.
|
void |
setNumVectorFields(int num)
Set number of allocated and used vector fields.
|
void |
setNumVectors(int ind,
int num,
int dimOfVectors)
Set number of vectors of a vector field with given index.
|
void |
setNumVertices(int numVertices)
Allocate given number of vertices, and allocate normals, colors etc.
|
boolean |
setPolygon(int anIndex,
PiVector aPolygon)
Set index vector of polygon with given index.
|
void |
setPolygonColors(java.awt.Color[] color)
Copy polygon colors of list to existing array of polygon colors.
|
void |
setPolygonNormals(PdVector[] normal)
Copy polygon normals of list to existing array of polygon normals.
|
void |
setPolygons(PiVector[] polygon)
Copy the first m_numPolygons of given array into polygon array.
|
void |
setPolygonSizes(PdVector size)
Copy polygon sizes of list to existing array of polygon sizes.
|
void |
setShininess(double val)
Set shininess of highlights of geometry.
|
void |
setSpecularColor(java.awt.Color col)
Set specular color of geometry.
|
void |
setState(int aKey,
boolean aState)
Set drawing flags of this geometry from within the display.
|
void |
setTagVertex(int anIndex,
int aTag)
Set a tag of a vertex.
|
void |
setTextureImage(java.awt.Image image)
Set image of texture.
|
void |
setTextureImageBnd(PdVector[] bnd)
Set bounds of texture image in normalized texture coordinates.
|
void |
setTextureImageName(java.lang.String image)
Set file name of texture image as relative path or protocol.
|
void |
setTexturePeriodic(int periodic)
Set number of repetitions of texture image in both directions.
|
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.
|
void |
setTextureTiling(java.awt.Dimension repeat)
Set number of repetitions of texture image in both directions.
|
void |
setTransparency(double alpha)
Set transparency of geometry.
|
void |
setVectorColors(int ind,
java.awt.Color[] list)
Copy vector colors of list to existing array of vector colors.
|
void |
setVectorElementBased(int ind,
boolean flag)
Set flag whether vector field is element based or vertex based.
|
void |
setVectorFieldName(int ind,
java.lang.String name)
Set name of vector field.
|
void |
setVectors(int ind,
PdVector[] list)
Copy all vectors of vector list to existing array of vectors.
|
boolean |
setVertex(int anIndex,
PdVector aVertex)
Copy new vertex to vertex at specified position in the vertex list
|
void |
setVertexColors(java.awt.Color[] colorList)
Copy vertex colors of list to existing array of vertex colors.
|
void |
setVertexFunctions(java.lang.String[][] vertexFunction)
Assign functions for each vertex of the vertex list.
|
void |
setVertexNormals(PdVector[] normalList)
Copy vertex normals of list to existing array of vertex normals.
|
void |
setVertexSizes(PdVector sizeList)
Copy vertex sizes of list to existing array of vertex sizes.
|
void |
setVertexTextures(PdVector[] texList)
Copy vertex textures of list to existing array of vertex textures.
|
void |
setVertices(PdVector[] vertex)
Copy all vertices of vertex list to existing array of vertices.
|
void |
showBackface(boolean flag)
Set flag to enable drawing of backfacing elements whose normal points away from camera.
|
void |
showBnd(int ind,
boolean flag)
Set visibility of boundary polygon.
|
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.
|
void |
showBoundaries(boolean flag)
Set flag to enable drawing of boundary curves.
|
void |
showEdgeColorFromElements(boolean flag)
Set flag if edge colors are induced from local element or vertex colors.
|
void |
showEdgeColorFromVertices(boolean flag)
Set flag to enable smooth edge coloring using vertex colors at vertices, requires vertex colors.
|
void |
showEdgeColors(boolean flag)
Set flag to enable drawing of individual edge colors.
|
void |
showEdgeLabels(boolean flag)
Set flag to enable drawing of edge labels in display.
|
void |
showEdges(boolean flag)
Set flag to enable drawing of element edges.
|
void |
showEdgeSizes(boolean flag)
Set flag to enable drawing of edge sizes.
|
void |
showElementBackColor(boolean flag)
Set flag to enable drawing of backface element colors.
|
void |
showElementBackColors(boolean flag)
Set flag to enable drawing of individual backface element colors.
|
void |
showElementColors(boolean flag)
Set flag to enable drawing of individual element colors.
|
void |
showElementFromVertexColors(boolean flag)
Set flag to enable smooth element coloring using vertex colors at vertices, requires vertex colors.
|
void |
showElementLabels(boolean flag)
Set flag to enable drawing of element labels in display.
|
void |
showElementNormalArrow(boolean flag)
Set flag to enable drawing of arrow of element normal.
|
void |
showElementNormals(boolean flag)
Set flag to enable drawing of element normals.
|
void |
showElements(boolean flag)
Set flag to enable drawing of elements.
|
void |
showElementTexture(boolean flag)
Set flag to enable drawing of vertex texture.
|
void |
showIndices(boolean flag)
Set flag to drawing of indices in display.
|
void |
showIndividualMaterial(int ind,
boolean flag)
Deprecated.
Since JavaView 3.98.003, use
showVectorFieldMaterials(int,boolean) instead |
void |
showPolygonColors(boolean flag)
Set flag to enable drawing of polygon colors.
|
void |
showPolygonEndArrow(boolean flag)
Set flag to enable drawing of arrow at last point of polygons.
|
void |
showPolygonLabels(boolean flag)
Set flag to enable drawing of polygon labels in display.
|
void |
showPolygonNormalArrow(boolean flag)
Set flag to enable drawing of arrow of polygon normal.
|
void |
showPolygonNormals(boolean flag)
Set flag to enable drawing of polygon normals.
|
void |
showPolygons(boolean flag)
Set flag to enable drawing of polygons.
|
void |
showPolygonSizes(boolean flag)
Set flag to enable drawing of polygon sizes.
|
void |
showPolygonStartArrow(boolean flag)
Set flag to enable drawing of arrow at first point of polygons.
|
void |
showSilhouette(boolean flag)
Set flag to enable if a polygon is shown along the silhouette if a shape.
|
void |
showSmoothEdgeColors(boolean flag)
Set flag to enable smooth coloring of edges, currently requires vertex colors.
|
void |
showSmoothElementColors(boolean flag)
Set flag to enable smooth coloring of elements, currently requires vertex colors.
|
void |
showSmoothLighting(boolean flag)
Set flag to enable smooth lighting, requires vertex normals.
|
void |
showTaggedElements(boolean flag)
Set flag to enable drawing of tagged elements.
|
void |
showTaggedPolygons(boolean flag)
Set flag to enable drawing of tagged polygons.
|
void |
showTaggedVertices(boolean flag)
Set flag to enable drawing of tagged vertices.
|
void |
showTransparency(boolean flag)
Enable usage of transparency.
|
void |
showVectorArrows(int ind,
boolean flag)
Set flag if tip of vectors is shown as arrow.
|
void |
showVectorColors(int ind,
boolean flag)
Set flag to enable drawing of individual vertex colors of a vector field.
|
void |
showVectorField(int ind,
boolean flag)
Set flag to enable drawing of vectors of a vector field.
|
void |
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.
|
void |
showVectorFields(boolean flag)
Set flag to enable drawing of all vector fields which are visible.
|
void |
showVertexColors(boolean flag)
Set flag to enable drawing of vertex colors.
|
void |
showVertexLabels(boolean flag)
Set flag to enable drawing of vertex labels in display.
|
void |
showVertexNormalArrow(boolean flag)
Set flag to enable drawing of arrow of vertex normal.
|
void |
showVertexNormals(boolean flag)
Set flag to enable drawing of vertex normals.
|
void |
showVertexOutline(boolean flag)
Set flag whether drawing of border of vertex circles is enabled.
|
void |
showVertexSizes(boolean flag)
Set flag to enable drawing of vertex sizes.
|
void |
showVertexTexture(boolean flag)
Set flag to enable drawing of element texture.
|
void |
showVertices(boolean flag)
Set flag to enable drawing of vertices.
|
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
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
assureInspector, getInfoPanel, getName, hasTag, setName
getFather, setParent
public PgJvxSrc()
PgJvxSrc(int)
to avoid problems with the init() method. This constructor explicitly
calls the init() method. These problems are due to JAX.PgJvxSrc(int)
public PgJvxSrc(int dim)
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.
public void init()
init
in class PgGeometry
public void setDimOfVertices(int dim)
setDimOfVertices
in class PgGeometry
public PdVector[] getBounds()
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.
getBounds
in class PgGeometry
getAmbientBounds()
public PdVector[] getAmbientBounds()
getAmbientBounds
in class PgGeometry
getBounds()
public void setState(int aKey, boolean aState)
setState
in interface PgGeometryIf
setState
in class PgGeometry
aKey
- flag to be set, choose among PvGeometryIf.SHOW_...aState
- enable or disable statepublic PgJvxSrc getJvx()
getJvx
in interface PgGeometryIf
getJvx
in class PgGeometry
public void setJvx(PgJvxSrc src)
setJvx
in interface PgGeometryIf
setJvx
in class PgGeometry
src
- a geometry source used to fill this instance with data.public void copy(PgJvxSrc src)
public java.lang.Object clone()
null
.clone
in interface PgGeometryIf
clone
in class PgGeometry
copy(PgJvxSrc)
public void paint(PvGeometryIf dc)
jv.project.PgGeometryIf
for detailed information.paint
in interface PgGeometryIf
paint
in class PgGeometry
PgGeometryIf
public int getNumVertices()
public PdVector[] getVertices()
public java.awt.Color[] getVertexColors()
public PdVector[] getVertexNormals()
public PdVector getVertexSizes()
public PdVector[] getVertexTextures()
public int getNumPolygons()
public PiVector[] getPolygons()
public java.awt.Color[] getPolygonColors()
public PdVector[] getPolygonNormals()
public PdVector getPolygonSizes()
public int getNumElements()
public PiVector[] getElements()
public java.awt.Color[] getElementColors()
public java.awt.Color[] getElementBackColors()
public PdVector[] getElementNormals()
public PdVector[][] getElementTextures()
public PiVector[] getNeighbours()
public void clearTagVertex(int anIndex, int aTag)
PvGeometryIf
.clearTagVertex
in interface PgGeometryIf
clearTagVertex
in class PgGeometry
public boolean hasTagVertex(int anIndex, int aTag)
PvGeometryIf
.hasTagVertex
in interface PgGeometryIf
hasTagVertex
in class PgGeometry
public void setTagVertex(int anIndex, int aTag)
PvGeometryIf
.setTagVertex
in interface PgGeometryIf
setTagVertex
in class PgGeometry
public int addVertex(PdVector aVertex)
setVertex(int, PdVector)
with index=getNumVertices().addVertex
in interface PgGeometryIf
addVertex
in class PgGeometry
aVertex
- vertex to be added to vertex listpublic PdVector getVertex(int anIndex)
getVertex
in interface PgGeometryIf
getVertex
in class PgGeometry
anIndex
- index of vertexpublic boolean setVertex(int anIndex, PdVector aVertex)
setVertex
in interface PgGeometryIf
setVertex
in class PgGeometry
anIndex
- index of vertex positionaVertex
- vertex to be copied to vertex listfalse
if index out of range, or argument missingpublic void setNumVertices(int numVertices)
numVertices
- new number of vertices of this geometry.public void assureVertexColors()
public void assureVertexNormals()
public void assureVertexSizes()
public void assureVertexTextures()
public int getDimOfTextures()
public void setDimOfTextures(int dim)
public int getDimOfVectors(int ind)
public int getNumVectors(int ind)
public void setNumVectors(int ind, int num, int dimOfVectors)
ind
- index of vector fieldnum
- number of vectors in that vector fielddimOfVectors
- dim of vectors in that vector fieldpublic int getNumVectorFields()
public void setNumVectorFields(int num)
num
- number of vector fieldspublic PdVector[] getVectors(int ind)
public void setVectors(int ind, PdVector[] list)
ind
- index of vector fieldlist
- array with new vectorspublic java.lang.String getVectorFieldName(int ind)
public void setVectorFieldName(int ind, java.lang.String name)
public boolean isShowingVectorArrows(int ind)
public void showVectorArrows(int ind, boolean flag)
public boolean isVectorElementBased(int ind)
public void setVectorElementBased(int ind, boolean flag)
ind
- index of vector field.flag
- true if element based vf, false if vertex based vf.public boolean isShowingIndividualMaterial(int ind)
isShowingVectorFieldMaterials(int)
insteadind
- index of vector fieldpublic boolean isShowingVectorFieldMaterials(int ind)
ind
- index of vector fieldpublic void showIndividualMaterial(int ind, boolean flag)
showVectorFieldMaterials(int,boolean)
insteadind
- index of vector fieldflag
- true if individual material of this vector field is usedpublic void showVectorFieldMaterials(int ind, boolean flag)
ind
- index of vector fieldflag
- true if individual material of this vector field is usedpublic boolean isShowingVectorFields()
public void showVectorFields(boolean flag)
public boolean isShowingVectorField(int ind)
public void showVectorField(int ind, boolean flag)
public boolean isShowingVectorColors(int ind)
public void showVectorColors(int ind, boolean flag)
public java.awt.Color getGlobalVectorColor(int ind)
public boolean setGlobalVectorColor(int ind, java.awt.Color color)
public double getGlobalVectorLength(int ind)
public boolean setGlobalVectorLength(int ind, double length)
public double getGlobalVectorSize(int ind)
public boolean setGlobalVectorSize(int ind, double size)
public void assureVectorColors(int ind)
ind
- index of vector fieldpublic java.awt.Color[] getVectorFieldColors(int ind)
ind
- index of vector fieldpublic void setVectorColors(int ind, java.awt.Color[] list)
ind
- index of vector fieldlist
- array with new vector colorspublic int getDimOfPolygons()
aSize=-1
.public void setDimOfPolygons(int aSize)
aSize<>0
, or individual aSize=-1
.
It is more efficient to call method before setNumPolygons()
.aSize
- Number of vertices for all polygons.setNumPolygons(int)
public void setNumPolygons(int numPolygons)
public void assurePolygonColors()
public void assurePolygonNormals()
public int getNumEdges()
public void setNumEdges(int aNumEdges)
public PiVector[] getEdges()
public void setEdges(PiVector[] edge)
setNumEdges(int)
before to
allocate argument array. If argument array too small do nothing.edge
- array of edge vectors to be copiedpublic PiVector[] getElementEdges()
public void setElementEdges(PiVector[] elementEdge)
public void assureElementEdges()
public java.awt.Color[] getEdgeColors()
public boolean hasEdgeColors()
assureEdgeColors()
public void assureEdgeColors()
public void setEdgeColors(java.awt.Color[] colorList)
Showing of edge colors must be switched on in order to be visible.
colorList
- array with new edge colorspublic boolean isShowingEdgeColors()
public void showEdgeColors(boolean flag)
public PdVector getEdgeSizes()
public void assureEdgeSizes()
public void setEdgeSizes(PdVector edgeSize)
Showing of edge sizes must be switched on in order to be visible.
edgeSize
- array with new edge size for all edgespublic boolean isShowingEdgeSizes()
public void showEdgeSizes(boolean flag)
public int getDimOfElements()
aSize=-1
.public void setDimOfElements(int aSize)
aSize<>0
,
or individual aSize=-1
.
It is more efficient to call method before setNumElements()
.
Argument must be -1 or >=3. Other values lead to a warning message.
aSize
- Number of vertices for all elements.setNumElements(int)
public void setNumElements(int numElements)
If the new number of elements is zero then dimension of elements is set to -1.
numElements
- new number of faces.public void assureNeighbours()
-1
.
Length of array is equal to all lengths of element array.
Variable m_dimOfElements
is used to determine length of neighbour array for
each element if m_dimOfElement!=-1
.
Initialization of neighbour array with -1
marks each edge as boundary edge.
If neighbour array or any individual vector changes length, then neighbour is set to -1.
public void assureElementColors()
public void assureElementBackColors()
public void assureElementNormals()
public void assureElementTextures()
public java.awt.Color getGlobalVertexColor()
public java.awt.Color getGlobalVertexTagColor()
public double getGlobalVertexSize()
public java.awt.Color getGlobalVertexNormalColor()
public double getGlobalVertexNormalLength()
public double getGlobalVertexNormalSize()
public void setGlobalVertexColor(java.awt.Color color)
public void setGlobalVertexTagColor(java.awt.Color color)
public void setGlobalVertexSize(double size)
public void setGlobalVertexNormalColor(java.awt.Color color)
public void setGlobalVertexNormalLength(double length)
public void setGlobalVertexNormalSize(double size)
public java.awt.Color getGlobalPolygonColor()
public java.awt.Color getGlobalPolygonTagColor()
public double getGlobalPolygonSize()
public java.awt.Color getGlobalPolygonNormalColor()
public double getGlobalPolygonNormalLength()
public double getGlobalPolygonNormalSize()
public void setGlobalPolygonColor(java.awt.Color color)
public void setGlobalPolygonTagColor(java.awt.Color color)
public void setGlobalPolygonSize(double size)
public void setGlobalPolygonNormalColor(java.awt.Color color)
public void setGlobalPolygonNormalLength(double length)
public void setGlobalPolygonNormalSize(double size)
public java.awt.Color getGlobalEdgeColor()
public java.awt.Color getGlobalEdgeTagColor()
public double getGlobalEdgeSize()
public void setGlobalEdgeColor(java.awt.Color color)
public void setGlobalEdgeTagColor(java.awt.Color color)
public void setGlobalEdgeSize(double size)
public java.awt.Color getGlobalEdgeNormalColor()
public double getGlobalEdgeNormalLength()
public double getGlobalEdgeNormalSize()
public void setGlobalEdgeNormalColor(java.awt.Color color)
public void setGlobalEdgeNormalLength(double length)
public void setGlobalEdgeNormalSize(double size)
public java.awt.Color getGlobalElementColor()
public java.awt.Color getGlobalElementBackColor()
public java.awt.Color getGlobalElementTagColor()
public java.awt.Color getGlobalElementNormalColor()
public double getGlobalElementNormalLength()
public double getGlobalElementNormalSize()
public void setGlobalElementColor(java.awt.Color color)
public void setGlobalElementBackColor(java.awt.Color color)
public void setGlobalElementTagColor(java.awt.Color color)
public void setGlobalElementNormalColor(java.awt.Color color)
public void setGlobalElementNormalLength(double length)
public void setGlobalElementNormalSize(double size)
public double getCreaseAngle()
setCreaseAngle(double)
public void setCreaseAngle(double angle)
getCreaseAngle()
public java.lang.String getBndName(int ind)
public void setBndName(int ind, java.lang.String name)
public PiVector getBndElementInd(int i)
public void setBndElementInd(int ind, PiVector elemInd)
public PiVector getBndNeighbourLocInd(int i)
public void setBndNeighbourLocInd(int ind, PiVector oppLocInd)
public void setBndNumVertices(int ind, int num)
public int getBndNumVertices(int ind)
public void setBndVertices(int ind, PdVector[] vertex)
public PdVector[] getBndVertices(int ind)
public void setBndVertexInd(int ind, PiVector vertexInd)
public PiVector getBndVertexInd(int ind)
public boolean isShowingBnd(int ind)
public void showBnd(int ind, boolean flag)
public java.awt.Color getGlobalBndColor()
public void setGlobalBndColor(java.awt.Color color)
public java.awt.Color getGlobalBndTagColor()
public void setGlobalBndTagColor(java.awt.Color color)
public java.awt.Color getBndColor(int ind)
public boolean setBndColor(int ind, java.awt.Color color)
public double getGlobalBndSize()
public void setGlobalBndSize(double size)
public double getBndSize(int ind)
public boolean setBndSize(int ind, double size)
public boolean isShowingBndMaterials(int ind)
ind
- index of boundary polygonpublic void showBndMaterials(int ind, boolean flag)
ind
- index of boundary polygonflag
- true if individual material of this boundary polygon is usedpublic int getNumBndPolygons()
public void setNumBndPolygons(int num)
num
- number of vector fieldspublic void setVertices(PdVector[] vertex)
vertex
- array with new verticespublic java.lang.String[][] getVertexFunctions()
public void setVertexFunctions(java.lang.String[][] vertexFunction)
vertexFunction
- array with new vertex functionspublic void setVertexColors(java.awt.Color[] colorList)
colorList
- array with new vertex colorspublic void setVertexNormals(PdVector[] normalList)
normalList
- array with new vertex normalspublic void setVertexSizes(PdVector sizeList)
sizeList
- array with new vertex sizespublic void setVertexTextures(PdVector[] texList)
texList
- array with new vertex texturespublic java.lang.String getTextureImageName()
getTextureImageName
in interface PgGeometryIf
getTextureImageName
in class PgGeometry
public void setTextureImageName(java.lang.String image)
setTextureImageName
in interface PgGeometryIf
setTextureImageName
in class PgGeometry
public java.awt.Image getTextureImage()
getTextureImage
in interface PgGeometryIf
getTextureImage
in class PgGeometry
public void setTextureImage(java.awt.Image image)
setTextureImage
in interface PgGeometryIf
setTextureImage
in class PgGeometry
public PdVector[] getTextureImageBnd()
public void setTextureImageBnd(PdVector[] bnd)
bnd
- array with bounds of image.public int getFilterType()
public void setFilterType(int filterType)
filterType
- filter type such as PgGeometryIf.FILTER_DIRECT, PgGeometryIf.FILTER_QUADRATIC ...public int getBlendingMode()
public void setBlendingMode(int blendingMode)
blendingMode
- blending type such as PgGeometryIf.BLEND_REPLACE, PgGeometryIf.BLEND_MATERIAL ...public int getTexturePeriodic()
public void setTexturePeriodic(int periodic)
periodic
- Type of periodic extension such as m_periodic.public java.awt.Dimension getTextureTiling()
public void setTextureTiling(java.awt.Dimension repeat)
repeat
- Number of repetitions of texture image in both directions.public double getShininess()
public void setShininess(double val)
public java.awt.Color getSpecularColor()
public void setSpecularColor(java.awt.Color col)
public boolean isShowingTransparency()
public void showTransparency(boolean flag)
public double getTransparency()
public void setTransparency(double alpha)
public void setPolygons(PiVector[] polygon)
setNumPolygons(int)
before to
allocate argument array. If argument array too small do nothing.polygon
- array of polygon vectors to be copiedpublic void setPolygonColors(java.awt.Color[] color)
color
- array with new polygon colorspublic void setPolygonNormals(PdVector[] normal)
normal
- array with new polygon normalspublic void removePolygonSizes()
Showing of polygon sizes must be switched off explicitly using
showPolygonSizes(boolean)
.
public void setPolygonSizes(PdVector size)
Showing of polygon sizes must be switched on in order to be visible.
size
- array with new polygon size for all polygonspublic void assurePolygonSizes()
public int addPolygon(PiVector aPolygon)
setPolygon(int, PiVector)
with index = getNumVertices().
Avoid usage and prefer setNumPolygons(numPolygons+1) and setPolygon(numPolygons) whenever the number of polygons is known in advance.
addPolygon
in interface PgGeometryIf
addPolygon
in class PgGeometry
aPolygon
- polygon to be added to polygon listpublic PiVector getPolygon(int anIndex)
getPolygon
in interface PgGeometryIf
getPolygon
in class PgGeometry
anIndex
- index of polygon to be returnedpublic boolean setPolygon(int anIndex, PiVector aPolygon)
setPolygon
in interface PgGeometryIf
setPolygon
in class PgGeometry
anIndex
- index of polygonaPolygon
- array with indices of new polygonpublic void setElements(PiVector[] element)
setNumElements(int)
before to
allocate argument array. If argument array is too small then do nothing.
If dimension of an element exceeds maxDimOfElements then its length
is truncated to this value.
Appearance of elements with 2 or less vertices should be avoid. They lead to a setting of m_dimOfElements=2.
element
- array of element vectors to be copiedpublic void setElementColors(java.awt.Color[] color)
color
- array with new element colorspublic void setElementBackColors(java.awt.Color[] color)
color
- array with new element colorspublic void setElementNormals(PdVector[] normal)
normal
- array with new element normalspublic void setElementTextures(PdVector[][] texCoords)
texCoords
- array with new element texturespublic void setNeighbours(PiVector[] neighbour)
neighbour
- array with neighbour informationpublic int addElement(PiVector anElement)
setElement(int, PiVector)
.
If dimension of element exceeds maxDimOfElements then length of
element is truncated to this value.addElement
in interface PgGeometryIf
addElement
in class PgGeometry
anElement
- element to be added to element listpublic PiVector getElement(int anIndex)
getElement
in interface PgGeometryIf
getElement
in class PgGeometry
anIndex
- index of elementpublic boolean setElement(int anIndex, PiVector newElem)
setElement
in interface PgGeometryIf
setElement
in class PgGeometry
anIndex
- index of elementnewElem
- vector with new indices of elementpublic boolean isEnabledIndexLabels()
isShowingIndices()
public boolean isDefaultLabelEnabled()
isShowingIndices()
public boolean isShowingIndices()
public boolean isShowingVertexLabels()
public boolean isShowingPolygonLabels()
public boolean isShowingEdgeLabels()
public boolean isShowingElementLabels()
public boolean isShowingVertices()
public boolean isShowingVertexColors()
public boolean isShowingVertexNormals()
public boolean isShowingVertexNormalArrow()
public boolean isShowingVertexSizes()
public boolean isShowingSilhouette()
public void showSilhouette(boolean flag)
public boolean isShowingVertexOutline()
public void showVertexOutline(boolean flag)
public boolean isShowingTaggedVertices()
public void showTaggedVertices(boolean flag)
public void setEnabledIndexLabels(boolean flag)
showIndices(boolean)
public void setDefaultLabelEnabled(boolean flag)
showIndices(boolean)
public void showIndices(boolean flag)
public void showVertexLabels(boolean flag)
public void showPolygonLabels(boolean flag)
public void showEdgeLabels(boolean flag)
public void showElementLabels(boolean flag)
public void showVertices(boolean flag)
public void showVertexColors(boolean flag)
public void showVertexNormals(boolean flag)
public void showVertexNormalArrow(boolean flag)
public void showVertexSizes(boolean flag)
public boolean isShowingPolygons()
public boolean isShowingPolygonNormals()
public boolean isShowingPolygonNormalArrow()
public boolean isShowingPolygonColors()
public boolean isShowingPolygonStartArrow()
public boolean isShowingPolygonEndArrow()
public boolean isShowingPolygonSizes()
public boolean isShowingTaggedPolygons()
public void showTaggedPolygons(boolean flag)
public void showPolygons(boolean flag)
public void showPolygonNormals(boolean flag)
public void showPolygonNormalArrow(boolean flag)
public void showPolygonColors(boolean flag)
public void showPolygonStartArrow(boolean flag)
public void showPolygonEndArrow(boolean flag)
public void showPolygonSizes(boolean flag)
public boolean isShowingEdges()
public void showEdges(boolean flag)
public boolean isShowingEdgeColorFromElements()
public void showEdgeColorFromElements(boolean flag)
public boolean isShowingSmoothEdgeColors()
public void showSmoothEdgeColors(boolean flag)
public boolean isShowingEdgeColorFromVertices()
public void showEdgeColorFromVertices(boolean flag)
public boolean isShowingSmoothLighting()
public void showSmoothLighting(boolean flag)
public boolean isShowingSmoothElementColors()
public void showSmoothElementColors(boolean flag)
public boolean isShowingElementFromVertexColors()
public void showElementFromVertexColors(boolean flag)
public boolean isShowingElements()
public boolean isShowingBackface()
public boolean isShowingElementNormals()
public boolean isShowingElementNormalArrow()
public boolean isShowingElementColors()
public boolean isShowingElementBackColor()
public boolean isShowingElementBackColors()
public boolean isShowingBoundaries()
public boolean isShowingVertexTexture()
public boolean isShowingElementTexture()
public boolean isShowingTaggedElements()
public void showTaggedElements(boolean flag)
public void showElements(boolean flag)
public void showBackface(boolean flag)
public void showElementNormals(boolean flag)
public void showElementNormalArrow(boolean flag)
public void showElementColors(boolean flag)
public void showElementBackColor(boolean flag)
public void showElementBackColors(boolean flag)
public void showBoundaries(boolean flag)
public void showVertexTexture(boolean flag)
public void showElementTexture(boolean flag)
public int getTextureSide()
showVertexTexture(boolean)
,
showElementTexture(boolean)
public void setTextureSide(int side)
showVertexTexture(boolean)
,
showElementTexture(boolean)
public boolean makeVertexNormals()
makeElementNormals()
public boolean makeElementNormals()
Method exists in this class to allow enabling of backface culling even if no element normals have been previously supplied by user.
public boolean makeElementColorsFromXYZ()
public void makeQuadrConn(int uDiscr, int vDiscr, boolean uClosed, boolean vClosed)
uDiscr
- Number of lines in u
direction.vDiscr
- Number of lines in v
direction.uClosed
- Flag if first and last u-lines are identical.vClosed
- Flag if first and last v-lines are identical.public boolean makeElementFromVertexColors()
public PgGeometry reflect(PdMatrix mat, boolean bOrient, boolean bVector)
reflect
in interface PgGeometryIf
reflect
in class PgGeometry
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"