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

📄 branch.h

📁 此文档是用vistual studio 2005 开发的用来描述3D-tree 的生长过程
💻 H
字号:
// Branch.h

#ifndef _3D_MyTree_BRANCH_
#define _3D_MyTree_BRANCH_

class Branch {
public :
	Branch( int depth, float length, float twist, float expand, float radius, int slices, char* bmpPath );
	~Branch();

	void setDepth( int depth );
	void setSlices( int slices );
	void setRadius( float radius );
	void setLength( float length );
	void setTwist( float twist );
	void setExpand( float expand );
	void setTexture( char* bmpPath );

	int getDepth();
	int getSlices();
	float getRadius();
	float getLength();
	float getTwist();
	float getExpand();
	unsigned int getTexture();
	void draw( float baseRadius, float topRadius, float length );

private :
	int depth;  
	float radius;
	float length;  // The length of the branch.
	float twist;  // The angle with coordinate X.
	float expand;  // The angle with coordinate Y.
	int slices;
	unsigned int texture;  // The texture of bark.
};

#endif  // _3D_MyTree_BRANCH_

⌨️ 快捷键说明

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