User Guide

Working with Models and Model Resources 477
Plane properties
Planes are the default Director MX primitive. Planes, whose
type property is #plane, are
generated in the xz plane with Lingo. Plane properties can be modified or animated at runtime.
Mesh generator properties
The mesh generator is the most complex model resource. It allows experienced 3D programmers
to create complicated geometries at runtime.
The mesh generator primitive’s
type property is #mesh and is created by the members newMesh()
command. The parameters included with that command describe how large the mesh will be.
You can use the mesh deform modifier to manipulate vertex positions at runtime for
#mesh or any
other type of model resource. You can also use the #mesh primitive to change mesh properties
directly, but this is usually not practical, because the mesh must be rebuilt mathematically after
each modification.
Use these properties to work with mesh primitives:
Property Access Description Value Range
width Get and set Width of the plane Positive floating-point
value. The default is 1.0.
length Get and set Length of the plane Positive floating-point
value. The default is 1.0.
length
Vertices
Get and set Number of vertices along the length of the plane 2 or more. The default
is 2.
width
Vertices
Get and set Number of vertices along the width of the plane 2 or more. The default
is 2.
Property Access Description Value Range
vertexList Get and set Lingo vector values for each vertex in the mesh.
Several faces may share a single vertex.
Set the value to the
number of vectors
specified in your
newMesh call.
normalList Get and set Lingo vector values for each normal in the
mesh. Several faces may share a single normal.
A normalized vector is one in which all
components are of unit length.
You can use the
generateNormals()
command instead of specifying normals
yourself. In that case, set 0 as the number of
normals in your
newMesh() call. The normals
are calculated based on a clockwise vertex
winding. That is to say, if you imagine the
vertices being wound down a spindle, they
would be wound from left to right, in a
clockwise manner.
No default. Instead, set
the value to the number
of vectors specified in
your
newMesh call.
texture
Coordinate
List
texcoordlist
Get and set A list of sublists identifying locations in an image
used for texture-mapping a triangle. Each
sublist contains two values between 0.0 and 1.0
that define a location and can be arbitrarily
scaled to any texture size.
No default. Instead, set
the value to the number
of two-element sublists
specified in your
newMesh call.