Line

Line


Creates lines(segments). There are two types of formats to create segments. These correspond to the basic primitive types of disjoint line and polyline.

disjont line
This is one of the types to generate segments. The coordinates of the end points of the lines are defined. Each line is defined by two points.

Format
# Micro AVS Geom:2.10
disjoint line
Primitive Name
Vertex Data Type (vertex or color)
n (number of vertices)
data for vertex #1
data for vertex #2
.
.
.
data for vertex #n
The basic primitive type disjoint line is specified in the second line.
An arbitrary name is specified in the third line.
In the fourth line, the vertex data type is defined either as vertex or as color. When the vertex data type is vertex, only the X, Y and Z coordinates are specified for each vertex. When the vertex data type is color, the X, Y and Z coordinates as well as the R, G, B color values are specified for each vertex.
The total number of vertices is specified in the fifth line (total number of vertices = number of lines * 2).
The X, Y, Z coordinates of each vertex are defined from the 6th line onwards.
Example: 4 independent lines (line.mgf)

# Micro AVS Geom:2.10
disjoint line
dline_sample
color
8
0.0 0.0 0.0 1.0 0.0 0.0
1.0 0.0 0.0 1.0 0.0 0.0
1.0 0.0 0.0 0.5 0.5 0.0
1.0 1.0 0.0 0.5 0.5 0.0
1.0 1.0 0.0 0.0 1.0 0.0
0.0 1.0 0.0 0.0 1.0 0.0
0.0 1.0 0.0 0.0 0.5 0.5
0.0 0.0 0.0 0.0 0.5 0.5

polyline
This is one of the types to generate segments. A continuous line is drawn to connect all the vertices defined.

Format
# Micro AVS Geom:2.10
polyline
Primitive Name
Vertex Data Type (vertex or color)
n (number of vertices)
data for vertex #1
data for vertex #2
.
.
.
data for vertex #n
The basic primitive type polyline is specified in the second line.
An arbitrary name is specified in the third line.
In the fourth line, the vertex data type is defined either as vertex or as color. When the vertex data type is vertex, only the X, Y and Z coordinates are specified for each vertex. When the vertex data type is color, the X, Y and Z coordinates as well as the R, G, B color values are specified for each vertex.
The total number of vertices is specified in the fifth line (total number of vertices = number of lines + 1).
The X, Y, Z coordinates of each vertex are defined from the 6th line onwards.

Example: 4 continuous lines (polyline.mgf)

# Micro AVS Geom:2.10
polyline
pline_sample
vertex
5
0.0 0.0 0.0
1.0 0.0 0.0
1.0 1.0 0.0
0.0 1.0 0.0
0.0 0.0 0.0


Examples of Shape Data Creation

The sample files are located in directory in which MicroAVS is <installed_dir>/MicroAVS/DATA/MGF and can be referred to if necessary.

UP © 1999-2008 KGT Inc. All rights reserved.