|
Ligno3D Designer's Data Structures
for the technically minded
The data structures in Ligno3D Designer have much to do
with the program's speed and agility. There are just three
arrays, or lists — for vertices, faces and
components. The XYZ coordinates of each vertex are recorded in
the vertex array. Faces in the face array refer to these
coordinates via their vertex numbers. Coincident vertices are
allowed.
In general, vertices are shared
between adjoining faces, such that when a vertex is moved in 3D
space it affects the size, shape and planar nature of all faces that
share the
vertex. However, this need not be so, as faces can be
given their own set of unshared vertices. This is what happens
when the 'Free-Faces' command is used to disconnect all faces.
Faces can then be moved independently, without affecting other faces.
The face array has face numbers
against a list of vertex numbers that make up the face (normally
in anticlockwise order). The face array is optimised for
triangular faces, with each row having columns for 3 vertex numbers.
Faces with more vertices take up several rows in the array. 'Lines'
are faces with just two vertices. The face array also has columns for
pointers to face color or texture, and to component names in the component array.
The component array is just a
numbered list of names.
Any number of faces can point to the one component name, but no face
can point to more than one component. Future versions of
Ligno3D Designer may have a hierarchical component list
— so that components can have sub-components.
Written in Visual C++, Ligno3D Designer's use of pre-allocated
arrays contributes to its speed. Conventional indexed arrays
are generally faster than data structures, like linked lists,
that rely on dynamically allocated memory. Memory is
not at a premium in modern PCs.
|

A dodechedron exploded by selecting all faces, using
the 'Free Faces' command, and then simultaneously moving all faces along
their normals with the '*' key. All faces now have their own vertices.

The Data View reveals all the data in the component,
face and vertex arrays, as well as calculated data. |