青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

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

Using the .X File Format(4)

Header

The following definitions should be used when directly reading and writing the binary header.

Note     Compressed data streams are not currently supported and are therefore not detailed here.

#define XOFFILE_FORMAT_MAGIC \
((long)'x' + ((long)'o' << 8) + ((long)'f' << 16) + ((long)' ' << 24))

#define XOFFILE_FORMAT_VERSION \
((long)'0' + ((long)'3' << 8) + ((long)'0' << 16) + ((long)'2' << 24))

#define XOFFILE_FORMAT_BINARY \
((long)'b' + ((long)'i' << 8) + ((long)'n' << 16) + ((long)' ' << 24))

#define XOFFILE_FORMAT_TEXT \
((long)'t' + ((long)'x' << 8) + ((long)'t' << 16) + ((long)' ' << 24))

#define XOFFILE_FORMAT_COMPRESSED \
((long)'c' + ((long)'m' << 8) + ((long)'p' << 16) + ((long)' ' << 24))

#define XOFFILE_FORMAT_FLOAT_BITS_32 \
((long)'0' + ((long)'0' << 8) + ((long)'3' << 16) + ((long)'2' << 24))

#define XOFFILE_FORMAT_FLOAT_BITS_64 \
((long)'0' + ((long)'0' << 8) + ((long)'6' << 16) + ((long)'4' << 24))

IndexedColor

Consists of an index parameter and an RGBA color and is used for defining mesh vertex colors. The index defines the vertex to which the color is applied.

template IndexedColor
{
< 1630B820-7842-11cf-8F52-0040333594A3 >
DWORD index;
ColorRGBA indexColor;
}

Where:

  • index - A DWORD. See the description above.
  • indexColor - A ColorRGBA template.

Material

Defines a basic material color that can be applied to either a complete mesh or a mesh's individual faces. The power is the specular exponent of the material.

Note     The ambient color requires an alpha component.

TextureFilename is an optional data object. If this object is not present, the face is untextured.

template Material
{
< 3D82AB4D-62DA-11CF-AB39-0020AF71E433 >
ColorRGBA faceColor;
FLOAT power;
ColorRGB specularColor;
ColorRGB emissiveColor;
[...]
}

Where:

  • faceColor - Face color. A ColorRGBA template.
  • power - Material specular color exponent.
  • specularColor - Material specular color. A ColorRGB template.
  • emissiveColor - Material emissive color. A ColorRGB template.

Matrix4x4

Defines a 4 x 4 matrix. This is used as a frame transformation matrix.

template Matrix4x4
{
< F6F23F45-7686-11cf-8F52-0040333594A3 >
array float matrix[16];
}

Where:

  • array float matrix[16] - Array of 16 floats.

Mesh

Defines a simple mesh. The first array is a list of vertices, and the second array defines the faces of the mesh by indexing into the vertex array.

template Mesh
{
<3D82AB44-62DA-11CF-AB39-0020AF71E433>
DWORD nVertices;
array Vector vertices[nVertices];
DWORD nFaces;
array MeshFace faces[nFaces];
[...]
}

Where:

  • nVertices - Number of vertices.
  • array Vector vertices[nVertices] - Array of vertices, each of type Vector.
  • nFaces - Number of faces.
  • array MeshFace faces[nFaces] - Array of faces, each of type MeshFace.
  • [ ... ] - Any .x file template can be used here. This makes the architecture extensible. Material and TextureFilename templates are typically used.

MeshFace

Used by the Mesh template to define a mesh's faces. Each element of the nFaceVertexIndices array references a mesh vertex used to build the face.

template MeshFace
{
< 3D82AB5F-62DA-11cf-AB39-0020AF71E433 >
DWORD nFaceVertexIndices;
array DWORD faceVertexIndices[nFaceVertexIndices];
}

Where:

  • nFaceVertexIndices - Number of indices.
  • array DWORD faceVertexIndices[nFaceVertexIndices] - Array of indices.

MeshFaceWraps

Used to define the texture topology of each face in a wrap. The value of the nFaceWrapValues member should be equal to the number of faces in a mesh.

template MeshFaceWraps
{
< ED1EC5C0-C0A8-11D0-941C-0080C80CFA7B >
DWORD nFaceWrapValues;
array Boolean2d faceWrapValues[nFaceWrapValues];
}

This template is no longer used.

MeshMaterialList

Used in a mesh object to specify which material applies to which faces. The nMaterials member specifies how many materials are present, and materials specify which material to apply.

template MeshMaterialList
{
< F6F23F42-7686-11CF-8F52-0040333594A3 >
DWORD nMaterials;
DWORD nFaceIndexes;
array DWORD faceIndexes[nFaceIndexes];
[Material <3D82AB4D-62DA-11CF-AB39-0020AF71E433>]
}

Where:

  • nMaterials - A DWORD. The number of materials.
  • nFaceIndexes - A DWORD. The number of indices.
  • faceIndexes[nFaceIndexes] - An arrray of DWORDs containing the face indices.

MeshNormals

Defines normals for a mesh. The first array of vectors is the normal vectors themselves, and the second array is an array of indexes specifying which normals should be applied to a given face. The value of the nFaceNormals member should be equal to the number of faces in a mesh.

template MeshNormals
{
< F6F23F43-7686-11cf-8F52-0040333594A3 >
DWORD nNormals;
array Vector normals[nNormals];
DWORD nFaceNormals;
array MeshFace faceNormals[nFaceNormals];
}

Where:

  • nNormals - Number of normals.
  • array Vector normals[nNormals] - Array of normals.
  • nFaceNormals - Number of face normals.
  • array MeshFace faceNormals[nFaceNormals] - Array of mesh face normals. 

MeshTextureCoords

Defines a mesh's texture coordinates.

template MeshTextureCoords
{
< F6F23F40-7686-11cf-8F52-0040333594A3 >
DWORD nTextureCoords;
array Coords2d textureCoords[nTextureCoords] ;
}

Where:

  • nTextureCoords - Number of texture coordinates.
  • array Coords2d textureCoords[nTextureCoords] - Array of 2D texture coordinates.

MeshVertexColors

Specifies vertex colors for a mesh, instead of applying a material per face or per mesh.

template MeshVertexColors
{
<1630B821-7842-11cf-8F52-0040333594A3>
DWORD nVertexColors;
array IndexColor vertexColors[nVertexColors];
}

Where:

  • nVertexColors - Number of colors. This matches the number of vertices in the mesh.
  • array IndexColor vertexColors[nVertexColors] - Array of indexed colors.

Patch

Defines a Bézier control patch. The array defines the control points for the patch.

template Patch
{
< A3EB5D44-FC22-429D-9AFB-3221CB9719A6 >
DWORD nControlIndices;
array DWORD controlIndices[nControlIndices];
}

Where:

  • nControlIndices - Number of control point indices.
  • array DWORD controlIndices[nControlIndices] - Array of control point indices.

The type of patch is defined by the number of control points, as shown in the following table.

Number of control points Type
10 Cubic Bézier triangular patch
15 Quartic Bézier triangular patch
16 Cubic Bézier quad rectangle patch

The order of the control points are given in a spiral pattern, as shown in the following diagrams for triangular and rectangular patches.

Triangular patches used the following pattern.

PatchMesh

Defines a mesh defined by Bézier patches. The first array is a list of vertices, and the second array defines the patches for the mesh by indexing into the vertex array.

template PatchMesh
{
< D02C95CC-EDBA-4305-9B5D-1820D7704BBF >
DWORD nVertices;
array Vector vertices[nVertices];
DWORD nPatches;
array Patch patches[nPatches];
[ ... ]
}

Where:

  • nVertices - Number of vertices.
  • vertices[nVertices] - Array of vertices.
  • nPatches - Number of patches.
  • patches[nPatches] - Array of patches.
  • [ ... ] - Any .x file template can be used here. This makes the architecture extensible.

The patches use the vertices in the array of vertices as the control points for each patch. This is a legacy template. The latest patch mesh template is PatchMesh9.

SkinWeights

This template is instantiated on a per-mesh basis. Within a mesh, a sequence of n instances of this template will appear, where n is the number of bones (X file frames) that influence the vertices in the mesh. Each instance of the template basically defines the influence of a particular bone on the mesh. There is a list of vertex indices, and a corresponding list of weights.

template SkinWeights 
{
< 6F0D123B-BAD2-4167-A0D0-80224F25FABB >
STRING transformNodeName;
DWORD nWeights;
array DWORD vertexIndices[nWeights];
array float weights[nWeights];
Matrix4x4 matrixOffset;
}

Where:

  • The name of the bone whose influence is being defined is transformNodeName, and nWeights is the number of vertices affected by this bone.
  • The vertices influenced by this bone are contained in vertexIndices, and the weights for each of the vertices influenced by this bone are contained in weights.
  • The matrix matrixOffset transforms the mesh vertices to the space of the bone. When concatenated to the bone's transform, this provides the world space coordinates of the mesh as affected by the bone.

TextureFilename

Enables you to specify the file name of a texture to apply to a mesh or a face. This template should appear within a material object.

template TextureFilename 
{
< A42790E1-7810-11cf-8F52-0040333594A3 >
string filename;
}

TimedFloatKeys

Defines a set of floats and a positive time used in animations.

template TimedFloatKeys 
{
< F406B180-7B3B-11cf-8F52-0040333594A3 >
DWORD time;
FloatKeys tfkeys;
}

Where:

  • tfkeys - See FloatKeys.

Vector

Defines a vector.

template Vector 
{
< 3D82AB5E-62DA-11cf-AB39-0020AF71E433 >
float x;
float y;
float z;
}

VertexDuplicationIndices

This template is instantiated on a per-mesh basis, holding information about which vertices in the mesh are duplicates of each other. Duplicates result when a vertex sits on a smoothing group or material boundary. The purpose of this template is to allow the loader to determine which vertices exhibiting different peripheral parameters are actually the same vertexes in the model. Certain applications (mesh simplification, for example) can make use of this information.

template VertexDuplicationIndices 
{
< B8D65549-D7C9-4995-89CF-53A9A8B031E3 >
DWORD nIndices;
DWORD nOriginalVertices;
array DWORD indices[nIndices];
}

Where:

  • nIndices - Number of vertex indices. This is the number of vertices in the mesh.
  • nOriginalVertices - Number of vertices in the mesh before any duplication occurs.
  • The value indices[n] holds the vertex index that vertex[n] in the vertex array for the mesh would have had if no duplication had occurred. Indices in this array that are the same, therefore, indicate duplicate vertices.

XSkinMeshHeader

This template is instantiated on a per-mesh basis only in meshes that contain exported skinning information. The purpose of this template is to provide information about the nature of the skinning information that was exported.

template XSkinMeshHeader 
{
< 3CF169CE-FF7C-44ab-93C0-F78F62D172E2 >
WORD nMaxSkinWeightsPerVertex;
WORD nMaxSkinWeightsPerFace;
WORD nBones;
}

Where:

  • nMaxSkinWeightsPerVertex - Maximum number of transforms that affect a vertex in the mesh.
  • nMaxSkinWeightsPerFace - Maximum number of unique transforms that affect the three vertices of any face.
  • nBones - Number of bones that affect vertices in this mesh.

posted on 2008-04-16 20:44 lovedday 閱讀(586) 評論(0)  編輯 收藏 引用


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


公告

導(dǎo)航

統(tǒng)計

常用鏈接

隨筆分類(178)

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

搜索

最新評論

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产日韩精品综合网站| 亚洲午夜电影| 欧美亚洲在线| 亚洲欧美日韩网| 国产一区二区三区高清| 亚洲桃花岛网站| 亚洲一区国产一区| 在线电影一区| 欧美色欧美亚洲另类二区| 亚洲欧美日韩国产中文在线| 亚洲第一精品夜夜躁人人爽| 亚洲人成毛片在线播放| 国产美女诱惑一区二区| 欧美巨乳在线| 欧美日韩亚洲另类| 另类综合日韩欧美亚洲| 性色av一区二区三区在线观看| 亚洲国产成人av在线| 免费在线成人| 欧美69视频| 欧美日本一区| 国产视频精品免费播放| 激情国产一区二区| 亚洲影视在线| 亚洲免费精彩视频| 国产精品视频| 国产手机视频精品| 影音先锋中文字幕一区| 亚洲性色视频| 欧美一区二区三区日韩视频| 久久久精品动漫| 欧美韩日一区| 99在线热播精品免费99热| 国产精品99久久久久久久vr| 久久成人av少妇免费| 欧美激情1区2区| 欧美一二三区精品| 欧美日韩极品在线观看一区| 国产一区二区激情| 欧美中文在线观看| 国产网站欧美日韩免费精品在线观看| 亚洲精品韩国| 欧美激情第9页| 久久人人爽人人爽爽久久| 欧美午夜片欧美片在线观看| 国产精品成人v| 国产欧美日韩在线视频| 亚洲国产日韩欧美| 欧美暴力喷水在线| 欧美va亚洲va国产综合| 亚洲性色视频| 欧美精品电影| 久久精品久久综合| 欧美一区二区免费视频| 亚洲一区亚洲二区| 亚洲成人在线| 一区二区三区四区蜜桃| 玖玖精品视频| 亚洲黄色精品| 亚洲免费观看| 蜜臀va亚洲va欧美va天堂| 欧美成人a视频| 一区二区三区无毛| 欧美影院午夜播放| 欧美激情a∨在线视频播放| 91久久国产精品91久久性色| 亚洲激情视频网| 亚洲一区二区毛片| 欧美sm极限捆绑bd| 亚洲午夜久久久| 日韩一级免费| 国产午夜亚洲精品理论片色戒| 美女被久久久| 久久av在线| 亚洲七七久久综合桃花剧情介绍| 欧美成人免费在线| 亚洲色图制服丝袜| 亚洲精选在线| 久色成人在线| 亚洲深夜福利网站| 麻豆精品一区二区综合av| 日韩手机在线导航| 国产精品国产亚洲精品看不卡15| 日韩亚洲欧美一区二区三区| 亚洲成色999久久网站| 久久久精品国产一区二区三区| 狠狠v欧美v日韩v亚洲ⅴ| 久久久噜噜噜久久狠狠50岁| 久久综合一区| 亚洲深爱激情| 久久久久高清| aaa亚洲精品一二三区| 亚洲欧美日韩一区二区| 伊人久久大香线| 日韩午夜一区| 韩国美女久久| 欧美不卡三区| 99re6热在线精品视频播放速度| 亚洲国产专区| 国产精品一二三视频| 久久综合99re88久久爱| 欧美美女bb生活片| 久久精品一区二区国产| 麻豆av福利av久久av| 亚洲欧美日韩综合一区| 久久免费黄色| 午夜久久99| 欧美大片在线观看一区| 久久精品一二三| 欧美色图五月天| 欧美国产亚洲精品久久久8v| 国产精品一区二区久激情瑜伽| 欧美黄色免费网站| 国产欧美在线观看一区| 亚洲精品美女| 激情另类综合| 久久国产福利| 午夜欧美大片免费观看| 欧美激情一区二区三区不卡| 久久三级福利| 国产欧美日韩一区二区三区在线观看 | 亚洲欧美日韩国产一区二区三区 | 国产精品视频区| 亚洲国产导航| 激情视频一区二区| 亚洲欧美视频在线| 亚洲免费在线视频一区 二区| 欧美精品18videos性欧美| 巨胸喷奶水www久久久免费动漫| 国产精品日本精品| 亚洲免费视频成人| 午夜精品久久久久久久久久久久| 欧美日韩日本视频| 亚洲欧洲在线视频| 一本在线高清不卡dvd| 欧美另类极品videosbest最新版本| 蜜桃久久精品乱码一区二区| 韩国福利一区| 久久久久看片| 欧美激情91| 亚洲毛片在线看| 欧美另类99xxxxx| 99riav久久精品riav| 亚洲一区二区黄| 国产欧美日韩不卡免费| 午夜精品久久久久久久| 久久琪琪电影院| 亚洲国产你懂的| 欧美电影免费观看大全| 亚洲区第一页| 亚洲一区欧美激情| 国产日韩欧美中文在线播放| 欧美一区二区三区另类| 久久综合五月| 日韩亚洲欧美中文三级| 欧美精品亚洲| 久久一区中文字幕| 欧美国产欧美综合 | 国产酒店精品激情| 午夜伦理片一区| 免费在线亚洲| 99精品国产热久久91蜜凸| 欧美精品一区二区三区很污很色的 | 国产精品高清网站| 亚洲欧美中文另类| 美女在线一区二区| 99精品热视频| 国产欧美精品在线观看| 久久一区二区视频| 日韩一区二区高清| 久久综合成人精品亚洲另类欧美| 亚洲级视频在线观看免费1级| 欧美视频你懂的| 久久综合九九| 亚洲午夜久久久| 欧美国产高潮xxxx1819| 亚洲一区二区影院| 亚洲电影欧美电影有声小说| 欧美三级在线| 久久色在线播放| 亚洲性感美女99在线| 欧美激情视频给我| 久久国产精品一区二区| 亚洲精品一区二区三区av| 国产精品一区二区在线观看网站| 久久夜色精品国产欧美乱| 亚洲综合欧美日韩| 亚洲丰满在线| 开元免费观看欧美电视剧网站| 亚洲一区日韩在线| 亚洲人成网站影音先锋播放| 国产欧美日韩高清| 国产精品第十页| 欧美激情一区二区| 麻豆91精品| 久久国产欧美精品| 亚洲综合好骚| 亚洲欧美美女| 亚洲一级在线| 亚洲综合精品自拍|