How to use self collision of cloth in the SoftBodyDemo?

yuanwr
Posts: 1
Joined: Tue Jan 13, 2009 10:05 am

How to use self collision of cloth in the SoftBodyDemo?

Post by yuanwr »

Is self collision available in the gimpact :?:
I found in the btSoftBody::defaultCollisionHandler(btSoftBody* psb)

Code: Select all

case	fCollision::VF_SS:
{
	btSoftColliders::CollideVF_SS	docollide;
	/* common					*/ 
	docollide.mrg=	getCollisionShape()->getMargin()+
		psb->getCollisionShape()->getMargin();
	/* psb0 nodes vs psb1 faces	*/ 
	docollide.psb[0]=this;
	docollide.psb[1]=psb;
	docollide.psb[0]->m_ndbvt.collideTT(	docollide.psb[0]->m_ndbvt.m_root,
		docollide.psb[1]->m_fdbvt.m_root,
		docollide);
	/* psb1 nodes vs psb0 faces	*/ 
	docollide.psb[0]=psb;
	docollide.psb[1]=this;
	docollide.psb[0]->m_ndbvt.collideTT(	docollide.psb[0]->m_ndbvt.m_root,
		docollide.psb[1]->m_fdbvt.m_root,
		docollide);
}
that I can not set docollide.psb[0] and docollide.psb[1] to the same object.
So how to deal with the self collision?


Thanks