Struct evosim::blob::block::PhysiBlockBundle
source · pub struct PhysiBlockBundle {Show 17 fields
pub sprite: SpriteBundle,
pub collider: Collider,
pub rigbody: RigidBody,
pub event_flag: ActiveEvents,
pub depth: BlockDepth,
pub velocity: Velocity,
pub massprop: ColliderMassProperties,
pub friction: Friction,
pub restitution: Restitution,
pub damping: Damping,
pub ex_force: ExternalForce,
pub ex_impulse: ExternalImpulse,
pub anchors: BlockAnchors,
pub parent_anchor: ParentAnchor,
pub neuron_id: NeuronId,
pub type_falg: ColliderFlag,
pub joint_info: JointInfo,
}
Expand description
PhysiBlockBundle is the smallest unit in this simulation. It is the cubiod that construct blobs.
Fields§
§sprite: SpriteBundle
§collider: Collider
§rigbody: RigidBody
§event_flag: ActiveEvents
§depth: BlockDepth
§velocity: Velocity
§massprop: ColliderMassProperties
§friction: Friction
§restitution: Restitution
§damping: Damping
§ex_force: ExternalForce
§ex_impulse: ExternalImpulse
§anchors: BlockAnchors
§parent_anchor: ParentAnchor
§neuron_id: NeuronId
neuron id
id=0 is the default id, means random neuron output
type_falg: ColliderFlag
§joint_info: JointInfo
Implementations§
source§impl PhysiBlockBundle
impl PhysiBlockBundle
pub fn from_xy_dx_dy(x: f32, y: f32, dx: f32, dy: f32) -> Self
pub fn set_color(&mut self, color: Color)
pub fn with_color(self, color: Color) -> Self
pub fn with_density(self, density: f32) -> Self
pub fn with_depth(self, depth: u32) -> Self
pub fn with_nn_id(self, nn_id: usize, parent_nn_id: Option<usize>) -> Self
pub fn with_blob(self, blob_id: u32) -> Self
pub fn with_parent_anchor(self, parent_anchor: usize) -> Self
Trait Implementations§
source§impl Clone for PhysiBlockBundle
impl Clone for PhysiBlockBundle
source§fn clone(&self) -> PhysiBlockBundle
fn clone(&self) -> PhysiBlockBundle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for PhysiBlockBundle
impl Default for PhysiBlockBundle
impl Bundle for PhysiBlockBundle
impl DynamicBundle for PhysiBlockBundle
Auto Trait Implementations§
impl !RefUnwindSafe for PhysiBlockBundle
impl Send for PhysiBlockBundle
impl Sync for PhysiBlockBundle
impl Unpin for PhysiBlockBundle
impl !UnwindSafe for PhysiBlockBundle
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere U: ShaderType, &'a T: for<'a> Into<U>,
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§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.§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.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World]source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.