JavaView JVX File Format - Geometry Section
Some Geometries Tags (Point, Line and Element Sets)
geometries
tagThe
geometries
tag keeps the geometries of a model together where each one is embraced by ageometry
tag.
geometry
tagA
geometry
tag has aname
attribute for the name of the geometry. Thegeometry
tag must contain apointSet
tag, possibly either alineSet
or afaceSet
tag, and optionally some additionalvectorField
tags.
pointSet
tagThe
pointSet
tag must have adim
attribute with the dimension of the ambient space and can have optionalpoint
,color
andnormal
attributes with the valuesshow
(default forpoint
) orhide
(default forcolor
andnormal
). The meaning of thecolor
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
tagThe
lineSet
tag can have optionalarrow
,line
,color
andnormal
attributes with the valuesshow
(default forline
) orhide
(default forarrow
,color
andnormal
). Thearrow
attribute influences the drawing of an arrow at the end of each line. The meaning of thecolor
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
tagThe
faceSet
tag can have optionalface
,edge
,color
,colorBackGlobal
,colorBackGlobal
,normal
,normalArrow
,texture, backface, boundary
attributes with the valuesshow
(default forface
,edge and backface
) orhide
(default forcolor, colorBackGlobal, colorBackLocal
,normal, normalArrow
,texture and boundary
). The meaning of thecolor
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 attributecolorBackGlobal
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 thelineSet
tag instead). Theedges
tag consists of a list ofe
tags with each having one edge's vertex indices and optional singlethickness
andcolor
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. Thetag
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
tagThe
vectorField
tag can have optionalname
,arrow
andbase
attributes. Thename
attribute is for the case a descriptive label for the vector field is wanted. Thearrow
attribute influences the drawing of an arrow at the end of each field vector and can beshow
orhide
(default). If the geometry contains a face set it is possible to define if with thebase
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 onevectors
tag and possibly onecolors
tag. With thecolors
tag every vector can get its own color.
points
tagThe
points
tag consists of a list ofp
tags with each having one point's coordinates and optionalthickness
,color
andcolorTag
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 thelines
orfaces tag.
The
p
tag takes the coordinate of one single point. The coordinate components are separated by blanks. Thetag
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
tagThe
lines
tag consists of a list ofl
tags with each having one line's vertex indices. Thelines
tag may have optionalthickness
,color
andcolorTag
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 thepoints
tag. Thetag
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", ... Thearrow
attribute can be used for defining if this line should be drawn with an arrow at its end (arrow="show"
, default isarrow="hide"
). (pending)Each
l
tag may have an arbitrary number of vertices larger than 1.
faces
tagThe
faces
tag consists of a list off
tags with each having one face's vertex indices. Thefaces
tag may have optional singlecolor
andcolorTag
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 thepoints
tag. Thetag
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
tagThe
normals
tag consists of a list ofn
tags with each having one point's normal coordinates and optional singlethickness
,length
andcolor
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 ofp
tags orl
tags orf
tags.
vectors
tagThe
vectors
tag consists of a list ofv
tags with each having one vector's coordinates and optional singlethickness
,length
andcolor
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 ofp
tags orl
tags orf
tags.
colors
tagThe
colors
tag consists of a list ofc
tags with each having one point, line or element color value. The optionaltype
attribute determines the way the values are defined inside thec
tags. 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
c
tags and the corresponding set ofp
tags orl
tags orf
tags.
textures
tagThe
textures
tag must have adim
attribute with the dimension of the ambient space. Inside there aret
tags for the texture coordinates and possibly oneimage
tag. The latter is optional because later on there will be an extension to the jvx file format for procedural textures. Inside thet
tags the coordinate components are separated by blanks.The
image
tag just contains anurl
tag for an internet address and has onerepeat
attribute with the possible valuesno
for no repeating (default),s
for horizontal repeating,t
for vertical repeating andst
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 ofp
tags orl
tags orf
tags.
neighbours
tagThe
neighbours
tag consists of a list ofnb
tags. Eachnb
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 off
tags. Further, there must be a 1-1 correspondence between the indices in eachf
andnb
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
andcolorTag
tagThe difference between these two tags is that the
color
tag is used for defining a color for a set of usual components while thecolorTag
tag is used for marked componenents. The optionaltype
attribute 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.