这篇教程C++ D3DXMatrixRotationX函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中D3DXMatrixRotationX函数的典型用法代码示例。如果您正苦于以下问题:C++ D3DXMatrixRotationX函数的具体用法?C++ D3DXMatrixRotationX怎么用?C++ D3DXMatrixRotationX使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了D3DXMatrixRotationX函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: D3DXMatrixRotationXvoid CMyObject::setRotAngels(D3DXVECTOR3 rotAngels){ D3DXMATRIX mtxRotX; D3DXMATRIX mtxRotY; D3DXMATRIX mtxRotZ; m_rotAngles = rotAngels; D3DXMatrixRotationX(&mtxRotX,m_rotAngles.x); D3DXMatrixRotationY(&mtxRotY,m_rotAngles.y); D3DXMatrixRotationZ(&mtxRotZ,m_rotAngles.z); m_mtxRot = mtxRotX * mtxRotY * mtxRotZ;}
开发者ID:XmakerenX,项目名称:Resoruse_Editor,代码行数:12,
示例2: Assertvoid AmjuGLDX9::RotateX(float degs){ AMJU_CALL_STACK; Assert(s_matrixMode == AmjuGL::AMJU_MODELVIEW_MATRIX); D3DXMATRIX m; D3DXMatrixIdentity(&m); D3DXMatrixRotationX(&m, D3DXToRadian(degs)); g_matrixStack->MultMatrixLocal( &m); dd->SetTransform(D3DTS_WORLD, g_matrixStack->GetTop());}
开发者ID:jason-amju,项目名称:amjulib,代码行数:12,
示例3: D3DXMatrixTranslation Node::Node() { D3DXMatrixTranslation( &this->matTranslate,0,0,0 ); D3DXMatrixTranslation( &this->matTranslate_Relative,0,0,0 ); D3DXMatrixRotationX( &this->matRotateX, 0 ); // Pitch D3DXMatrixRotationY( &this->matRotateY, 0 ); // Yaw D3DXMatrixRotationZ( &this->matRotateZ, 0 ); // Roll D3DXMatrixScaling( &this->matScale,1,1,1 ); this->hasParent = false; this->hasChildren = false; }
开发者ID:Siduron,项目名称:Siduron-Engine,代码行数:12,
示例4: SetupWorldMatrice//-----------------------------------------------------------------------------// Desc: 设置世界矩阵//-----------------------------------------------------------------------------VOID SetupWorldMatrice(){ //建立一个绕X轴动态旋转的世界矩阵 D3DXMATRIX matWorld; UINT iTime = timeGetTime() % 1000; FLOAT fAngle = iTime * (2.0f * D3DX_PI) / 1000.0f; D3DXMatrixIdentity( &matWorld ); D3DXMatrixRotationX( &matWorld, fAngle ); //设置世界矩阵 g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );}
开发者ID:chenbk85,项目名称:3dlearn,代码行数:15,
示例5: D3DXMatrixRotationXvoid cPart::Update(float delta, D3DXMATRIXA16* pmatParentWorld){ if (m_eState == E_STATE_WALK){ if (m_epart != PT_fist){ m_fAngle += m_fAngleSpeed * delta; D3DXMatrixRotationX(&m_matRot, m_fAngle); } } else if (m_eState == E_STATE_ATTACK && m_epart == PT_arm_right){ m_fXAngle -= D3DXToRadian(-360) * delta; D3DXMatrixRotationX(&m_matRot, m_fXAngle); } else { D3DXMatrixRotationX(&m_matRot, m_fAngle); } if (m_fAngle < -D3DX_PI / 4.0f) { m_fAngle = (-D3DX_PI / 4.0f); m_fAngleSpeed *= -1; } if (m_fAngle > D3DX_PI / 4.0f) { m_fAngle = (D3DX_PI / 4.0f); m_fAngleSpeed *= -1; } m_matWorldTM = m_matPrevT * m_matRot * m_matPostT; if (pmatParentWorld) { m_matWorldTM = m_matWorldTM * (*pmatParentWorld); } for each (auto p in m_vecChildren) { p->Update(delta, &m_matWorldTM); }
开发者ID:arkiny,项目名称:Direct3D,代码行数:40,
示例6: D3DXMatrixRotationX// Sets the object's rotation.void SceneObject::SetRotation( float x, float y, float z ){ m_rotation.x = x; m_rotation.y = y; m_rotation.z = z; D3DXMATRIX rotationX, rotationY; D3DXMatrixRotationX( &rotationX, m_rotation.x ); D3DXMatrixRotationY( &rotationY, m_rotation.y ); D3DXMatrixRotationZ( &m_rotationMatrix, m_rotation.z ); D3DXMatrixMultiply( &m_rotationMatrix, &m_rotationMatrix, &rotationX ); D3DXMatrixMultiply( &m_rotationMatrix, &m_rotationMatrix, &rotationY );}
开发者ID:zonedoutspace,项目名称:evamp,代码行数:14,
|