本文整理汇总了C++中ChMatrix33::MatrTMultiply方法的典型用法代码示例。如果您正苦于以下问题:C++ ChMatrix33::MatrTMultiply方法的具体用法?C++ ChMatrix33::MatrTMultiply怎么用?C++ ChMatrix33::MatrTMultiply使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChMatrix33
的用法示例。
在下文中一共展示了ChMatrix33::MatrTMultiply方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CollideRecurse
void CHOBBcollider::CollideRecurse(
ChMatrix33<>& boR, Vector& boT,
CHOBBTree *o1, int b1,
CHOBBTree *o2, int b2,
eCollMode flag)
{
this->num_bv_tests++;
CHOBB* box1 = o1->child(b1);
CHOBB* box2 = o2->child(b2);
// first thing, see if we're overlapping
if (!CHOBB::OBB_Overlap(boR, boT, box1, box2))
return;
// if we are, see if we test geometries next
int l1 = box1->IsLeaf();
int l2 = box2->IsLeaf();
//
// CASE TWO LEAVES
//
if (l1 && l2)
{
this->num_geo_tests++;
// transform the points in b2 into space of b1, then compare
ChGeometry* mgeo1 = o1->geometries[box1->GetGeometryIndex()];
ChGeometry* mgeo2 = o2->geometries[box2->GetGeometryIndex()];
bool just_intersect = false;
if (flag==ChNarrowPhaseCollider::ChC_FIRST_CONTACT)
just_intersect = true;
ChGeometryCollider::ComputeCollisions(*mgeo1, &this->R1, &this->T1,
*mgeo2, &this->R2, &this->T2,
*this,
&this->R, &this->T,
just_intersect);
return;
}
// we dont, so decide whose children to visit next
double sz1 = box1->GetSize();
double sz2 = box2->GetSize();
ChMatrix33<> Rc;
Vector Tc;
if (l2 || (!l1 && (sz1 > sz2)))
{
int c1 = box1->GetFirstChildIndex();
int c2 = box1->GetSecondChildIndex();
Rc.MatrTMultiply(o1->child(c1)->Rot, boR);
Tc = ChTrasform<>::TrasformParentToLocal(boT, o1->child(c1)->To, o1->child(c1)->Rot);
CollideRecurse(Rc,Tc,o1,c1,o2,b2,flag);
if ((flag == ChC_FIRST_CONTACT) && (this->GetNumPairs() > 0)) return;
Rc.MatrTMultiply(o1->child(c2)->Rot, boR);
Tc = ChTrasform<>::TrasformParentToLocal(boT, o1->child(c2)->To, o1->child(c2)->Rot);
CollideRecurse(Rc,Tc,o1,c2,o2,b2,flag);
}
else
{
int c1 = box2->GetFirstChildIndex();
int c2 = box2->GetSecondChildIndex();
Rc.MatrMultiply(boR, o2->child(c1)->Rot);
Tc = ChTrasform<>::TrasformLocalToParent(o2->child(c1)->To,boT, boR);
CollideRecurse(Rc,Tc,o1,b1,o2,c1,flag);
if ((flag == ChC_FIRST_CONTACT) && (this->GetNumPairs() > 0)) return;
Rc.MatrMultiply(boR, o2->child(c2)->Rot);
Tc = ChTrasform<>::TrasformLocalToParent(o2->child(c2)->To,boT, boR);
CollideRecurse(Rc,Tc,o1,b1,o2,c2,flag);
}
}