Skip to main content
gamedev.net
🔒 Locked

D3DXIntersect

Started by Jezak 0 replies 350+ views
Original Post
Jezak
Jezak
I can''t understanding one parameters of that functions. HRESULT D3DXIntersect( LPD3DXBASEMESH pMesh, CONST D3DXVECTOR3 *pRayPos, CONST D3DXVECTOR3 *pRayDir, BOOL *pHit, DWORD *pFaceIndex, FLOAT *pU, FLOAT *pV, FLOAT *pDist, LPD3DXBUFFER *ppAllHits, DWORD *pCountOfHits ); What is *pRayDir? In directx sdk write."] Pointer to a D3DXVECTOR3 structure, specifying the direction of the ray. " Okay but where from i can take it. For example I habe two point start(0,0,0) and end (1,1,1). What is direction? Why directx need diretion vector?
shakazed
shakazed
Your direction is just that, the direction your vector is pointing. pRayPos is the origin (start position) of the vector.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.