![]() |
RigsofRods
2023.09
Soft-body Physics Simulation
|
Enables saving and loading flexbodies from/to binary file. More...
#include <FlexFactory.h>
Data Structures | |
| struct | FlexBodyFileMetadata |
Public Member Functions | |
| FlexBodyFileIO () | |
| std::vector< FlexBody * > & | GetList () |
| void | AddItemToSave (FlexBody *fb) |
| FlexBodyCacheData * | GetLoadedItem (unsigned index) |
| ResultCode | SaveFile () |
| ResultCode | LoadFile () |
Static Public Attributes | |
| static const char * | SIGNATURE = "RoR FlexBody" |
| static const unsigned int | FILE_FORMAT_VERSION = 1 |
Private Member Functions | |
| void | OpenFile (const char *fopen_mode) |
| void | WriteToFile (void *source, size_t length) |
| void | ReadFromFile (void *dest, size_t length) |
| void | CloseFile () |
| void | WriteSignature () |
| void | ReadAndCheckSignature () |
| void | WriteMetadata () |
| void | ReadMetadata (FlexBodyFileMetadata *meta) |
| void | WriteFlexbodyHeader (FlexBody *flexbody) |
| void | ReadFlexbodyHeader (FlexBodyCacheData *flexbody) |
| void | WriteFlexbodyLocatorList (FlexBody *flexbody) |
| void | ReadFlexbodyLocatorList (FlexBodyCacheData *flexbody) |
| void | WriteFlexbodyNormalsBuffer (FlexBody *flexbody) |
| void | ReadFlexbodyNormalsBuffer (FlexBodyCacheData *flexbody) |
| void | WriteFlexbodyPositionsBuffer (FlexBody *flexbody) |
| void | ReadFlexbodyPositionsBuffer (FlexBodyCacheData *flexbody) |
| void | WriteFlexbodyColorsBuffer (FlexBody *flexbody) |
| void | ReadFlexbodyColorsBuffer (FlexBodyCacheData *flexbody) |
Private Attributes | |
| std::vector< FlexBody * > | m_items_to_save |
| std::vector< FlexBodyCacheData > | m_loaded_items |
| FILE * | m_file |
| unsigned int | m_fileformat_version |
| int | m_cache_entry_number |
Enables saving and loading flexbodies from/to binary file.
FILE STRUCTURE:
Definition at line 97 of file FlexFactory.h.
Definition at line 100 of file FlexFactory.h.
| FlexBodyFileIO::FlexBodyFileIO | ( | ) |
Definition at line 403 of file FlexFactory.cpp.
|
inline |
Definition at line 118 of file FlexFactory.h.
|
inlineprivate |
Definition at line 133 of file FlexFactory.h.
| std::vector<FlexBody*>& RoR::FlexBodyFileIO::GetList | ( | ) |
|
inline |
Definition at line 119 of file FlexFactory.h.
| FlexBodyFileIO::ResultCode FlexBodyFileIO::LoadFile | ( | ) |
Definition at line 361 of file FlexFactory.cpp.
|
private |
Definition at line 306 of file FlexFactory.cpp.
|
private |
Definition at line 181 of file FlexFactory.cpp.
|
private |
Definition at line 292 of file FlexFactory.cpp.
|
private |
Definition at line 229 of file FlexFactory.cpp.
|
private |
Definition at line 242 of file FlexFactory.cpp.
|
private |
Definition at line 257 of file FlexFactory.cpp.
|
private |
Definition at line 273 of file FlexFactory.cpp.
|
private |
Definition at line 165 of file FlexFactory.cpp.
|
private |
Definition at line 202 of file FlexFactory.cpp.
| FlexBodyFileIO::ResultCode FlexBodyFileIO::SaveFile | ( | ) |
Definition at line 322 of file FlexFactory.cpp.
|
private |
Definition at line 283 of file FlexFactory.cpp.
|
private |
Definition at line 209 of file FlexFactory.cpp.
|
private |
Definition at line 236 of file FlexFactory.cpp.
|
private |
Definition at line 251 of file FlexFactory.cpp.
|
private |
Definition at line 267 of file FlexFactory.cpp.
|
private |
Definition at line 192 of file FlexFactory.cpp.
|
private |
Definition at line 175 of file FlexFactory.cpp.
|
private |
Definition at line 155 of file FlexFactory.cpp.
|
static |
Definition at line 113 of file FlexFactory.h.
|
private |
Definition at line 160 of file FlexFactory.h.
|
private |
Definition at line 158 of file FlexFactory.h.
|
private |
Definition at line 159 of file FlexFactory.h.
|
private |
Definition at line 156 of file FlexFactory.h.
|
private |
Definition at line 157 of file FlexFactory.h.
|
static |
Definition at line 112 of file FlexFactory.h.
1.8.17