Lucas Golden
unread,Nov 23, 2009, 10:55:23 AM11/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to o3d-d...@googlegroups.com
Hey Everyone,
I've developed a Flex App that allows a user to draw a 2D shape then have that shape converted to 3D in O3D. I'm having a problem with the O3D part and figuring out exactly which primitive to use.
Since they are non-normal polygons (not just a square or rectangle), the Box primitive is out.
The only primitive that I found that even takes a co-ordinate system is the "createPrism" primitive. It gets close to what I need, however, since it doesn't like points concave from origin point, it does some weird stuff.
Also, if I reverse the order that I feed it the co-ordinates (i.e. if I draw my shape counter-clockwise as opposed to clockwise), the shape itself is inverted.
This is the code I'm using:
/////////////////
var shapeTrans= g_pack.createObject('o3d.Transform');
shapeTrans.name = "shapeTrans";
shapeTrans.parent = root;
var myShape= o3djs.primitives.createPrism(g_pack, material,shapeArray,6);
shapeTrans.addShape(myShape);
////////////////
Are there any alternatives to createPrism that may work better using co-ordinates?
Thanks!
Luke