Cloth as a submesh of a mesh

Vineeth@nxOgre

03-04-2008 06:28:30

cloth = mScene->createCloth("cloth",NxOgre::Pose(Vector3(0,3,0)), cp);


NxMeshData meshData=cloth->getMeshData();
Ogre::SubMesh*sub=myBody->getEntity()->getMesh()->createSubMesh("submesh");
sub->vertexData=new VertexData();
sub->vertexData->vertexCount=static_cast<size_t>(meshData.maxVertices);
.
.hopeless attempt
sub->vertexData->vertexStart=*(dynamic_cast<size_t*>(meshData.indicesBegin));
..



teh above piece of code is what i have written to mak a part of the mesh cloth How can i proceed .i have very little knowledge of ogre meshe.But I have been working on physx and hence know that the cooked mesh writes the NXMESHDATA for the cloth.

basically i want a part of the mesh/entity to behave as a cloth.The cloth that has been created

betajaen

03-04-2008 09:40:19

There is a whole facility that takes a Ogre mesh into a cloth for you.

cloth = mScene->createCloth("cloth", "mesh.mesh", Vector3(0,3,0), cp);

Vineeth@nxOgre

03-04-2008 09:55:20

I made the cloth static and hang it in air

I am using cake 3 .i want to use the unbuffered mouse input in the frame started method to get the cloth to tear. what can I do betajaen please help me

How do i do it .I know that we can use mouse states abs and relative values and how do i connect this to cloth