Le contenu du fichier texte se présente comme ceci :
Ce que je voudrais faire c'est récupérer seulement la section Mesh staticMesh, plus précisément les lignes suivantes avec les nombres flottant. Les essais jusqu'ici ne fonctionne pas, sois-je charge tout, sois-je charge rien du tout. Est-ce que quelqu'un à un idée pour faire ça ?xof 0303txt 0032
// DirectX file generated by Ultimate Unwrap3D
// Start of Templates
template VertexDuplicationIndices {
<b8d65549-d7c9-4995-89cf-53a9a8b031e3>
DWORD nIndices;
DWORD nOriginalVertices;
array DWORD indices[nIndices];
}
template FVFData {
<b6e70a0e-8ef9-4e83-94ad-ecc8b0c04897>
DWORD dwFVF;
DWORD nDWords;
array DWORD data[nDWords];
}
template Header {
<3D82AB43-62DA-11cf-AB39-0020AF71E433>
WORD major;
WORD minor;
DWORD flags;
}
template Vector {
<3D82AB5E-62DA-11cf-AB39-0020AF71E433>
FLOAT x;
FLOAT y;
FLOAT z;
}
template Coords2d {
<F6F23F44-7686-11cf-8F52-0040333594A3>
FLOAT u;
FLOAT v;
}
template Matrix4x4 {
<F6F23F45-7686-11cf-8F52-0040333594A3>
array FLOAT matrix[16];
}
template ColorRGBA {
<35FF44E0-6C7C-11cf-8F52-0040333594A3>
FLOAT red;
FLOAT green;
FLOAT blue;
FLOAT alpha;
}
template ColorRGB {
<D3E16E81-7835-11cf-8F52-0040333594A3>
FLOAT red;
FLOAT green;
FLOAT blue;
}
template IndexedColor {
<1630B820-7842-11cf-8F52-0040333594A3>
DWORD index;
ColorRGBA indexColor;
}
template Material {
<3D82AB4D-62DA-11cf-AB39-0020AF71E433>
ColorRGBA faceColor;
FLOAT power;
ColorRGB specularColor;
ColorRGB emissiveColor;
[...]
}
template TextureFilename {
<A42790E1-7810-11cf-8F52-0040333594A3>
STRING filename;
}
template MeshFace {
<3D82AB5F-62DA-11cf-AB39-0020AF71E433>
DWORD nFaceVertexIndices;
array DWORD faceVertexIndices[nFaceVertexIndices];
}
template MeshTextureCoords {
<F6F23F40-7686-11cf-8F52-0040333594A3>
DWORD nTextureCoords;
array Coords2d textureCoords[nTextureCoords];
}
template MeshMaterialList {
<F6F23F42-7686-11cf-8F52-0040333594A3>
DWORD nMaterials;
DWORD nFaceIndexes;
array DWORD faceIndexes[nFaceIndexes];
[Material]
}
template MeshNormals {
<F6F23F43-7686-11cf-8F52-0040333594A3>
DWORD nNormals;
array Vector normals[nNormals];
DWORD nFaceNormals;
array MeshFace faceNormals[nFaceNormals];
}
template MeshVertexColors {
<1630B821-7842-11cf-8F52-0040333594A3>
DWORD nVertexColors;
array IndexedColor vertexColors[nVertexColors];
}
template Mesh {
<3D82AB44-62DA-11cf-AB39-0020AF71E433>
DWORD nVertices;
array Vector vertices[nVertices];
DWORD nFaces;
array MeshFace faces[nFaces];
[...]
}
template FrameTransformMatrix {
<F6F23F41-7686-11cf-8F52-0040333594A3>
Matrix4x4 frameMatrix;
}
template Frame {
<3D82AB46-62DA-11cf-AB39-0020AF71E433>
[...]
}
template FloatKeys {
<10DD46A9-775B-11cf-8F52-0040333594A3>
DWORD nValues;
array FLOAT values[nValues];
}
template TimedFloatKeys {
<F406B180-7B3B-11cf-8F52-0040333594A3>
DWORD time;
FloatKeys tfkeys;
}
template AnimationKey {
<10DD46A8-775B-11cf-8F52-0040333594A3>
DWORD keyType;
DWORD nKeys;
array TimedFloatKeys keys[nKeys];
}
template AnimationOptions {
<E2BF56C0-840F-11cf-8F52-0040333594A3>
DWORD openclosed;
DWORD positionquality;
}
template Animation {
<3D82AB4F-62DA-11cf-AB39-0020AF71E433>
[...]
}
template AnimationSet {
<3D82AB50-62DA-11cf-AB39-0020AF71E433>
[Animation]
}
// Start of Frames
Frame Body {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh staticMesh {
12;
-10.000000; 0.000000; 5.773503;,
0.000000; 0.000000; -11.547006;,
10.000000; 0.000000; 5.773503;,
-0.000000; 0.000000; -11.547006;,
0.000000; 16.329931; -0.000000;,
10.000000; 0.000000; 5.773503;,
-10.000000; 0.000000; 5.773503;,
0.000000; 16.329931; 0.000000;,
0.000000; 0.000000; -11.547006;,
10.000000; 0.000000; 5.773503;,
-0.000000; 16.329931; -0.000000;,
-10.000000; 0.000000; 5.773503;;
4;
3;0, 1, 2;,
3;3, 4, 5;,
3;6, 7, 8;,
3;9, 10, 11;;
MeshNormals {
12;
0.000000; -1.000000; 0.000000;,
0.000000; -1.000000; 0.000000;,
0.000000; -1.000000; 0.000000;,
0.816497; 0.333333; -0.471405;,
0.816497; 0.333333; -0.471405;,
0.816497; 0.333333; -0.471405;,
-0.816497; 0.333333; -0.471405;,
-0.816497; 0.333333; -0.471405;,
-0.816497; 0.333333; -0.471405;,
-0.000000; 0.333333; 0.942809;,
-0.000000; 0.333333; 0.942809;,
-0.000000; 0.333333; 0.942809;;
4;
3;0, 1, 2;,
3;3, 4, 5;,
3;6, 7, 8;,
3;9, 10, 11;;
}
MeshTextureCoords {
12;
1.000000; 1.000000;,
0.500000; 0.000000;,
0.000000; 1.000000;,
1.000000; 1.000000;,
0.500000; 0.000000;,
0.000000; 1.000000;,
1.000000; 1.000000;,
0.500000; 0.000000;,
0.000000; 1.000000;,
1.000000; 1.000000;,
0.500000; 0.000000;,
0.000000; 1.000000;;
}
MeshMaterialList {
1;
4;
0,
0,
0,
0;
Material {
1.000000; 1.000000; 1.000000; 1.000000;;
128.000000;
1.000000; 1.000000; 1.000000;;
0.000000; 0.000000; 0.000000;;
TextureFilename {
"pyra.jpg";
}
}
}
}
}
Merci à l'avance.
A+
Guimauve