CoolWordTuScrin

Posts 1–2 of 2 · Page 1 of 1
WordTuScrin
Code:
void GetMBP ( D3DVIEWPORT9 ViewPort, D3DXVECTOR3 *Out, D3DXMATRIX World, D3DXMATRIX View      , D3DXMATRIX Projection )
{
	if( (World  != NULL) || (View != NULL) || (Projection != NULL) )
	{
		IDirect3DDevice9* pDevice = pMenu.g_pD3DXDev;
		
		pDevice->GetViewport( &ViewPort );

		pDevice->GetTransform(D3DTS_VIEW      , &View);
		pDevice->GetTransform(D3DTS_PROJECTION, &Projection);
		pDevice->GetTransform(D3DTS_WORLD     , &World);

		D3DXVec3Project( Out, Out, &ViewPort, &Projection, &View, &World );
	}
}

bool WorldToScreen(D3DXVECTOR3 Pos, D3DXVECTOR3* Screen, LPDIRECT3DDEVICE9 pDevice) 
{
	D3DVIEWPORT9 pViewport;
	D3DXMATRIX World, View, Projection;

	 GetMBP( pViewport, Screen, World, View, Projection );

	if(Screen->z < 1)
		return TRUE;

	return FALSE;
}
Creditos

Sei lá.

OBS: Full code brother ? Never.
Puque tiu? em puque? Puque num posta inteilo tiu? Purque se faiz isso tiu

Good Job.
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?