#include <ModelInstance.h>
G3D::AABox iBound
Definition: ModelInstance.h:52
54 {
return ID == other.ID; }
uint32 ID
Definition: ModelInstance.h:48
157 check += fread(&spawn.flags,
sizeof(
uint32), 1, rf);
162 std::cout <<
"Error reading ModelSpawn!\n";
165 check += fread(&spawn.adtId,
sizeof(
uint16), 1, rf);
166 check += fread(&spawn.ID,
sizeof(
uint32), 1, rf);
167 check += fread(&spawn.iPos,
sizeof(
float), 3, rf);
168 check += fread(&spawn.iRot,
sizeof(
float), 3, rf);
169 check += fread(&spawn.iScale,
sizeof(
float), 1, rf);
174 check += fread(&bLow,
sizeof(
float), 3, rf);
175 check += fread(&bHigh,
sizeof(
float), 3, rf);
178 check += fread(&nameLen,
sizeof(
uint32), 1, rf);
179 if (check !=
uint32(has_bound ? 17 : 11))
181 std::cout <<
"Error reading ModelSpawn!\n";
187 std::cout <<
"Error reading ModelSpawn, file name too long!\n";
190 check = fread(nameBuff,
sizeof(
char), nameLen, rf);
191 if (check != nameLen)
193 std::cout <<
"Error reading ModelSpawn!\n";
196 spawn.name = std::string(nameBuff, nameLen);
uint32_t uint32
Definition: Define.h:150
uint16_t uint16
Definition: Define.h:151
Definition: ModelInstance.h:39
uint32_t uint32
Definition: g3dmath.h:168
T check(T value)
Definition: format.h:305
203 check += fwrite(&spawn.flags,
sizeof(
uint32), 1, wf);
204 check += fwrite(&spawn.adtId,
sizeof(
uint16), 1, wf);
205 check += fwrite(&spawn.ID,
sizeof(
uint32), 1, wf);
206 check += fwrite(&spawn.iPos,
sizeof(
float), 3, wf);
207 check += fwrite(&spawn.iRot,
sizeof(
float), 3, wf);
208 check += fwrite(&spawn.iScale,
sizeof(
float), 1, wf);
212 check += fwrite(&spawn.iBound.low(),
sizeof(float), 3, wf);
213 check += fwrite(&spawn.iBound.high(),
sizeof(float), 3, wf);
215 uint32 nameLen = spawn.name.length();
216 check += fwrite(&nameLen,
sizeof(
uint32), 1, wf);
217 if (check !=
uint32(has_bound ? 17 : 11))
return false;
218 check = fwrite(spawn.name.c_str(),
sizeof(char), nameLen, wf);
219 if (check != nameLen)
return false;
uint32_t uint32
Definition: Define.h:150
uint16_t uint16
Definition: Define.h:151
Definition: ModelInstance.h:39
uint32_t uint32
Definition: g3dmath.h:168
T check(T value)
Definition: format.h:305
uint16 VMAP::ModelSpawn::adtId |
uint32 VMAP::ModelSpawn::flags |
float VMAP::ModelSpawn::iScale |
std::string VMAP::ModelSpawn::name |
The documentation for this class was generated from the following files: