getVertexBuffer :: RESOLVED

Software: Away3D 4.x

bardo, Member
Posted: 29 February 2012 10:32 AM   Total Posts: 79

hi all ... a question that is maybe stupid :

I need to create a small sphere on each vertex of a bigger sphere ... but actually , in Broomstick , i can’t get the list of vertices of a the bigger spehere ...

i access vertexdata of subgeom of the mesh (m.geometry.subGeometries[0].vertexData;... are them the indices of vertices?) , but i return only Numbers .

How i can get the the real posiotions of vertices?


i tried something like this :

var v:VertexBuffer3D = m.geometry.subGeometries[0].getVertexBuffer(Stage3DManager.getInstance(stage).getStage3DProxy(0));

but an error occurred(null object prop).

Somebody can help me?

and ..is there some tutorial around , on the new way meshes/geometries ara handled?

Thanks!

   

bardo, Member
Posted: 29 February 2012 11:06 AM   Total Posts: 79   [ # 1 ]

basically ..have to do something like this (3.6)

for (var i:int = 0; i < _sf.vertices.length; i++) {
  var p:Plane = new Plane( { width:50, height:50, material:new BitmapMaterial(EmbedDUMMY.bitmapData)} );
      var c:ObjectC ObjectContainer3D();
  c.addChild(p);    p.rotati
  _cont.addChild(c);    c.positi
  c.lookAt(new Vector3D(0, 0, 0) ); 
  }

   

inSertCodE, Sr. Member
Posted: 29 February 2012 11:45 AM   Total Posts: 105   [ # 2 ]
bardo - 29 February 2012 10:32 AM

i access vertexdata of subgeom of the mesh (m.geometry.subGeometries[0].vertexData;... are them the indices of vertices?) , but i return only Numbers .

Thats what you need… Those numbers are x,y,z coordinates of each vertex.
So 3 numbers for each vertex.
The array vertexData is as folowing:
X-vert1, Y-vert1, Z-vert1, X-vert2, Y-vert2 ....and so on…

   

bardo, Member
Posted: 29 February 2012 11:55 AM   Total Posts: 79   [ # 3 ]

thanx a lot ... i was digging in Mesh debugger and gamustras forums just now ... you save me a lot of time!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X