Skip to content

Commit

Permalink
Put static functions in dodeca.rs in a module
Browse files Browse the repository at this point in the history
  • Loading branch information
inthar-raven committed Apr 26, 2024
1 parent e43d176 commit 377ab02
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 199 deletions.
3 changes: 1 addition & 2 deletions client/src/graphics/voxels/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use crate::{
Config, Loader, Sim,
};
use common::{
dodeca,
dodeca::Vertex,
graph::NodeId,
lru_slab::SlotId,
Expand Down Expand Up @@ -142,7 +141,7 @@ impl Voxels {
for &(node, ref node_transform) in &nodes {
let node_to_view = local_to_view * node_transform;
let origin = node_to_view * math::origin();
if !frustum_planes.contain(&origin, dodeca::BOUNDING_SPHERE_RADIUS) {
if !frustum_planes.contain(&origin, common::dodeca::BOUNDING_SPHERE_RADIUS) {
// Don't bother generating or drawing chunks from nodes that are wholly outside the
// frustum.
continue;
Expand Down
3 changes: 2 additions & 1 deletion common/src/cursor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::OnceLock;

use crate::dodeca::{Side, Vertex, SIDE_COUNT};
use crate::dodeca::SIDE_COUNT;
use crate::dodeca::{Side, Vertex};
use crate::graph::{Graph, NodeId};
use crate::node::ChunkId;

Expand Down
Loading

0 comments on commit 377ab02

Please sign in to comment.