Add support for part/triangle id for GIMPACT.
Thanks Alex Silverman: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2032
This commit is contained in:
@@ -256,9 +256,39 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//!@}
|
/// Accessor/Mutator pairs for Part and triangleID
|
||||||
|
void setFace0(int value)
|
||||||
|
{
|
||||||
|
m_triface0 = value;
|
||||||
|
}
|
||||||
|
int getFace0()
|
||||||
|
{
|
||||||
|
return m_triface0;
|
||||||
|
}
|
||||||
|
void setFace1(int value)
|
||||||
|
{
|
||||||
|
m_triface1 = value;
|
||||||
|
}
|
||||||
|
int getFace1()
|
||||||
|
{
|
||||||
|
return m_triface1;
|
||||||
|
}
|
||||||
|
void setPart0(int value)
|
||||||
|
{
|
||||||
|
m_part0 = value;
|
||||||
|
}
|
||||||
|
int getPart0()
|
||||||
|
{
|
||||||
|
return m_part0;
|
||||||
|
}
|
||||||
|
void setPart1(int value)
|
||||||
|
{
|
||||||
|
m_part1 = value;
|
||||||
|
}
|
||||||
|
int getPart1()
|
||||||
|
{
|
||||||
|
return m_part1;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -783,6 +783,8 @@ public:
|
|||||||
{
|
{
|
||||||
btTriangleShapeEx tri1(triangle[0],triangle[1],triangle[2]);
|
btTriangleShapeEx tri1(triangle[0],triangle[1],triangle[2]);
|
||||||
tri1.setMargin(margin);
|
tri1.setMargin(margin);
|
||||||
|
algorithm->setPart1(partId);
|
||||||
|
algorithm->setFace1(triangleIndex);
|
||||||
algorithm->gimpact_vs_shape(
|
algorithm->gimpact_vs_shape(
|
||||||
body0,body1,gimpactshape0,&tri1,swapped);
|
body0,body1,gimpactshape0,&tri1,swapped);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user