www.pudn.com > QuadTreeLOD4cs.rar > 3DTree.h, change:2006-06-12,size:1415b


// 3DTree.h: interface for the C3DTree class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_3DTREE_H__C1CB6201_9BF6_11D6_813B_5254AB37CDC9__INCLUDED_) 
#define AFX_3DTREE_H__C1CB6201_9BF6_11D6_813B_5254AB37CDC9__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
//#include "structdef.h" 
#include "texture.h" 
#include "Vector.h"	// Added by ClassView 
struct VERTEX 
{ 
	VERTEX(){} 
	VERTEX(float x,float y,float z){   xpos=x; ypos=y; zpos=z;}  
	float xpos; 
	float ypos; 
	float zpos; 
}; 
class C3DTree   
{ 
	CVector3 m_vPos; 
public: 
	CVector3 m_vScale; 
	void CreateGreenTreeList(); 
	void CreateYellowTreeList(); 
	SIZE GetSize(); 
	static void LoadRes(); 
	CVector3 GetPos(); 
	C3DTree(); 
	virtual ~C3DTree(); 
    bool Init3DTree(int treeType,float treeSize=0.2f); 
	void Render3DTree(); 
	void SetPos(float x,float y,float z){m_vPos.x = x,m_vPos.y = y;m_vPos.z = z;}; 
 
protected: 
    void Draw3DTree(); 
	void DrawBranch(float width,float height); 
	void DrawYellowTree(); 
	void DrawGreenTree(); 
	void DrawTop(float width,float height); 
 
	float m_szTree; 
	float m_height; 
	int   m_type; 
 
//	float m_fPosX,m_fPosY,m_fPosZ; 
//    unsigned int texTreeBody; 
//	unsigned int texBranch; 
	static CTexture m_Txt[5]; 
private: 
	 
}; 
 
#endif // !defined(AFX_3DTREE_H__C1CB6201_9BF6_11D6_813B_5254AB37CDC9__INCLUDED_)