pub struct SolverSet {
pub body_sims: Vec<BodySim>,
pub body_states: Vec<BodyState>,
pub joint_sims: Vec<JointSim>,
pub contact_indices: Vec<i32>,
pub island_sims: Vec<IslandSim>,
pub set_index: i32,
}Expand description
Solver set data for contiguous storage of sims.
Sets used:
- static set for all static bodies and joints between static bodies
- active set for all active bodies with body states (no contacts or joints)
- disabled set for disabled bodies and their joints
- all further sets are sleeping island sets along with their contacts and joints
Purpose: high memory locality. https://www.youtube.com/watch?v=nZNd5FjSquk (b3SolverSet)
Fields§
§body_sims: Vec<BodySim>Body array. Empty for unused set.
body_states: Vec<BodyState>Body state only exists for active set
joint_sims: Vec<JointSim>Sleeping/disabled joints. Empty for static/active set.
contact_indices: Vec<i32>All contacts for sleeping sets; non-touching contacts for the awake set. Empty for static and disabled sets. (C: b3Array(int) contactIndices)
island_sims: Vec<IslandSim>Awake set has an array of islands. Sleeping sets normally have a single island; joints between sleeping sets cause merges with multiple islands. Static and disabled sets have no islands.
set_index: i32Aligns with World::solver_set_id_pool.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SolverSet
impl RefUnwindSafe for SolverSet
impl Send for SolverSet
impl Sync for SolverSet
impl Unpin for SolverSet
impl UnsafeUnpin for SolverSet
impl UnwindSafe for SolverSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more