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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? quake3format.htm

?? 用opengl實(shí)現(xiàn)的bsp管理3D場(chǎng)景的算法
?? HTM
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
<html>

<head>
<TITLE>GameTutorials - Quake 3 BSP Format</TITLE>
<META NAME="Description" CONTENT="GameTutorials brings you the best programming tutorials from beginner (NO experience) to advanced topics AND keeps you in touch with all the latest game industry news.">
<META NAME="Keywords" CONTENT="programming tutorials, video games, game tutorials, programming, C, C++, Windows, Win32, OpenGL, DirectX">
<link rel="stylesheet" href="../default.css">
</head>

<body bgcolor="#000000" text="#f0f0ff" link="#7396dc" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">

<!-- main table -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>                      
	<!-- left column -->
	<td valign="top" background="http://www.gametutorials.com/images/Left_Seamless.jpg" width="211" height="661">
        <p align="center">
        <map name="FPMap0">
        <area href="http://www.gametutorials.com" shape="RECT" coords="50,270,127,300">
        <area href="http://www.gametutorials.com/Tutorials/tutorials.htm" shape="RECT" coords="46,317,131,348">
        <area href="http://www.gametutorials.com/forum/" shape="RECT" coords="46,374,134,402">
        <area href="http://www.gametutorials.com/CodeDump/CodeDump_Pg1.htm" shape="RECT" coords="49,424,142,458">
        <area href="http://www.gametutorials.com/D&amp;G/D&amp;G_Main.htm" shape="RECT" coords="50,480,157,513">
        <area href="http://gametutorials.tech-engine.com/" shape="RECT" coords="47,536,138,571">
        <area href="http://www.gametutorials.com/links.htm" shape="RECT" coords="49,594,137,627">
        </map><img border="0" src="http://www.gametutorials.com/images/Left.jpg" usemap="#FPMap0" width="211" height="661"></p>
        
        <p><br></p> <!-- Spacing -->
        <p align="center"><font face="Verdana" size="1">Link to us:</font><br>
        <a href="http://www.gametutorials.com/download/GT_Link.zip"><img border="0" src="http://www.gametutorials.com/images/GameTutorials_Link.jpg" width="88" height="31"></a></p>
      	
        
	</td>
	<!-- center column -->
	<td valign="top">
		<table border="0" cellpadding="0" cellspacing="0" height="568">
		<tr>    
			<td valign="top" height="207" width="609">
                <p><img border="0" src="http://www.gametutorials.com/images/Title.jpg" width="609" height="207"></p>
			</td>
		</tr>
		<tr>
			<td valign="top" align="center" height="361">
				<!-- main content area -->
				<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" width="561">
	            <tr>
              		<td width="559">
              		
  
  <p align="center"><br><b><span style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt">Unofficial</span></b><span style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt"><b>
  Quake
  3 BSP Format<br>
  </b>
  </span><span style="mso-bidi-font-size: 10.0pt"><font size="3"><b>Author:&nbsp;&nbsp;&nbsp;&nbsp;
  Ben "Digiben" Humphrey</b></font></span><b><span style="FONT-SIZE: 20pt; mso-bidi-font-size: 10.0pt"><O:P>
  </O:P>
  </span></b></p> 
  <p class="MsoBodyText">
  </p>
  <table width="571">
    <tr bgColor="#2165ae">
      <td height="17" width="563"><b><font size="5">Introduction</font></b></td>
    </tr>
  </table>
  <p class="MsoNormal">This document was created as an aid to the <b>Quake3 BSP</b>
  tutorial series featured on <a href="http://www.GameTutorials.com"><b>www.GameTutorials.com</b></a>.&nbsp;
  &nbsp;<O:P>
  &nbsp;The information is what I have found, and it's possibly that it's
  incorrect or just blatently wrong.&nbsp; I suggest you use this as a reference
  and a guide, not the end all file format doc for the Quake3 .bsp file
  format.&nbsp; With that out of the way, let's load some sweet levels!
  </p>
  <p class="MsoNormal">The Quake3 level format, .bsp, stores most of the
  information about the level.&nbsp; There are other files such as .shader,
  .arena and .aas, which store bot and texture shader information.&nbsp; The .bsp
  file is stored in what is called a IBSP format.&nbsp; That means that the
  length and offsets of different sections in the file are stored in what's know
  as <b>lumps</b>.&nbsp; The older version of Quake use this same lump format,
  but different information is stored in each version of Quake.&nbsp; If you can
  read in Quake 3 levels, it's not a lot of changes to write a Quake 2 level
  loader.
  </p>
  <p class="MsoNormal">If you don't know what <b>BSP</b> stands for yet, it
  means <b>Binary Space Partition(ing)</b>.&nbsp; You would create a BSP
  tree.&nbsp; That means that there is a parent node, and at most, 2 children attached
  to each parent.&nbsp; These children are called the <b>front </b>and <b>back </b>children.&nbsp;
  I won't attempt to teach you how to create or manage a BSP tree here, but
  there is a BSP FAQ that SGI put out floating around the internet somewhere
  that has a ton of information.&nbsp; Better yet, I suggest you take the BSP
  class at <a href="http://www.GameInstitute.com"><b>www.GameInstitute.com</b></a>.&nbsp;
  I personally took this class and was quite satisfied.&nbsp; It teaches all you
  need to know about BSP trees.
  </p>
  <p class="MsoBodyText">
  </p>
  <table width="572">
    <tr bgColor="#2165ae">
      <td height="17" width="564"><b><font size="5">Lumps</font></b></td>
    </tr>
  </table>
  <p class="MsoBodyText">
  Like we mentioned before, lumps hold the length in bytes and offset into the
  file for a given section.&nbsp; Below is an enum <b>eLumps</b> that holds all
  the lumps and their order in the file:
  </p>
  <p class="MsoBodyText"><code>
  enum <b> eLumps</b><br>
  {<br>&nbsp;&nbsp;&nbsp; kEntities =
     0,&nbsp;&nbsp;&nbsp;&nbsp; // Stores
  player/object positions, etc...<br>
  &nbsp;&nbsp;&nbsp; kTextures,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores texture information<br>
  &nbsp;&nbsp;&nbsp; kPlanes,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the splitting planes<br>
  &nbsp;&nbsp;&nbsp; kNodes,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the BSP nodes<br>
  &nbsp;&nbsp;&nbsp; kLeafs,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the leafs of the nodes<br>
  &nbsp;&nbsp;&nbsp; kLeafFaces,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
  Stores the leaf's indices into the faces<br>
  &nbsp;&nbsp;&nbsp; kLeafBrushes,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Stores the
  leaf's indices into the brushes<br>
  &nbsp;&nbsp;&nbsp; kModels,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the info of world models<br>
  &nbsp;&nbsp;&nbsp; kBrushes,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the brushes info (for collision)<br>
  &nbsp;&nbsp;&nbsp; kBrushSides,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Stores
  the brush surfaces info<br>
  &nbsp;&nbsp;&nbsp; kVertices,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the level vertices<br>
    &nbsp;&nbsp;&nbsp;
  kIndices,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Stores the level&nbsp;indices<br>
  &nbsp;&nbsp;&nbsp; kShaders,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the shader files (blending, anims..)<br>
  &nbsp;&nbsp;&nbsp; kFaces,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores the faces for the level<br>
  &nbsp;&nbsp;&nbsp; kLightmaps,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
  Stores the lightmaps for the level<br>
  &nbsp;&nbsp;&nbsp; kLightVolumes,&nbsp;&nbsp;&nbsp;&nbsp; // Stores extra
  world lighting information<br>
  &nbsp;&nbsp;&nbsp; kVisData,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // Stores PVS and cluster info (visibility)<br>
  &nbsp;&nbsp;&nbsp; kMaxLumps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // A constant to store the number of lumps<br>
  };<br>
  <br>
  <font face="Times New Roman" size="3">Each on of these sections has a offset
  and a size in bytes that need to be read in.&nbsp; In the next sections we
  will examine the structures needed to read in each lump.</font></code>
  </p>
  <p class="MsoBodyText"><code><font face="Times New Roman" size="3">Here is a
  lump structure.&nbsp; The <b>offset</b> is the position into the file that is
  the starting point of the current section.&nbsp; The <b>length</b> is the
  number of bytes that this lump stores.</font></code>
  </p>
  <p class="MsoBodyText">
  <code><br>
  struct <b>tBSPLump</b><br>
  {<br>
  &nbsp;&nbsp;&nbsp; int offset;<br>
  &nbsp;&nbsp;&nbsp; int length;<br>
  };</code>
  </p>
  <p class="MsoBodyText">
  <br>
  Let's give an example of reading in the vertices (<b>kVertices</b>) for the
  level.&nbsp; Once the lumps are read in, to find the number of vertices in the
  level we do this:
  </p>
  <p class="MsoBodyText">
  numOfVerts = lumps[kVertices].length / sizeof(tBSPVertex);
  </p>
  <p class="MsoBodyText">We index the <b>lumps[]</b> array with the <b>kVertices</b>
  constant, then divide that lumps <b>length</b> by the size of the <b>tBSPVertex</b>
  structure in bytes, which we will define later on.&nbsp; It just so happens
  it's 44 bytes.&nbsp; If the length is 3388, then 3388 / 44 = 77.&nbsp; We now
  know there is 77 vertices in the .bsp file.&nbsp; We then need to position the
  file pointer to the lump's <b>offset</b>, and start reading in 77 <b>tBSPVertex
  </b>structures into our dynamically allocated vertex array.&nbsp; I use <b>fread()</b>
  and <b>fseek()</b> for the file manipulation.&nbsp; This is of course, ONLY if
  you are not reading from the .zip file.&nbsp; I am strictly speaking of
  loading the .bsp file unzipped.
  </p>
  <p class="MsoBodyText">Now that we understand the basics of lumps, let's move
  on to the header structure, along with the rest of the structures for each
  lump read in.<br>
  </p>
  <p class="MsoBodyText">
  </p>
  <table width="570">
    <tr bgColor="#2165ae">
      <td height="17" width="562"><b><font size="5">BSP Header</font></b></td>
    </tr>
  </table>
  <p class="MsoBodyText">The very first thing that needs to be read in for the .bsp
  file is the header.&nbsp; The header contains a 4 character ID, then an
  integer that holds the version.
  </p>
  <p class="MsoBodyText">
  <code>
  <br>
  struct <b> tBSPHeader</b><br>
  {<br>
  &nbsp;&nbsp;&nbsp; char strID[4];&nbsp;&nbsp;&nbsp;&nbsp; // This should
  always be 'IBSP'<br>
  &nbsp;&nbsp;&nbsp; int version;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This
  should be 0x2e for Quake 3 files<br>
  };
  </code>
  </p>
  <p class="MsoBodyText">
  </p>
  <table width="570">
    <tr bgColor="#2165ae">
      <td height="17" width="562"><b><font size="5">Vertices</font></b></td>
    </tr>
  </table>
  <p class="MsoBodyText">
  This structure stores the vertex information.&nbsp; There is a position,
  texture and lightmap coordinates, the vertex normal and color.&nbsp; To
  calculate the number of vertices in the lump you divide the length of the lump
  by the sizeof(<b>tBSPVertex</b>).
  </p>
  <p class="MsoBodyText">
  <code>
  <br>
  struct <b> tBSPVertex</b><br>
  {<br>
  &nbsp;&nbsp;&nbsp; float vPosition[3];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // (x, y,
  z) position.&nbsp;<br>
  &nbsp;&nbsp;&nbsp; float vTextureCoord[2];&nbsp; // (u, v) texture coordinate<br>
  &nbsp;&nbsp;&nbsp; float vLightmapCoord[2]; // (u, v) lightmap coordinate<br>
  &nbsp;&nbsp;&nbsp; float vNormal[3];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // (x, y, z) normal vector<br>
  &nbsp;&nbsp;&nbsp; byte color[4];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // RGBA color for the vertex&nbsp;<br>
  };<br>
  </code>
  </p>
  <p class="MsoBodyText">
  </p>
  <table width="571">
    <tr bgColor="#2165ae">
      <td height="17" width="563"><b><font size="5">Faces</font></b></td>
    </tr>
  </table>
  <p class="MsoBodyText">
  This structure holds the face information for each polygon of the level.&nbsp;
  It mostly holds indices into all the vertex and texture arrays.&nbsp; To
  calculate the number of faces in the lump you divide the length of the lump by
  the sizeof(<b>tBSPFace</b>).
  </p>
  <p class="MsoBodyText"><code>
  <br>
  struct <b>tBSPFace</b><br>
  {<br>
  &nbsp;&nbsp;&nbsp; int textureID;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
  The index into the texture array&nbsp;<br>
  &nbsp;&nbsp;&nbsp; int effect;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // The index for the effects (or -1 = n/a)&nbsp;<br>
  &nbsp;&nbsp;&nbsp; int type;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  // 1=polygon, 2=patch, 3=mesh, 4=billboard&nbsp;<br>
  &nbsp;&nbsp;&nbsp; int startVertIndex;&nbsp;&nbsp; // The index
  into this face's first vertex&nbsp;<br>
  &nbsp;&nbsp;&nbsp; int numOfVerts;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // The
  number of vertices for this face&nbsp;<br>&nbsp;&nbsp;&nbsp; int startIndex;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// The index into
  the&nbsp;indices array<br>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产日韩a在线播放| 国产精品影音先锋| 亚洲一区二区欧美激情| 国产精品不卡一区| 一色桃子久久精品亚洲| 国产精品传媒入口麻豆| 国产精品久久久久一区二区三区| 国产欧美日本一区视频| 中日韩av电影| 欧美国产成人在线| 中文字幕在线不卡| 亚洲免费观看高清完整版在线观看熊 | 九九**精品视频免费播放| 日韩黄色在线观看| 精品一区二区三区久久| 国产一区二区三区综合 | 日韩一区二区视频| 精品国产精品网麻豆系列 | 久久国产精品一区二区| 精品制服美女久久| 国产99久久久国产精品免费看| 不卡的看片网站| 中文字幕成人av| 中文字幕一区二区三区不卡在线| 亚洲同性gay激情无套| 亚洲一区在线观看免费 | 看电影不卡的网站| 国产伦理精品不卡| 色狠狠一区二区三区香蕉| 欧美日高清视频| 久久久久久久精| 中文字幕日韩欧美一区二区三区| 亚洲一级在线观看| 久久超碰97中文字幕| 粉嫩aⅴ一区二区三区四区| 色美美综合视频| 欧美成人性战久久| 国产精品女人毛片| 亚洲第一激情av| 国产成人综合亚洲网站| 色婷婷亚洲精品| 欧美不卡一区二区三区四区| 国产精品乱人伦中文| 亚洲国产精品一区二区久久 | 国产高清精品在线| 一本久道久久综合中文字幕| 日韩欧美一级二级| 国产精品卡一卡二卡三| 婷婷国产在线综合| 93久久精品日日躁夜夜躁欧美| 欧美裸体一区二区三区| 国产精品区一区二区三区| 婷婷中文字幕一区三区| 国产白丝网站精品污在线入口| 欧美日韩色综合| 欧美国产日韩精品免费观看| 日日夜夜免费精品| 99re视频精品| 亚洲精品一区二区三区影院| 亚洲一区二区三区四区的| 国产成人精品综合在线观看 | 久久久www免费人成精品| 亚洲bt欧美bt精品777| 成人免费毛片嘿嘿连载视频| 91麻豆精品国产91久久久久久久久| 欧美国产精品专区| 另类小说欧美激情| 欧美午夜精品理论片a级按摩| 久久欧美一区二区| 日韩中文字幕一区二区三区| 成人v精品蜜桃久久一区| 精品乱人伦小说| 亚洲福利一区二区| 91黄色免费版| 国产精品福利av| 国产在线观看免费一区| 欧美精品 国产精品| 亚洲精品国久久99热| 国产成人aaa| 久久久亚洲综合| 精品一二三四在线| 制服丝袜中文字幕一区| 亚洲最大成人综合| 91视视频在线直接观看在线看网页在线看| 欧美精品一区二区在线播放 | 欧美日韩一区不卡| 一区二区三区不卡视频| 91美女在线看| 国产精品成人免费在线| 成人黄色片在线观看| 久久九九国产精品| 激情图片小说一区| 日韩精品一区二区三区视频播放 | 日韩一区二区不卡| 日韩激情中文字幕| 91麻豆精品国产自产在线| 日韩国产欧美三级| 欧美精品久久一区二区三区| 亚洲国产另类av| 在线成人av影院| 天天亚洲美女在线视频| 在线综合视频播放| 久久99最新地址| 久久久久久久av麻豆果冻| 国产福利精品导航| 国产欧美视频一区二区三区| 国产丶欧美丶日本不卡视频| 国产香蕉久久精品综合网| 国产成人8x视频一区二区| 欧美韩国日本不卡| 91在线高清观看| 亚洲国产美国国产综合一区二区 | 亚洲妇女屁股眼交7| 欧美日韩高清影院| 免费国产亚洲视频| 精品国产一区二区三区四区四| 精品在线你懂的| 久久久久久亚洲综合| 国产iv一区二区三区| 亚洲欧洲在线观看av| 欧美综合一区二区| 亚洲bdsm女犯bdsm网站| 日韩一级片网站| 从欧美一区二区三区| 综合欧美一区二区三区| 欧美日韩精品一区二区在线播放| 免费视频一区二区| 日本一区二区三区高清不卡| 色综合天天综合网天天看片| 亚洲午夜国产一区99re久久| 91精品国产欧美一区二区18| 国产高清不卡一区二区| 一区视频在线播放| 91精品国产福利| 国产成人免费视频精品含羞草妖精| 亚洲少妇30p| 欧美一区二视频| 国产成人超碰人人澡人人澡| 亚洲在线观看免费视频| 欧美大片日本大片免费观看| 高清av一区二区| 亚洲一区二区三区在线| 欧美mv日韩mv国产网站| 99久久夜色精品国产网站| 婷婷综合另类小说色区| 久久久欧美精品sm网站| 91福利视频在线| 国产一区二区三区四| 一区二区三区 在线观看视频| 日韩视频免费观看高清完整版 | 亚洲国产精品人人做人人爽| 日韩欧美色综合网站| 91玉足脚交白嫩脚丫在线播放| 男女视频一区二区| 亚洲三级久久久| 337p粉嫩大胆噜噜噜噜噜91av| 一本大道av一区二区在线播放| 九色综合国产一区二区三区| 亚洲伦在线观看| 欧美精品一区二区三区高清aⅴ| 日本久久一区二区三区| 国产高清久久久| 青娱乐精品在线视频| 亚洲美女精品一区| 日本一区二区三级电影在线观看| 欧美二区三区的天堂| 99久久精品99国产精品 | 欧美一区二区三区色| 99久久精品国产网站| 国产一区二区网址| 日日夜夜精品免费视频| 亚洲美女视频一区| 国产精品视频看| 精品国产免费视频| 欧美肥妇bbw| 欧洲av一区二区嗯嗯嗯啊| 波波电影院一区二区三区| 极品少妇xxxx精品少妇| 日韩综合在线视频| 亚洲愉拍自拍另类高清精品| 国产精品福利一区二区三区| 久久精品视频在线看| 日韩欧美国产1| 91精品国产福利| 欧美剧情电影在线观看完整版免费励志电影 | 欧美男人的天堂一二区| bt欧美亚洲午夜电影天堂| 久久99热这里只有精品| 午夜精品久久久| 一区二区三区四区五区视频在线观看| 中文字幕不卡在线| 国产日韩欧美综合一区| 久久久久久久久久电影| 欧美精品一区二区三区高清aⅴ | 91丨九色丨蝌蚪丨老版| 国产激情一区二区三区桃花岛亚洲| 精品一区二区影视| 久久av资源网| 精品亚洲国内自在自线福利| 久久99久久久久|