SoLDMWriterWriteSubVolume Method (SbBox3i32, SoBufferObject, Boolean, Boolean) |
Writes the data contained in the specified subVolume into the LDM file.
Namespace: OIV.LDM.Converters
public int WriteSubVolume( SbBox3i32 subVolume, SoBufferObject data, bool doLowerResolution, bool doOverlappingTiles )
All tiles that are completely inside the subvolume are written into the file overwriting any already existing data for those tiles. (Overwritten values are still taken into account for the histogram). All tiles that are partially inside the subvolume are also written into the file. If a partially inside tile already exists in the file(perhaps from a previous call to writeSubVolume), that tile will first be read back from the file, updated with the new voxel values, then re-written into the file.
If doLowerResolution is true (default), builds the lower resolution tiles immediately, if possible. The converter needs 8 neighbors tiles of max resolution to build one of resolution max-1 low resolution. So if the given subVolume does not contain those 8 neighbors, the low resolution tile cannot be built during this call. It's then important to notice that a call to writeSubVolume with doLowerResolution set to true and a call to finish(false) can potentially result in missing low resolution tile in the generated LDM file. Otherwise, this can be significantly faster than building them in the OIV.LDM.Converters.SoLDMWriter.Finish(System.Boolean) method, because the full resolution data is already in memory. If doLowerResolution is false, the lower resolution tiles are not generated during this call, but can still be generated later if the OIV.LDM.Converters.SoLDMWriter.Finish(System.Boolean) method is called with doMultiResolution set to true.
doOverlappingTiles is no longer used and ignored since Open Inventor 9.0
Returns a result code defined by the enum OIV.LDM.Converters.SoConverter.ConverterErrors (zero if successful).