d3drm: Implement D3DRMQuaternionMultiply.
This commit is contained in:
parent
7fccb04201
commit
f289cf3129
|
@ -6,7 +6,7 @@
|
|||
@ stub D3DRMCreateColorRGBA
|
||||
@ stub D3DRMMatrixFromQuaternion
|
||||
@ stub D3DRMQuaternionFromRotation
|
||||
@ stub D3DRMQuaternionMultiply
|
||||
@ stdcall D3DRMQuaternionMultiply(ptr ptr ptr)
|
||||
@ stub D3DRMQuaternionSlerp
|
||||
@ stdcall D3DRMVectorAdd(ptr ptr ptr)
|
||||
@ stdcall D3DRMVectorCrossProduct(ptr ptr ptr)
|
||||
|
|
|
@ -32,6 +32,18 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
||||
|
||||
/* Product of 2 quaternions */
|
||||
LPD3DRMQUATERNION WINAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q, LPD3DRMQUATERNION a, LPD3DRMQUATERNION b)
|
||||
{
|
||||
D3DVECTOR cross_product;
|
||||
D3DRMVectorCrossProduct(&cross_product, &a->v, &b->v);
|
||||
q->s = a->s * b->s - D3DRMVectorDotProduct(&a->v, &b->v);
|
||||
q->v.x = a->s * b->v.x + b->s * a->v.x + cross_product.x;
|
||||
q->v.y = a->s * b->v.y + b->s * a->v.y + cross_product.y;
|
||||
q->v.z = a->s * b->v.z + b->s * a->v.z + cross_product.z;
|
||||
return q;
|
||||
}
|
||||
|
||||
/* Add Two Vectors */
|
||||
LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR d, LPD3DVECTOR s1, LPD3DVECTOR s2)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue