logo

JavaView JVX File Format - Geometry Section

Some Geometries Tags (Point, Line and Element Sets)

geometries tag

The geometries tag keeps the geometries of a model together where each one is embraced by a geometry tag. 

geometry tag

A geometry tag has a name attribute for the name of the geometry. The geometry tag must contain a pointSet tag, possibly either a lineSet or a faceSet tag, and optionally some additional vectorField tags.

pointSet tag

The pointSet tag must have a dim attribute with the dimension of the ambient space and can have optional point, color and normal attributes with the values show (default for point) or hide (default for color and normal). The meaning of the color attribute is to define if the individual colors should be used (color="show") or the global color (color="hide").

The purpose of the pointSet tag is to bind the point coordinates (points tag) with their individual properties. That is for each point possibly its color (colors tag), its normal (normals tag) and the corresponding coordinate inside a texture (textures tag). 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 points tag.

lineSet tag

The lineSet tag can have optional arrow, line, color and normal attributes with the values show (default for line) or hide (default for arrow, color and normal). The arrow attribute influences the drawing of an arrow at the end of each line. The meaning of the color attribute is to define if the individual colors should be used (color="show") or the global color (color="hide").

The purpose of the lineSet tag is to bind the lines (lines tag) with their individual properties. That is for each line possibly its color (colors tag) and its normal (normals tag). 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 lines tag.

faceSet tag

The faceSet tag can have optional face, edge, color, colorBackGlobal, colorBackGlobal, normal, normalArrow, texture, backface, boundary attributes with the values show (default for face, edge and backface) or hide (default for color, colorBackGlobal, colorBackLocal, normal, normalArrow, texture and boundary). The meaning of the color attribute 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 attribute colorBackGlobal or 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 faceSet tag is to bind the face indices (faces tag) with their individual properties. That is for each face possibly its neighbours (neighbours tag), its color (colors tag), its normal (normals tag) and its texture (textures tag). The origins of the normals are in the center of the faces.

The optional edges tag 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 the lineSet tag instead). The edges tag consists of a list of  e tags with each having one edge's vertex indices and optional single thickness and color tags. 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 e tag takes the vertex indices of the endpoints of a single edge. The indices are separated by blanks. The tag attribute 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", ...

vectorField tag

The vectorField tag can have optional name, arrow and base attributes. The name attribute is for the case a descriptive label for the vector field is wanted. The arrow attribute influences the drawing of an arrow at the end of each field vector and can be show or hide (default). If the geometry contains a face set it is possible to define if with the base attribute 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 vectorField tag is one vectors tag and possibly one colors tag. With the colors tag every vector can get its own color.

points tag

The points tag consists of a list of p tags with each having one point's coordinates and optional thickness, color and colorTag tags. 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 points tag. This is relevant when referencing indexed vertices in the lines or faces tag.

The p tag takes the coordinate of one single point. The coordinate components are separated by blanks. The tag attribute 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", ...

lines tag

The lines tag consists of a list of l tags with each having one line's vertex indices. The lines tag may have optional thickness, color and colorTag tags 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 l tag 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 the points tag. The tag attribute 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", ... The arrow attribute can be used for defining if this line should be drawn with an arrow at its end (arrow="show", default is arrow="hide"). (pending)

Each l tag may have an arbitrary number of vertices larger than 1.

faces tag

The faces tag consists of a list of f tags with each having one face's vertex indices. The faces tag may have optional single color and colorTag tags. 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 f tag 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 the points tag. The tag attribute 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 f tag may have an arbitrary number of vertices larger than 2 and less than 300.

normals tag

The normals tag consists of a list of n tags with each having one point's normal coordinates and optional single thickness, length and color tags. 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 n tags and the corresponding set of p tags or l tags or f tags.

vectors tag

The vectors tag consists of a list of v tags with each having one vector's coordinates and optional single thickness, length and color tags. 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 v tags and the corresponding set of p tags or l tags or f tags.

colors tag

The colors tag consists of a list of c tags with each having one point, line or element color value. The optional type attribute determines the way the values are defined inside the c tags. There must be one value for type="grey", three values for type="rgb" (default) or four values for type="rgba" separated by blanks and each within 0 and 255.

Note, there must be a 1-1 correspondence between the set of c tags and the corresponding set of p tags or l tags or f tags.

textures tag

The textures tag must have a dim attribute with the dimension of the ambient space. Inside there are t tags for the texture coordinates and possibly one image tag. The latter is optional because later on there will be an extension to the jvx file format for procedural textures. Inside the t tags the coordinate components are separated by blanks.

The image tag just contains an url tag for an internet address and has one repeat attribute with the possible values no for no repeating (default), s for horizontal repeating, t for vertical repeating and st for 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 t tags and the corresponding set of p tags or l tags or f tags.

neighbours tag

The neighbours tag consists of a list of nb tags. Each nb tag 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 nb tags and the corresponding set of f tags. Further, there must be a 1-1 correspondence between the indices in each f and nb tag. 

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.

color and colorTag tag

The difference between these two tags is that the color tag is used for defining a color for a set of usual components while the colorTag tag is used for marked componenents. The optional type attribute of both determines the way the values are defined inside them. There must be one value for type="grey", three values for type="rgb" (default) or four values for type="rgba" separated by blanks and each within 0 and 255.

© 1997-2017 Last modified: 22.06.2017 --- www.javaview.de --- The JavaView Project