Formats.m3DS.hpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. // CodeGear C++Builder
  2. // Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'Formats.m3DS.pas' rev: 36.00 (Windows)
  5. #ifndef Formats_m3DSHPP
  6. #define Formats_m3DSHPP
  7. #pragma delphiheader begin
  8. #pragma option push
  9. #if defined(__BORLANDC__) && !defined(__clang__)
  10. #pragma option -w- // All warnings off
  11. #pragma option -Vx // Zero-length empty class member
  12. #endif
  13. #pragma pack(push,8)
  14. #include <System.hpp>
  15. #include <SysInit.hpp>
  16. #include <System.Classes.hpp>
  17. #include <System.SysUtils.hpp>
  18. #include <Formats.m3DSTypes.hpp>
  19. //-- user supplied -----------------------------------------------------------
  20. namespace Formats
  21. {
  22. namespace M3ds
  23. {
  24. //-- forward type declarations -----------------------------------------------
  25. class DELPHICLASS TMaterialList;
  26. class DELPHICLASS TObjectList;
  27. class DELPHICLASS TKeyFramer;
  28. class DELPHICLASS TFile3DS;
  29. //-- type declarations -------------------------------------------------------
  30. typedef void __fastcall (__closure *TLoadProgress)(System::LongInt StreamPos, System::LongInt StreamMax);
  31. #pragma pack(push,4)
  32. class PASCALIMPLEMENTATION TMaterialList : public System::TObject
  33. {
  34. typedef System::TObject inherited;
  35. public:
  36. Formats::M3dstypes::PMaterial3DS operator[](int Index) { return this->Material[Index]; }
  37. private:
  38. TFile3DS* FOwner;
  39. System::Classes::TList* FLocalList;
  40. int __fastcall GetCount();
  41. Formats::M3dstypes::PMaterial3DS __fastcall GetMaterial(int Index);
  42. Formats::M3dstypes::PMaterial3DS __fastcall GetMaterialByName(const System::UnicodeString Name);
  43. public:
  44. __fastcall virtual TMaterialList(TFile3DS* AOwner);
  45. __fastcall virtual ~TMaterialList();
  46. void __fastcall ClearList();
  47. __property int Count = {read=GetCount, nodefault};
  48. __property Formats::M3dstypes::PMaterial3DS Material[int Index] = {read=GetMaterial/*, default*/};
  49. __property Formats::M3dstypes::PMaterial3DS MaterialByName[const System::UnicodeString Name] = {read=GetMaterialByName};
  50. };
  51. #pragma pack(pop)
  52. #pragma pack(push,4)
  53. class PASCALIMPLEMENTATION TObjectList : public System::TObject
  54. {
  55. typedef System::TObject inherited;
  56. private:
  57. TFile3DS* FOwner;
  58. System::Classes::TList* FMeshList;
  59. System::Classes::TList* FOmniList;
  60. System::Classes::TList* FSpotList;
  61. System::Classes::TList* FCameraList;
  62. Formats::M3dstypes::PCamera3DS __fastcall GetCamera(int Index);
  63. int __fastcall GetCamCount();
  64. int __fastcall GetMeshObjectCount();
  65. Formats::M3dstypes::PMesh3DS __fastcall GetMesh(int Index);
  66. int __fastcall GetOmniCount();
  67. Formats::M3dstypes::PLight3DS __fastcall GetOmniLight(int Index);
  68. int __fastcall GetSpotCount();
  69. Formats::M3dstypes::PLight3DS __fastcall GetSpotLight(int Index);
  70. public:
  71. __fastcall virtual TObjectList(TFile3DS* AOwner);
  72. __fastcall virtual ~TObjectList();
  73. void __fastcall ClearLists();
  74. __property int CameraCount = {read=GetCamCount, nodefault};
  75. __property int MeshCount = {read=GetMeshObjectCount, nodefault};
  76. __property int OmniLightCount = {read=GetOmniCount, nodefault};
  77. __property int SpotLightCount = {read=GetSpotCount, nodefault};
  78. __property Formats::M3dstypes::PMesh3DS Mesh[int Index] = {read=GetMesh};
  79. __property Formats::M3dstypes::PCamera3DS Camera[int Index] = {read=GetCamera};
  80. __property Formats::M3dstypes::PLight3DS OmniLight[int Index] = {read=GetOmniLight};
  81. __property Formats::M3dstypes::PLight3DS SpotLight[int Index] = {read=GetSpotLight};
  82. };
  83. #pragma pack(pop)
  84. #pragma pack(push,4)
  85. class PASCALIMPLEMENTATION TKeyFramer : public System::TObject
  86. {
  87. typedef System::TObject inherited;
  88. public:
  89. Formats::M3dstypes::PKFMesh3DS operator[](int Index) { return this->MeshMotion[Index]; }
  90. private:
  91. TFile3DS* FOwner;
  92. System::Classes::TList* FMeshMotionList;
  93. System::Classes::TList* FOmniMotionList;
  94. System::Classes::TList* FSpotMotionList;
  95. System::Classes::TList* FCameraMotionList;
  96. Formats::M3dstypes::PKFAmbient3DS FAmbientMotion;
  97. Formats::M3dstypes::PKFAmbient3DS __fastcall GetAmbientMotion();
  98. Formats::M3dstypes::PKFCamera3DS __fastcall GetCameraMotion(int Index);
  99. int __fastcall GetCamMotionCount();
  100. Formats::M3dstypes::TKFSets3DS __fastcall GetKFSets();
  101. int __fastcall GetMeshMotionCount();
  102. Formats::M3dstypes::PKFMesh3DS __fastcall GetMeshMotion(int Index);
  103. int __fastcall GetOmniMotionCount();
  104. Formats::M3dstypes::PKFOmni3DS __fastcall GetOmniLightMotion(int Index);
  105. int __fastcall GetSpotMotionCount();
  106. Formats::M3dstypes::PKFSpot3DS __fastcall GetSpotLightMotion(int Index);
  107. public:
  108. __fastcall virtual TKeyFramer(TFile3DS* AOwner);
  109. __fastcall virtual ~TKeyFramer();
  110. void __fastcall ClearLists();
  111. __property Formats::M3dstypes::PKFAmbient3DS AmbientLightMotion = {read=GetAmbientMotion};
  112. __property int CameraMotionCount = {read=GetCamMotionCount, nodefault};
  113. __property int MeshMotionCount = {read=GetMeshMotionCount, nodefault};
  114. __property int OmniLightMotionCount = {read=GetOmniMotionCount, nodefault};
  115. __property int SpotLightMotionCount = {read=GetSpotMotionCount, nodefault};
  116. __property Formats::M3dstypes::PKFMesh3DS MeshMotion[int Index] = {read=GetMeshMotion/*, default*/};
  117. __property Formats::M3dstypes::PKFCamera3DS CameraMotion[int Index] = {read=GetCameraMotion};
  118. __property Formats::M3dstypes::PKFOmni3DS OmniLightMotion[int Index] = {read=GetOmniLightMotion};
  119. __property Formats::M3dstypes::TKFSets3DS Settings = {read=GetKFSets};
  120. __property Formats::M3dstypes::PKFSpot3DS SpotLightMotion[int Index] = {read=GetSpotLightMotion};
  121. };
  122. #pragma pack(pop)
  123. class PASCALIMPLEMENTATION TFile3DS : public System::TObject
  124. {
  125. typedef System::TObject inherited;
  126. private:
  127. Formats::M3dstypes::PNodeList FNodeList;
  128. Formats::M3dstypes::TDatabase3DS FDatabase;
  129. System::Classes::TStream* FStream;
  130. bool FOwnStream;
  131. TMaterialList* FMaterialList;
  132. TObjectList* FObjectList;
  133. TKeyFramer* FKeyFramer;
  134. System::UnicodeString FFileName;
  135. TLoadProgress FOnLoadProgress;
  136. Formats::M3dstypes::TAtmosphere3DS __fastcall GetAtmosphereData();
  137. Formats::M3dstypes::TBackground3DS __fastcall GetBackgroundData();
  138. Formats::M3dstypes::TDBType3DS __fastcall GetDatabaseType();
  139. Formats::M3dstypes::TMeshSet3DS __fastcall GetMeshSettings();
  140. Formats::M3dstypes::TViewport3DS __fastcall GetViewportData();
  141. Formats::M3dstypes::TReleaseLevel __fastcall GetDatabaseRelease();
  142. Formats::M3dstypes::TReleaseLevel __fastcall GetMeshRelease();
  143. protected:
  144. void __fastcall AddToNodeList(Formats::M3dstypes::PChunk3DS Chunk);
  145. void __fastcall AssignParentNames();
  146. void __fastcall CheckListNodeIDs();
  147. void __fastcall CreateDatabase();
  148. Formats::M3dstypes::PNodeList __fastcall FindNodeByID(short ID);
  149. short __fastcall GetChunkNodeID(Formats::M3dstypes::PChunk3DS Chunk);
  150. void __fastcall InitDatabase();
  151. bool __fastcall IsNode(System::Word Tag);
  152. void __fastcall KFAddParentName(Formats::M3dstypes::PChunk3DS Chunk, const Formats::M3dstypes::String3DS Name);
  153. void __fastcall MakeNode(Formats::M3dstypes::PNodeList &Node);
  154. void __fastcall ParseDatabase();
  155. void __fastcall ReadChildren(Formats::M3dstypes::PChunk3DS Parent);
  156. void __fastcall ReadXDataEntryChildren(Formats::M3dstypes::PChunk3DS Parent);
  157. void __fastcall ReleaseDatabase();
  158. void __fastcall ReleaseNodeList();
  159. void __fastcall ReleaseStream();
  160. public:
  161. __fastcall virtual TFile3DS();
  162. __fastcall virtual TFile3DS(const System::UnicodeString FileName);
  163. __fastcall virtual ~TFile3DS();
  164. void __fastcall ClearLists();
  165. void __fastcall DumpDataBase(System::Classes::TStrings* Strings, Formats::M3dstypes::TDumpLevel DumpLevel);
  166. void __fastcall LoadFromFile(const System::UnicodeString FileName);
  167. void __fastcall LoadFromStream(System::Classes::TStream* const aStream);
  168. System::Byte __fastcall ReadByte();
  169. unsigned __fastcall ReadCardinal();
  170. void __fastcall ReadChunkData(Formats::M3dstypes::PChunk3DS Chunk);
  171. void __fastcall ReadData(int Size, void * Data);
  172. double __fastcall ReadDouble();
  173. Formats::M3dstypes::TFace3DS __fastcall ReadFace();
  174. void __fastcall ReadHeader(System::Word &ChunkType, unsigned &ChunkSize);
  175. int __fastcall ReadInteger();
  176. Formats::M3dstypes::TKeyHeader3DS __fastcall ReadKeyHeader();
  177. Formats::M3dstypes::TPoint3DS __fastcall ReadPoint();
  178. short __fastcall ReadShort();
  179. float __fastcall ReadSingle();
  180. Formats::M3dstypes::PChar3DS __fastcall ReadString();
  181. Formats::M3dstypes::TTexVert3DS __fastcall ReadTexVert();
  182. Formats::M3dstypes::TTrackHeader3DS __fastcall ReadTrackHeader();
  183. System::Word __fastcall ReadWord();
  184. void __fastcall FinishHeader(unsigned StartPos, unsigned EndPos);
  185. void * __fastcall InitChunkData(Formats::M3dstypes::PChunk3DS Chunk);
  186. void __fastcall SeekChild(Formats::M3dstypes::PChunk3DS Chunk);
  187. void __fastcall Skip(int AValue);
  188. void __fastcall WriteByte(System::Byte AValue);
  189. void __fastcall WriteCardinal(unsigned AValue);
  190. void __fastcall WriteData(int Size, void * Data);
  191. void __fastcall WriteDouble(double AValue);
  192. void __fastcall WriteFace(const Formats::M3dstypes::TFace3DS &F);
  193. void __fastcall WriteFixedString(const Formats::M3dstypes::String3DS AValue, int Len);
  194. void __fastcall WriteHeader(System::Word ChunkType, unsigned ChunkSize);
  195. void __fastcall WriteInteger(int AValue);
  196. void __fastcall WriteKeyHeader(const Formats::M3dstypes::TKeyHeader3DS &K);
  197. void __fastcall WritePoint(const Formats::M3dstypes::TPoint3DS &P);
  198. void __fastcall WriteShort(short AValue);
  199. void __fastcall WriteSingle(float AValue);
  200. void __fastcall WriteString(const Formats::M3dstypes::String3DS AValue);
  201. void __fastcall WriteTexVertex(const Formats::M3dstypes::TTexVert3DS &T);
  202. void __fastcall WriteTrackHeader(const Formats::M3dstypes::TTrackHeader3DS &T);
  203. void __fastcall WriteWord(System::Word AValue);
  204. __property Formats::M3dstypes::TAtmosphere3DS Atmosphere = {read=GetAtmosphereData};
  205. __property Formats::M3dstypes::TBackground3DS Background = {read=GetBackgroundData};
  206. __property Formats::M3dstypes::TReleaseLevel DatabaseRelease = {read=GetDatabaseRelease, nodefault};
  207. __property Formats::M3dstypes::TDBType3DS DatabaseType = {read=GetDatabaseType, nodefault};
  208. __property System::UnicodeString FileName = {read=FFileName};
  209. __property TKeyFramer* KeyFramer = {read=FKeyFramer};
  210. __property TMaterialList* Materials = {read=FMaterialList};
  211. __property Formats::M3dstypes::TReleaseLevel MeshRelease = {read=GetMeshRelease, nodefault};
  212. __property Formats::M3dstypes::TMeshSet3DS MeshSettings = {read=GetMeshSettings};
  213. __property TObjectList* Objects = {read=FObjectList};
  214. __property Formats::M3dstypes::TViewport3DS Viewport = {read=GetViewportData};
  215. __property TLoadProgress OnLoadProgress = {read=FOnLoadProgress, write=FOnLoadProgress};
  216. };
  217. //-- var, const, procedure ---------------------------------------------------
  218. } /* namespace M3ds */
  219. } /* namespace Formats */
  220. #if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS_M3DS)
  221. using namespace Formats::M3ds;
  222. #endif
  223. #if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FORMATS)
  224. using namespace Formats;
  225. #endif
  226. #pragma pack(pop)
  227. #pragma option pop
  228. #pragma delphiheader end.
  229. //-- end unit ----------------------------------------------------------------
  230. #endif // Formats_m3DSHPP