Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.88 KB | None | 0 0
  1. NVR Documentation
  2.  
  3. Header 28 Bytes:
  4. ------------------------------------
  5. UInt Magic;
  6. UInt Version;
  7. UInt MaterialCount;
  8. UInt VertexBufferCount;
  9. UInt IndexBufferCount;
  10. UInt MeshCount;
  11. UInt NodeCount;
  12.  
  13. Read Material:
  14.     Read 816 Bytes, store within this struct:
  15.     Byte Name[260];
  16.     UInt MaterialType;
  17.     ColorValue m_DiffuseColor;
  18.     Byte DiffuseTextureName[260];
  19.     ColorValue m_EmissiveColor;
  20.     Byte EmissiveTextureName[260];
  21.    
  22.     Structure Note:
  23.     --------------------------------------------------------------------------------
  24.     ColorValue Struct:
  25.     float r;float g;float b;float a;
  26.     --------------------------------------------------------------------------------
  27.    
  28.     Next Data is read, note some previous data seems to be copied into this:
  29.     Read 2988 Bytes:
  30.     Byte Name[260];
  31.     UInt MaterialType;
  32.     Uint Flags;
  33.     Channel Channels[8];
  34.    
  35.     Structure Note:
  36.     --------------------------------------------------------------------------------
  37.     Channel Struct:
  38.     ColorValue _Color;
  39.     Byte TextureName[260];
  40.     Matrix44f m_Transform;
  41.    
  42.     Matrix44f Struct:
  43.     Float f00;Float f01;Float f02;Float f03;Float f10;Float f11;Float f12;Float f13;Float f20;Float f21;Float f22;Float f23;Float f30;Float f31;Float f32;Float f33;
  44.     Float r11;Float r12;Float r13;Float r14;Float r21;Float r22;Float r23;Float r24;Float r31;Float r32;Float r33;Float r34;Float r41;Float r42;Float r43;Float r44;
  45.     Float Data[4][4];
  46.     Int i00;Int i01;Int i02;Int i03;Int i10;Int i11;Int i12;Int i13;Int i20;Int i21;Int i22;Int i23;Int i30;Int i31;Int i32;Int i33;
  47.     UInt u00;UInt u01;UInt u02;UInt u03;UInt u10;UInt u11;UInt u12;UInt u13;UInt u20;UInt u21;UInt u22;UInt u23;UInt u30;UInt u31;UInt u32;UInt u33;
  48.     Byte u[16]; s0; Byte u[16]; s1;Byte u[16]; s2;Byte u[16]; s3;
  49.     Float m[4][4];  
  50.     --------------------------------------------------------------------------------
  51.    
  52.     Loop for Material Count
  53.    
  54.    
  55. Vertex Buffer:
  56.     UInt Length;
  57.     Read VertexBuffer for Length
  58.     Loop for Vertex Buffer Count
  59.    
  60. Index Buffer:
  61.     UInt Length;
  62.     IndexBufferFormat Format; //Either 0x65 or 0x66, specify if 16 or 32?
  63.     Read IndexBuffer for Length
  64.     Loop for Index Buffer Count
  65.    
  66. Meshes:
  67.     Read 96 Bytes:
  68.     UInt m_QualityLevel;
  69.     Sphere BoundingSphere;
  70.     Box3f m_BoundingBox;
  71.     UInt Material;
  72.     IndexedPrimitive IndexedPrimitive[2];
  73.    
  74.     Structure Note:
  75.     --------------------------------------------------------------------------------
  76.     Sphere Struct:
  77.     Vector3f mCenter; //Float x; Float y; Float z;
  78.     float mRadius;
  79.    
  80.     Box3f Struct:
  81.     Vector3f mMin;
  82.     Vector3f mMax;
  83.    
  84.     IndexedPrimitive:
  85.     UInt VertexBuffer;
  86.     UInt FirstVertex;
  87.     UInt VertexCount;
  88.     UInt IndexBuffer;
  89.     UInt FirstIndex;
  90.     UInt IndexCount;
  91.     --------------------------------------------------------------------------------
  92.    
  93.     Loop for Mesh Count
  94.    
  95. Nodes:
  96.     40 Bytes:
  97.     Box3f BoundingBox;
  98.     UInt FirstMesh;
  99.     UInt MeshCount;
  100.     UInt FirstChildNode;
  101.     UInt ChildNodeCount;
  102.    
  103.     Loop for node count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement