📄 branch.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 + -