当前位置: 首页>>代码示例>>C++>>正文


C++ NxD6Joint类代码示例

本文整理汇总了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);
}
开发者ID:gbaumgart,项目名称:vt,代码行数:7,代码来源:pJointD6.cpp

示例2:

D6MotionMode pJointD6::getZMotion()
{
	NxD6JointDesc descr;	NxD6Joint *joint  = static_cast<NxD6Joint*>(getJoint());
	if (!joint)return D6MM_Locked;
	joint->saveToDesc(descr);
	return (D6MotionMode)descr.zMotion;
}
开发者ID:gbaumgart,项目名称:vt,代码行数:7,代码来源:pJointD6.cpp

示例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;
}
开发者ID:gbaumgart,项目名称:vt,代码行数:6,代码来源:pJointD6.cpp

示例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);
开发者ID:daher-alfawares,项目名称:xr.desktop,代码行数:67,代码来源:NXU_PhysicsExport.cpp


注:本文中的NxD6Joint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。