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


C++ b3Vector3::dot方法代码示例

本文整理汇总了C++中b3Vector3::dot方法的典型用法代码示例。如果您正苦于以下问题:C++ b3Vector3::dot方法的具体用法?C++ b3Vector3::dot怎么用?C++ b3Vector3::dot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在b3Vector3的用法示例。


在下文中一共展示了b3Vector3::dot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: notExist

bool notExist(const b3Vector3& planeEquation,const b3AlignedObjectArray<b3Vector3>& planeEquations)
{
	int numbrushes = planeEquations.size();
	for (int i=0;i<numbrushes;i++)
	{
		const b3Vector3& N1 = planeEquations[i];
		if (planeEquation.dot(N1) > b3Scalar(0.999))
		{
			return false;
		} 
	}
	return true;
}
开发者ID:Ochakko,项目名称:MameBake3D,代码行数:13,代码来源:b3GeometryUtil.cpp

示例2:

bool	b3GeometryUtil::areVerticesBehindPlane(const b3Vector3& planeNormal, const b3AlignedObjectArray<b3Vector3>& vertices, b3Scalar	margin)
{
	int numvertices = vertices.size();
	for (int i=0;i<numvertices;i++)
	{
		const b3Vector3& N1 = vertices[i];
		b3Scalar dist = b3Scalar(planeNormal.dot(N1))+b3Scalar(planeNormal[3])-margin;
		if (dist>b3Scalar(0.))
		{
			return false;
		}
	}
	return true;
}
开发者ID:Ochakko,项目名称:MameBake3D,代码行数:14,代码来源:b3GeometryUtil.cpp

示例3: ComputeClosestPointsPlaneSphere

void ComputeClosestPointsPlaneSphere(const b3Vector3& planeNormalWorld, b3Scalar planeConstant, const b3Vector3& spherePosWorld,b3Scalar sphereRadius,  plContactCache* contactCache) 
{
	if (contactCache->numAddedPoints < contactCache->pointCapacity)
	{
		lwContactPoint& pointOut = contactCache->pointsOut[contactCache->numAddedPoints];
		b3Scalar t = -(spherePosWorld.dot(-planeNormalWorld)+planeConstant);
		b3Vector3 intersectionPoint = spherePosWorld+t*-planeNormalWorld;
		b3Scalar distance = t-sphereRadius;
		if (distance<=0)
		{
			pointOut.m_distance = distance;
			plVecCopy(pointOut.m_ptOnBWorld,intersectionPoint);
			plVecCopy(pointOut.m_ptOnAWorld,spherePosWorld+sphereRadius*-planeNormalWorld);
			plVecCopy(pointOut.m_normalOnB,planeNormalWorld);
			contactCache->numAddedPoints++;
		}
	}
}
开发者ID:Ochakko,项目名称:MameBake3D,代码行数:18,代码来源:RealTimeBullet3CollisionSdk.cpp


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