≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
How to Linepick Clones and animated Meshes??
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b]csp-games[/b] wrote: Here's some further info, for those interested in the subject matter: This is how to parse all meshes and their mesh buffers and their vertices, for instance: [code] // this reads the first vertexX of the first meshbuffer of the first scene node (given that is a mesh - see the weird string getType returns...) var kids=scene.getRootSceneNode().getChildren(); // get all children of root scene node in array alert(kids[0].getType); alert(kids[0].Name); if(kids[0].getType == 'function(){return"mesh"}' ){alert("very weird...");} // very weird, but works var mybuf=kids[0].getMesh().GetMeshBuffers(); // get all meshbuffers of first mesh in an array, this will crash if getType is not 'function(){return"mesh"}' //finally access the meshbuffer data alert(mybuf[0].Vertices[0].Pos.X); // Pos XYZ, Normal XYZ, Color int argb, TCoords XY, TCoords2, see CL3D.Vertex3D // this shows how to determine the number of child nodes, meshbuffers per meshnode, vertices per meshbuffer: alert("kids:"+mymesh7.length+" surfs:"+mybuf.length+" vertices: "+mybuf[0].Vertices.length); // (note, a node can be a mesh, but doesn't have to. It can contain multiple meshbuffer, which means basically parts of the mesh, using individual textures) [/code] So this allows to parse all meshes and store their vertex coords in a directly accessible array that can then be used by the beforementioned RIT function.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact