deargui-vpl/ref/virtools/Samples/VRSdk/SampleBlend/Sources/MyVRManager.h

89 lines
2.2 KiB
C++

/*************************************************************************/
/* 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(0xed45607,0x5e3e5257)
/************************************************
Struct
***********************************************/
struct MyWarpData
{
//float Distance;
XString Texturename;
};
/*************************************************
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 CreateBlendingEnvironment(VRView* iView);
// Warping Tokens
CKBOOL m_TokenOK;
int m_WarpWidth;
int m_WarpHeight;
int m_BlendWidth;
int m_BlendHeight;
// Blending Environment
CKLevel* m_level;
CK2dEntity* m_BlendEntity;
CKMaterial* m_BlendMaterial;
CKTexture* m_BlendTexture;
CK2dEntity* m_OriginalViewTargetSprite;
CKMaterial* m_OriginalViewMaterial;
CKCamera* m_BlendCamera;
};
#endif