how to create cloth

ljenjoylife

14-10-2009 08:05:20

as in your 1.5.5blog
create the cloth:

ClothDescription desc;
desc.mMesh = NxOgre::MeshManager::getSingleton()->load("media:test.xcl", "testy");
desc.mGlobalPose.identity();
desc.mGlobalPose.set(0, 10, 0);
desc.mFlags |= Enums::ClothFlags_DebugVisualisation;
desc.mFlags |= Enums::ClothFlags_Hardware;

Cloth* cloth = mRenderSystem->createCloth(desc, "WelshFlag");
cloth->attachVertexToGlobalPosition(0, Vec3(1, 10, 0));
cloth->attachVertexToGlobalPosition(16, Vec3(4, 10, 0));
cloth->attachVertexToGlobalPosition(32, Vec3(8, 10, 0));


how can i get the xcl file? is it created by the flour?

and the four0.4 don`t support .mesh file, will the nxogre support create cloth from .mesh file manually?

betajaen

14-10-2009 11:30:08

You can use a ManualMesh to write a Cloth Mesh within Code, or if you have Blender you can use the BlenderToFlower Exporter to create a Cloth from that; the advantage being that it doesn't have to rectangular.

Flour 0.4 won't be supporting Ogre Mesh files in the future.

ljenjoylife

15-10-2009 09:43:23

TKS, betajaen.
But still another problem, expect your reply my new post