• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當(dāng)自強(qiáng)而不息

            Using the .X File Format

            Using the .X File Format(11)      摘要: Skeletal animation systems require a frame hierarchy (which represents the bone structure) to orient each bone during rendering. The .X file format defines a frame−of−reference data template that you can use to define your bone hierarchy. This template, Frame, is merely a placeholder of sorts. It allows any type of data object to be embedded in it so you can reference the instanced Frame object by its assigned instance name and allow all contained objects to be addressed as well.  
             
            Using the .X File Format(10)      摘要: Just as I promised, it's time to check out how to merge the mesh−loading functions into your .X parser class. Since you're going to be accessing the mesh data objects directly, you need to use the D3DXLoadMeshFromXof function to load mesh data. That means you need to parse each data object, and look for Mesh objects as you go. Start by deriving a parser class with which to work. 
             
            Using the .X File Format(9)      摘要: Now that you've got a firm grip on how the .X file format works, consider how Microsoft first intended for you to use it−to contain 3D mesh information for your games. The D3DX library comes with a number of functions you can use to load mesh data from an .X file. With the addition of the .X parser developed in this chapter, you have even more options available to you. Check out just how easy it is to work with D3DX to load mesh data.  
             
            Using the .X File Format(8)      摘要: So, you want to create a class to handle all aspects of parsing .X files, eh? Sounds great to me! In this .X file parser class, you can wrap up the Parse and ParseObject functions you saw earlier in this chapter, in the "Enumerating Data Objects" section. Use the code from those two functions and write the parser class to allow yourself to override the data object parsing functions, which will allow you to scan for specific objects. 
             
            Using the .X File Format(7)      摘要: Remember that data objects are containers for data, and if you're going to the trouble to enumerate data objects, it's a safe bet that you're after the data in each one. Once you've got a valid IDirectXFileData object that points at an enumerated data object, you can retrieve the object's instance name, template GUID, and data using a trio of functions. The first function, IDirectXFileData::GetName, retrieves the name of the data object instance.  
             
            Using the .X File Format(6)      摘要: At this point, you have opened your .X file and registered the templates you'll be using (such as the DirectX standard templates). The enumeration object has been created, and you are now ready to pull data from the .X file.

            In its current state, the IDirectXFileEnumObject object you created points to the first data object in the file, which is typically the Header object. All top−level data objects are siblings of the Header object (or the first object in the file). Each data object yo  
             
            Using the .X File Format(5)      摘要: Regardless of the version of DirectX you are using (either DirectX 8 or 9), the methods you use to access .X files are the same. In fact, the interfaces have not changed names between the two newest versions of DirectX (8 and 9), making it possible for you to quickly port your version 8 code to the newer version 9 (and vice versa if you want).  
             
            Using the .X File Format(4)      摘要: some .X Standard Templates:  
             
            Using the .X File Format(3)      摘要: Data referencing has one caveat−the template restrictions set in place must allow you to use a reference. That might not make sense at first, but you can't use a data reference without the proper restrictions. An .X file represents an entire hierarchy of data objects, which can only be siblings or children of other objects. Thus, data objects embedded in other objects need the proper restrictions to be referenced or instanced. For example, consider the following three template declarations:  
             
            Using the .X File Format(2)      摘要: Since an .X file's open−ended design is so, well, open−ended, you must predefine each template that you intend to use for DirectX to understand how to access the template's data. Typically templates are defined inside an .X file, although you can define them from within your program (as I mentioned earlier).  
             
            Using the .X File Format(1)      摘要: Your 3D meshes need a place to liverather, you need a place to store your 3D mesh data (not to mention all that other data your game project requires). What's a developer to do−develop his own file format or go with a third−party format? With so many popular formats out there, it's an easy choice to make, but what about the restrictions some formats impose? Why can't you just use somebody else's file format and configure it to work the way you want?  

            posted on 2008-04-18 15:18 lovedday 閱讀(741) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關(guān)鏈接

            搜索

            最新評(píng)論

            三级韩国一区久久二区综合| 久久精品国产亚洲AV蜜臀色欲 | 久久久久一区二区三区| 久久久久波多野结衣高潮| 日日狠狠久久偷偷色综合96蜜桃| 国产成人久久激情91| 久久99精品久久久大学生| 狠狠色丁香久久婷婷综合图片| 看全色黄大色大片免费久久久| 精品久久久久久无码中文野结衣| 99热成人精品免费久久| 精品久久久久久无码中文字幕| 国产综合免费精品久久久| 久久国产成人精品国产成人亚洲| 日本道色综合久久影院| 国产999精品久久久久久| 88久久精品无码一区二区毛片 | 久久精品男人影院| 久久er国产精品免费观看2| 人人狠狠综合久久亚洲88| 久久男人中文字幕资源站| 亚洲精品tv久久久久| 欧美牲交A欧牲交aⅴ久久| 久久精品免费观看| 久久se精品一区二区影院| 久久久久亚洲av成人网人人软件 | 亚洲综合精品香蕉久久网97| 久久婷婷五月综合97色直播| 久久精品国产亚洲av麻豆图片| 久久精品国产亚洲AV无码娇色| 99久久精品这里只有精品 | 国产精品成人无码久久久久久| 人人狠狠综合88综合久久| 亚洲AV日韩AV永久无码久久| A狠狠久久蜜臀婷色中文网| 久久久久综合国产欧美一区二区| 亚洲香蕉网久久综合影视| 伊人色综合久久天天| 亚洲人成网亚洲欧洲无码久久| 2021久久精品国产99国产精品| 色婷婷久久久SWAG精品|