Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi niko. Thanks for the quick reply on my previous post.I wanted to ask you what is the method to add a ccbjs file to an existing scene as a mesh.And to explain better i am starting with startCopperLichtFromFile('3darea', 'copperlichtdata/test.ccbjs'); because i have a standrd start scene.And now i want to add ccbjs files as meshes into that scene.Can you please help me on that?And another question.If we add the ccbjs file as mesh how can we have access to the vertexes of that mesh? Thanks in advance Vangelis |
||||
|
The engine was originally only planned to load only one such file, but it should also work with multiple files. The scenes loaded then from that file should then simply be available in the getScenes() array, after loading. Depending on where you want the scene nodes in that scenes, you can simply move them to the place you need them. Use either createClone() or a combination of removeChild() and addChild() for this. I've not tested this but it should work. Vertices of a mesh can be accessed in this way: Usually, you have a MeshSceneNode then, use its method getMesh() to acces the mesh and with its methods like GetMeshBuffers(), you can read and write the vertices, indices and materials of that: http://www.ambiera.com/copperlic... |
|