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

天行健 君子當自強而不息

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)  編輯 收藏 引用


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


公告

導航

統計

常用鏈接

隨筆分類(178)

3D游戲編程相關鏈接

搜索

最新評論

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国精品一区二区| 国产精品爽爽爽| 中日韩视频在线观看| 在线观看三级视频欧美| 激情自拍一区| 亚洲国产91| 99国产精品视频免费观看一公开| 亚洲欧洲美洲综合色网| 99精品免费网| 亚洲永久字幕| 久久久久综合一区二区三区| 美女日韩在线中文字幕| 久久精品国语| 亚洲精品国产精品国产自| 亚洲电影av在线| 亚洲一本大道在线| 久久久久久久激情视频| 欧美日韩久久精品| 国产一区二区三区丝袜| 亚洲免费电影在线观看| 午夜精品久久久久久久久久久久 | 国产麻豆精品久久一二三| 国产一区二区三区四区五区美女| 亚洲第一天堂av| 在线一区二区日韩| 久久―日本道色综合久久| 亚洲毛片一区二区| 久久久女女女女999久久| 欧美午夜精品久久久久久浪潮| 国产一区二区三区在线观看精品 | 久久久久久久综合| 欧美日韩亚洲高清一区二区| 激情自拍一区| 亚洲欧美综合v| 亚洲日韩视频| 久久视频在线免费观看| 国产农村妇女毛片精品久久莱园子| 亚洲第一精品福利| 久久久久成人精品免费播放动漫| 日韩午夜黄色| 欧美顶级大胆免费视频| 国内在线观看一区二区三区| 亚洲女优在线| 99视频精品| 欧美超级免费视 在线| 国产一区二区欧美日韩| 午夜精品在线看| 一级日韩一区在线观看| 欧美精品1区| 在线视频成人| 美女日韩欧美| 麻豆成人91精品二区三区| 狠狠色噜噜狠狠色综合久| 欧美在线二区| 欧美视频日韩视频在线观看| 国产日韩欧美精品一区| 中国成人亚色综合网站| 欧美电影免费网站| 久久免费精品视频| 在线视频成人| 亚洲国内精品在线| 欧美护士18xxxxhd| 一本不卡影院| 一区二区三区四区国产| 国产精品美女一区二区在线观看| 亚洲视频电影在线| 中文日韩欧美| 国产欧美韩日| 久久日韩粉嫩一区二区三区| 久久在线免费观看视频| 亚洲精品国产无天堂网2021| 亚洲人成艺术| 国产精品欧美久久| 久久精品国产在热久久 | 午夜欧美大片免费观看| 国产一区深夜福利| 蜜臀久久久99精品久久久久久| 久久久久一区二区| 日韩视频一区二区| 亚洲小视频在线| 国产曰批免费观看久久久| 麻豆freexxxx性91精品| 欧美国产大片| 欧美有码在线观看视频| 久久乐国产精品| 一本一本久久| 久久高清福利视频| 日韩一级黄色片| 香蕉成人啪国产精品视频综合网| 黄色一区二区三区| 亚洲精品久久久久久一区二区| 国产精品久久久久久久第一福利| 久久精品亚洲一区| 欧美aⅴ99久久黑人专区| 亚洲综合社区| 免费欧美日韩| 性欧美18~19sex高清播放| 久久电影一区| 亚洲一区二区毛片| 久久综合色播五月| 欧美一区二区三区久久精品| 免费欧美在线视频| 久久久www成人免费毛片麻豆| 欧美国产一区二区三区激情无套| 欧美专区18| 欧美视频中文字幕| 欧美国产日韩在线| 国产伦精品免费视频| 亚洲精品在线一区二区| 在线看不卡av| 久久高清免费观看| 午夜激情亚洲| 欧美日韩精品二区第二页| 久热成人在线视频| 国产伦精品一区| 中文亚洲免费| 99精品视频免费全部在线| 久久精品人人做人人爽电影蜜月| 亚洲永久精品大片| 一区二区三区视频在线看| 久久亚洲一区二区| 久久亚洲综合色一区二区三区| 国产精品久久久久久久久婷婷| 亚洲韩国青草视频| 亚洲第一成人在线| 久久久综合激的五月天| 久久久久免费| 国产亚洲一区精品| 亚洲欧美日韩另类| 亚洲欧美日韩区| 国产精品久久久久久久午夜| 亚洲剧情一区二区| 99香蕉国产精品偷在线观看| 欧美成人性网| 亚洲电影观看| 一本到高清视频免费精品| 欧美日韩国产小视频| 99国产一区| 亚洲欧美激情在线视频| 国产精品久久久久毛片软件| 亚洲视频图片小说| 欧美影视一区| 伊大人香蕉综合8在线视| 久久综合一区二区| 亚洲激情社区| 亚洲综合另类| 国产亚洲女人久久久久毛片| 欧美一区2区三区4区公司二百| 久久精品国内一区二区三区| 影音先锋日韩精品| 欧美mv日韩mv国产网站| 99热免费精品| 久久久青草婷婷精品综合日韩| 黄色亚洲大片免费在线观看| 麻豆成人精品| 一区二区三区欧美视频| 欧美中文字幕视频在线观看| 伊人色综合久久天天| 欧美国产一区二区| 亚洲欧美日韩国产综合精品二区| 久久久久久穴| 一本一本久久| 国产日韩欧美另类| 玖玖精品视频| 亚洲午夜小视频| 免费欧美在线视频| 亚洲亚洲精品在线观看| 狠狠色丁香久久婷婷综合_中| 老司机一区二区| 亚洲深夜福利| 欧美电影电视剧在线观看| 亚洲自拍偷拍色片视频| 黄色小说综合网站| 欧美午夜精彩| 久久精品网址| 一区二区三区高清不卡| 国产专区欧美专区| 欧美日韩中字| 麻豆精品一区二区av白丝在线| 一区二区三区四区五区视频 | 亚洲一区二区高清视频| 欧美v日韩v国产v| 亚洲一区日本| 亚洲日本乱码在线观看| 永久免费精品影视网站| 日韩一区二区精品葵司在线| 国产伦精品一区二区三区视频孕妇 | 日韩一级免费| 欧美高清视频免费观看| 欧美一区二区三区免费看| 亚洲美女黄网| 亚洲第一天堂av| 国产亚洲精品bv在线观看| 欧美三区在线视频| 欧美www在线| 久久综合影音| 亚洲欧美精品一区| 亚洲精品乱码久久久久久久久| 免费成人毛片| 久久久久久网站|