Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.9 KiB

  1. /*****************************************************************************\
  2. FILE: CameraMove.h
  3. DESCRIPTION:
  4. The caller can create this object to tell it to move from point a to
  5. point b from time t1 to time t2.
  6. BryanSt 12/24/2000
  7. Copyright (C) Microsoft Corp 2000-2001. All rights reserved.
  8. \*****************************************************************************/
  9. #ifndef CAMERAMOVE_H
  10. #define CAMERAMOVE_H
  11. class CCameraMove;
  12. #include "util.h"
  13. #include "main.h"
  14. class CCameraMove
  15. {
  16. public:
  17. // Member Functions
  18. virtual HRESULT Init(D3DXVECTOR3 vStartLoc, D3DXVECTOR3 vStartTangent, D3DXVECTOR3 vUpVec);
  19. virtual HRESULT CreateNextMove(D3DXVECTOR3 vSourceLoc, D3DXVECTOR3 vSourceTangent, D3DXVECTOR3 vDestLoc, D3DXVECTOR3 vDestTangent);
  20. virtual HRESULT CreateNextRotate(D3DXVECTOR3 vSourceLoc, D3DXVECTOR3 vSourceTangent, D3DXVECTOR3 vDestTangent);
  21. virtual HRESULT CreateNextWait(int nBatch, int nPreFetch, float fTime = -1.0f);
  22. virtual HRESULT SetCamera(IDirect3DDevice8 * pD3DDevice, FLOAT fTimeKeyIn);
  23. virtual HRESULT DeleteAllMovements(float fCurrentTime);
  24. CCameraMove();
  25. ~CCameraMove();
  26. private:
  27. // Helper Functions
  28. // Member Variables
  29. D3DXVECTOR3 m_vUpVec;
  30. D3DXVECTOR3 m_vLocLast; // This is the last location we were in.
  31. D3DXVECTOR3 m_vLookAtLast; // This is the last location we were looking at.
  32. D3DXVECTOR3 m_vEyePrev;
  33. D3DXVECTOR3 m_vLookAtPrev;
  34. HDPA m_hdpaMovements; // This contains CAMERA_MOVEMENT items.
  35. int m_nCurrent;
  36. int m_nFramesFromCurrent;
  37. float m_fTimeInPreviousMovements;
  38. float m_fTimeWarp;
  39. float m_fTimeToRotate;
  40. float m_fTimeToWalk;
  41. float m_fTimeToLookAtPainting;
  42. int m_nMinTurnFrames;
  43. int m_nMinWalkFrames;
  44. int m_nMaxTurnFrames;
  45. int m_nMaxWalkFrames;
  46. };
  47. #endif // CAMERAMOVE_H