Struct lodtree::coords::OctVec [−][src]
Expand description
A Lod Vector for use in an octree It subdivides into 8 children of equal size
Fields
x: u64
x position in the octree
y: u64
y position in the octree
z: u64
z position in the octree
depth: u8
lod depth in the octree this is limited, hence we use u8
Implementations
creates a new vector from the raw x and y coords
Args
x
The x position in the tree. Allowed range scales with the depth (doubles as the depth increases by one)y
The y position in the tree. Allowed range scales with the depth (doubles as the depth increases by one)z
The z position in the tree. Allowed range scales with the depth (doubles as the depth increases by one)depth
the lod depth the coord is at. This is soft limited at roughly 60, and the tree might behave weird if it gets higher
creates a new vector from floating point coords mapped so that (0, 0, 0) is the front bottom left corner and (1, 1, 1) is the back top right
Args
x
x coord of the float vector, from 0 to 1y
y coord of the float vector, from 0 to 1z
z coord of the float vector, from 0 to 1depth
The lod depth of the coord
converts the coord into float coords Returns a tuple of (x: f64, y: f64, z: f64) to represent the coordinates, at the front bottom left corner
Trait Implementations
get the number of child nodes a node can have in the tree
gets one of the child node position of this node, defined by it’s index
wether the node can subdivide, compared to another node and the required detail. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for OctVec
impl UnwindSafe for OctVec
Blanket Implementations
Mutably borrows from an owned value. Read more