您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ D3DXVec3Dot函数代码示例

51自学网 2021-06-01 20:17:23
  C++
这篇教程C++ D3DXVec3Dot函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中D3DXVec3Dot函数的典型用法代码示例。如果您正苦于以下问题:C++ D3DXVec3Dot函数的具体用法?C++ D3DXVec3Dot怎么用?C++ D3DXVec3Dot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: acos

void Tank::orientTurret(float deltaX,float deltaY, float time){	float anglelimit = acos(D3DXVec3Dot(&D3DXVECTOR3(0,1,0), m_tankState->GetUp()));	yaw += deltaX*0.01f;	if ((deltaY < 0 && pitch > -0.60 + anglelimit) || (deltaY > 0 && pitch <0.60 + anglelimit))		pitch += deltaY*0.005f;}
开发者ID:francislavoie,项目名称:COMP3501-Fall2013,代码行数:8,


示例2: orthogonalizeAndNormalizeTangent

		void orthogonalizeAndNormalizeTangent(const D3DXVECTOR3 &tangent, const D3DXVECTOR3& normal, D3DXVECTOR3& tangentOut){			float d = D3DXVec3Dot(&normal, &tangent);						D3DXVECTOR3 newTangent = tangent - d * normal;			D3DXVec3Normalize(&newTangent, &newTangent);			tangentOut = newTangent;					}
开发者ID:Manaluusua,项目名称:Dx11Sandbox,代码行数:8,


示例3: D3DXVec3Dot

float CRouter::GetDistance(const D3DXVECTOR3 *vPosA, const D3DXVECTOR3 *vPosB){	D3DXVECTOR3 vDif = *vPosB - *vPosA;	D3DXVECTOR3 vPos = *vPosA;	float fDot = D3DXVec3Dot(&vDif, &vPos);	float fCos = fDot/(D3DXVec3Length(&vDif)*D3DXVec3Length(&vPos));	return D3DXVec3Length(&vPos)*(sqrt(1 - fCos*fCos));}
开发者ID:flair2005,项目名称:vr-bike,代码行数:8,


示例4: D3DXVec3Dot

D3DXQUATERNION Sun::QuatFromBallPoints(const D3DXVECTOR3 &vFrom, const D3DXVECTOR3 &vTo){	D3DXVECTOR3 vPart;	float fDot = D3DXVec3Dot(&vFrom, &vTo);	D3DXVec3Cross(&vPart, &vFrom, &vTo);	return D3DXQUATERNION(vPart.x, vPart.y, vPart.z, fDot);}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:8,


示例5: MoveBack

// Move camera backwardsvoid Camera::MoveBack(GameTime& gameTime){	D3DXVECTOR3 forward;		forward = mDirection - (D3DXVec3Dot(&mDirection, &mWorldUp) * mWorldUp);	D3DXVec3Normalize(&forward, &forward);	mPosition -= forward * C_MOVE_SPEED * (float)gameTime.GetTimeSinceLastTick().Seconds;}
开发者ID:KimRestad,项目名称:3D-II-Lab2,代码行数:9,


示例6: D3DXVec3Dot

void BoundingBox::getAxisProjection(D3DXVECTOR3 axis, BoundingBox* box, float& min, float& max){	float val;	min = D3DXVec3Dot(&axis, &(box->getVertex(0)));	max = D3DXVec3Dot(&axis, &(box->getVertex(0)));	for (int i=0; i<8; i++)	{		D3DXVECTOR3 as = box->getVertex(i);		val = D3DXVec3Dot(&axis, &(box->getVertex(i)));		if (val < min)			min = val;		if (val > max)			max = val;	}}
开发者ID:s0n4m,项目名称:ISM,代码行数:17,


示例7: D3DXVec3Dot

D3DXQUATERNION ArcBall::QuatFromBallPoints(const D3DXVECTOR3 &vFrom, const D3DXVECTOR3 &vTo){	D3DXVECTOR3 vPart;	float fDot = D3DXVec3Dot( &vFrom, &vTo );	// rotation angle	D3DXVec3Cross( &vPart, &vFrom, &vTo );		// rotation axis	return D3DXQUATERNION( vPart.x, vPart.y, vPart.z, fDot );}
开发者ID:Clearlove1992,项目名称:GraphicsDemos,代码行数:8,


示例8: calcSphereTriangleDistance

static inline void calcSphereTriangleDistance(    Sphere* sphere,    Vector* normal,    Vector* v0, Vector* v1, Vector* v2,    Vector* collPoint,    float* distance ){    // project sphere center onto plane of triangle.    Vector* center = &sphere->center;    Vector  projPoint;    float   dist2plane = D3DXVec3Dot( v0, normal ) - D3DXVec3Dot( center, normal );    D3DXVec3Scale( &projPoint, normal, dist2plane );    D3DXVec3Add( &projPoint, &projPoint, center );    // does the projected point lie within the collision triangle?    Vector* vertices[3];    vertices[0] = v0, vertices[1] = v1, vertices[2] = v2;    if( isPointWithinTriangle( &projPoint, vertices, normal ) )    {        *distance = fabs( dist2plane );        *collPoint = projPoint;        return;    }    // projected point lies outside the triangle, so find the nearest    // point on the triangle boundary...    else    {        float currdist;        Vector closestPoint, temp;            findNearestPointOnLine( &closestPoint, &projPoint, v0, v1 );        D3DXVec3Subtract( &temp, center, &closestPoint );        *distance = D3DXVec3Length(&temp), *collPoint = closestPoint;        findNearestPointOnLine( &closestPoint, &projPoint, v1, v2 );        D3DXVec3Subtract(&temp, center, &closestPoint);        currdist = D3DXVec3Length(&temp);        if( *distance > currdist ) *distance = currdist, *collPoint = closestPoint;        findNearestPointOnLine( &closestPoint, &projPoint, v0, v2 );        D3DXVec3Subtract(&temp, center, &closestPoint);        currdist = D3DXVec3Length(&temp);        if( *distance > currdist ) *distance = currdist, *collPoint = closestPoint;    }}
开发者ID:cheinkn,项目名称:basextreme,代码行数:46,


万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。