var p:Plane = new Plane(new ColorMaterial(0x00ff00), 500, 500); p.rotationX = 90 p.x = 750 _view.scene.addChild(p); _view.render()
var vBuffer:Vector.<Number> = p.geometry.subGeometries[0].vertexData var bottomleftVertex:Vector3D = new Vector3D(vBuffer[0], vBuffer[1], vBuffer[2]); trace(bottomleftVertex); // position of vertex in mesh trace(Matrix3D(p.sceneTransform).transformVector(bottomleftVertex)); //position of vertex in view ps theres a forum http://away3d.com/forum/ On 12 September 2011 13:02, Canado <[email protected]> wrote: > Hi Michael > > When I check the sceneTransform property of the object3D I need to > pass a matrix as parameter > But I don t understand why I have to pass a matrix here since I need > the real position of a given vertex > > And when I create the matrix to pass as a parameter it doesn't work > Do I need to use the raw data of the object ??? if yes how do you do > that? > > thanks for your input > > On Sep 9, 3:21 pm, Canado <[email protected]> wrote: > > thanks for your help > > the first one I know how to do it, it's the second option I need to > > do, "real vertex position inside the view3D" > > ok I ll check the scene transform method > > thanks > > > > On Sep 9, 10:49 am, Michael Iv <[email protected]> wrote: > > > > > > > > > > > > > > > > > Do you mean you want to know the screen coordinates of the vertices or > the 3d scene? If it is first then search the away3d.com forum . I put a > code for this there a couple of months ago . If you need a world or scene > position of the vertices you should multiply each vertex by the scene > transform matrix which was usually available as the property of any object3d > . I can't give you an exact code as I haven't worked with away3d 4 already > for a long time and currently I am on vacation and have no access to my PC > > > > > Sent from my iPhone > > > > > On Sep 9, 2011, at 4:37 PM, Canado <[email protected]> wrote: > > > > > > Hi Michael > > > > > > Do you know how to do this? > > > > Even if my plane has some rotation? > > > > > > thanks > > > > > > On Sep 8, 8:03 am, "Michael IV (aka SasMaster)" > > > > <[email protected]> wrote: > > > >> Those are in the object space.Multiply the vertices by the world > matrix. > > > > > >> On Thu, Sep 8, 2011 at 2:58 PM, Canado <[email protected]> wrote: > > > >>> I have a simple question > > > > > >>> How can I know the real position of a vertexdata inside the view3D > > > > > >>> I want to know the exact position of a given corner of a plane > > > >>> So far I can create a vertex with 3 vertexdata which give me one > > > >>> corner > > > >>> but when I check the x/y/z of that vertex it doesn t correspond to > the > > > >>> real coordinates, even when I add the x/y/z of the plane > > > > > >>> any idea? > > > > > >> -- > > > >> Michael Ivanov ,Senior Programmer > > > >> Neurotech Solutions Ltd.www.neurotechresearch.comhttp:// > blog.alladvanced.net > > > >> Tel:054-4962254 > > > >> [email protected] > > > >> [email protected] >
