A
download scene.h
Language: C++
LOC: 21
Project Info
TableHockey3D(tablehockey)
Server: SourceForge
Type: cvs
...ey\CVSROOT\tablehockey\src\
   Application.cpp
   Application.h
   Camera.cpp
   Camera.h
   Cube.cpp
   Cube.h
   Data.cpp
   Data.h
   Disk.cpp
   Disk.h
   FloatingText.cpp
   FloatingText.h
   Floor.cpp
   Floor.h
   Input.cpp
   Input.h
   Light.cpp
   Light.h
   log.cpp
   log.h
   main.cpp
   mmgr.cpp
   mmgr.h
   Model.cpp
   Model.h
   nommgr.h
   Puck.cpp
   Puck.h
   Pyramid.cpp
   Pyramid.h
   scene.cpp
   scene.h
   SmartPtr.h
   Sound.cpp
   Sound.h
   TableHockey.dsp
   TableHockey.dsw
   TestScene.cpp
   TestScene.h
   text.cpp
   text.h
   TextHelp.cpp
   TextHelp.h
   texture.cpp
   texture.h
   TexturedCube.cpp
   TexturedCube.h
   timer.cpp
   timer.h
   View.cpp
   View.h

// Renderer.h: interface for the CRenderer class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RENDERER_H__BFD9A961_9F50_11D4_A9EA_00105A2EAD2D__INCLUDED_)
#define AFX_RENDERER_H__BFD9A961_9F50_11D4_A9EA_00105A2EAD2D__INCLUDED_

#include "smartptr.h"

#include "Camera.h"	// Added by ClassView

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/**
 * This is the base class for a scene.
 *
 * A scene describes everything on the screen and processes the user
 * input. A menu for example will print various options, highlight the
 * active choice and scroll down/up if the user presses the arrow keys.
 *
 * Every scene will be created by CView. First "Init()" is called which
 * should be used to initialize all objects. Derive a class from CModel and 
 * CText to create your own objects and overwrite the "Draw()" function to
 * colorize/texturize and position your models. 
 *
 * "Update()" is called when the next frame of the scene. 
 * should be shown. Do all drawing and input processing here. Please note
 * that you shouldn't rely on a constant framerate, better use your own
 * timer.
 *
 * If the size of the window changes, "Resize()" will be called.
 */
class CScene  
{
public:
	/// pure virtual function to process the user input. MUST be overwritten!
	virtual void ProcessInput() = 0;
	/// pure virtual function to process the next frame (draw screen and process input)
	virtual void Update() = 0;
	/// initialize the scene
	virtual bool Init();
	/// clear the screen
	void Clear();
	/// window was resized
	void Resize();

	/// constructor
	CScene();
	/// destructor
	virtual ~CScene();

protected:
	RefCountPtr<CCamera> pCamera;
};

#endif // !defined(AFX_RENDERER_H__BFD9A961_9F50_11D4_A9EA_00105A2EAD2D__INCLUDED_)

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us