branch.h
来自「此文档是用vistual studio 2005 开发的用来描述3D-tree 」· C头文件 代码 · 共 39 行
H
39 行
// 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 + =
减小字号Ctrl + -
显示快捷键?