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

📄 volumecreator.h

📁 java实现的简单的分形树。简单易学!是学习分形知识的很好的例子。其java语法简单
💻 H
字号:
// --------------------------------------------------------------------------
// Dingus project - a collection of subsystems for game/graphics applications
// --------------------------------------------------------------------------

#ifndef __VOLUME_TEXTURE_CREATOR_H
#define __VOLUME_TEXTURE_CREATOR_H

namespace dingus {


class IVolumeCreator : public CRefCounted {
public:
	typedef DingusSmartPtr<IVolumeCreator>	TSharedPtr;
public:
	virtual ~IVolumeCreator() = 0 { }
	virtual IDirect3DVolumeTexture9* createTexture() = 0;
};


class CAbstractVolumeCreator : public IVolumeCreator {
public:
	CAbstractVolumeCreator( DWORD usage, D3DFORMAT format, D3DPOOL pool )
		:	mUsage(usage), mFormat(format), mPool(pool) { }

protected:
	DWORD		getUsage() const { return mUsage; }
	D3DFORMAT	getFormat() const { return mFormat; }
	D3DPOOL		getPool() const { return mPool; }
private:
	DWORD		mUsage;
	D3DFORMAT	mFormat;
	D3DPOOL		mPool;
};

/// Creates fixed size texture
class CFixedVolumeCreator : public CAbstractVolumeCreator {
public:
	CFixedVolumeCreator( int width, int height, int depth, int levels, DWORD usage, D3DFORMAT format, D3DPOOL pool )
		:	CAbstractVolumeCreator(usage,format,pool), mWidth(width), mHeight(height), mDepth(depth), mLevels(levels) { }

	virtual IDirect3DVolumeTexture9* createTexture();

private:
	int			mWidth, mHeight, mDepth, mLevels;
};


}; // namespace

#endif

⌨️ 快捷键说明

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