本文整理汇总了C++中NxScene::checkOverlapCapsule方法的典型用法代码示例。如果您正苦于以下问题:C++ NxScene::checkOverlapCapsule方法的具体用法?C++ NxScene::checkOverlapCapsule怎么用?C++ NxScene::checkOverlapCapsule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NxScene
的用法示例。
在下文中一共展示了NxScene::checkOverlapCapsule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IHandleResize
void plPXPhysicalControllerCore::IHandleResize()
{
uint32_t collideFlags =
1<<plSimDefs::kGroupStatic |
1<<plSimDefs::kGroupAvatarBlocker |
1<<plSimDefs::kGroupDynamic;
if(!IsSeeking())
{
collideFlags|=(1<<plSimDefs::kGroupExcludeRegion);
}
NxScene* myscene = plSimulationMgr::GetInstance()->GetScene(this->fWorldKey);
// NxShape** response=new NxShape*[2];
NxVec3 center(fLocalPosition.fX,fLocalPosition.fY,fLocalPosition.fZ+fPreferedRadius);
NxSegment Seg(center,center);
const NxCapsule newCap(Seg,fPreferedRadius);
int numintersect =myscene->checkOverlapCapsule(newCap,NX_ALL_SHAPES,collideFlags);
//with new capsule dimensions check for overlap
//with objects we would collide with
if(numintersect==0)
{
fHeight=fPreferedHeight;
fRadius=fPreferedRadius;
fController->setRadius(fRadius);
fController->setHeight(fHeight);
fNeedsResize=false;
}
// delete[] response;
}