#graphic-flex-image-effects-07-Flex-Mesh3D.ax [swf] [flash] flex
Abstract base class for 3D models. This holds the untransformed vertices, sides and UVT data, then can convert the 3D vertices into 2D coordinates to be rendered on the screen.
Constructor. This saves a reference to the parent container of the model for use in transforming coordinates into the parent coordinate space, as well as calls the createMesh() method to initialize all of the model properties.
parameter: container The container display object in which the model will be rendered.
Abstract method to be overridden by concrete child classes. This should initialize all of the vertices, sides and UVT data.
Transforms a 3D vector into a 2D screen coordinate.
parameter: vector The 3D vector to convert.
returns: The 2D coordinate in the parent container's coordinate space.
Applies the specified matrix transform to the vertices in the model. This is non-destructive, creating a separate list of transformed vertices.
parameter: matrix The 3D matrix transform to apply to the model.
Returns the 2D coordinates that can be used to draw the 3D model. This returns the vertices in the form required by drawTriangles().
returns: The 2D coordinates that can be used to draw the 3D model.
Returns the sides data that can be used to draw the 3D model. This returns the sides in the form required by drawTriangles().
returns: The sides that can be used to draw the 3D model.
Returns the UVT data that can be used to texture the 3D model. This returns the data in the form required by drawTriangles().
returns: The UVT data that can be used to texture the 3D model.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.