本文整理汇总了C++中NxD6Joint类的典型用法代码示例。如果您正苦于以下问题:C++ NxD6Joint类的具体用法?C++ NxD6Joint怎么用?C++ NxD6Joint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NxD6Joint类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void pJointD6::setDrivePosition(VxVector pos)
{
NxD6JointDesc descr; NxD6Joint *joint = static_cast<NxD6Joint*>(getJoint()); if (!joint)return ; joint->saveToDesc(descr);
joint->setDrivePosition(pMath::getFrom(pos));
descr.drivePosition = (pMath::getFrom(pos));
joint->loadFromDesc(descr);
}
示例2:
D6MotionMode pJointD6::getZMotion()
{
NxD6JointDesc descr; NxD6Joint *joint = static_cast<NxD6Joint*>(getJoint());
if (!joint)return D6MM_Locked;
joint->saveToDesc(descr);
return (D6MotionMode)descr.zMotion;
}
示例3: result
pJD6SoftLimit pJointD6::getTwistHighLimit()
{
NxD6JointDesc descr;NxD6Joint *joint = static_cast<NxD6Joint*>(getJoint());joint->saveToDesc(descr);
pJD6SoftLimit result(descr.twistLimit.high.damping,descr.twistLimit.high.spring,descr.twistLimit.high.value,descr.twistLimit.high.restitution);
return result;
}
示例4: getCurrentScene
//.........这里部分代码省略.........
desc->copyFrom(d1,cc);
joint = static_cast<NxJointDesc *>(desc);
}
break;
case NX_JOINT_PULLEY:
if ( 1 )
{
::NxPulleyJointDesc d1;
NxPulleyJoint *sj = j->isPulleyJoint();
sj->saveToDesc(d1);
addActor( d1.actor[0] );
addActor( d1.actor[1] );
NxPulleyJointDesc *desc = new NxPulleyJointDesc;
desc->copyFrom(d1,cc);
joint = static_cast<NxJointDesc *>(desc);
}
break;
case NX_JOINT_FIXED:
if ( 1 )
{
::NxFixedJointDesc d1;
NxFixedJoint *sj = j->isFixedJoint();
sj->saveToDesc(d1);
addActor( d1.actor[0] );
addActor( d1.actor[1] );
NxFixedJointDesc *desc = new NxFixedJointDesc;
desc->copyFrom(d1,cc);
joint = static_cast<NxJointDesc *>(desc);
}
break;
case NX_JOINT_D6:
if ( 1 )
{
::NxD6JointDesc d1;
NxD6Joint *sj = j->isD6Joint();
sj->saveToDesc(d1);
addActor( d1.actor[0] );
addActor( d1.actor[1] );
NxD6JointDesc *desc = new NxD6JointDesc;
desc->copyFrom(d1,cc);
joint = static_cast<NxJointDesc *>(desc);
}
break;
default:
break;
}
//Add Limits
// in addition, we also have to write out its limit planes!
j->resetLimitPlaneIterator();
if (j->hasMoreLimitPlanes())
{
// write limit point
joint->mOnActor2 = j->getLimitPoint(joint->mPlaneLimitPoint);
NxArray< NxPlaneInfoDesc *> plist;
// write the plane normals
while (j->hasMoreLimitPlanes())
{
NxPlaneInfoDesc *pInfo = new NxPlaneInfoDesc();
#if NX_SDK_VERSION_NUMBER >= 272
j->getNextLimitPlane(pInfo->mPlaneNormal, pInfo->mPlaneD, &pInfo->restitution);