package pl.minim.paperout.in3D.render.alternativa { import alternativa.engine3d.core.Face; import alternativa.engine3d.core.Mesh; import alternativa.engine3d.materials.TextureMaterial; import alternativa.engine3d.materials.TextureMaterialPrecision; import alternativa.types.Texture; import pl.minim.paperout.vo.TrackStepVO; import org.papervision3d.core.math.NumberUV; import flash.geom.Point; import flash.geom.Vector3D; /** * @author Marek Brun */ public class Alternativa3DTrackStepMesh extends Mesh { static public const STEP_VERTICES_ARRANGE:Array=[ [1,2,4], [2,3,4], [2,5,3], [5,8,3], [5,6,7], [5,7,8], [10,1,4], [10,9,1], [6,11,12], [6,12,7], ]; public function Alternativa3DTrackStepMesh(name:String, step0:TrackStepVO, step1:TrackStepVO, stepUVs:Vector.>, texture:Texture) { super(name); createVertexByVector3D(step1._3Dpoints[0], 'vert1'); createVertexByVector3D(step1._3Dpoints[1], 'vert2'); createVertexByVector3D(step1._3Dpoints[2], 'vert5'); createVertexByVector3D(step1._3Dpoints[3], 'vert6'); createVertexByVector3D(step1._3Dpoints[4], 'vert9'); createVertexByVector3D(step1._3Dpoints[5], 'vert11'); createVertexByVector3D(step0._3Dpoints[0], 'vert4'); createVertexByVector3D(step0._3Dpoints[1], 'vert3'); createVertexByVector3D(step0._3Dpoints[2], 'vert8'); createVertexByVector3D(step0._3Dpoints[3], 'vert7'); createVertexByVector3D(step0._3Dpoints[4], 'vert10'); createVertexByVector3D(step0._3Dpoints[5], 'vert12'); //creating faces var arrange:Array, faces:Array=[], face:Face; for(var i:uint=0;i