pub struct PhysicsDebugger {
pub flags: PhysicsDebugFlags,
pub bodies: HashMap<PhysBodyId, PhysBodyState>,
pub contacts: Vec<ContactPoint>,
pub constraints: Vec<ConstraintViz>,
pub force_fields: Vec<ForceFieldViz>,
pub cloth_meshes: Vec<ClothMeshViz>,
pub ik_chains: Vec<IkChainViz>,
pub particles: ParticleDebugViz,
pub stats: PhysicsStats,
/* private fields */
}Fields§
§flags: PhysicsDebugFlags§bodies: HashMap<PhysBodyId, PhysBodyState>§contacts: Vec<ContactPoint>§constraints: Vec<ConstraintViz>§force_fields: Vec<ForceFieldViz>§cloth_meshes: Vec<ClothMeshViz>§ik_chains: Vec<IkChainViz>§particles: ParticleDebugViz§stats: PhysicsStatsImplementations§
Source§impl PhysicsDebugger
impl PhysicsDebugger
pub fn new() -> Self
pub fn register_body(&mut self, body: PhysBodyState)
pub fn update_body(&mut self, id: PhysBodyId, pos: Vec3, rot: Quat, vel: Vec3)
pub fn set_contacts(&mut self, contacts: Vec<ContactPoint>)
pub fn set_constraints(&mut self, constraints: Vec<ConstraintViz>)
pub fn add_force_field(&mut self, ff: ForceFieldViz)
pub fn add_cloth(&mut self, cloth: ClothMeshViz)
pub fn add_ik_chain(&mut self, chain: IkChainViz)
Sourcepub fn build_primitives(&mut self)
pub fn build_primitives(&mut self)
Rebuild the debug primitive buffer
Sourcepub fn build_line_buffer(&self) -> Vec<(Vec3, Vec3, Vec4)>
pub fn build_line_buffer(&self) -> Vec<(Vec3, Vec3, Vec4)>
Expand primitives into flat vertex buffer for GPU
pub fn primitives(&self) -> &[DebugPrim]
pub fn clear(&mut self)
Trait Implementations§
Source§impl Debug for PhysicsDebugger
impl Debug for PhysicsDebugger
Auto Trait Implementations§
impl Freeze for PhysicsDebugger
impl RefUnwindSafe for PhysicsDebugger
impl Send for PhysicsDebugger
impl Sync for PhysicsDebugger
impl Unpin for PhysicsDebugger
impl UnsafeUnpin for PhysicsDebugger
impl UnwindSafe for PhysicsDebugger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.