/*************************************************************************/ /* File : MyVRManager.h */ /* */ /* Author : Virtools */ /* */ /* The VR Sdk being under development, the following implementation and */ /* recommendation will problably change for the official release. */ /*************************************************************************/ #ifndef MyVRManager_H #define MyVRManager_H "$Id:$" #include "VRBaseManager.h" /************************************************ Defines ***********************************************/ #define MyVRManagerGUID CKGUID(0x19ACFF87,0x26FB0963) /************************************************ Struct ***********************************************/ struct MyWarpData { float Distance; }; /************************************************* Name: MyVRManager Summary: This manager implements the main VR events as a code sample. *************************************************/ class MyVRManager : public VRBaseManager { public : MyVRManager(CKContext *Context, CKBOOL &oError); ~MyVRManager(); // CKBaseManager Events // OnCKInit and OnCKEnd are already implemented by VRBaseManager. // As we don't need to implement any more events in this sample, // we don't declare anything more // VRBaseManager Events virtual CKERROR OnParse(); virtual CKERROR OnViewCreate(VRView* iView); virtual CKERROR OnViewDelete(VRView* iView); virtual CKERROR OnViewWarp(CKRenderContext* rc, VRView* iView); virtual CKDWORD GetValidVRFunctionsMask() { return VRMANAGER_FUNC_OnParse | VRMANAGER_FUNC_OnViewCreate | VRMANAGER_FUNC_OnViewDelete | VRMANAGER_FUNC_OnViewWarp ; } protected : CKERROR LoadWarpEnvironment(); // Warping Tokens CKBOOL m_TokenOK; XString m_WarpFile; int m_WarpWidth; int m_WarpHeight; // Warping Environment CK3dEntity* m_WarpEntity; CKMesh* m_WarpMesh; CKCamera* m_WarpCamera; CKMaterial* m_WarpMaterial; }; #endif