How to convert to the .xsk file?[SOLVED]

harr999y

04-07-2010 12:56:41

Hi,everyone :)
I can't find the way to convert to the .xsk file just using in the tutorial 111 for CCDMesh in the new flour version, can you help me? And in one thread Beatjean said it had been serialized in flower,but how to use?
Thanks very much! :)
Harry

betajaen

04-07-2010 13:03:21

I haven't updated flour yet to write them. The only way currently is to write one in code and save it that way.

harr999y

04-07-2010 13:07:38

I haven't updated flour yet to write them. The only way currently is to write one in code and save it that way.
Thanks Betahaen. And can you tell me the code about it?As my poor English,so terror finding it in English forum~ :)

betajaen

04-07-2010 14:35:36

Normall you would create it like any other NxOgre Mesh, via the ManualMesh class.

NxOgre::ManualMesh mesh;
mesh.begin(NxOgre::Enums::MeshType_Skeleton);
float size = 2 * 0.5f;
mesh.vertex( size, -size, -size);
mesh.vertex( size, -size, size);
mesh.vertex( size, size, -size);
mesh.vertex( size, size, size);
mesh.vertex(-size, -size, -size);
mesh.vertex(-size, -size, size);
mesh.vertex(-size, size, -size);
mesh.vertex(-size, size, size);
mesh.triangle(0,1,3);
mesh.triangle(0,3,2);
mesh.triangle(3,7,6);
mesh.triangle(3,6,2);
mesh.triangle(1,5,7);
mesh.triangle(1,7,3);
mesh.triangle(4,6,7);
mesh.triangle(4,7,5);
mesh.triangle(1,0,4);
mesh.triangle(5,1,4);
mesh.triangle(4,0,2);
mesh.triangle(4,2,6);
mCCDMesh = mesh.end(true, "file://test.xsk");

harr999y

04-07-2010 14:49:31

Normall you would create it like any other NxOgre Mesh, via the ManualMesh class.
Thanks very much! I get it :)
And it seems that you write it in the below of the .cpp file,sorry for my careless. :mrgreen:
Harry

betajaen

04-07-2010 16:10:59

No it's okay.

Creating skeletons is a new feature and I haven't been up to date on documention or implementing it in flour as I should. Other things have had my attention lately.