Flint Particle System Forum - Extrusion2011-12-11T05:36:06+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Extrusionhttp://flintparticles.org/forum/comments.php?DiscussionID=380&Focus=1285#Comment_12852010-08-07T06:18:55+01:002011-12-11T05:36:06+00:00bobbyhttp://flintparticles.org/forum/account.php?u=397
Dear Team,
I am trying to draw a custom 2-d shape on the screen and then create its 3-d model using Away 3-d. I have included the classes that I have used. I am yet to create the 3-d model using ...
I am trying to draw a custom 2-d shape on the screen and then create its 3-d model using Away 3-d. I have included the classes that I have used. I am yet to create the 3-d model using extrusion. The problem is that there is always a small offset when making the drawing. When trying out the code please click on the screen at two different points to get the drawing start and going. The drawing is triggered on MouseDown. Please do help me as I have been trying to find a solution for quiet sometime.
public class UsingExtrusionTest3 extends ExtrusionBaseClass {
private var _xpos:Array = new Array(20); private var _ypos:Array = new Array(20); private var sides:Number = 1; private var init:Boolean = true; private var firstTime:Boolean = true; private var mesh:Mesh = new Mesh(); private var i:uint=0;
public function UsingExtrusionTest3() { super(); } override protected function _createScene() : void { mesh.bothsides = true; var material : WireColorMaterial = new WireColorMaterial(0xFF0000); material.wireColor = 0x000000; material.thickness = 2; mesh.material = material; _view.scene.addChild(mesh);
var segment0:Segment = new Segment(); segment0.moveTo(0, 0, 0); segment0.lineTo(200, 0, 0); segment0.lineTo(200, 0,100); segment0.lineTo(0, 0,100); segment0.lineTo(0, 0,0); mesh.addSegment(segment0);
trace("x2 = "+ _xpos[i]); trace("y2 = "+ _ypos[i]); var segment1:Segment = new Segment(); segment1.moveTo(_xpos[i-1],- _ypos[i-1],0); segment1.lineTo(_xpos[i],-_ypos[i],0); mesh.addSegment(segment1);
i++; }
} } }]]>
Extrusionhttp://flintparticles.org/forum/comments.php?DiscussionID=380&Focus=1287#Comment_12872010-08-09T08:33:58+01:002010-08-09T08:34:09+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
This question would be more appropriate on the Away3d forum at http://groups.google.com/group/away3d-dev
http://groups.google.com/group/away3d-dev]]>