Merge branch 'master' into infinite_fall_memory

Fix merge conflict resulting from "axii" spelling correction
This commit is contained in:
Robert Hrusecky
2020-10-29 18:09:41 -05:00
76 changed files with 2756 additions and 819 deletions

View File

@@ -337,7 +337,7 @@ impl SAPAxis {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
struct SAPRegion {
axii: [SAPAxis; DIM],
axes: [SAPAxis; DIM],
existing_proxies: BitVec,
#[cfg_attr(feature = "serde-serialize", serde(skip))]
to_insert: Vec<usize>, // Workspace
@@ -347,14 +347,14 @@ struct SAPRegion {
impl SAPRegion {
pub fn new(bounds: AABB<f32>) -> Self {
let axii = [
let axes = [
SAPAxis::new(bounds.mins.x, bounds.maxs.x),
SAPAxis::new(bounds.mins.y, bounds.maxs.y),
#[cfg(feature = "dim3")]
SAPAxis::new(bounds.mins.z, bounds.maxs.z),
];
SAPRegion {
axii,
axes,
existing_proxies: BitVec::new(),
to_insert: Vec::new(),
update_count: 0,
@@ -394,14 +394,14 @@ impl SAPRegion {
// Update endpoints.
let mut deleted = 0;
for dim in 0..DIM {
self.axii[dim].update_endpoints(dim, proxies, reporting);
deleted += self.axii[dim].delete_out_of_bounds_proxies(&mut self.existing_proxies);
self.axes[dim].update_endpoints(dim, proxies, reporting);
deleted += self.axes[dim].delete_out_of_bounds_proxies(&mut self.existing_proxies);
}
if deleted > 0 {
self.proxy_count -= deleted;
for dim in 0..DIM {
self.axii[dim].delete_out_of_bounds_endpoints(&self.existing_proxies);
self.axes[dim].delete_out_of_bounds_endpoints(&self.existing_proxies);
}
}
@@ -411,9 +411,9 @@ impl SAPRegion {
if !self.to_insert.is_empty() {
// Insert new proxies.
for dim in 1..DIM {
self.axii[dim].batch_insert(dim, &self.to_insert, proxies, None);
self.axes[dim].batch_insert(dim, &self.to_insert, proxies, None);
}
self.axii[0].batch_insert(0, &self.to_insert, proxies, Some(reporting));
self.axes[0].batch_insert(0, &self.to_insert, proxies, Some(reporting));
self.to_insert.clear();
// In the rare event that all proxies leave this region in the next step, we need an