A single point in 3-dimensional space. This is used to represent the models' points.

function Point3D(x, y, z, materialId)Constructs a Point3D.

Parameters
int x - the x position
int y - the y position
int z - the z position
int materialId - the material id (reference to the material array of the parent model)Returns
Point3D - a new Point3D object

function duplicate()Duplicates this Point3D.

Returns
Point3D - The new Point3D

function setPosition(x, y, z)Sets the position of this Point3D.

Parameters
int x - the x position
int y - the y position
int z - the z position

function transform(matrix)Transforms the point with the given matrix.

Parameters
Matrix matrix - the matrix to transform the point with

function homogenize()Homogenizes the point.

function refresh()This handler is called when the point is drawn.

function toString()Returns a string representation of the point.

Returns
String - A string of the format (x, y, z, w)

Model

A collection of points that make up a model.

function Model(id, material)Constructs a new model at (0,0,0) without any points.

function createPointCode()Writes all layers into the document (and also stores references to the DIVs in the respective Point3D objects). The naming convention used for the DIV elements:
pnt + {model-ID} + {point-ID}

Implementation notes
The HTML is written directly within the method, preceeding the initialization of the corresponding points with their
respective layer references. This is not left to the user.

function assignLayers()Assigns layer references for all points of the model.

A material has a body, basically containing a string with HTML code (which will make up the content of a point's DIV). Additionally it has a JavaScript statement - the refresh() method - that is called when drawing the points, so the material appearance can be changed by changing what is happening in the DIV.

function toString()Returns the string representation of this Material.

Returns
String - the Material's body

Modulator

This is basically an object encapsulating a function of some sort. It can be used to influence parameters such as the scaling of a model, its movement or the color of a point.
For an example, see implementation of MouseModulator.js.

function Modulator()Constructs a Modulator.

Returns
Modulator - a new Modulator object

function getMatrix()Returns the modulator's internal matrix.

Returns
Matrix - the modulator's internal matrix

function animate()The (empty) default implementation of the animate method, which is used in modulators to update their internal matrix.