package { import flash.display.DisplayObject; import flash.geom.Vector3D; /** * Class holding 3D values for pyramid model. */ public class graphic_flex_image_effects_07_Flex_PyramidMesh extends graphic_flex_image_effects_07_Flex_Mesh3D { /** * Constructor. Calls super's contructor. * * @param container The object in which the model will be rendered. */ public function graphic_flex_image_effects_07_Flex_PyramidMesh(container:DisplayObject) { super(container); } /** * Initializes all the values needed to render the model, * including vertices, sides and uvt data. */ override protected function createMesh():void { _vectors = new Vector.(); _vectors.push(new Vector3D(0, -100, 0)); _vectors.push(new Vector3D(130, 100, 130)); _vectors.push(new Vector3D(130, 100, -130)); _vectors.push(new Vector3D(-130, 100, -130)); _vectors.push(new Vector3D(-130, 100, 130)); _sides = new Vector.(); _sides.push(0, 1, 2); _sides.push(0, 2, 3); _sides.push(0, 3, 4); _sides.push(0, 4, 1); _uvtData = new Vector.(); _uvtData.push(0.5, 0.5); _uvtData.push(0, 1); _uvtData.push(0, 0); _uvtData.push(1, 0); _uvtData.push(1, 1); } } }