strafe-client/src/map.rs

44 lines
915 B
Rust
Raw Normal View History

2024-01-16 03:09:34 +00:00
pub enum Error{
}
/* block types
BLOCK_MAP_HEADER:
DefaultStyleInfo style_info
//bvh goes here
u64 num_nodes
//node 0 parent node is implied to be None
for node_id in 1..num_nodes{
u64 parent_node
}
u64 num_spacial_blocks
for spacial_block_id in 0..num_spacial_blocks{
u64 node_id
u64 block_id //data block
Aabb block_extents
}
//ideally spacial blocks are sorted from distance to start zone
//texture blocks are inserted before the first spacial block they are used in
BLOCK_MAP_RESOURCE:
//an individual one of the following:
- model (IndexedModel)
- shader (compiled SPIR-V)
- image (JpegXL)
- sound (Opus)
- video (AV1)
- animation (Trey thing)
BLOCK_MAP_OBJECT:
//an individual one of the following:
- model instance
- located resource
//for a list of resources, parse the object.
//alternatively, BLOCK_MAP_REGION lists a group of objects to be decoded all at once
*/
pub struct Map{
//
}