JavaView JVX File Format - Geometry Section
Some Geometries Tags (Point, Line and Element Sets)
geometriestagThe
geometriestag keeps the geometries of a model together where each one is embraced by ageometrytag.
geometrytagA
geometrytag has anameattribute for the name of the geometry. Thegeometrytag must contain apointSettag, possibly either alineSetor afaceSettag, and optionally some additionalvectorFieldtags.
pointSettagThe
pointSettag must have adimattribute with the dimension of the ambient space and can have optionalpoint,colorandnormalattributes with the valuesshow(default forpoint) orhide(default forcolorandnormal). The meaning of thecolorattribute is to define if the individual colors should be used (color="show") or the global color (color="hide").The purpose of the
pointSettag is to bind the point coordinates (pointstag) with their individual properties. That is for each point possibly its color (colorstag), its normal (normalstag) and the corresponding coordinate inside a texture (texturestag). The origins of the normals are in the center of the points.It is also possible to define a global color and thickness for all points of the geometry inside the
pointstag.
lineSettagThe
lineSettag can have optionalarrow,line,colorandnormalattributes with the valuesshow(default forline) orhide(default forarrow,colorandnormal). Thearrowattribute influences the drawing of an arrow at the end of each line. The meaning of thecolorattribute is to define if the individual colors should be used (color="show") or the global color (color="hide").The purpose of the
lineSettag is to bind the lines (linestag) with their individual properties. That is for each line possibly its color (colorstag) and its normal (normalstag). The origins of the normals are in the middle of the lines.It is also possible to define a global color and thickness for all lines of the geometry inside the
linestag.
faceSettagThe
faceSettag can have optionalface,edge,color,colorBackGlobal,colorBackGlobal,normal,normalArrow,texture, backface, boundaryattributes with the valuesshow(default forface,edge and backface) orhide(default forcolor, colorBackGlobal, colorBackLocal,normal, normalArrow,texture and boundary). The meaning of thecolorattribute is to define if the individual colors should be used (color="show") or the global color (color="hide"). Color of backface elements is enabled if either the global color attributecolorBackGlobalor the individual color attribute is set this show. The attribute backface allows to disable drawing of elements whose element normal points away from the camera. Note, this requires element normals to be available. The attribute boundary determines if boundary curves are shown. This requires the neighbour adjacency relation.The purpose of the
faceSettag is to bind the face indices (facestag) with their individual properties. That is for each face possibly its neighbours (neighbourstag), its color (colorstag), its normal (normalstag) and its texture (texturestag). The origins of the normals are in the center of the faces.The optional
edgestag can be used to define a couple of edges that should be somehow related to the faces (otherwise it is better to define a separate geometry and use thelineSettag instead). Theedgestag consists of a list ofetags with each having one edge's vertex indices and optional singlethicknessandcolortags. The first tag is for the thickness of the edge measured in pixels. And the second tag gives the same color to all of the listed edges.The
etag takes the vertex indices of the endpoints of a single edge. The indices are separated by blanks. Thetagattribute can be used for marking this edge. By giving different marks to different lines it is possible to make distinguishable groups. For example: tag="head", tag="arm", tag="23", ...
vectorFieldtagThe
vectorFieldtag can have optionalname,arrowandbaseattributes. Thenameattribute is for the case a descriptive label for the vector field is wanted. Thearrowattribute influences the drawing of an arrow at the end of each field vector and can beshoworhide(default). If the geometry contains a face set it is possible to define if with thebaseattribute if the origins of the vectors should be in the middle of the points (base="vertex"- default) or in the center of the faces (base="element").Inside the
vectorFieldtag is onevectorstag and possibly onecolorstag. With thecolorstag every vector can get its own color.
pointstagThe
pointstag consists of a list ofptags with each having one point's coordinates and optionalthickness,colorandcolorTagtags. The first tag is for the thickness of the points measured in pixels. The second tag gives the same color to all of the listed points. And the last tag defines the color that all marked points should have.The vertices are indexed from 0 to numVertices-1 in the order they appear in the
pointstag. This is relevant when referencing indexed vertices in thelinesorfaces tag.The
ptag takes the coordinate of one single point. The coordinate components are separated by blanks. Thetagattribute can be used for marking this point. By giving different marks to different points it is possible to make distinguishable groups. For example: tag="head", tag="arm", tag="23", ...
linestagThe
linestag consists of a list ofltags with each having one line's vertex indices. Thelinestag may have optionalthickness,colorandcolorTagtags The first tag is for the thickness of the lines measured in pixels. The second tag gives the same color to all of the listed lines. And the last tag defines the color that all marked lines should have.The
ltag takes the vertex indices of the endpoints of a single line. The indices are separated by blanks. The vertices are indexed from 0 to numVertices-1 in the order they appear in thepointstag. Thetagattribute can be used for marking this line. By giving different marks to different lines it is possible to make distinguishable groups. For example: tag="head", tag="arm", tag="23", ... Thearrowattribute can be used for defining if this line should be drawn with an arrow at its end (arrow="show", default isarrow="hide"). (pending)Each
ltag may have an arbitrary number of vertices larger than 1.
facestagThe
facestag consists of a list offtags with each having one face's vertex indices. Thefacestag may have optional singlecolorandcolorTagtags. The first tag gives the same color to all of the listed faces. And the last tag defines the color that all marked faces should have.The
ftag takes the vertex indices of the edge points of a single face. The indices are separated by blanks. The vertices are indexed from 0 to numVertices-1 in the order they appear in thepointstag. Thetagattribute can be used for marking this face. By giving different marks to different faces it is possible to make distinguishable groups. For example: tag="head", tag="arm", tag="23", ...Each
ftag may have an arbitrary number of vertices larger than 2 and less than 300.
normalstagThe
normalstag consists of a list ofntags with each having one point's normal coordinates and optional singlethickness,lengthandcolortags. The first tag is for the thickness of the normals measured in pixels. The second tag sets their length in pixels. And the last gives the same color to all of the listed normals.Note, there must be a 1-1 correspondence between the set of
ntags and the corresponding set ofptags orltags orftags.
vectorstagThe
vectorstag consists of a list ofvtags with each having one vector's coordinates and optional singlethickness,lengthandcolortags. The first tag is for the thickness of the vectors measured in pixels. The second tag sets their length in pixels. And the last gives the same color to all of the listed vectors.Note, there must be a 1-1 correspondence between the set of
vtags and the corresponding set ofptags orltags orftags.
colorstagThe
colorstag consists of a list ofctags with each having one point, line or element color value. The optionaltypeattribute determines the way the values are defined inside thectags. There must be one value fortype="grey", three values fortype="rgb"(default) or four values fortype="rgba"separated by blanks and each within 0 and 255.Note, there must be a 1-1 correspondence between the set of
ctags and the corresponding set ofptags orltags orftags.
texturestagThe
texturestag must have adimattribute with the dimension of the ambient space. Inside there arettags for the texture coordinates and possibly oneimagetag. The latter is optional because later on there will be an extension to the jvx file format for procedural textures. Inside thettags the coordinate components are separated by blanks.The
imagetag just contains anurltag for an internet address and has onerepeatattribute with the possible valuesnofor no repeating (default),sfor horizontal repeating,tfor vertical repeating andstfor horizontal and vertical repeating.If the texture belongs to a point set then there must be one texture coordinate for each point. If it belongs to a face set then there must be one texture coordinate for each face vertex. That is if the face set consists of a rectangle and a triangle then there must be four texture coordinates for the rectangle and afterwards three texture coordinates for the triangle.
Note, there must be a 1-1 correspondence between the set of
ttags and the corresponding set ofptags orltags orftags.
neighbourstagThe
neighbourstag consists of a list ofnbtags. Eachnbtag takes a blank separated list of all indices of elements that are adjacent along a common edge of this element, or -1 at a boundary edge with no adjacent element.Note, there must be a 1-1 correspondence between the set of
nbtags and the corresponding set offtags. Further, there must be a 1-1 correspondence between the indices in eachfandnbtag.The semantics of the neighbours is as follows: There is a 1-1 correspondence between the set of vertex indices in a face tag <f> and a neighbour tag <nb>: each entry in the face tag <f> is the index of a vertex, and the entry in the neighbour tag <nb> is the index of the adjacent face at the edge after next.
This means that for triangle meshes the neighbour entry refers to the adjacent face at the opposite edge. At boundary edges the neighbour entry is -1. The index of the faces ranges from 0 to numFaces-1 where the faces are indexed in the sequence of their appearance.
colorandcolorTagtagThe difference between these two tags is that the
colortag is used for defining a color for a set of usual components while thecolorTagtag is used for marked componenents. The optionaltypeattribute of both determines the way the values are defined inside them. There must be one value fortype="grey", three values fortype="rgb"(default) or four values fortype="rgba"separated by blanks and each within 0 and 255.