VOXELFORMAT: save vxm version 9

master
Martin Gerhardy 2022-05-21 14:14:31 +02:00
parent 1d830a1058
commit 4db3b861ca
1 changed files with 9 additions and 1 deletions

View File

@ -70,7 +70,7 @@ bool VXMFormat::saveGroups(const SceneGraph& sceneGraph, const core::String &fil
return false;
}
core::ScopedPtr<voxel::RawVolume> scopedPtr(merged.first);
wrapBool(stream.writeUInt32(FourCC('V','X','M','8')));
wrapBool(stream.writeUInt32(FourCC('V','X','M','9')));
const glm::vec3 pivot(0.5f);
const voxel::Region& region = merged.first->region();
@ -89,6 +89,14 @@ bool VXMFormat::saveGroups(const SceneGraph& sceneGraph, const core::String &fil
wrapBool(stream.writeFloat(pivot.y));
wrapBool(stream.writeFloat(pivot.z));
wrapBool(stream.writeBool(false));
// has surface - set to false otherwise
// the following data is needed:
// 3 int start
// 3 int end
// 1 int normal possible values: [0,1][2,3][4,5]
// followed by surface width * surface height bytes
wrapBool(stream.writeFloat(0.0f));
wrapBool(stream.writeFloat(0.0f));
wrapBool(stream.writeFloat(0.0f));