How to create the SubGeometry object?

Software: Away3D 4.x

KobeJames, Newbie
Posted: 13 June 2012 12:14 PM   Total Posts: 21

A Mesh object contains two cube subGeometry,what shall i do?

var subCube:SubGeometry = new CubeGeometry(); 

???
that’s not right!

or

cubeMesh1.addChild(cubeMesh2); 

???

could somebody tell me

   

Richard Olsson, Administrator
Posted: 16 June 2012 11:21 AM   Total Posts: 1192   [ # 1 ]

I’m not sure what you’re trying to achieve. Do you want a single mesh to contain two cube-shaped geometries? If so, you could create two separate CubeGeometry and one Mesh for each, position them relative to each other the way you want them, and then use the Merge class to merge them into a single Mesh. They will however likely end up in the same SubGeometry.

If you don’t care specifically about them belonging to the same Geometry, but just sticking together when you move them around, your second suggestion sounds fine, i.e. parenting one mesh to the other.

   

KobeJames, Newbie
Posted: 16 June 2012 01:48 PM   Total Posts: 21   [ # 2 ]

Thanks for your advice ,I’ll ty Merge class.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X