亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? load3ds.h

?? 3ds 文件讀取程序
?? H
字號:
// Load3DS.h: interface for the CLoad3DS class.
//     原始代碼來自:GameTutorials
//     改編:
//     沈陽藍雨視景科技
//     http://www.bvrain.com
//     bvrain@163.com  chglei@163.com
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LOAD3DS_H__69E7E7AC_7A07_4479_9687_AC19CED0E3CF__INCLUDED_)
#define AFX_LOAD3DS_H__69E7E7AC_7A07_4479_9687_AC19CED0E3CF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "3dmath.h"
//向量STL
#include <vector>
using namespace std;

//>------ Primary Chunk, at the beginning of each file
#define PRIMARY       0x4D4D

//>------ Main Chunks
#define OBJECTINFO    0x3D3D				// This gives the version of the mesh and is found right before the material and object information
#define VERSION       0x0002				// This gives the version of the .3ds file
#define EDITKEYFRAME  0xB000				// This is the header for all of the key frame info

//>------ sub defines of OBJECTINFO
#define MATERIAL	  0xAFFF				// This stored the texture info
#define OBJECT		  0x4000				// This stores the faces, vertices, etc...

//>------ sub defines of MATERIAL
#define MATNAME       0xA000				// This holds the material name
#define MATDIFFUSE    0xA020				// This holds the color of the object/material
#define MATMAP        0xA200				// This is a header for a new material
#define MATMAPFILE    0xA300				// This holds the file name of the texture

#define OBJECT_MESH   0x4100				// This lets us know that we are reading a new object

//>------ sub defines of OBJECT_MESH
#define OBJECT_VERTICES     0x4110			// The objects vertices
#define OBJECT_FACES		0x4120			// The objects faces
#define OBJECT_MATERIAL		0x4130			// This is found if the object has a material, either texture map or color
#define OBJECT_UV			0x4140			// The UV texture coordinates


// This class handles all of the loading code
class CLoad3DS
{
//把這幾個結構體聲明到類里面,使封裝更徹底
public:
	// Here is our structure for our 3DS indicies (since .3DS stores 4 unsigned shorts)
	struct tIndices {							

		unsigned short a, b, c, bVisible;		// This will hold point1, 2, and 3 index's into the vertex array plus a visible flag
	};

	// This holds the chunk info
	struct tChunk
	{
		unsigned short int ID;					// The chunk's ID		
		unsigned int length;					// The length of the chunk
		unsigned int bytesRead;					// The amount of bytes read within that chunk
	};

	// This is our face structure.  This is is used for indexing into the vertex	
	// and texture coordinate arrays.  From this information we know which vertices
	// from our vertex array go to which face, along with the correct texture coordinates.
	struct tFace
	{
		int vertIndex[3];			// indicies for the verts that make up this triangle
		int coordIndex[3];			// indicies for the tex coords to texture this face
	};

	// This holds the information for a material.  It may be a texture map of a color.
	// Some of these are not used, but I left them because you will want to eventually
	// read in the UV tile ratio and the UV tile offset for some models.
	struct tMaterialInfo
	{
		char  strName[255];			// The texture name
		char  strFile[255];			// The texture file name (If this is set it's a texture map)
		BYTE  color[3];				// The color of the object (R, G, B)
		int   texureId;				// the texture ID
		float uTile;				// u tiling of texture  (Currently not used)
		float vTile;				// v tiling of texture	(Currently not used)
		float uOffset;			    // u offset of texture	(Currently not used)
		float vOffset;				// v offset of texture	(Currently not used)
	} ;
	//材料引用類
	class tMatREF
	{
	public:
		int nMaterialID;
		USHORT *pFaceIndexs;
		int nFaceNum;
		bool bHasTexture;
	public:
		tMatREF()
		{
			nMaterialID=-1;
			nFaceNum=0;
			pFaceIndexs=NULL;
			bHasTexture=false;
		}
	};

	// This holds all the information for our model/scene. 
	// You should eventually turn into a robust class that 
	// has loading/drawing/querying functions like:
	// LoadModel(...); DrawObject(...); DrawModel(...); DestroyModel(...);
	struct t3DObject 
	{
		int  numOfVerts;			// The number of verts in the model
		int  numOfFaces;			// The number of faces in the model
		int  numTexVertex;			// The number of texture coordinates
		int  numOfMaterials;		// the 材料數量
		int  materialID;			// The texture ID to use, which is the index into our texture array
		bool bHasTexture;			// This is TRUE if there is a texture map for this object
		char strName[255];			// The name of the object
		CVector3  *pVerts;			// The object's vertices
		CVector3  *pNormals;		// The object's normals
		CVector2  *pTexVerts;		// The texture's UV coordinates
		tFace *pFaces;				// The faces information of the object
		tMatREF	      *pMaterialREFS;// 材料IDS
		
	};

	// This holds our model information.  This should also turn into a robust class.
	// We use STL's (Standard Template Library) vector class to ease our link list burdens. :)
	struct t3DModel 
	{
		int numOfObjects;					// The number of objects in the model
		int numOfMaterials;					// The number of materials for the model
		//改名了	
		vector<tMaterialInfo> vctMaterials;	// The list of material information (Textures and colors)
		vector<t3DObject> vctObjects;			// The object list for our model
	};

public:
	//構造
	CLoad3DS();								
	//析構
	~CLoad3DS();
	// 載入3ds文件
	bool Import3DS(t3DModel *pModel, char *strFileName);

private:
	// This reads in a string and saves it in the char array passed in
	int GetString(char *);

	// This reads the next chunk
	void ReadChunk(tChunk *);

	// This reads the next large chunk
	void ProcessNextChunk(t3DModel *pModel, tChunk *);

	// This reads the object chunks
	void ProcessNextObjectChunk(t3DModel *pModel, t3DObject *pObject, tChunk *);

	// This reads the material chunks
	void ProcessNextMaterialChunk(t3DModel *pModel, tChunk *);

	// This reads the RGB value for the object's color
	void ReadColorChunk(tMaterialInfo *pMaterial, tChunk *pChunk);

	// This reads the objects vertices
	void ReadVertices(t3DObject *pObject, tChunk *);

	// This reads the objects face information
	void ReadVertexIndices(t3DObject *pObject, tChunk *);

	// This reads the texture coodinates of the object
	void ReadUVCoordinates(t3DObject *pObject, tChunk *);

	// This reads in the material name assigned to the object and sets the materialID
	void ReadObjectMaterial(t3DModel *pModel, t3DObject *pObject, tChunk *pPreviousChunk,vector<tMatREF*> *pvmatids);
	
	// This computes the vertex normals for the object (used for lighting)
	void ComputeNormals(t3DModel *pModel);

	// This frees memory and closes the file
	void CleanUp();
	
	// The file pointer
	FILE *m_FilePointer;
};


#endif // !defined(AFX_LOAD3DS_H__69E7E7AC_7A07_4479_9687_AC19CED0E3CF__INCLUDED_)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜臀av性久久久久av蜜臀妖精| 99久久伊人网影院| 九一久久久久久| 精品在线视频一区| 天天综合天天综合色| 日韩影院精彩在线| 日韩女同互慰一区二区| 91在线观看成人| 在线日韩av片| 6080日韩午夜伦伦午夜伦| 日韩免费观看2025年上映的电影| 精品国产乱子伦一区| 欧美mv日韩mv亚洲| 26uuu色噜噜精品一区二区| 国产成人午夜精品5599| www.欧美日韩国产在线| 欧美怡红院视频| 69成人精品免费视频| 久久久久成人黄色影片| 亚洲视频每日更新| 日本视频一区二区三区| 久久成人麻豆午夜电影| 欧美一区二区三区日韩| 久久伊99综合婷婷久久伊| 国产精品电影院| 午夜不卡av免费| 福利91精品一区二区三区| 欧美在线免费观看视频| www激情久久| 一区二区三区在线播放| 老司机午夜精品99久久| 国产一区二区免费视频| 色婷婷久久一区二区三区麻豆| 欧美美女一区二区在线观看| 亚洲成人手机在线| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产69精品久久99不卡| 色狠狠一区二区| 精品久久久久香蕉网| 国产精品久久久久精k8 | 日韩中文字幕区一区有砖一区 | 欧美日韩国产成人在线免费| 久久久久久久久久久久久女国产乱 | av一区二区三区四区| 91精选在线观看| 国产精品热久久久久夜色精品三区 | 久久亚洲二区三区| 一区二区三区资源| 免费人成在线不卡| 国产不卡一区视频| 91精品国产综合久久婷婷香蕉| 中文在线一区二区| 亚洲一区二区在线观看视频| 国产一区在线观看视频| 欧美日韩亚洲综合在线| 国产精品三级电影| 九九视频精品免费| 欧美少妇bbb| 国产成人在线免费| 日韩视频一区在线观看| 夜夜嗨av一区二区三区四季av | bt7086福利一区国产| 精品久久人人做人人爱| 亚洲成a天堂v人片| 91免费观看视频| 国产日韩三级在线| 精品一区二区免费| 欧美日韩在线不卡| 亚洲乱码日产精品bd| 国产成都精品91一区二区三| 精品少妇一区二区三区免费观看 | 亚洲va韩国va欧美va精品| 国产成a人亚洲| 欧美一个色资源| 亚洲成人午夜电影| 成人激情电影免费在线观看| 久久久久国产精品免费免费搜索| 日韩福利电影在线| 欧美日韩中文精品| 亚洲人成网站精品片在线观看| 国产xxx精品视频大全| 久久天堂av综合合色蜜桃网| 奇米影视7777精品一区二区| 欧美伦理视频网站| 午夜精品久久一牛影视| 欧美三级日韩在线| 一区二区欧美精品| 欧美午夜精品久久久久久超碰 | 男人的天堂亚洲一区| 欧美性videosxxxxx| 一区二区三区在线免费| 成人深夜在线观看| 国产精品网站在线观看| 成人自拍视频在线| 中文一区二区完整视频在线观看| 国产精品一二三四区| 国产欧美日韩激情| 成人免费高清视频在线观看| 欧美日韩精品一区二区天天拍小说 | 久久不见久久见中文字幕免费| 日韩中文字幕一区二区三区| 日韩欧美一级二级三级| 国产成人鲁色资源国产91色综 | 欧美日韩在线电影| 久久精品噜噜噜成人av农村| 日本一区免费视频| 欧美揉bbbbb揉bbbbb| 久久99精品久久久久久| 国产精品久久久久三级| 欧美日韩一区二区电影| 国产九色精品成人porny| 《视频一区视频二区| 欧美日韩国产123区| 国产美女娇喘av呻吟久久| ...av二区三区久久精品| 91麻豆精品国产自产在线| 国产精品综合在线视频| 亚洲激情av在线| www一区二区| 欧美图片一区二区三区| 国产乱人伦偷精品视频免下载| 亚洲精品国产成人久久av盗摄| 精品国产污网站| 日本精品裸体写真集在线观看| 男女性色大片免费观看一区二区| 一区二区三区四区不卡视频| 欧美美女一区二区| 丰满白嫩尤物一区二区| 亚洲成av人片观看| 国产精品美女久久久久久久久久久 | 国产婷婷色一区二区三区| 欧美在线观看你懂的| 精品一区二区三区av| 一区二区三区成人在线视频| 久久精品网站免费观看| 欧美老肥妇做.爰bbww| www.性欧美| 国模少妇一区二区三区| 亚洲电影中文字幕在线观看| 国产精品美女久久久久久| 日韩免费一区二区三区在线播放| 91福利精品第一导航| 高清视频一区二区| 久久99热国产| 香蕉久久夜色精品国产使用方法 | 色综合久久久久久久| 国产一区999| 蜜桃视频在线一区| 亚洲午夜在线电影| 亚洲日韩欧美一区二区在线| 国产亚洲欧美日韩在线一区| 欧美一区二区福利在线| 欧美日韩三级在线| 自拍偷拍国产精品| 国产区在线观看成人精品| 欧美一级黄色大片| 欧美亚洲一区二区在线观看| a在线欧美一区| 国产成人在线观看| 国产乱一区二区| 久久99精品国产麻豆婷婷洗澡| 肉肉av福利一精品导航| 亚洲国产另类av| 一区二区三区资源| 亚洲免费观看在线视频| 日韩伦理av电影| 中文字幕久久午夜不卡| 久久久激情视频| 久久你懂得1024| 精品成人一区二区| 日韩欧美黄色影院| 日韩三级在线观看| 3d成人h动漫网站入口| 欧美喷水一区二区| 欧美色爱综合网| 欧美亚洲愉拍一区二区| 欧美日韩中文字幕一区| 欧美性色黄大片手机版| 在线视频欧美精品| 欧美视频你懂的| 91久久精品一区二区三| 在线观看网站黄不卡| 在线观看视频欧美| 欧美日韩国产一级片| 91精品婷婷国产综合久久性色 | 国产麻豆视频精品| 国产69精品久久久久777| 国产盗摄视频一区二区三区| 成人美女在线视频| 99久久婷婷国产综合精品| 99精品视频免费在线观看| 91香蕉视频污| 在线观看日韩毛片| 欧美日产在线观看| 精品蜜桃在线看| 国产欧美久久久精品影院| 国产精品毛片a∨一区二区三区| 亚洲欧洲精品一区二区三区| 亚洲精品视频在线看| 亚洲国产aⅴ天堂久久|