⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c3dbase.h

📁 This package includes a 3-D game engine example application and a document describing the most impor
💻 H
字号:
    /*
    *
============================================================================
    *  Name     : C3DBase.h
    *  Part of  : Example3D
    *  Created  : 12/14/2003 by Forum Nokia
    *  Description:
    *     This is the project specification file for Example3D.
    *     Initial content was generated by Series 60 AppWizard.
    *
    *  Version  : 1.0.0
    *  Copyright: Forum Nokia
    *
============================================================================
    */

#ifndef __C3DBASE_H__
#define __C3DBASE_H__


// INCLUDES
#include <e32base.h>
#include "3DTypes.h"
   

// CLASS DECLARATION

/**
*  Base class for all 3D code
*  Purpose for this class is to contain
*  Functions and data common to many classes
*  in the 3D-Engine
*/


class C3DBase 
	: public CBase
	{
	public:

		/// Two-phased constructor
		/// @param aScreenSize drawing bitmap size for frustum calculation
		static C3DBase* NewL( const TSize& aScreenSize );

		/// Destructor
		~C3DBase();

	private:

		/// Default costructor
		/// @param aScreenSize drawing bitmap size for frustum calculation
		C3DBase( const TSize& aScreenSize );
		
		/// Second phase constructor
		void ConstructL();

	public: // New methods

		/// address of cosine table
		TInt16*		CosTable();

		/// address of sinus table
		TInt16*		SinTable();

		/// the view frustum
		TFrustum&	ViewFrustum();

		/// quick sort entries of aZ with indexes aN
		/// between index aLow..aHigh
		void QSort( TInt* aZ, TInt* aN, TInt aLow, TInt aHigh );

		/// Basic 3D rotate functions
		/// These aren't really used by this engine
		/// but they are useful for game creators
		/// like rotating wheel positions with car angle
		TVertex RotateX( const TVertex& aVertex, TInt aAngle );
		TVertex RotateY( const TVertex& aVertex, TInt aAngle );
		TVertex RotateZ( const TVertex& aVertex, TInt aAngle );
		

	private: // Data

		TFrustum	iViewFrustum;
		TInt16*		iCos;
		TInt16*		iSin;

		TUint16*	iScreenAddress;
		TSize		iScreenSize;
	};


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -