Class MetadataBinaryIO
- 32 bits (int) with the number of nodes, nNodes repeat the following nNodes times (for each node) - 32 bits (int) - pageId - The ID of the octant, or octree node - 32 bits (float) - centreX - The x component of the centre - 32 bits (float) - centreY - The y component of the centre - 32 bits (float) - centreZ - The z component of the centre - 32 bits (float) - sx - The half-size in x - 32 bits (float) - sy - The half-size in y - 32 bits (float) - sz - The half-size in z - 32 bits * 8 (int) - childrenIds - 8 integers with the ids of the children. If no child in the given position, the id is negative. - 32 bits (int) - depth - The level (depth) of the node in the tree - 32 bits (int) - nObjects - The cumulative number of objects of this node and its descendants - 32 bits (int) - ownObjects - The number of objects of this node - 32 bits (int) - childCount - The number of children nodes
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReads the metadata into an octree nodereadMetadata
(InputStream in, LoadStatus status) Reads the metadata into an octree nodereadMetadataMapped
(String file) readMetadataMapped
(String file, LoadStatus status) void
toList
(OctreeNode node, List<OctreeNode> nodes) void
writeMetadata
(OctreeNode root, OutputStream out) Writes the metadata of the given octree node and its descendants to the given output stream in binary.
-
Field Details
-
nodesMap
-
-
Constructor Details
-
MetadataBinaryIO
public MetadataBinaryIO()
-
-
Method Details
-
readMetadata
Reads the metadata into an octree node- Parameters:
in
-- Returns:
- The octree node
-
readMetadata
Reads the metadata into an octree node- Parameters:
in
- Input stream- Returns:
- The octree node
-
readMetadataMapped
-
readMetadataMapped
-
writeMetadata
Writes the metadata of the given octree node and its descendants to the given output stream in binary.- Parameters:
root
-out
-
-
toList
-