Game Development Reference
In-Depth Information
Figure 7.4 Objects required for the Bendypoints system.
selection from the target mesh is defined. Going back to the 12 vertices
example, we create three objects in the modelling program, as shown in
Figure 7.4.
Here ObjectA is the target mesh, ObjectB is an object made up of the
polygons formed from vertices 1-8 of ObjectA and ObjectC is made up of
the polygons formed from vertices 5-12 of ObjectA. Each of these is a
simple object so can obviously be saved to disk if you are using
Lightwave, or will appear as a mesh object in a scene file when exported
in ASCII format in 3DS. We will look in later chapters at how to get access
to this geometry, but suffice it to say that it is possible. When we set up a
scene in our development engine we want to be able to say that objects
B and C are actually control objects for A and do not need to be displayed.
Similarly, since every vertex in A is being controlled by another object,
there is no requirement to transform mesh A itself, since this will only be
overridden by the control objects. In the application program Toon3D
Creator provided on the CD we can set up this simple scene. But before
we do, let's look at the way that Toon3D creates the linkage between the
control vertices and the target mesh vertices by point location.
typedef struct stPOINT3D{
double ox,oy,oz; //Modelled points
double nx,ny,nz; //Original normal
Search Nedrilad ::

Custom Search