Graphics Programs Reference
In-Depth Information
Figure 9.14 The cube and its data points
Let's load the cubeData.as file into the program. Change line 2 to that shown here.
Delete lines 24-26 since they are already defined as part of the data.
1
2
3
// include the object data
#include "cubeData.as"
Step 2: Define the object in 3D space
Only two minor changes are needed to define the object in 3D space. Change numLines
to numPlanes in line 31 as shown below. Delete lines 32-39 since we already have the
coordinates of the points.
27
28
29
30
31
// -------------------------------------------------------
// define the object in 3D space
var numPts:Number = points.length;
var numPlanes:Number = planes.length;
 
Search WWH ::




Custom Search