no try_calc
This commit is contained in:
parent
e0e635e083
commit
6ee4c8014a
@ -58,7 +58,7 @@ struct Header{
|
|||||||
priming:u64,
|
priming:u64,
|
||||||
/// uuid for this file
|
/// uuid for this file
|
||||||
resource:u128,
|
resource:u128,
|
||||||
#[bw(try_calc(u32::try_from(block_location.len()-1)))]
|
//don't need try_calc: the struct will force field initialization anyways and it can be calculated there
|
||||||
block_count:u32,
|
block_count:u32,
|
||||||
#[br(count=block_count+1)]
|
#[br(count=block_count+1)]
|
||||||
block_location:Vec<u64>,
|
block_location:Vec<u64>,
|
||||||
|
@ -89,7 +89,7 @@ struct BvhNode{
|
|||||||
#[binrw]
|
#[binrw]
|
||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
struct Region{
|
struct Region{
|
||||||
#[bw(try_calc(u32::try_from(models.len())))]
|
//consider including a bvh in the region instead of needing to rebalance the physics bvh on the fly
|
||||||
model_count:u32,
|
model_count:u32,
|
||||||
#[br(count=model_count)]
|
#[br(count=model_count)]
|
||||||
models:Vec<model::Model>,
|
models:Vec<model::Model>,
|
||||||
|
Loading…
Reference in New Issue
Block a user